Interface DeedCampusAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface DeedCampusAssignmentSession extends OsidSession

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

  • Method Details

    • canAssignDeeds

      boolean canAssignDeeds()
      Tests if this user can alter deed/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.
    • canAssignDeedsToCampus

      boolean canAssignDeedsToCampus(Id campusId)
      Tests if this user can alter deed/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 deed 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.
    • getAssignableCampusIdsForDeed

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

      Adds an existing Deed to a Campus .
      Parameters:
      deedId - the Id of the Deed
      campusId - the Id of the Campus
      Throws:
      AlreadyExistsException - deedId is already assigned to campusId
      NotFoundException - deedId or campusId not found
      NullArgumentException - deedId or campusId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignDeedFromCampus

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

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