Interface KeySearchSession

All Superinterfaces:
AutoCloseable, Closeable, KeyQuerySession, OsidSession, OsidSession

public interface KeySearchSession extends KeyQuerySession

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 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. The KeySearchOrder is supplied to a KeySearch to specify the ordering of results.
      Returns:
      the key search order
      Compliance:
      mandatory - This method must be implemented.
    • getKeysBySearch

      Gets a list of Keys matching the given search.
      Parameters:
      keyQuery - the key query
      keySearch - the key search
      Returns:
      the returned search results
      Throws:
      NullArgumentException - keyQuery or keySearch is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - keySearch or a keyQuery is not of this service
      Compliance:
      mandatory - This method must be implemented.
    • getKeyQueryFromInspector

      KeyQuery getKeyQueryFromInspector(KeyQueryInspector keyQueryInspector)
      Gets a key query from an inspector. The inspector is available from an KeySearchResults .
      Parameters:
      keyQueryInspector - a query inspector
      Returns:
      the key query
      Throws:
      NullArgumentException - keyQueryInspector is null
      UnsupportedException - keyQueryInspector is not of this service
      Compliance:
      mandatory - This method must be implemented.