Interface StepOfficeAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface StepOfficeAssignmentSession extends OsidSession

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

  • Method Details

    • canAssignStepes

      boolean canAssignStepes()
      Tests if this user can alter step/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 . 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.
    • canAssignStepesToOffice

      boolean canAssignStepesToOffice(Id officeId)
      Tests if this user can alter step/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 . This 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 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.
    • getAssignableOfficeIdsForStep

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

      Adds an existing Step to an Office .
      Parameters:
      stepId - the Id of the Step
      officeId - the Id of the Office
      Throws:
      AlreadyExistsException - stepId is already assigned to officeId
      NotFoundException - stepId or officeId not found
      NullArgumentException - stepId or officeId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignStepFromOffice

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

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