Interface RequestDistributorAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface RequestDistributorAssignmentSession extends OsidSession

This session provides methods to re-assign Requests to Distributor mappings. A Request may appear in multiple Distributor objects and removing the last reference to a Request is the equivalent of deleting it. Each Distributor may have its own authorizations governing who is allowed to operate on it.

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

  • Method Details

    • canAssignRequests

      boolean canAssignRequests()
      Tests if this user can alter request/distributor mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known provisionable 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.
    • canAssignRequestsToDistributor

      boolean canAssignRequestsToDistributor(Id distributorId)
      Tests if this user can alter request/distributor mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known provisionable 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:
      distributorId - the Id of the Distributor
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - distributorId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableDistributorIds

      IdList getAssignableDistributorIds(Id distributorId) throws OperationFailedException
      Gets a list of distributors including and under the given distributor node in which any request can be assigned.
      Parameters:
      distributorId - the Id of the Distributor
      Returns:
      list of assignable distributor Ids
      Throws:
      NullArgumentException - distributorId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableDistributorIdsForRequest

      IdList getAssignableDistributorIdsForRequest(Id distributorId, Id requestId) throws OperationFailedException
      Gets a list of distributors including and under the given distributor node in which a specific request can be assigned.
      Parameters:
      distributorId - the Id of the Distributor
      requestId - the Id of the Request
      Returns:
      list of assignable distributor Ids
      Throws:
      NullArgumentException - distributorId or requestId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignRequestToDistributor

      void assignRequestToDistributor(Id requestId, Id distributorId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing Request to a Distributor .
      Parameters:
      requestId - the Id of the Request
      distributorId - the Id of the Distributor
      Throws:
      AlreadyExistsException - requestId is already assigned to distributorId
      NotFoundException - requestId or distributorId not found
      NullArgumentException - requestId or distributorId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignRequestFromDistributor

      void unassignRequestFromDistributor(Id requestId, Id distributorId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a Request from a Distributor .
      Parameters:
      requestId - the Id of the Request
      distributorId - the Id of the Distributor
      Throws:
      NotFoundException - requestId or distributorId not found or requestId not assigned to distributorId
      NullArgumentException - requestId or distributorId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignRequestToDistributor

      void reassignRequestToDistributor(Id requestId, Id fromDistributorId, Id toDistributorId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves a Request from one Distributor to another. Mappings to other Distributors are unaffected.
      Parameters:
      requestId - the Id of the Request
      fromDistributorId - the Id of the current Distributor
      toDistributorId - the Id of the destination Distributor
      Throws:
      AlreadyExistsException - requestId already assigned to toDistributorId
      NotFoundException - requestId, fromDistributorId , or toDistributorId not found or requestId not mapped to fromDistributorId
      NullArgumentException - requestId, fromDistributorId , or toDistributorId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.