public class BulkLifeCycleChangeListener extends Object implements PostCommitEventListener
If event occurs on a folder, it will recurse on children to perform the same transition if possible.
If the transition event is about marking documents as "deleted", and a child cannot perform the transition, it will be removed.
Undelete transitions are not processed, but this listener instead looks for a specific documentUndeleted event. This is because we want to undelete documents (parents) under which we don't want to recurse.
Reinit document copy lifeCycle (BulkLifeCycleChangeListener is bound to the event documentCreatedByCopy)
| Constructor and Description |
|---|
BulkLifeCycleChangeListener() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
changeDocumentsState(CoreSession documentManager,
DocumentModelList docModelList,
String transition,
String targetState) |
void |
handleEvent(EventBundle events)
Handles the set of events that were raised during the life of an user operation.
|
protected boolean |
isNonRecursiveTransition(String transition,
String type) |
protected void |
processTransition(Event event) |
protected void |
reinitDocumentsLifeCyle(CoreSession documentManager,
DocumentModelList docs) |
public BulkLifeCycleChangeListener()
public void handleEvent(EventBundle events)
PostCommitEventListener
The events are fired as a BundleEvent after the transaction is committed.
handleEvent in interface PostCommitEventListenerevents - the events to handleprotected void processTransition(Event event)
protected void reinitDocumentsLifeCyle(CoreSession documentManager, DocumentModelList docs)
protected boolean isNonRecursiveTransition(String transition, String type)
protected void changeDocumentsState(CoreSession documentManager, DocumentModelList docModelList, String transition, String targetState)
Copyright © 2015 Nuxeo SA. All rights reserved.