Interface EventCyclicEventAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface EventCyclicEventAssignmentSession extends OsidSession

This session provides methods to manually assign Events to CyclicEvents . An Event may be the product of a OsidRule originating from a SupersedingEvent , OffsetEvent , or a RecurringEvent in which case the CyclicEvent is applied to the rule.

  • Method Details

    • getCalendarId

      Id getCalendarId()
      Gets the Calendar Id associated with this session.
      Returns:
      the Calendar Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getCalendar

      Gets the Calendar associated with this session.
      Returns:
      the Calendar associated with this session
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canAssignEvents

      boolean canAssignEvents()
      Tests if this user can alter event/cyclic event 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.
    • canAssignCyclicEventsToCyclicEvent

      boolean canAssignCyclicEventsToCyclicEvent(Id cyclicEventId)
      Tests if this user can alter event/cyclic event 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:
      cyclicEventId - the Id of the CyclicEvent
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - cyclicEventId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableCyclicEventIds

      IdList getAssignableCyclicEventIds() throws OperationFailedException
      Gets a list of cyclic event Ids .
      Returns:
      list of assignable cyclic event Ids
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignEventToCyclicEvent

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

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