public interface PoolDistributorAssignmentSession extends OsidSession
This session provides methods to re-assign Pools
to
Distributor
mappings. A Pool
may appear in
multiple Distributor
objects and removing the last
reference to a Pool
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 Pool
to another
Distributor
is not a copy operation (eg: does not change its
Id
).
Modifier and Type | Method and Description |
---|---|
void |
assignPoolToDistributor(Id poolId,
Id distributorId)
Adds an existing
Pool to a Distributor. |
boolean |
canAssignPools()
Tests if this user can alter pool/distributor mappings.
|
boolean |
canAssignPoolsToDistributor(Id distributorId)
Tests if this user can alter pool/distributor mappings.
|
IdList |
getAssignableDistributorIds(Id distributorId)
Gets a list of distributors including and under the given distributor
node in which any pool can be assigned.
|
IdList |
getAssignableDistributorIdsForPool(Id distributorId,
Id poolId)
Gets a list of distributors including and under the given distributor
node in which a specific pool can be assigned.
|
void |
unassignPoolFromDistributor(Id poolId,
Id distributorId)
Removes a
Pool from a Distributor. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignPools()
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users. false
if pool assignment is not authorized,
true
otherwisemandatory
- This method must be implemented. boolean canAssignPoolsToDistributor(Id distributorId)
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users.distributorId
- the Id
of the Distributor
false
if pool assignment is not authorized,
true
otherwiseNullArgumentException
- distributorId
is
null
mandatory
- This method must be implemented. IdList getAssignableDistributorIds(Id distributorId) throws OperationFailedException
distributorId
- the Id
of the Distributor
Ids
NullArgumentException
- distributorId
is
null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. IdList getAssignableDistributorIdsForPool(Id distributorId, Id poolId) throws OperationFailedException
distributorId
- the Id
of the Distributor
poolId
- the Id
of the Pool
Ids
NullArgumentException
- distributorId
or
poolId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignPoolToDistributor(Id poolId, Id distributorId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Pool
to a Distributor.
poolId
- the Id
of the Pool
distributorId
- the Id
of the Distributor
AlreadyExistsException
- poolId
is
already assigned to distributorId
NotFoundException
- poolId
or
distributorId
not foundNullArgumentException
- poolId
or
distributorId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignPoolFromDistributor(Id poolId, Id distributorId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Pool
from a Distributor.
poolId
- the Id
of the Pool
distributorId
- the Id
of the Distributor
NotFoundException
- poolId
or
distributorId
not found or poolId
not
assigned to distributorId
NullArgumentException
- poolId
or
distributorId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.