Package fi.bitwards.service
Class BitwardsSchedule
java.lang.Object
fi.bitwards.service.BitwardsSchedule
Represents the schedule when the end user has access to a particular resource.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classRepresents an exception day with alternative access times, which overrule regular rules.static final classRepresent a single rule specifying access times on weekday basis. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionReturns list schedule exception days.getRules()Get the list of schedule rules.booleanCheck if at a given time access will granted based on this BitwardsSchedule instance.
-
Field Details
-
TAG
- See Also:
-
-
Method Details
-
getRules
Get the list of schedule rules. Each rule represents a set of weekdays and times when end user has access to the resource.- Returns:
- list of rules; returns null if there are no rules in this schedule
-
getExceptionDays
Returns list schedule exception days. Each exception day represent a date and times when end user has access to the resource. Exception days overrule the rules.- Returns:
- list of exception days, returns null if there are no exception days in this schedule
-
hasAccess
Check if at a given time access will granted based on this BitwardsSchedule instance.- Parameters:
date- the date at which time the check is to be done- Returns:
- true if access will be granted at the given time, false otherwise
-