OSID Logo
OSID Specifications
filing package
Version 3.1.0
Interfaceosid.filing.FileNotificationSession
Implementsosid.OsidSession
Used Byosid.filing.FilingManager
osid.filing.FilingProxyManager
Description

This session defines methods to receive notifications on adds/changes to Files. This session is intended for consumers needing to synchronize their state with this service without the use of polling. Notifications are cancelled when this session is closed.

Two view are defined in this session:

federated view: includes notifications of files located in subdirectories in this directory

isolated view: includes notifcations of files in this directory only

MethodgetDirectoryId
Description

Gets the Id of this directory.

Returnosid.id.Id the Id of this directory
Compliancemandatory This method must be implemented.
MethodgetDirectory
Description

Gets the Directory associated with this session.

Returnosid.filing.Directory the Directory associated with this session
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodcanRegisterForFileNotifications
Description

Tests if this user can register for File notifications. 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 notification operations.

Returnboolean false if notification methods are not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethoduseFederatedDirectoryView
Description

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

Compliancemandatory This method is must be implemented.
MethoduseIsolatedDirectoryView
Description

Isolates the view for methods in this session. An isolated view restricts notifications to this diretory only.

Compliancemandatory This method is must be implemented.
MethodreliableFileNotifications
Description

Reliable notifications are desired. In reliable mode, notifications are to be acknowledged using acknowledgeFileNotification().

Compliancemandatory This method is must be implemented.
MethodunreliableFileNotifications
Description

Unreliable notifications are desired. In unreliable mode, notifications do not need to be acknowledged.

Compliancemandatory This method is must be implemented.
MethodacknowledgeFileNotification
Description

Acknowledge a file notification.

Parametersosid.id.IdnotificationId the Id of the notification
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodregisterForNewFiles
Description

Register for notifications of new files. FileReceiver.newFiles() is invoked when a new File is created.

ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodregisterForChangedFiles
Description

Registers for notification of updated files. FileReceiver.changedFiles() is invoked when a file is changed.

ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodregisterForChangedFile
Description

Registers for notification of an updated file. FileReceiver.changedFiles() is invoked when the specified file is changed.

Parametersosid.id.IdfileId the Id of the file
ErrorsNULL_ARGUMENT fileId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodregisterForDeletedFiles
Description

Registers for notification of deleted files. FileReceiver.deletedFiles() is invoked when a file is deleted.

ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodregisterForDeletedFile
Description

Registers for notification of a deleted file. FileReceiver.changedFiles() is invoked when the specified file is deleted.

Parametersosid.id.IdfileId the Id of the file
ErrorsNULL_ARGUMENT fileId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.