Package org.nuxeo.ecm.core.versioning
Class OrphanVersionRemoverListener
- java.lang.Object
-
- org.nuxeo.ecm.core.versioning.OrphanVersionRemoverListener
-
- All Implemented Interfaces:
PostCommitEventListener
public class OrphanVersionRemoverListener extends Object implements PostCommitEventListener
Async listener that is in charge to delete the versions. Before running the delete operation on the versions passed as argument of the event, it will call the registredOrphanVersionRemovalFilterto allow them to mark some of the orphan versions to be kept.- Author:
- Tiry
-
-
Constructor Summary
Constructors Constructor Description OrphanVersionRemoverListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Collection<OrphanVersionRemovalFilter>getFilters()voidhandleEvent(EventBundle events)Handles the set of events that were raised during the life of an user operation.protected voidremoveIfPossible(CoreSession session, ShallowDocumentModel deletedLiveDoc, List<String> versionUUIDs)
-
-
-
Constructor Detail
-
OrphanVersionRemoverListener
public OrphanVersionRemoverListener()
-
-
Method Detail
-
handleEvent
public void handleEvent(EventBundle events)
Description copied from interface:PostCommitEventListenerHandles the set of events that were raised during the life of an user operation.The events are fired as a
BundleEventafter the transaction is committed.- Specified by:
handleEventin interfacePostCommitEventListener- Parameters:
events- the events to handle
-
getFilters
protected Collection<OrphanVersionRemovalFilter> getFilters()
-
removeIfPossible
protected void removeIfPossible(CoreSession session, ShallowDocumentModel deletedLiveDoc, List<String> versionUUIDs)
-
-