public interface ItemBankSession extends OsidSession
This session provides methods to retrieve Item to
Bank mappings. An Item may appear in multiple
Banks. Each Bank may have its own
authorizations governing who is allowed to look at it.
This lookup session defines two views:
| Modifier and Type | Method and Description |
|---|---|
boolean |
canLookupItemBankMappings()
Tests if this user can perform lookups of item/bank mappings.
|
IdList |
getBankIdsByItem(Id itemId)
Gets the list of
Bank Ids mapped to an
Item. |
BankList |
getBanksByItem(Id itemId)
Gets the list of
Banks mapped to an Item. |
IdList |
getItemIdsByBank(Id bankId)
Gets the list of
Item Ids associated
with a Bank. |
IdList |
getItemIdsByBanks(IdList bankIds)
Gets the list of
Item Ids corresponding to a list of
Banks. |
ItemList |
getItemsByBank(Id bankId)
Gets the list of
Items associated with a Bank. |
ItemList |
getItemsByBanks(IdList bankIds)
Gets the list of
Items corresponding to a list of
Banks. |
void |
useComparativeBankView()
The returns from the lookup methods may omit or translate elements
based on this session, such as assessment, and not result in an error.
|
void |
usePlenaryBankView()
A complete view of the
Item and Bank
returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseboolean canLookupItemBankMappings()
PERMISSION_DENIED. This is intended as a hint to
an application that may opt not to offer lookup operations to
unauthorized users. false if looking up mappings is not authorized,
true otherwisemandatory - This method must be implemented. void useComparativeBankView()
mandatory - This method is must be implemented. void usePlenaryBankView()
Item and Bank
returns is desired. Methods will return what is requested or result in
an error. This view is used when greater precision is desired at the
expense of interoperability.mandatory - This method is must be implemented. IdList getItemIdsByBank(Id bankId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Item Ids associated
with a Bank. bankId - Id of the Bank Ids NotFoundException - bankId is not foundNullArgumentException - bankId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failure
occurredmandatory - This method must be implemented. ItemList getItemsByBank(Id bankId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Items associated with a Bank.
bankId - Id of the Bank NotFoundException - bankId is not foundNullArgumentException - bankId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failure
occurredmandatory - This method must be implemented. IdList getItemIdsByBanks(IdList bankIds) throws OperationFailedException, PermissionDeniedException
Item Ids corresponding to a list of
Banks. bankIds - list of bank Ids Ids NullArgumentException - bankIds is
null OperationFailedException - unable to complete requestPermissionDeniedException - assessment failuremandatory - This method must be implemented. ItemList getItemsByBanks(IdList bankIds) throws OperationFailedException, PermissionDeniedException
Items corresponding to a list of
Banks. bankIds - list of bank Ids NullArgumentException - bankIds is
null OperationFailedException - unable to complete requestPermissionDeniedException - assessment failuremandatory - This method must be implemented. IdList getBankIdsByItem(Id itemId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Bank Ids mapped to an
Item. itemId - Id of an Item Ids NotFoundException - itemId is not foundNullArgumentException - itemId is
null OperationFailedException - unable to complete requestPermissionDeniedException - assessment failuremandatory - This method must be implemented. BankList getBanksByItem(Id itemId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Banks mapped to an Item.
itemId - Id of an Item NotFoundException - itemId is not foundNullArgumentException - itemId is
null OperationFailedException - unable to complete requestPermissionDeniedException - assessment failuremandatory - This method must be implemented.