Interface DirectorySearchSession

All Superinterfaces:
AutoCloseable, Closeable, DirectoryQuerySession, OsidSession, OsidSession

public interface DirectorySearchSession extends DirectoryQuerySession

This session provides methods for searching among Directory objects. The search query is constructed using the DirectoryQuery .

This session defines views that offer differing behaviors for searching.

  • federated directory view: searches include directories in directories of which this directory is an ancestor
  • isolated directory view: searches are restricted to diectories in this directory only
getDirectoriesByQuery() is the basic search method and returns a list of Directories . A more advanced search may be performed with getDirectoriesBySearch() . It accepts a DirectorySearch in addition to the query for the purpose of specifying additional options affecting the entire search, such as ordering. getDirectoriesBySearch() returns an DirectorySearchResults that can be used to access the resulting DirectoryList or be used to perform a search within the result set through DirectorySearch .
  • Method Details

    • getDirectorySearch

      DirectorySearch getDirectorySearch()
      Gets a diectory search.
      Returns:
      the directory search
      Compliance:
      mandatory - This method must be implemented.
    • getDirectorySearchOrder

      DirectorySearchOrder getDirectorySearchOrder()
      Gets a directory search order. The DirectorySearchOrder is supplied to a DirectorySearch to specify the ordering of results.
      Returns:
      the directory search order
      Compliance:
      mandatory - This method must be implemented.
    • getDirectoriesBySearch

      DirectorySearchResults getDirectoriesBySearch(DirectoryQuery directoryQuery, DirectorySearch directorySearch) throws OperationFailedException, PermissionDeniedException
      Gets the search results matching the given search.
      Parameters:
      directoryQuery - the directory query
      directorySearch - the directory search
      Returns:
      the directory search results
      Throws:
      NullArgumentException - directoryQuery or directorySearch is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - directoryQuery or directorySearch is not of this service
      Compliance:
      mandatory - This method must be implemented.
    • getDirectoryQueryFromInspector

      DirectoryQuery getDirectoryQueryFromInspector(DirectoryQueryInspector directoryQueryInspector)
      Gets a directory query from an inspector. The inspector is available from an DirectorySearchResults .
      Parameters:
      directoryQueryInspector - a query inspector
      Returns:
      the directory query
      Throws:
      NullArgumentException - directoryQueryInspector is null
      UnsupportedException - directoryQueryInspector is not of this service
      Compliance:
      mandatory - This method must be implemented.