Interface KeySearchSession
- All Superinterfaces:
AutoCloseable, Closeable, KeyQuerySession, OsidSession, 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.
getKeysByQuery() is the basic search method and returns a list of
Keys . A more advanced search may be performed with
getKeysBySearch() . It accepts an KeySearch in addition to the
query for the purpose of specifying additional options affecting the
entire search, such as ordering. getKeysBySearch() returns a
KeySearchResult that can be used to access the resulting
KeyList or be used to perform a search within the result set through
KeySearch .
This session defines views that offer differing behaviors for searching.
- federated agency view: searches include keys in agencies of which this agency is a ancestor in the agency hierarchy
- isolated agency view: searches are restricted to agents in this agency
Keys may have a query record indicated by their respective record types. The query record is accessed via the KeyQuery.
-
Method Summary
Modifier and TypeMethodDescriptiongetKeyQueryFromInspector(KeyQueryInspector keyQueryInspector) Gets a key query from an inspector.getKeysBySearch(KeyQuery keyQuery, KeySearch keySearch) Gets a list ofKeysmatching the given search.Gets a key query.Gets a key search order.Methods inherited from interface KeyQuerySession
canSearchKeys, getAgency, getAgencyId, getKeyQuery, getKeysByQuery, useFederatedAgencyView, useIsolatedAgencyViewModifier and TypeMethodDescriptionbooleanTests if this user can performKeysearches.Gets theAgencyassociated with this session.Gets theAgencyIdassociated with this session.Gets a key query.getKeysByQuery(KeyQuery keyQuery) Gets a list ofKeysmatching the given search.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getKeySearch
KeySearch getKeySearch()Gets a key query.- Returns:
- the key search
- Compliance:
mandatory- This method must be implemented.
-
getKeySearchOrder
KeySearchOrder getKeySearchOrder()Gets a key search order. TheKeySearchOrderis supplied to aKeySearchto specify the ordering of results.- Returns:
- the key search order
- Compliance:
mandatory- This method must be implemented.
-
getKeysBySearch
KeySearchResults getKeysBySearch(KeyQuery keyQuery, KeySearch keySearch) throws OperationFailedException, PermissionDeniedException Gets a list ofKeysmatching the given search.- Parameters:
keyQuery- the key querykeySearch- the key search- Returns:
- the returned search results
- Throws:
NullArgumentException-keyQueryorkeySearchisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-keySearchor akeyQueryis not of this service- Compliance:
mandatory- This method must be implemented.
-
getKeyQueryFromInspector
Gets a key query from an inspector. The inspector is available from anKeySearchResults.- Parameters:
keyQueryInspector- a query inspector- Returns:
- the key query
- Throws:
NullArgumentException-keyQueryInspectorisnullUnsupportedException-keyQueryInspectoris not of this service- Compliance:
mandatory- This method must be implemented.
-