Interface OffsetEventCalendarAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface OffsetEventCalendarAssignmentSession extends OsidSession

This session provides methods to re-assign OffsetEvents to Calendars . An OffsetEvent may map to multiple Calendars and removing the last reference to an OffsetEvent is the equivalent of deleting it. Each Calendar may have its own authorizations governing who is allowed to operate on it.

Moving or adding a reference of an OffsetEvent to another Calendar is not a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignOffsetEvents

      boolean canAssignOffsetEvents()
      Tests if this user can alter offset event/calendar mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping 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 assignment operations to unauthorized users.
      Returns:
      false if mapping is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignOffsetEventsToCalendar

      boolean canAssignOffsetEventsToCalendar(Id calendarId)
      Tests if this user can alter offset event/calendar mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping 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 assignment operations to unauthorized users.
      Parameters:
      calendarId - the Id of the Calendar
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - calendarId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableCalendarIds

      IdList getAssignableCalendarIds(Id calendarId) throws OperationFailedException
      Gets a list of calendars including and under the given calendar node in which any offset event can be assigned.
      Parameters:
      calendarId - the Id of the Calendar
      Returns:
      list of assignable calendar Ids
      Throws:
      NullArgumentException - calendarId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableCalendarIdsForOffsetEvent

      IdList getAssignableCalendarIdsForOffsetEvent(Id calendarId, Id offsetEventId) throws OperationFailedException
      Gets a list of calendars including and under the given calendar node in which a specific offset event can be assigned.
      Parameters:
      calendarId - the Id of the Calendar
      offsetEventId - the Id of the offsetEventId
      Returns:
      list of assignable calendar Ids
      Throws:
      NullArgumentException - calendarId or offsetEventId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignOffsetEventToCalendar

      void assignOffsetEventToCalendar(Id offsetEventId, Id calendarId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing OffsetEvent to a Calendar .
      Parameters:
      offsetEventId - the Id of the OffsetEvent
      calendarId - the Id of the Calendar
      Throws:
      AlreadyExistsException - offsetEventId is already assigned to calendarId
      NotFoundException - offsetEventId or calendarId not found
      NullArgumentException - offsetEventId or calendarId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignOffsetEventFromCalendar

      void unassignOffsetEventFromCalendar(Id offsetEventId, Id calendarId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes an OffsetEvent from a Calendar .
      Parameters:
      offsetEventId - the Id of the OffsetEvent
      calendarId - the Id of the Calendar
      Throws:
      NotFoundException - offsetEventId or calendarId not found or offsetEventId not assigned to calendarId
      NullArgumentException - offsetEventId or calendarId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignOffsetEventToCalendar

      void reassignOffsetEventToCalendar(Id offsetEventId, Id fromCalendarId, Id toCalendarId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves an OffsetEvent from one Calendar to another. Mappings to other Calendars are unaffected.
      Parameters:
      offsetEventId - the Id of the OffsetEvent
      fromCalendarId - the Id of the current Calendar
      toCalendarId - the Id of the destination Calendar
      Throws:
      AlreadyExistsException - offsetEventId already assigned to toCalendarId
      NotFoundException - offsetEventId, fromCalendarId , or toCalendarId not found or offsetEventId not mapped to fromCalendarId
      NullArgumentException - offsetEventId, fromCalendarId , or toCalendarId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.