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