public interface KeyQuerySession extends OsidSession
This session provides methods for searching Keys.
The
search query is constructed using the KeyQuery.
The key
record Type
also specifies the record for the key query.
This session defines views that offer differing behaviors for searching.
Keys may have a query record indicated by their respective record types. The query record is accessed via the KeyQuery.
Modifier and Type | Method and Description |
---|---|
boolean |
canSearchKeys()
Tests if this user can perform
Key searches. |
Agency |
getAgency()
Gets the
Agency associated with this session. |
Id |
getAgencyId()
Gets the
Agency Id associated with this
session. |
KeyQuery |
getKeyQuery()
Gets a key query.
|
KeyList |
getKeysByQuery(KeyQuery keyQuery)
Gets a list of
Keys matching the given search. |
void |
useFederatedAgencyView()
Federates the view for methods in this session.
|
void |
useIsolatedAgencyView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getAgencyId()
Agency
Id
associated with this
session. Agency Id
associated with this sessionmandatory
- This method must be implemented. Agency getAgency() throws OperationFailedException, PermissionDeniedException
Agency
associated with this session. Agency
associated with this sessionOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canSearchKeys()
Key
searches. 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 search operations to
unauthorized users. false
if search methods are not authorized,
true
otherwisemandatory
- This method must be implemented. void useFederatedAgencyView()
mandatory
- This method is must be implemented. void useIsolatedAgencyView()
mandatory
- This method is must be implemented. KeyQuery getKeyQuery()
mandatory
- This method must be implemented. KeyList getKeysByQuery(KeyQuery keyQuery) throws OperationFailedException, PermissionDeniedException
Keys
matching the given search.keyQuery
- the key query KeyList
NullArgumentException
- keyQuery
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- keyQuery
is not
of this servicemandatory
- This method must be implemented.