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 registredOrphanVersionRemovalFilter
to 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()
void
handleEvent(EventBundle events)
Handles the set of events that were raised during the life of an user operation.protected void
removeIfPossible(CoreSession session, ShallowDocumentModel deletedLiveDoc, List<String> versionUUIDs)
-
-
-
Constructor Detail
-
OrphanVersionRemoverListener
public OrphanVersionRemoverListener()
-
-
Method Detail
-
handleEvent
public void handleEvent(EventBundle events)
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
-
getFilters
protected Collection<OrphanVersionRemovalFilter> getFilters()
-
removeIfPossible
protected void removeIfPossible(CoreSession session, ShallowDocumentModel deletedLiveDoc, List<String> versionUUIDs)
-
-