public interface ResourceBinAssignmentSession extends OsidSession
This session provides methods to re-assign Resources to
Bins. A Resource may map to multiple
Bin objects and removing the last reference to a Resource
is the equivalent of deleting it. Each Bin may have
its own authorizations governing who is allowed to operate on it.
Moving or adding a reference of a Resource to another
Bin is not a copy operation (eg: does not change its
Id ).
| Modifier and Type | Method and Description |
|---|---|
void |
assignResourceToBin(Id resourceId,
Id binId)
Adds an existing
Resource to a Bin. |
boolean |
canAssignResources()
Tests if this user can alter resource/bin mappings.
|
boolean |
canAssignResourcesToBin(Id binId)
Tests if this user can alter resource/bin mappings.
|
IdList |
getAssignableBinIds(Id binId)
Gets a list of bins including and under the given bin node in which
any resource can be assigned.
|
IdList |
getAssignableBinIdsForResource(Id binId,
Id resourceId)
Gets a list of bins including and under the given bin node in which a
specific resource can be assigned.
|
void |
unassignResourceFromBin(Id resourceId,
Id binId)
Removes a
Resource from a Bin. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseboolean canAssignResources()
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 canAssignResourcesToBin(Id binId)
PERMISSION_DENIED . This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users.binId - the Id of the Bin false if mapping is not authorized, true
otherwiseNullArgumentException - binId is
null mandatory - This method must be implemented. IdList getAssignableBinIds(Id binId) throws OperationFailedException
binId - the Id of the Bin Ids NullArgumentException - binId is
null OperationFailedException - unable to complete requestmandatory - This method must be implemented. IdList getAssignableBinIdsForResource(Id binId, Id resourceId) throws OperationFailedException
binId - the Id of the Bin resourceId - the Id of the Resource
Ids NullArgumentException - binId or
resourceId is null OperationFailedException - unable to complete requestmandatory - This method must be implemented. void assignResourceToBin(Id resourceId, Id binId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Resource to a Bin. resourceId - the Id of the Resource
binId - the Id of the Bin AlreadyExistsException - resourceId is
already assigned to binId NotFoundException - resourceId or
binId not foundNullArgumentException - resourceId or
binId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void unassignResourceFromBin(Id resourceId, Id binId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Resource from a Bin. resourceId - the Id of the Resource
binId - the Id of the Bin NotFoundException - resourceId or
binId not found or resourceId not
assigned to binId NullArgumentException - resourceId or
binId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.