Interface CyclicEventCalendarAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface CyclicEventCalendarAssignmentSession extends OsidSession

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

  • Method Details

    • canAssignCyclicEvents

      boolean canAssignCyclicEvents()
      Tests if this user can alter cyclic 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.
    • canAssignCyclicEventsToCalendar

      boolean canAssignCyclicEventsToCalendar(Id calendarId)
      Tests if this user can alter cyclic 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 cyclic 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.
    • getAssignableCalendarIdsForCyclicEvent

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

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

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

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