Interface CyclicTimePeriodCalendarSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface CyclicTimePeriodCalendarSession extends OsidSession

This session provides methods to retrieve CyclicTimePeriod to Calendar mappings. A CyclicTimePeriod may appear in multiple Calendars . Each Calendar may have its own authorizations governing who is allowed to look at it.

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
  • Method Details

    • canLookupCyclicTimePeriodCalendarMappings

      boolean canLookupCyclicTimePeriodCalendarMappings()
      Tests if this user can perform lookups of cyclic time period/calendar 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 Calendar 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.
    • getCyclicTimePeriodIdsByCalendar

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

      Gets the list of CyclicTimePeriods associated with an Calendar .
      Parameters:
      calendarId - Id of the Calendar
      Returns:
      list of related cyclic time periods
      Throws:
      NotFoundException - calendarId is not found
      NullArgumentException - calendarId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCyclicTimePeriodIdsByCalendars

      IdList getCyclicTimePeriodIdsByCalendars(IdList calendarIds) throws OperationFailedException, PermissionDeniedException
      Gets the list of CyclicTimePeriodIds corresponding to a list of Calendars .
      Parameters:
      calendarIds - list of calendar Ids
      Returns:
      list of cyclic time period Ids
      Throws:
      NullArgumentException - calendarIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCyclicTimePeriodsByCalendars

      CyclicTimePeriodList getCyclicTimePeriodsByCalendars(IdList calendarIds) throws OperationFailedException, PermissionDeniedException
      Gets the list of CyclicTimePeriods corresponding to a list of Calendars .
      Parameters:
      calendarIds - list of calendar Ids
      Returns:
      list of cyclic time periods
      Throws:
      NullArgumentException - calendarIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCalendarIdsByCyclicTimePeriod

      IdList getCalendarIdsByCyclicTimePeriod(Id cyclicTimePeriodId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the list of Calendar Ids mapped to a CyclicTimePeriod .
      Parameters:
      cyclicTimePeriodId - Id of a CyclicTimePeriod
      Returns:
      list of calendar 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.
    • getCalendarsByCyclicTimePeriod

      CalendarList getCalendarsByCyclicTimePeriod(Id cyclicTimePeriodId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the list of Calendars mapped to a CyclicTimePeriod .
      Parameters:
      cyclicTimePeriodId - Id of a CyclicTimePeriod
      Returns:
      list of calendar 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.