OSID Logo
OSID Specifications
filing package
Version 3.0.0
Release Candidate Preview
Interfaceosid.filing.FileNotificationSession
Implementsosid.OsidSession
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.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.
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
CompliancemandatoryThis 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.

CompliancemandatoryThis method is must be implemented.
MethoduseIsolatedDirectoryView
Description

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

CompliancemandatoryThis method is must be implemented.
MethodreliableFileNotifications
Description

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

CompliancemandatoryThis method is must be implemented.
MethodunreliableFileNotifications
Description

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

CompliancemandatoryThis method is must be implemented.
MethodacknowledgeFileNotification
Description

Acknowledge a file notification.

Parametersosid.id.IdnotificationIdthe Id of the notification
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForNewFiles
Description

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

ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForChangedFiles
Description

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

ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis 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.IdfileIdthe Id of the file
ErrorsNULL_ARGUMENT fileId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForDeletedFiles
Description

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

ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis 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.IdfileIdthe Id of the file
ErrorsNULL_ARGUMENT fileId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.