Interface | osid.filing.DirectoryReceiver | ||
---|---|---|---|
Implements | osid.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() {} } | ||
Method | newDirectories | ||
Description |
The callback for notifications of new directories. | ||
Parameters | osid.id.Id | notificationId | the notification Id |
osid.id.IdList | directoryIds | the Ids of the new directories | |
Compliance | mandatory | This method must be implemented. | |
Method | changedDirectories | ||
Description |
The callback for notification of updated directories. | ||
Parameters | osid.id.Id | notificationId | the notification Id |
osid.id.IdList | directoryIds | the Ids of the new directories | |
Compliance | mandatory | This method must be implemented. | |
Method | deletedDirectories | ||
Description |
the callback for notification of deleted directories. | ||
Parameters | osid.id.Id | notificationId | the notification Id |
osid.id.IdList | directoryIds | the Ids of the new directories | |
Compliance | mandatory | This method must be implemented. |