Interface FloorCampusAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface FloorCampusAssignmentSession extends OsidSession

This session provides methods to re-assign Floors to Campuses . A Floor may map to multiple Campuses and removing the last reference to a Floor is the equivalent of deleting it. Each Campus may have its own authorizations governing who is allowed to operate on it.

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

  • Method Details

    • canAssignFloors

      boolean canAssignFloors()
      Tests if this user can alter floor/campus 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.
    • canAssignFloorsToCampus

      boolean canAssignFloorsToCampus(Id campusId)
      Tests if this user can alter floor/campus 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:
      campusId - the Id of the Campus
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - campusId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableCampusIds

      IdList getAssignableCampusIds(Id campusId) throws OperationFailedException
      Gets a list of campuses including and under the given campus node in which any floor can be assigned.
      Parameters:
      campusId - the Id of the Campus
      Returns:
      list of assignable campus Ids
      Throws:
      NullArgumentException - campusId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableCampusIdsForFloor

      IdList getAssignableCampusIdsForFloor(Id campusId, Id floorId) throws OperationFailedException
      Gets a list of campuses including and under the given campus node in which a specific floor can be assigned.
      Parameters:
      campusId - the Id of the Campus
      floorId - the Id of the Floor
      Returns:
      list of assignable campus Ids
      Throws:
      NullArgumentException - campusId or floorId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignFloorToCampus

      void assignFloorToCampus(Id floorId, Id campusId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing Floor to a Campus .
      Parameters:
      floorId - the Id of the Floor
      campusId - the Id of the Campus
      Throws:
      AlreadyExistsException - floorId is already assigned to campusId
      NotFoundException - floorId or campusId not found
      NullArgumentException - floorId or campusId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignFloorFromCampus

      void unassignFloorFromCampus(Id floorId, Id campusId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a Floor from a Campus .
      Parameters:
      floorId - the Id of the Floor
      campusId - the Id of the Campus
      Throws:
      NotFoundException - floorId or campusId not found or floorId not assigned to campusId
      NullArgumentException - floorId or campusId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignFloorToCampus

      void reassignFloorToCampus(Id floorId, Id fromCampusId, Id toCampusId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves a Floor from one Campus to another. Mappings to other Campuses are unaffected.
      Parameters:
      floorId - the Id of the Floor
      fromCampusId - the Id of the current Campus
      toCampusId - the Id of the destination Campus
      Throws:
      AlreadyExistsException - floorId , already assigned to toCampusId
      NotFoundException - floorId, fromCampusId , or toCampusId not found or floorIf not mapped to fromCampusId
      NullArgumentException - floorId, fromCampusId , or toCampusId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.