Class NuxeoDriveFileSystemDeletionListener

java.lang.Object
org.nuxeo.drive.listener.NuxeoDriveFileSystemDeletionListener
All Implemented Interfaces:
EventListener

public class NuxeoDriveFileSystemDeletionListener extends Object implements EventListener
Synchronous event listener to track events that cannot be directly handled by the FileSystemChangeFinder because the document bound to the event is either no more adaptable as a FileSystemItem after the transaction has been committed (e.g. deletion) or not a descendant of a synchronization root (e.g. security update on any document). In particular this includes:
  • Synchronization root unregistration (user specific).
  • Simple document or synchronization root trashed state change to trashed.
  • Simple document or synchronization root physical removal from the directory.
  • Update of a document after which it has no blob.
  • Move of a document to a non synchronized folder.
  • Security update.
  • Group change.

The listener injects virtual entries in the audit logs with the NuxeoDriveEvents.EVENT_CATEGORY category to be handled by the FileSystemChangeFinder. These entries are set in the context of a NuxeoDriveEvents.VIRTUAL_EVENT_CREATED event handled by the post-commit asynchronous NuxeoDriveVirtualEventLogger to ensure that the transaction is committed before the log entries are actually added.