Interface ScheduleSlot

All Superinterfaces:
Browsable, Containable, Extensible, Identifiable, OsidObject

public interface ScheduleSlot extends OsidObject, Containable

A ScheduleSlot describes a repeating time slot. The time slot can be defined as a fixed time interval or be defined on a weekly interval specifying the days of the week.

  • Method Details

    • getScheduleSlotIds

      IdList getScheduleSlotIds()
      Gets the Ids of the schedule slots included inside this one.
      Returns:
      the schedules slot Ids
      Compliance:
      mandatory - This method must be implemented.
    • getScheduleSlots

      ScheduleSlotList getScheduleSlots() throws OperationFailedException
      Gets the schedule slots included inside this one.
      Returns:
      the schedule slots
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • hasWeeklyInterval

      boolean hasWeeklyInterval()
      Tests if this schedule has a weekly interval. If true, hasFixedInterval() must be false.
      Returns:
      true if there is a weekly interval, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getWeekdays

      long[] getWeekdays()
      Gets the weekdays of the schedule. On a Gregorian calendar, Sunday is zero.
      Returns:
      the weekdays
      Throws:
      IllegalStateException - hasWeeklyInterval() is false
      Compliance:
      mandatory - This method must be implemented.
    • hasWeekOfMonthInterval

      boolean hasWeekOfMonthInterval()
      Tests if this schedule has a weekly interval based on the week of the month. This method must be false if hasWeeklyInterval() is false.
      Returns:
      true if there is a week of month specified, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getWeeklyInterval

      long getWeeklyInterval()
      Gets the number of weeks of the interval. 1 is every week. 2 is every other week. -1 is every week back in time.
      Returns:
      the week interval
      Throws:
      IllegalStateException - hasWeekdlyInterval() is false or hasWeekofMonthInterval() is true
      Compliance:
      mandatory - This method must be implemented.
    • getWeekOfMonth

      long getWeekOfMonth()
      Gets the week of the month for the interval. 1 is the first week of the month. -1 is the last week of the month. 0 is invalid.
      Returns:
      the week interval
      Throws:
      IllegalStateException - hasWeeklyInterval() is false or hasWeekofMonthInterval() is false
      Compliance:
      mandatory - This method must be implemented.
    • getWeekdayTime

      Time getWeekdayTime()
      Gets the time of this recurring schedule.
      Returns:
      the time
      Throws:
      IllegalStateException - hasWeeklyInterval() is false
      Compliance:
      mandatory - This method must be implemented.
    • hasFixedInterval

      boolean hasFixedInterval()
      Tests if this schedule has a fixed time interval.
      Returns:
      true if there is a fixed time interval, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getFixedInterval

      Duration getFixedInterval()
      Gets the repeating interval.
      Returns:
      the interval
      Throws:
      IllegalStateException - hasFixedInterval() is false
      Compliance:
      mandatory - This method must be implemented.
    • getDuration

      Duration getDuration()
      Gets the duration of the schedule slot.
      Returns:
      the duration
      Compliance:
      mandatory - This method must be implemented.
    • getScheduleSlotRecord

      ScheduleSlotRecord getScheduleSlotRecord(Type scheduleSlotRecordType) throws OperationFailedException
      Gets the schedule slot record corresponding to the given ScheduleSlot record Type. This method is used to retrieve an object implementing the requested record. The scheduleSlotRecordType may be the Type returned in getRecordTypes() or any of its parents in a Type hierarchy where hasRecordType(scheduleSlotRecordType) is true.
      Parameters:
      scheduleSlotRecordType - the type of the record to retrieve
      Returns:
      the schedule slot record
      Throws:
      NullArgumentException - scheduleSlotRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(scheduleSlotRecordType) is false
      Compliance:
      mandatory - This method must be implemented.