Interface QueueDistributorAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface QueueDistributorAssignmentSession extends OsidSession

This session provides methods to re-assign Queue to Distributor mappings. A Queue may appear in multiple Distributor objects and removing the last reference to a Queue 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 Queue to another Distributor is not a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignQueues

      boolean canAssignQueues()
      Tests if this user can alter queue/distributor 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.
    • canAssignQueuesToDistributor

      boolean canAssignQueuesToDistributor(Id distributorId)
      Tests if this user can alter queue/distributor 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:
      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 queue 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.
    • getAssignableDistributorIdsForQueue

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

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

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

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