Interface ResourceRelationshipBinAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ResourceRelationshipBinAssignmentSession extends OsidSession

This session provides methods to re-assign ResourceRelationships to Bins . A ResourceRelationship may map to multiple Bin objects and removing the last reference to a ResourceRelationship is the equivalent of deleting it. Each Bin may have its own authorizations governing who is allowed to operate on it.

Moving or adding a reference of a ResourceRelationship to another Bin is not a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignResourceRelationships

      boolean canAssignResourceRelationships()
      Tests if this user can alter resource relationship/bin 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 lookup operations to unauthorized users.
      Returns:
      false if mapping is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignResourceRelationshipsToBin

      boolean canAssignResourceRelationshipsToBin(Id binId)
      Tests if this user can alter resource relationship/bin 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 lookup operations to unauthorized users.
      Parameters:
      binId - the Id of the Bin
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - binId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableBinIds

      IdList getAssignableBinIds(Id binId) throws OperationFailedException
      Gets a list of bins including and under the given bin node in which any resource relationship can be assigned.
      Parameters:
      binId - the Id of the Bin
      Returns:
      list of assignable bin Ids
      Throws:
      NullArgumentException - binId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableBinIdsForResourceRelationship

      IdList getAssignableBinIdsForResourceRelationship(Id binId, Id resourceRelationshipId) throws OperationFailedException
      Gets a list of bins including and under the given bin node in which a specific resource relationship can be assigned.
      Parameters:
      binId - the Id of the Bin
      resourceRelationshipId - the Id of the ResourceRelationship
      Returns:
      list of assignable bin Ids
      Throws:
      NullArgumentException - binId or resourceRelationshipId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignResourceRelationshipToBin

      void assignResourceRelationshipToBin(Id resourceRelationshipId, Id binId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing ResourceRelationship to a Bin .
      Parameters:
      resourceRelationshipId - the Id of the ResourceRelationship
      binId - the Id of the Bin
      Throws:
      AlreadyExistsException - resourceRelationshipId is already assigned to binId
      NotFoundException - resourceRelationshipId or binId not found
      NullArgumentException - resourceRelationshipId or binId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignResourceRelationshipFromBin

      void unassignResourceRelationshipFromBin(Id resourceRelationshipId, Id binId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a ResourceRelationship from a Bin .
      Parameters:
      resourceRelationshipId - the Id of the ResourceRelationship
      binId - the Id of the Bin
      Throws:
      NotFoundException - resourceRelationshipId or binId not found or resourceRelationshipId not assigned to binId
      NullArgumentException - resourceRelationshipId or binId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignResourceRelationshipToBin

      void reassignResourceRelationshipToBin(Id resourceRelationshipId, Id fromBinId, Id toBinId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves a ResourceRelationship from one Bin to another. Mappings to other Bins are unaffected.
      Parameters:
      resourceRelationshipId - the Id of the ResourceRelationship
      fromBinId - the Id of the current Bin
      toBinId - the Id of the destination Bin
      Throws:
      AlreadyExistsException - resourceRelationshipId already assigned to toBinId
      NotFoundException - resourceRelationshipId, fromBinId , or toBinId not found or resourceRelationshipId not mapped to fromBinId
      NullArgumentException - resourceRelationshipId, fromBinId , or toBinId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.