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