Interface FileSearchSession
- All Superinterfaces:
AutoCloseable, Closeable, FileQuerySession, OsidSession, OsidSession
This session provides methods for searching among files and directories
objects. The search query is constructed using a FileQuery .
getFilesByQuery() is the basic search method and returns a list of
Files . A more advanced search may be performed with
getFilesBySearch() . It accepts a FileSearch in addition to the
query for the purpose of specifying additional options affecting the
entire search, such as ordering. getFilesBySearch() returns an
FileSearchResults that can be used to access the resulting
FileList or be used to perform a search within the result set through
FileSearch .
This session defines views that offer differing behaviors when retrieving multiple objects.
- federated directory view: searches include entries in directories of which this directory is an ancestor
- isolated directory view: searches are restricted this directory only
-
Method Summary
Modifier and TypeMethodDescriptiongetFileQueryFromInspector(FileQueryInspector fileQueryInspector) Gets a file query from an inspector.getFilesBySearch(FileQuery fileQuery, FileSearch fileSearch) Gets the search results matching the given search query using the given search.Gets a file search.Gets a file search order.Methods inherited from interface FileQuerySession
canSearchFiles, getDirectory, getDirectoryId, getFileQuery, getFilesByQuery, useFederatedDirectoryView, useIsolatedDirectoryViewModifier and TypeMethodDescriptionbooleanTests if this user can performFilesearches.Gets the directory associated with this session.Gets theIdof this directory.Gets a file query.getFilesByQuery(FileQuery fileQuery) Gets a list ofFilesmatching the given file 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
-
getFileSearch
FileSearch getFileSearch()Gets a file search.- Returns:
- the file search
- Compliance:
mandatory- This method must be implemented.
-
getFileSearchOrder
FileSearchOrder getFileSearchOrder()Gets a file search order. TheFileSearchOrderis supplied to aFileSearchto specify the ordering of results.- Returns:
- the file search order.
- Compliance:
mandatory- This method must be implemented.
-
getFilesBySearch
FileSearchResults getFilesBySearch(FileQuery fileQuery, FileSearch fileSearch) throws OperationFailedException, PermissionDeniedException Gets the search results matching the given search query using the given search.- Parameters:
fileQuery- the file queryfileSearch- the file search- Returns:
- the file search results
- Throws:
NullArgumentException-fileQueryorfileSearchisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-fileQueryorfileSearchis not of this service- Compliance:
mandatory- This method must be implemented.
-
getFileQueryFromInspector
Gets a file query from an inspector. The inspector is available from aFileSearchResults.- Parameters:
fileQueryInspector- a query inspector- Returns:
- the file query
- Throws:
NullArgumentException-fileQueryInspectorisnullUnsupportedException-fileQueryInspectoris not of this service- Compliance:
mandatory- This method must be implemented.
-