OSID Logo
OSID Specifications
filing package
Version 3.1.0
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.IdnotificationId the notification Id
osid.id.IdListdirectoryIds the Ids of the new directories
Compliancemandatory This method must be implemented.
MethodchangedDirectories
Description

The callback for notification of updated directories.

Parametersosid.id.IdnotificationId the notification Id
osid.id.IdListdirectoryIds the Ids of the new directories
Compliancemandatory This method must be implemented.
MethoddeletedDirectories
Description

the callback for notification of deleted directories.

Parametersosid.id.IdnotificationId the notification Id
osid.id.IdListdirectoryIds the Ids of the new directories
Compliancemandatory This method must be implemented.