Interface SupersedingEventCalendarAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface SupersedingEventCalendarAssignmentSession extends OsidSession

This session provides methods to re-assign SupersedingEvents to Calendars . A SupersedingEvent may map to multiple Calendars and removing the last reference to a SupersedingEvent 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 a SupersedingEvent to another Calendar is not a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignSupersedingEvents

      boolean canAssignSupersedingEvents()
      Tests if this user can alter superseding 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.
    • canAssignSupersedingEventsToCalendar

      boolean canAssignSupersedingEventsToCalendar(Id calendarId)
      Tests if this user can alter superseding 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 superseding 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.
    • getAssignableCalendarIdsForSupersedingEvent

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

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

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

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