Interface RenovationCampusAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface RenovationCampusAssignmentSession extends OsidSession

This session provides methods to re-assign Renovations to Campuses . A Renovation may map to multiple Campuses and removing the last reference to a Renovation 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 Renovation to another Campus is not a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignRenovations

      boolean canAssignRenovations()
      Tests if this user can alter renovation/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.
    • canAssignRenovationsToCampus

      boolean canAssignRenovationsToCampus(Id campusId)
      Tests if this user can alter renovation/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 renovation 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.
    • getAssignableCampusIdsForRenovation

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

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

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

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