Interface TimePeriodCyclicTimePeriodLookupSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface TimePeriodCyclicTimePeriodLookupSession extends OsidSession

This session provides methods to retrieve CyclicTimePeriod to TimePeriod mappings. A TimePeriod may be mapped to multiple CyclicTimePeriods explicitly or through a rule-based generation.

This lookup session defines two views:

  • comparative view: elements may be silently omitted or re-ordered
  • plenary view: provides a complete result set or is an error condition
  • isolated calendar view: All cyclic time period methods in this session operate, retrieve and pertain to cyclic time periods defined explicitly in the current calendar.
  • federated calendar view: All cyclic time period methods in this session operate, retrieve and pertain to all cyclic time periods defined in this calendar and any other calendars implicitly available in this calendar through calendar inheritence.
  • Method Details

    • getCalendarId

      Id getCalendarId()
      Gets the Calendar Id associated with this session.
      Returns:
      the Calendar Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getCalendar

      Gets the Calendar associated with this session.
      Returns:
      the Calendar associated with this session
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canLookupTimePeriodCyclicTimePeriodMappings

      boolean canLookupTimePeriodCyclicTimePeriodMappings()
      Tests if this user can perform lookups of tiem period/cyclic time period mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known lookup methods in this session will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.
      Returns:
      false if looking up mappings is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • useComparativeCalendarView

      void useComparativeCalendarView()
      The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.
      Compliance:
      mandatory - This method is must be implemented.
    • usePlenaryCalendarView

      void usePlenaryCalendarView()
      A complete view of the CyclicTimePeriod and TmePeriod returns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.
      Compliance:
      mandatory - This method is must be implemented.
    • useFederatedCalendarView

      void useFederatedCalendarView()
      Federates the view for methods in this session. A federated view will include cyclic time periods in calendars which are children of this calendar in the calendar hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedCalendarView

      void useIsolatedCalendarView()
      Isolates the view for methods in this session. An isolated view restricts lookups to this calendar only.
      Compliance:
      mandatory - This method is must be implemented.
    • getTimePeriodIdsByCyclicTimePeriod

      IdList getTimePeriodIdsByCyclicTimePeriod(Id cyclicTimePeriodId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the list of TimePeriod Ids associated with a CyclicTimePeriod .
      Parameters:
      cyclicTimePeriodId - Id of the CyclicTimePeriod
      Returns:
      list of related time period Ids
      Throws:
      NotFoundException - cyclicTimePeriodId is not found
      NullArgumentException - cyclicTimePeriodId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getTimePeriodsByCyclicTimePeriod

      TimePeriodList getTimePeriodsByCyclicTimePeriod(Id cyclicTimePeriodId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the list of TimePeriods associated with a CyclicTimePeriod .
      Parameters:
      cyclicTimePeriodId - Id of the CyclicTimePeriod
      Returns:
      list of related time periods
      Throws:
      NotFoundException - cyclicTimePeriodId is not found
      NullArgumentException - cyclicTimePeriodId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getTimePeriodIdsByCyclicTimePeriodAndDate

      IdList getTimePeriodIdsByCyclicTimePeriodAndDate(Id cyclicTimePeriodId, DateTime from, DateTime to) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the list of TimePeriod Ids between the given date range included associated with a CyclicTimePeriod .
      Parameters:
      cyclicTimePeriodId - Id of the CyclicTimePeriod
      from - starting date
      to - ending date
      Returns:
      list of related time period Ids
      Throws:
      InvalidArgumentException - from is greater than to
      NotFoundException - cyclicTimePeriodId is not found
      NullArgumentException - cyclicTimePeriodId, from , or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getTimePeriodsByCyclicTimePeriodAndDate

      TimePeriodList getTimePeriodsByCyclicTimePeriodAndDate(Id cyclicTimePeriodId, DateTime from, DateTime to) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the list of TimePeriods between the given date range included associated with a CyclicTimePeriod .
      Parameters:
      cyclicTimePeriodId - Id of the CyclicTimePeriod
      from - starting date
      to - ending date
      Returns:
      list of related cyclic time periods
      Throws:
      InvalidArgumentException - from is greater than to
      NotFoundException - cyclicTimePeriodId is not found
      NullArgumentException - cyclicTimePeriodId, from , or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCyclicTimePeriodIdsByTimePeriod

      IdList getCyclicTimePeriodIdsByTimePeriod(Id timePeriodId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the list of CyclicTimePeriodIds mapped to a TimePeriod .
      Parameters:
      timePeriodId - Id of a TimePeriod
      Returns:
      list of cyclic time period Ids
      Throws:
      NotFoundException - timePeriodId is not found
      NullArgumentException - timePeriodId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCyclicTimePeriodsByTimePeriod

      CyclicTimePeriodList getCyclicTimePeriodsByTimePeriod(Id timePeriodId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the list of CyclicTimePeriods mapped to a TimePeriod .
      Parameters:
      timePeriodId - Id of a TimePeriod
      Returns:
      list of cyclic time periods
      Throws:
      NotFoundException - timePeriodId is not found
      NullArgumentException - timePeriodId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.