Class BitwardsSchedule

java.lang.Object
fi.bitwards.service.BitwardsSchedule

public class BitwardsSchedule extends Object
Represents the schedule when the end user has access to a particular resource.
  • Field Details

  • Method Details

    • getRules

      public List<BitwardsSchedule.Rule> 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

      public List<BitwardsSchedule.ExceptionDay> 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

      public boolean hasAccess(Date date)
      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