Class NuxeoDriveGroupUpdateListener
- All Implemented Interfaces:
PostCommitEventListener
,PostCommitFilteringEventListener
UserManager
.
For all the documents carrying an ACL impacted by a changed group or one of its ancestors it fires the
NuxeoDriveEvents.GROUP_UPDATED
event that is handled by the synchronous
NuxeoDriveFileSystemDeletionListener
.
- Since:
- 9.2
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
acceptEvent
(Event event) Checks if this event is worth passing to the asynchronousPostCommitEventListener.handleEvent(org.nuxeo.ecm.core.event.EventBundle)
.getAllGroupNames
(String groupName, EventContext context) Returns a list containing the names of the given group and all its ancestor groups.protected String
getGroupName
(EventContext context) protected String
getImpactedDocumentQuery
(List<String> groupNames) Returns a query listing the documents carrying an ACL impacted by one of the given group names.void
handleEvent
(EventBundle events) Handles the set of events that were raised during the life of an user operation.protected void
handleUpdatedGroups
(List<String> groupNames)
-
Field Details
-
log
protected static final org.apache.logging.log4j.Logger log
-
-
Constructor Details
-
NuxeoDriveGroupUpdateListener
public NuxeoDriveGroupUpdateListener()
-
-
Method Details
-
acceptEvent
Description copied from interface:PostCommitFilteringEventListener
Checks if this event is worth passing to the asynchronousPostCommitEventListener.handleEvent(org.nuxeo.ecm.core.event.EventBundle)
.Note that the event's documents are usually disconnected into
ShallowDocumentModel
instances, which means that this method may not be able to get to all the information it would get from a standard DocumentModel implementation. If there is not enough information in the ShallowDocumentModel to decide whether this event is of interest, then this method should accept it an let the actual logic done inPostCommitEventListener.handleEvent(org.nuxeo.ecm.core.event.EventBundle)
do the final filtering.- Specified by:
acceptEvent
in interfacePostCommitFilteringEventListener
- Parameters:
event
- the event- Returns:
true
to accept it, orfalse
to ignore it
-
handleEvent
Description copied from interface:PostCommitEventListener
Handles the set of events that were raised during the life of an user operation.The events are fired as a
BundleEvent
after the transaction is committed.- Specified by:
handleEvent
in interfacePostCommitEventListener
- Parameters:
events
- the events to handle
-
getGroupName
-
getAllGroupNames
Returns a list containing the names of the given group and all its ancestor groups. -
handleUpdatedGroups
-
getImpactedDocumentQuery
Returns a query listing the documents carrying an ACL impacted by one of the given group names.
-