Interface FileQuerySession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
All Known Subinterfaces:
FileSearchSession

public interface FileQuerySession extends OsidSession

This session provides methods for searching among files and directories objects. The search query is constructed using a FileQuery .

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

    • getDirectoryId

      Id getDirectoryId()
      Gets the Id of this directory.
      Returns:
      the Id of this directory
      Compliance:
      mandatory - This method must be implemented.
    • getDirectory

      Gets the directory associated with this session.
      Returns:
      the directory associated with this session
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canSearchFiles

      boolean canSearchFiles()
      Tests if this user can perform File searches. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer search operations to unauthorized users.
      Returns:
      false if lookup methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • useFederatedDirectoryView

      void useFederatedDirectoryView()
      Federates the view for methods in this session. A federated view will include entries in directories which are children of this directory.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedDirectoryView

      void useIsolatedDirectoryView()
      Isolates the view for methods in this session. An isolated view restricts lookups to this directory only.
      Compliance:
      mandatory - This method is must be implemented.
    • getFileQuery

      FileQuery getFileQuery()
      Gets a file query.
      Returns:
      the file query
      Compliance:
      mandatory - This method must be implemented.
    • getFilesByQuery

      Gets a list of Files matching the given file query.
      Parameters:
      fileQuery - the file query
      Returns:
      the returned FileList
      Throws:
      NullArgumentException - fileQuery is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - fileQuery is not of this service
      Compliance:
      mandatory - This method must be implemented.