public class NuxeoDriveFileSystemDeletionListener extends Object implements EventListener
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:
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.
Constructor and Description |
---|
NuxeoDriveFileSystemDeletionListener() |
Modifier and Type | Method and Description |
---|---|
protected LogEntry |
computeLogEntry(String eventName,
Date eventDate,
String docId,
String docPath,
String principal,
String docType,
String repositoryName,
String currentLifeCycleState,
String impactedUserName,
FileSystemItem fsItem) |
protected void |
fireVirtualEventLogEntries(DocumentModel doc,
String eventName,
Principal principal,
String impactedUserName,
CoreSession session) |
protected List<DocumentModel> |
getChildSyncRoots(DocumentModel doc,
CoreSession session) |
protected FileSystemItem |
getFileSystemItem(DocumentModel doc,
String eventName) |
protected boolean |
handleAboutToRemove(DocumentModel doc) |
protected DocumentModel |
handleBeforeDocUpdate(DocumentEventContext ctx,
DocumentModel doc) |
void |
handleEvent(Event event)
Handle the given event.
|
protected boolean |
handleLifeCycleTransition(DocumentEventContext ctx) |
public NuxeoDriveFileSystemDeletionListener()
public void handleEvent(Event event)
EventListener
Event.cancel()
handleEvent
in interface EventListener
event
- the eventprotected DocumentModel handleBeforeDocUpdate(DocumentEventContext ctx, DocumentModel doc)
protected boolean handleLifeCycleTransition(DocumentEventContext ctx)
protected boolean handleAboutToRemove(DocumentModel doc)
protected void fireVirtualEventLogEntries(DocumentModel doc, String eventName, Principal principal, String impactedUserName, CoreSession session)
protected FileSystemItem getFileSystemItem(DocumentModel doc, String eventName)
protected List<DocumentModel> getChildSyncRoots(DocumentModel doc, CoreSession session)
Copyright © 2017 Nuxeo. All rights reserved.