Interface FileSmartDirectorySession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface FileSmartDirectorySession extends OsidSession

This session manages queries and sequencing to create "smart" dynamic catalogs. A FileQuery can be retrieved from this session and mapped to this Directory to create a virtual collection of files. The files may be sequenced using the FileSearchOrder from this session.

This Directory has a default query that matches any file and a default search order that specifies no sequencing. The queries may be examined using a FileQueryInspector . The query may be modified by converting the inspector back to a FileQuery .

  • Method Details

    • getDirectoryId

      Id getDirectoryId()
      Gets the absolute path 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.
    • canManageSmartDirectories

      boolean canManageSmartDirectories()
      Tests if this user can manage smart directories. A return of true does not guarantee successful authorization. A return of false indicates that it is known 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 operations to unauthorized users.
      Returns:
      false if smart directory management is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getFileQuery

      FileQuery getFileQuery()
      Gets a file query.
      Returns:
      the file query
      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.
    • applyFileQuery

      void applyFileQuery(FileQuery fileQuery) throws OperationFailedException, PermissionDeniedException
      Applies a file query to this directory.
      Parameters:
      fileQuery - the file query
      Throws:
      NullArgumentException - fileQuery is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      UnsupportedException - fileQuery not of this service
      Compliance:
      mandatory - This method must be implemented.
    • inspectFileQuery

      Gets a file query inspector for this directory.
      Returns:
      the file query inspector
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method must be implemented.
    • applyFileSequencing

      void applyFileSequencing(FileSearchOrder fileSearchOrder) throws OperationFailedException, PermissionDeniedException
      Applies a file search order to this directory.
      Parameters:
      fileSearchOrder - the file search order
      Throws:
      NullArgumentException - fileSearchOrder is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      UnsupportedException - fileSearchOrder not of this service
      Compliance:
      mandatory - This method must be implemented.
    • getFileQueryFromInspector

      FileQuery getFileQueryFromInspector(FileQueryInspector fileQueryInspector)
      Gets a file query from an inspector.
      Parameters:
      fileQueryInspector - a file 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.