Interface OffsetEvent

All Superinterfaces:
Browsable, Extensible, Identifiable, Operable, OsidObject, OsidRule

public interface OffsetEvent extends OsidRule

An OffsetEvent describes events that are relative to other events. OffsetEvents may have a fixed or rubber start date as well as a fixed or rubber end date. A rubber start and end date has a variable duration based on the starting and ending milestones. An OffsetEvent with a fixed start date and a fixed duration behaves like a normal fixed Event.

Creating an OffsetEvent produces an Event that is based on these offset rules.

  • Method Details

    • hasFixedStartTime

      boolean hasFixedStartTime()
      Tests if this offset event is based on a fixed start time.
      Returns:
      true if this offset is based on a fixed start time, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getFixedStartTime

      DateTime getFixedStartTime()
      Gets the fixed start time for this event.
      Returns:
      the fixed start time
      Throws:
      IllegalStateException - hasFixedStartIme() is false
      Compliance:
      mandatory - This method must be implemented.
    • getStartReferenceEventId

      Id getStartReferenceEventId()
      Gets the Event Id to which the start of this event is offset.
      Returns:
      the relative event Id
      Throws:
      IllegalStateException - hasFixedStartTime() is true
      Compliance:
      mandatory - This method must be implemented.
    • getStartReferenceEvent

      Event getStartReferenceEvent() throws OperationFailedException
      Gets the Event to which the start of this event is offset.
      Returns:
      the relative event
      Throws:
      IllegalStateException - hasFixedStartTime() is true
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • hasFixedStartOffset

      boolean hasFixedStartOffset()
      Tests if this offset start time based on a fixed period of time.
      Returns:
      true if this offset is based on a fixed period of time, false otherwise
      Throws:
      IllegalStateException - hasFixedStartTime() is true
      Compliance:
      mandatory - This method must be implemented.
    • getFixedStartOffset

      Duration getFixedStartOffset()
      Gets the fixed starting time offset.
      Returns:
      the offset
      Throws:
      IllegalStateException - hasFixedStartOffset() is false
      Compliance:
      mandatory - This method must be implemented.
    • hasRelativeWeekdayStartOffset

      boolean hasRelativeWeekdayStartOffset()
      Tests if this starting time offset is a based on a relative weekday.
      Returns:
      true if this offset is based on a relative weekday, false otherwise
      Throws:
      IllegalStateException - hasFixedStartOffset() is true
      Compliance:
      mandatory - This method must be implemented.
    • getRelativeWeekdayStartOffset

      long getRelativeWeekdayStartOffset()
      Gets the starting offset as the nth weekday from the relative event. Zero is no offset.
      Returns:
      the offset
      Throws:
      IllegalStateException - hasRelativeWeekdayStartOffset() is false
      Compliance:
      mandatory - This method must be implemented.
    • getRelativeStartWeekday

      long getRelativeStartWeekday()
      Gets the starting weekday number. The weekday is based on the calendar type. On the Gregorian calendar, 0 is Sunday.
      Returns:
      the weekday number
      Throws:
      IllegalStateException - hasRelativeWeekdayStartOffset() is false
      Compliance:
      mandatory - This method must be implemented.
    • hasFixedDuration

      boolean hasFixedDuration()
      Tests if this offset event is based on a fixed duration.
      Returns:
      true if this offset is based on a fixed duration, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getFixedDuration

      Duration getFixedDuration(DateTimeResolution units)
      Gets the duration of the offset event.
      Parameters:
      units - the units of the duration
      Returns:
      the duration
      Throws:
      IllegalStateException - hasFixedDuration() is false
      NullArgumentException - units is null
      Compliance:
      mandatory - This method must be implemented.
    • getEndReferenceEventId

      Id getEndReferenceEventId()
      Gets the Event Id to which the end of this event is offset.
      Returns:
      the relative event Id
      Throws:
      IllegalStateException - hasFixedDuration() is true
      Compliance:
      mandatory - This method must be implemented.
    • getEndReferenceEvent

      Event getEndReferenceEvent() throws OperationFailedException
      Gets the Event to which the end of this event is offset.
      Returns:
      the relative event
      Throws:
      IllegalStateException - hasFixedDuration() is true
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • hasFixedEndOffset

      boolean hasFixedEndOffset()
      Tests if this offset end time based on a fixed period of time.
      Returns:
      true if this offset is based on a fixed period of time, false otherwise
      Throws:
      IllegalStateException - hasFixedDuration() is true
      Compliance:
      mandatory - This method must be implemented.
    • getFixedEndOffset

      Duration getFixedEndOffset()
      Gets the fixed ending time offset.
      Returns:
      the offset
      Throws:
      IllegalStateException - hasFixedEndOffset() is false
      Compliance:
      mandatory - This method must be implemented.
    • hasRelativeWeekdayEndOffset

      boolean hasRelativeWeekdayEndOffset()
      Tests if this ending time offset is a based on a relative weekday.
      Returns:
      true if this offset is based on a relative weekday, false otherwise
      Throws:
      IllegalStateException - hasFixedEndOffset() is true
      Compliance:
      mandatory - This method must be implemented.
    • getRelativeWeekdayEndOffset

      long getRelativeWeekdayEndOffset()
      Gets the ending offset as the nth weekday from the relative event. Zero is no offset.
      Returns:
      the offset
      Throws:
      IllegalStateException - hasRelativeWeekdayEndOffset() is false
      Compliance:
      mandatory - This method must be implemented.
    • getRelativeEndWeekday

      long getRelativeEndWeekday()
      Gets the ending weekday number. The weekday is based on the calendar type. On the Gregorian calendar, 0 is Sunday.
      Returns:
      the weekday number
      Throws:
      IllegalStateException - hasRelativeWeekdayEndOffset() is false
      Compliance:
      mandatory - This method must be implemented.
    • getLocationDescription

      DisplayText getLocationDescription()
      Gets a descriptive location.
      Returns:
      the location
      Compliance:
      mandatory - This method must be implemented.
    • hasLocation

      boolean hasLocation()
      Tests if a location is associated with this event.
      Returns:
      true if there is an associated location, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getLocationId

      Id getLocationId()
      Gets the location Id.
      Returns:
      a location Id
      Throws:
      IllegalStateException - hasLocation() is false
      Compliance:
      mandatory - This method must be implemented.
    • getLocation

      Location getLocation() throws OperationFailedException
      Gets the Location.
      Returns:
      a location
      Throws:
      IllegalStateException - hasLocation() is false
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • hasSponsors

      boolean hasSponsors()
      Tests if a sponsor is associated with this event.
      Returns:
      true if there is an associated sponsor. false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getSponsorIds

      IdList getSponsorIds()
      Gets the Id of the event sponsors.
      Returns:
      the sponsor Ids
      Throws:
      IllegalStateException - hasSponsors() is false
      Compliance:
      mandatory - This method must be implemented.
    • getSponsors

      Gets the Sponsors.
      Returns:
      the sponsors
      Throws:
      IllegalStateException - hasSponsors() is false
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getOffsetEventRecord

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