Interface OffsetEventEnablerCalendarAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface OffsetEventEnablerCalendarAssignmentSession extends OsidSession

This session provides methods to re-assign OffsetEventEnabler to Calendar mappings. An OffsetEventEnabler may appear in multiple Calendar objects and removing the last reference to an OffsetEventEnabler is the equivalent of deleting it. Each Calendar may have its own authorizations governing who is allowed to operate on it.

Adding a reference of an OffsetEventEnabler to another Calendar is not a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignOffsetEventEnablers

      boolean canAssignOffsetEventEnablers()
      Tests if this user can alter offset event enabler/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 lookup operations to unauthorized users.
      Returns:
      false if mapping is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignOffsetEventEnablersToCalendar

      boolean canAssignOffsetEventEnablersToCalendar(Id calendarId)
      Tests if this user can alter offset event enabler/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 lookup 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 enabler 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.
    • getAssignableCalendarIdsForOffsetEventEnabler

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

      void assignOffsetEventEnablerToCalendar(Id offsetEventEnablerId, Id calendarId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing OffsetEventEnabler to an Calendar .
      Parameters:
      offsetEventEnablerId - the Id of the OffsetEventEnabler
      calendarId - the Id of the Calendar
      Throws:
      AlreadyExistsException - offsetEventEnablerId already mapped to calendarId
      NotFoundException - offsetEventEnablerId or calendarId not found
      NullArgumentException - offsetEventEnablerId or calendarId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignOffsetEventEnablerFromCalendar

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

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