Interface DirectorySearchSession
- All Superinterfaces:
AutoCloseable, Closeable, DirectoryQuerySession, OsidSession, OsidSession
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 Summary
Modifier and TypeMethodDescriptiongetDirectoriesBySearch(DirectoryQuery directoryQuery, DirectorySearch directorySearch) Gets the search results matching the given search.getDirectoryQueryFromInspector(DirectoryQueryInspector directoryQueryInspector) Gets a directory query from an inspector.Gets a diectory search.Gets a directory search order.Methods inherited from interface DirectoryQuerySession
canSearchDirectories, getDirectoriesByQuery, getDirectory, getDirectoryId, getDirectoryQuery, useFederatedDirectoryView, useIsolatedDirectoryViewModifier and TypeMethodDescriptionbooleanTests if this user can performDirectorysearches.getDirectoriesByQuery(DirectoryQuery directoryQuery) Gets a list ofDirectoryobjects matching the given directory query.Gets the directory associated with this session.Gets theIdof this directory.Gets a directory query.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
-
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. TheDirectorySearchOrderis supplied to aDirectorySearchto 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 querydirectorySearch- the directory search- Returns:
- the directory search results
- Throws:
NullArgumentException-directoryQueryordirectorySearchisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-directoryQueryordirectorySearchis not of this service- Compliance:
mandatory- This method must be implemented.
-
getDirectoryQueryFromInspector
Gets a directory query from an inspector. The inspector is available from anDirectorySearchResults.- Parameters:
directoryQueryInspector- a query inspector- Returns:
- the directory query
- Throws:
NullArgumentException-directoryQueryInspectorisnullUnsupportedException-directoryQueryInspectoris not of this service- Compliance:
mandatory- This method must be implemented.
-