public interface ResourceBinSession extends OsidSession
This session provides methods to retrieve Resource
to
Bin
mappings. A Resource
may appear in
multiple Bins.
Each Bin
may have its own
authorizations governing who is allowed to look at it.
This lookup session defines several views:
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupResourceBinMappings()
Tests if this user can perform lookups of resource/bin mappings.
|
IdList |
getBinIdsByResource(Id resourceId)
Gets the list of
Bin Ids mapped to a
Resource. |
BinList |
getBinsByResource(Id resourceId)
Gets the list of
Bin objects mapped to a
Resource. |
IdList |
getResourceIdsByBin(Id binId)
Gets the list of
Resource Ids associated
with a Bin. |
IdList |
getResourceIdsByBins(IdList binIds)
Gets the list of
Resource Ids corresponding to a list
of Bin objects. |
ResourceList |
getResourcesByBin(Id binId)
Gets the list of
Resources associated with a
Bin. |
ResourceList |
getResourcesByBins(IdList binIds)
Gets the list of
Resources corresponding to a list of
Bins. |
void |
useComparativeBinView()
The returns from the lookup methods may omit or translate elements
based on this session, such as authorization, and not result in an
error.
|
void |
usePlenaryBinView()
A complete view of the
Resource and Bin
returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
void useComparativeBinView()
mandatory
- This method is must be implemented. void usePlenaryBinView()
Resource
and Bin
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. boolean canLookupResourceBinMappings()
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. IdList getResourceIdsByBin(Id binId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Resource
Ids
associated
with a Bin.
binId
- Id
of a Bin
Ids
NotFoundException
- binId
is not foundNullArgumentException
- binId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ResourceList getResourcesByBin(Id binId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Resources
associated with a
Bin.
binId
- Id
of a Bin
NotFoundException
- binId
is not foundNullArgumentException
- binId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. IdList getResourceIdsByBins(IdList binIds) throws OperationFailedException, PermissionDeniedException
Resource Ids
corresponding to a list
of Bin
objects.binIds
- list of bin Ids
Ids
NullArgumentException
- binIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ResourceList getResourcesByBins(IdList binIds) throws OperationFailedException, PermissionDeniedException
Resources
corresponding to a list of
Bins.
binIds
- list of bin Ids
NullArgumentException
- binIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. IdList getBinIdsByResource(Id resourceId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Bin
Ids
mapped to a
Resource.
resourceId
- Id
of a Resource
Ids
NotFoundException
- resourceId
is not
foundNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. BinList getBinsByResource(Id resourceId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Bin
objects mapped to a
Resource.
resourceId
- Id
of a Resource
NotFoundException
- resourceId
is not
foundNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.