Interface FileSmartDirectorySession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, 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.
Like all OsidSessions, FileSmartDirectorySessions are
dedicated to single processing threads and a single authenticated user.
-
Method Summary
Modifier and TypeMethodDescriptionvoidapplyFileQuery(FileQuery fileQuery) Applies a file query to this directory.voidapplyFileSequencing(FileSearchOrder fileSearchOrder) Applies a file search order to this directory.booleanTests if this user can manage smart directories.Gets theDirectoryassociated with this session.Gets the absolute path of this directory.Gets a file query.getFileQueryFromInspector(FileQueryInspector fileQueryInspector) Gets a file query from an inspector.Gets a file search order.Gets a file query inspector for this directory.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatTypes, getLocales, isAuthenticated, startTransaction, supportsTransactions
-
Method Details
-
getDirectoryId
Id getDirectoryId()Gets the absolute path of this directory.- Returns:
- the
Idof this directory - Compliance:
mandatory- This method must be implemented.
-
getDirectory
Gets theDirectoryassociated with this session.- Returns:
- the
Directoryassociated with this session - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer operations to unauthorized users.- Returns:
falseif smart directory management is not authorized,trueotherwise- 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. TheFileSearchOrderis supplied to aFileSearchto specify the ordering of results.- Returns:
- the file search order
- Compliance:
mandatory- This method must be implemented.
-
applyFileQuery
Applies a file query to this directory.- Parameters:
fileQuery- the file query- Throws:
NullArgumentException-fileQueryisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurredUnsupportedException-fileQuerynot 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 requestPermissionDeniedException- 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-fileSearchOrderisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurredUnsupportedException-fileSearchOrdernot of this service- Compliance:
mandatory- This method must be implemented.
-
getFileQueryFromInspector
Gets a file query from an inspector.- Parameters:
fileQueryInspector- a file query inspector- Returns:
- the file query
- Throws:
NullArgumentException-fileQueryInspectorisnullUnsupportedException-fileQueryInspectoris not of this service- Compliance:
mandatory- This method must be implemented.
-