public interface FileLookupSession extends OsidSession
This session defines methods for looking up on files in the current directory.
This session defines the following views:
Generally, the comparative view should be used for most applications as it permits operation even if there is data out of sync. Some administrative applications may need to know whether it had retrieved an entire set of objects and may sacrifice some interoperability for the sake of precision using the plenary view.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canLookupFiles()
Tests if this user can perform entry lookups.
|
Directory |
getDirectory()
Gets the directory associated with this session.
|
Id |
getDirectoryId()
Gets the
Id of this directory. |
File |
getFile(Id fileId)
Gets a specified file or alias to the file.
|
FileList |
getFiles()
Gets the list of files and aliases to files in this directory.
|
FileList |
getFilesByGenusType(Type fileGenusType)
Gets a
FileList corresponding to the given file genus
Type which does not include files of genus types
derived from the specified Type. |
FileList |
getFilesByIds(IdList fileIds)
Gets a
FileList corresponding to the given
IdList. |
FileList |
getFilesByParentGenusType(Type fileGenusType)
Gets a
FileList corresponding to the given file genus
Type and include any additional files with genus types
derived from the specified Type. |
FileList |
getFilesByRecordType(Type fileRecordType)
Gets a
FileList corresponding to the given file record
Type. |
void |
useComparativeFileView()
The returns from the lookup methods may omit or translate elements
based on this session, such as authorization, and not result in an
error.
|
void |
useFederatedDirectoryView()
Federates the view for methods in this session.
|
void |
useIsolatedDirectoryView()
Isolates the view for methods in this session.
|
void |
usePlenaryFileView()
A complete view of the file returns is desired.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getDirectoryId()
Id of this directory. Id of this directorymandatory - This method must be implemented. Directory getDirectory() throws OperationFailedException, PermissionDeniedException
OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canLookupFiles()
PERMISSION_DENIED. This is intended as a hint to an
application that may opt not to offer lookup operations. false if lookup methods are not authorized,
true otherwisemandatory - This method must be implemented. void useComparativeFileView()
mandatory - This method is must be implemented. void usePlenaryFileView()
mandatory - This method is must be implemented. void useFederatedDirectoryView()
mandatory - This method is must be implemented. void useIsolatedDirectoryView()
mandatory - This method is must be implemented. File getFile(Id fileId) throws NotFoundException, OperationFailedException, PermissionDeniedException
fileId - the Id to the fileNotFoundException - fileId is not foundNullArgumentException - fileId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. FileList getFilesByIds(IdList fileIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
FileList corresponding to the given
IdList. In plenary mode, the returned list contains all of the
files specified in the Id list, in the order of the
list, including duplicates, or an error results if an Id
in the supplied list is not found or inaccessible. Otherwise,
inaccessible Fies may be omitted from the list and may
present the elements in any order including returning a unique set.fileIds - the list of Ids to retrieve File listNotFoundException - an Id was not foundNullArgumentException - fileIds is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. FileList getFilesByGenusType(Type fileGenusType) throws OperationFailedException, PermissionDeniedException
FileList corresponding to the given file genus
Type which does not include files of genus types
derived from the specified Type. In plenary mode, the
returned list contains all known files or an error results. Otherwise,
the returned list may contain only those files that are accessible
through this session.fileGenusType - a file genus type File list NullArgumentException - fileGenusType is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. FileList getFilesByParentGenusType(Type fileGenusType) throws OperationFailedException, PermissionDeniedException
FileList corresponding to the given file genus
Type and include any additional files with genus types
derived from the specified Type. In plenary mode, the
returned list contains all known files or an error results. Otherwise,
the returned list may contain only those files that are accessible
through this session.fileGenusType - a file genus type File listNullArgumentException - fileGenusType is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. FileList getFilesByRecordType(Type fileRecordType) throws OperationFailedException, PermissionDeniedException
FileList corresponding to the given file record
Type. The set of files implementing the given record
type is returned. In plenary mode, the returned list
contains all known files or an error results. Otherwise, the returned
list may contain only those files that are accessible through this
session.fileRecordType - a file record type File listNullArgumentException - fileRecordType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. FileList getFiles() throws OperationFailedException, PermissionDeniedException
OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.