public interface BinLookupSession extends OsidSession
This session provides methods for retrieving Bin
objects. The Bin represents a collection resources.
This session defines views that offer differing behaviors when retrieving multiple objects.
Generally, the comparative view should be used for most applications
as it permits operation even if there is data that cannot be accessed. For
example, a browsing application may only need to examine the Bins
it can access, without breaking execution. However, an
administrative application may require all Bin elements to
be available.
Bins may have an additional records indicated by their respective
record types. The record may not be accessed through a cast of the
Bin.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canLookupBins()
Tests if this user can perform
Bin lookups. |
Bin |
getBin(Id binId)
Gets the
Bin specified by its Id. |
BinList |
getBins()
Gets all
Bins. |
BinList |
getBinsByGenusType(Type binGenusType)
Gets a
BinList corresponding to the given bin genus
Type which does not include bins of types derived from
the specified Type. |
BinList |
getBinsByIds(IdList binIds)
Gets a
BinList corresponding to the given
IdList. |
BinList |
getBinsByParentGenusType(Type binGenusType)
Gets a
BinList corresponding to the given bin genus
Type and include any additional bins with genus types
derived from the specified Type. |
BinList |
getBinsByProvider(Id resourceId)
Gets a
BinList from the given provider. |
BinList |
getBinsByRecordType(Type binRecordType)
Gets a
BinList containing the given bin record
Type. |
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
Bin returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseboolean canLookupBins()
Bin lookups. A return of
true does not guarantee successful authorization. A return of false
indicates that it is known all methods in this session will result in
a PERMISSION_DENIED. This is intended as a hint to an
application that may opt not to offer lookup operations to
unauthorized users. false if lookup methods are not authorized,
true otherwisemandatory - This method must be implemented. void useComparativeBinView()
mandatory - This method is must be implemented. void usePlenaryBinView()
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. Bin getBin(Id binId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Bin specified by its Id. In
plenary mode, the exact Id is found or a
NOT_FOUND results. Otherwise, the returned Bin
may have a different Id than requested, such as the
case where a duplicate Id was assigned to a Bin
and retained for compatibility.binId - Id of the Bin NotFoundException - binId not foundNullArgumentException - binId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method is must be implemented. BinList getBinsByIds(IdList binIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
BinList corresponding to the given
IdList. In plenary mode, the returned list contains all of the
bins specified in the Id list, in the order of the
list, including duplicates, or an error results if an Id
in the supplied list is not found or inaccessible. Otherwise,
inaccessible Bins may be omitted from the list and may
present the elements in any order including returning a unique set.binIds - the list of Ids to retrieve Bin list NotFoundException - an Id was not foundNullArgumentException - binIds is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. BinList getBinsByGenusType(Type binGenusType) throws OperationFailedException, PermissionDeniedException
BinList corresponding to the given bin genus
Type which does not include bins of types derived from
the specified Type. In plenary mode, the returned list
contains all known bins or an error results. Otherwise, the returned
list may contain only those bins that are accessible through this
session.binGenusType - a bin genus type Bin list NullArgumentException - binGenusType is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. BinList getBinsByParentGenusType(Type binGenusType) throws OperationFailedException, PermissionDeniedException
BinList corresponding to the given bin genus
Type and include any additional bins with genus types
derived from the specified Type. In plenary mode, the
returned list contains all known bins or an error results. Otherwise,
the returned list may contain only those bins that are accessible
through this session.binGenusType - a bin genus type Bin list NullArgumentException - binGenusType is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. BinList getBinsByRecordType(Type binRecordType) throws OperationFailedException, PermissionDeniedException
BinList containing the given bin record
Type. In plenary mode, the returned list contains all known
bins or an error results. Otherwise, the returned list may contain
only those bins that are accessible through this session.binRecordType - a bin record type Bin list NullArgumentException - binRecordType is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. BinList getBinsByProvider(Id resourceId) throws OperationFailedException, PermissionDeniedException
BinList from the given provider. In plenary
mode, the returned list contains all known bins or an error results.
Otherwise, the returned list may contain only those bins that are
accessible through this session.resourceId - a resource Id Bin list NullArgumentException - resourceId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. BinList getBins() throws OperationFailedException, PermissionDeniedException
Bins. In plenary mode, the returned list
contains all known bins or an error results. Otherwise, the returned
list may contain only those bins that are accessible through this
session. Bins OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.