OSID Logo
OSID Specifications
filing package
Version 3.0.0
Release Candidate Preview
Interfaceosid.filing.FileLookupSession
Implementsosid.OsidSession
Description

This session defines methods for looking up on files in the current directory.

This session defines the following views:

  • comparative view: elements may be silently omitted or re-ordered
  • plenary view: provides a complete result set or is an error condition
  • federated directory view: searches include entries in directories of which this directory is an ancestor
  • isolated directory view: lookups are restricted to entries in this directory only

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.

MethodgetDirectoryId
Description

Gets the Id of this directory.

Returnosid.id.Idthe Id of this directory
CompliancemandatoryThis method must be implemented.
MethodgetDirectory
Description

Gets the directory associated with this session.

Returnosid.filing.Directorythe directory associated with this session
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanLookupFiles
Description

Tests if this user can perform entry lookups. 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 lookup operations.

Returnboolean false if lookup methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoduseComparativeFileView
Description

The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.

CompliancemandatoryThis method is must be implemented.
MethodusePlenaryFileView
Description

A complete view of the file returns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.

CompliancemandatoryThis method is must be implemented.
MethoduseFederatedDirectoryView
Description

Federates the view for methods in this session. A federated view will include entries in directories which are children of this directory.

CompliancemandatoryThis method is must be implemented.
MethoduseIsolatedDirectoryView
Description

Isolates the view for methods in this session. An isolated view restricts lookups to this directory only.

CompliancemandatoryThis method is must be implemented.
MethodgetFile
Description

Gets a specified file or alias to the file.

Parametersosid.id.IdfileIdthe Id to the file
Returnosid.filing.Filethe file
ErrorsNOT_FOUND fileId is not found
NULL_ARGUMENT fileId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetFilesByIds
Description

Gets a 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.

Parametersosid.id.IdListfileIdsthe list of Ids to retrieve
Returnosid.filing.FileListthe returned File list
ErrorsNOT_FOUNDan Id was not found
NULL_ARGUMENT fileIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetFilesByGenusType
Description

Gets a 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.

Parametersosid.type.TypefileGenusTypea file genus type
Returnosid.filing.FileListthe returned File list
ErrorsNULL_ARGUMENT fileGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetFilesByParentGenusType
Description

Gets a 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.

Parametersosid.type.TypefileGenusTypea file genus type
Returnosid.filing.FileListthe returned File list
ErrorsNULL_ARGUMENT fileGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetFilesByRecordType
Description

Gets a 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.

Parametersosid.type.TypefileRecordTypea file record type
Returnosid.filing.FileListthe returned File list
ErrorsNULL_ARGUMENT fileRecordType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetFiles
Description

Gets the list of files and aliases to files in this directory. In a federated view, this method returns all files in descendant directories. 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.

Returnosid.filing.FileListthe list of files in this directory
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.