public interface ChainLookupSession extends OsidSession
This session defines methods for retrieving chains.
This lookup session defines several views:
Chains
with the ChainAdminSession.
The methods useFederatedAntimatroidView()
and
useIsolatedAntimatroidView()
behave as a radio group and one
should be selected before invoking any lookup methods.
Chains may have an additional records indicated by their respective record types. The record may not be accessed through a cast of the chains.
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupChains()
Tests if this user can perform
Chain lookups. |
Antimatroid |
getAntimatroid()
Gets the
Antimatroid associated with this session. |
Id |
getAntimatroidId()
Gets the
Antimatroid Id associated with
this session. |
Chain |
getChain(Id chainId)
Gets the
Chain specified by its Id. |
ChainList |
getChains()
Gets all chains.
|
ChainList |
getChainsByGenusType(Type chainGenusType)
Gets a
ChainList corresponding to the given chain genus
Type which does not include chains of types derived
from the specified Type. |
ChainList |
getChainsByIds(IdList chainIds)
Gets a
ChainList corresponding to the given
IdList. |
ChainList |
getChainsByParentGenusType(Type chainGenusType)
Gets a
ChainList corresponding to the given chain genus
Type and include any additional chains with genus types
derived from the specified Type. |
ChainList |
getChainsByRecordType(Type chainRecordType)
Gets a
ChainList containing the given chain record
Type. |
void |
useComparativeChainView()
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 |
useFederatedAntimatroidView()
Federates the view for methods in this session.
|
void |
useIsolatedAntimatroidView()
Isolates the view for methods in this session.
|
void |
usePlenaryChainView()
A complete view of the
Chain returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getAntimatroidId()
Antimatroid
Id
associated with
this session. Antimatroid Id
associated with this sessionmandatory
- This method must be implemented. Antimatroid getAntimatroid() throws OperationFailedException, PermissionDeniedException
Antimatroid
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canLookupChains()
Chain
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 not offer lookup operations to unauthorized
users. false
if lookup methods are not authorized,
true
otherwisemandatory
- This method must be implemented. void useComparativeChainView()
mandatory
- This method is must be implemented. void usePlenaryChainView()
Chain
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. void useFederatedAntimatroidView()
mandatory
- This method is must be implemented. void useIsolatedAntimatroidView()
mandatory
- This method is must be implemented. Chain getChain(Id chainId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Chain
specified by its Id.
In plenary mode, the exact Id
is found
or a NOT_FOUND
results. Otherwise, the returned
Chain
may have a different Id
than requested,
such as the case where a duplicate Id
was assigned to a
Chain
and retained for compatibility.chainId
- the Id
of the Chain
to
retrieve Chain
NotFoundException
- no Chain
found with
the given Id
NullArgumentException
- chainId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ChainList getChainsByIds(IdList chainIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
ChainList
corresponding to the given
IdList.
In plenary mode, the returned list contains all of the
chains 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 Chains
may be omitted from the list and
may present the elements in any order including returning a unique
set.chainIds
- the list of Ids
to retrieve Chain
listNotFoundException
- an Id
was not foundNullArgumentException
- chainIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ChainList getChainsByGenusType(Type chainGenusType) throws OperationFailedException, PermissionDeniedException
ChainList
corresponding to the given chain genus
Type
which does not include chains of types derived
from the specified Type.
In plenary mode, the returned list contains all known
chains or an error results. Otherwise, the returned list may contain
only those chains that are accessible through this session.chainGenusType
- a chain genus type Chain
listNullArgumentException
- chainGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ChainList getChainsByParentGenusType(Type chainGenusType) throws OperationFailedException, PermissionDeniedException
ChainList
corresponding to the given chain genus
Type
and include any additional chains with genus types
derived from the specified Type.
In plenary mode, the returned list contains all known
chains or an error results. Otherwise, the returned list may contain
only those chains that are accessible through this session.chainGenusType
- a chain genus type Chain
listNullArgumentException
- chainGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ChainList getChainsByRecordType(Type chainRecordType) throws OperationFailedException, PermissionDeniedException
ChainList
containing the given chain record
Type.
In plenary mode, the returned list contains all known chains or an
error results. Otherwise, the returned list may contain only those
chains that are accessible through this session.chainRecordType
- a chain record type Chain
listNullArgumentException
- chainRecordType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ChainList getChains() throws OperationFailedException, PermissionDeniedException
In plenary mode, the returned list contains all of the
chains including duplicates, or an error results if an Id
in the supplied list is not found or inaccessible. Otherwise,
inaccessible Chains
may be omitted from the list and
may present the elements in any order including returning a unique
set. Chain
listOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.