Interface PoolEnablerDistributorAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface PoolEnablerDistributorAssignmentSession extends OsidSession

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

  • Method Details

    • canAssignPoolEnablers

      boolean canAssignPoolEnablers()
      Tests if this user can alter pool enabler/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. T his 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.
    • canAssignPoolEnablerToDistributor

      boolean canAssignPoolEnablerToDistributor(Id distributorId)
      Tests if this user can alter pool enabler/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. T his 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 pool enabler 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.
    • getAssignableDistributorIdsForPoolEnabler

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

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

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

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