OSID Logo
OSID Specifications
filing package
Version 3.0.0
Release Candidate Preview
Interfaceosid.filing.FileSearchSession
Implementsosid.filing.FileQuerySession
Description

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 a ancestor
  • isolated directory view: searches are restricted this directory only
MethodgetFileSearch
Description

Gets a file search.

Returnosid.filing.FileSearchthe file search
CompliancemandatoryThis method must be implemented.
MethodgetFileSearchOrder
Description

Gets a file search order. The FileSearchOrder is supplied to a FileSearch to specify the ordering of results.

Returnosid.filing.FileSearchOrderthe file search order.
CompliancemandatoryThis method must be implemented.
MethodgetFilesBySearch
Description

Gets the search results matching the given search query using the given search.

Parametersosid.filing.FileQueryfileQuerythe file query
osid.filing.FileSearchfileSearchthe file search
Returnosid.filing.FileSearchResultsthe file search results
ErrorsNULL_ARGUMENT fileQuery or fileSearch is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED fileQuery or fileSearch is not of this service
CompliancemandatoryThis method must be implemented.
MethodgetFileQueryFromInspector
Description

Gets a file query from an inspector. The inspector is available from a FileSearchResults.

Parametersosid.filing.FileQueryInspectorfileQueryInspectora query inspector
Returnosid.filing.FileQuerythe file query
ErrorsNULL_ARGUMENT fileQueryInspector is null
UNSUPPORTED fileQueryInspector is not of this service
CompliancemandatoryThis method must be implemented.