Interface EventCalendarSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface EventCalendarSession extends OsidSession

This session provides methods to retrieve Event to Calendar mappings. An Event 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
  • normalized event view: a single recurring event is used to represent a series of events
  • denormalized view: recurring events are expanded into individual events
  • Method Details

    • canLookupEventCalendarMappings

      boolean canLookupEventCalendarMappings()
      Tests if this user can perform lookups of event/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 Event 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.
    • useNormalizedEventView

      void useNormalizedEventView()
      A normalized view sends a single notification for recurring events.
      Compliance:
      mandatory - This method is must be implemented.
    • useDenormalizedEventView

      void useDenormalizedEventView()
      A denormalized view sends a separate notification for each event in a recurring set.
      Compliance:
      mandatory - This method is must be implemented.
    • getEventIdsByCalendar

      Gets the list of Event Ids associated with a Calendar .
      Parameters:
      calendarId - Id of the Calendar
      Returns:
      list of related event 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.
    • getEventsByCalendar

      Gets the list of Events associated with a Calendar .
      Parameters:
      calendarId - Id of the Calendar
      Returns:
      list of related events
      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.
    • getEventIdsByCalendars

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

      EventList getEventsByCalendars(IdList calendarIds) throws OperationFailedException, PermissionDeniedException
      Gets the list of Events corresponding to a list of Calendars .
      Parameters:
      calendarIds - list of calendar Ids
      Returns:
      list of events
      Throws:
      NullArgumentException - calendarIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCalendarIdsByEvent

      Gets the list of Calendar Ids mapped to an Event .
      Parameters:
      eventId - Id of an Event
      Returns:
      list of calendar Ids
      Throws:
      NotFoundException - eventId is not found
      NullArgumentException - eventId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCalendarsByEvent

      Gets the list of Calendars mapped to an Event .
      Parameters:
      eventId - Id of an Event
      Returns:
      list of calendars
      Throws:
      NotFoundException - eventId is not found
      NullArgumentException - eventId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.