Interface FileSearchSession

All Superinterfaces:
AutoCloseable, Closeable, FileQuerySession, OsidSession, OsidSession

public interface FileSearchSession extends FileQuerySession

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 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. The FileSearchOrder is supplied to a FileSearch to specify the ordering of results.
      Returns:
      the file search order.
      Compliance:
      mandatory - This method must be implemented.
    • getFilesBySearch

      Gets the search results matching the given search query using the given search.
      Parameters:
      fileQuery - the file query
      fileSearch - the file search
      Returns:
      the file search results
      Throws:
      NullArgumentException - fileQuery or fileSearch is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - fileQuery or fileSearch is not of this service
      Compliance:
      mandatory - This method must be implemented.
    • getFileQueryFromInspector

      FileQuery getFileQueryFromInspector(FileQueryInspector fileQueryInspector)
      Gets a file query from an inspector. The inspector is available from a FileSearchResults .
      Parameters:
      fileQueryInspector - a query inspector
      Returns:
      the file query
      Throws:
      NullArgumentException - fileQueryInspector is null
      UnsupportedException - fileQueryInspector is not of this service
      Compliance:
      mandatory - This method must be implemented.