Interface TimePeriodCyclicTimePeriodAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface TimePeriodCyclicTimePeriodAssignmentSession extends OsidSession

This session provides methods to manually assign TimePeriods to CyclicTimePeriods .

  • 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.
    • canAssignTimePeriods

      boolean canAssignTimePeriods()
      Tests if this user can alter time period/cyclic time period 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.
    • canAssignCyclicTimePeriodsToCyclicTimePeriod

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

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

      void assignTimePeriodToCyclicTimePeriod(Id timePeriodId, Id cyclicTimePeriodId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing TimePeriod to a CyclicTimePeriod .
      Parameters:
      timePeriodId - the Id of the TimePeriod
      cyclicTimePeriodId - the Id of the CyclicTimePeriod
      Throws:
      AlreadyExistsException - timePeriodId is alrteady assigned to cyclicTimePeriodId
      NotFoundException - timePeriodId or cyclicTimePeriodId not found
      NullArgumentException - timePeriodId or cyclicTimePeriodId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignTimePeriodFromCyclicTimePeriod

      void unassignTimePeriodFromCyclicTimePeriod(Id timePeriodId, Id cyclicTimePeriodId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a TimePeriod from a CyclicTimePeriod .
      Parameters:
      timePeriodId - the Id of the TimePeriod
      cyclicTimePeriodId - the Id of the CyclicTimePeriod
      Throws:
      NotFoundException - timePeriodId or cyclicTimePeriodId not found or timePeriodId is not asigned to cyclicTimePeriodId
      NullArgumentException - timePeriodId or cyclicTimePeriodId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.