Interface StepEnablerOfficeAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface StepEnablerOfficeAssignmentSession extends OsidSession

This session provides methods to re-assign StepEnabler to Office mappings. A StepEnabler may appear in multiple Office catalogs and removing the last reference to a StepEnabler is the equivalent of deleting it. Each Office may have its own authorizations governing who is allowed to operate on it.

Adding a reference of a StepEnabler to another Office is not a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignStepEnablers

      boolean canAssignStepEnablers()
      Tests if this user can alter step enabler/office 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. T his 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.
    • canAssignStepEnablerToOffice

      boolean canAssignStepEnablerToOffice(Id officeId)
      Tests if this user can alter step enabler/office 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. T his is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.
      Parameters:
      officeId - the Id of the Office
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - officeId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableOfficeIds

      IdList getAssignableOfficeIds(Id officeId) throws OperationFailedException
      Gets a list of offices including and under the given office node in which any step enabler can be assigned.
      Parameters:
      officeId - the Id of the Office
      Returns:
      list of assignable office Ids
      Throws:
      NullArgumentException - officeId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableOfficeIdsForStepEnabler

      IdList getAssignableOfficeIdsForStepEnabler(Id officeId, Id stepEnablerId) throws OperationFailedException
      Gets a list of offices including and under the given office node in which a specific step enabler can be assigned.
      Parameters:
      officeId - the Id of the Office
      stepEnablerId - the Id of the StepEnabler
      Returns:
      list of assignable office Ids
      Throws:
      NullArgumentException - officeId or stepEnablerId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignStepEnablerToOffice

      void assignStepEnablerToOffice(Id stepEnablerId, Id officeId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing StepEnabler to an Office .
      Parameters:
      stepEnablerId - the Id of the StepEnabler
      officeId - the Id of the Office
      Throws:
      AlreadyExistsException - stepEnablerId is already assigned to officeId
      NotFoundException - stepEnablerId or officeId not found
      NullArgumentException - stepEnablerId or officeId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignStepEnablerFromOffice

      void unassignStepEnablerFromOffice(Id stepEnablerId, Id officeId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a StepEnabler from an Office .
      Parameters:
      stepEnablerId - the Id of the StepEnabler
      officeId - the Id of the Office
      Throws:
      NotFoundException - stepEnablerId or officeId not found or stepEnablerId not assigned to officeId
      NullArgumentException - stepEnablerId or officeId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignStepEnablerToOffice

      void reassignStepEnablerToOffice(Id stepEnablerId, Id fromOfficeId, Id toOfficeId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves a StepEnabler from one Office to another. Mappings to other Offices are unaffected.
      Parameters:
      stepEnablerId - the Id of the StepEnabler
      fromOfficeId - the Id of the current Office
      toOfficeId - the Id of the destination Office
      Throws:
      AlreadyExistsException - stepEnablerId already assigned to toOfficeId
      NotFoundException - stepEnablerId, fromOfficeId , or toOfficeId not found or stepEnablerId not mapped to fromOfficeId
      NullArgumentException - stepEnablerId, fromOfficeId , or toOfficeId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.