public interface ItemBankAssignmentSession extends OsidSession
This session provides methods to re-assign Items
to
Banks.
An Item
may map to multiple
Banks
and removing the last reference to an Item
is
the equivalent of deleting it. Each Bank
may have its own
authorizations governing who is allowed to operate on it.
Moving or adding a reference of an Item
to another
Bank
is not a copy operation (eg: does not change its
Id
).
Modifier and Type | Method and Description |
---|---|
void |
assignItemToBank(Id itemId,
Id bankId)
Adds an existing
Item to a Bank. |
boolean |
canAssignItems()
Tests if this user can alter item/bank mappings.
|
boolean |
canAssignItemsToBank(Id bankId)
Tests if this user can alter item/bank mappings.
|
IdList |
getAssignableBankIds(Id bankId)
Gets a list of banks including and under the given bank node in which
any item can be assigned.
|
IdList |
getAssignableBankIdsForItem(Id bankId,
Id itemId)
Gets a list of banks including and under the given bank node in which
a specific item can be assigned.
|
void |
unassignItemFromBank(Id itemId,
Id bankId)
Removes an
Item from a Bank. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignItems()
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 canAssignItemsToBank(Id bankId)
PERMISSION_DENIED.
This is intended as a hint to an
application that may opt not to offer lookup operations to
unauthorized users.bankId
- the Id
of the Bank
false
if mapping is not authorized, true
otherwiseNullArgumentException
- bankId
is
null
mandatory
- This method must be implemented. IdList getAssignableBankIds(Id bankId) throws OperationFailedException
bankId
- the Id
of the Bank
Ids
NullArgumentException
- bankId
is
null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. IdList getAssignableBankIdsForItem(Id bankId, Id itemId) throws OperationFailedException
bankId
- the Id
of the Bank
itemId
- the Id
of the Item
Ids
NullArgumentException
- bankId
or
itemId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignItemToBank(Id itemId, Id bankId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Item
to a Bank.
itemId
- the Id
of the Item
bankId
- the Id
of the Bank
AlreadyExistsException
- itemId
is
already assigned to bankId
NotFoundException
- itemId
or
bankId
not foundNullArgumentException
- itemId
or
bankId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failure
occurredmandatory
- This method must be implemented. void unassignItemFromBank(Id itemId, Id bankId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Item
from a Bank.
itemId
- the Id
of the Item
bankId
- the Id
of the Bank
NotFoundException
- itemId
or
bankId
not found or itemId
not assigned
to bankId
NullArgumentException
- itemId
or
bankId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failure
occurredmandatory
- This method must be implemented.