Interface CommitmentEnablerCalendarAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface CommitmentEnablerCalendarAssignmentSession extends OsidSession

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

  • Method Details

    • canAssignCommitmentEnablers

      boolean canAssignCommitmentEnablers()
      Tests if this user can alter commitment 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.
    • canAssignCommitmentEnablersToCalendar

      boolean canAssignCommitmentEnablersToCalendar(Id calendarId)
      Tests if this user can alter commitment 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 commitment 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.
    • getAssignableCalendarIdsForCommitmentEnabler

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

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

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

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