OSID Logo
OSID Specifications
filing package
Version 3.0.0
Release Candidate Preview
Interfaceosid.filing.DirectoryReceiver
Implementsosid.OsidReceiver
Description

The directory receiver is the consumer supplied interface for receiving notifications pertaining to new, updated or deleted directories.

An example showing how to receive notifications of new directories created under a user's home directory.

                     
                     
                     notificationSession = manager.getDirectoryNotificationSessionForDirectory(myReceiver, "/Users/tom");
                     notificationSession.useFederatedDirectoryView();
                     notificationSession.registerForNewDirectories();
                     
                                 
                     
                
                     
                     
                     class myReceiver {
                         void newDirectories(osid.id.IdList directoryIds) {
                             while (directoryIds.hasNext()) {
                                osid.filing.Directory directory = lookupSession.getDirectory(directoryIds.getNextId());
                                print "new directory created: " + directory.getPath());
                             }
                     
                             notificationSession.acknowledgeDiectoryNotification(notificationId);
                         }
                     
                         void changedDirectories(osid.id.IdList directoryIds) {}
                         void deletedDirectories(osid.id.IdList directoryIds) {}
                         void up() {}
                         void down() {}
                     }
                     
                                 
                     
                
MethodnewDirectories
Description

The callback for notifications of new directories.

Parametersosid.id.IdnotificationIdthe notification Id
osid.id.IdListdirectoryIdsthe Ids of the new directories
CompliancemandatoryThis method must be implemented.
MethodchangedDirectories
Description

The callback for notification of updated directories.

Parametersosid.id.IdnotificationIdthe notification Id
osid.id.IdListdirectoryIdsthe Ids of the new directories
CompliancemandatoryThis method must be implemented.
MethoddeletedDirectories
Description

the callback for notification of deleted directories.

Parametersosid.id.IdnotificationIdthe notification Id
osid.id.IdListdirectoryIdsthe Ids of the new directories
CompliancemandatoryThis method must be implemented.