Package org.nuxeo.drive.listener
Class NuxeoDriveFileSystemDeletionListener
java.lang.Object
org.nuxeo.drive.listener.NuxeoDriveFileSystemDeletionListener
- All Implemented Interfaces:
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.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected LogEntrycomputeLogEntry(String eventName, Date eventDate, String docId, String docPath, String principal, String docType, String repositoryName, String currentLifeCycleState, String impactedUserName, FileSystemItem fsItem) protected voidfireVirtualEventLogEntries(DocumentModel doc, String eventName, NuxeoPrincipal principal, String impactedUserName, CoreSession session) protected List<DocumentModel>getChildSyncRoots(DocumentModel doc, CoreSession session) protected FileSystemItemgetFileSystemItem(DocumentModel doc, String eventName) protected booleanprotected DocumentModelvoidhandleEvent(Event event) Handle the given event.protected boolean
-
Constructor Details
-
NuxeoDriveFileSystemDeletionListener
public NuxeoDriveFileSystemDeletionListener()
-
-
Method Details
-
handleEvent
Description copied from interface:EventListenerHandle the given event. The listener can cancel the event by callingEvent.cancel()- Specified by:
handleEventin interfaceEventListener- Parameters:
event- the event
-
handleBeforeDocUpdate
-
handleLifeCycleTransition
-
handleAboutToRemove
-
fireVirtualEventLogEntries
protected void fireVirtualEventLogEntries(DocumentModel doc, String eventName, NuxeoPrincipal principal, String impactedUserName, CoreSession session) -
getFileSystemItem
-
getChildSyncRoots
-
computeLogEntry
-