Package org.nuxeo.snapshot
Class SnapshotRemovalPolicy
java.lang.Object
org.nuxeo.snapshot.SnapshotRemovalPolicy
- All Implemented Interfaces:
OrphanVersionRemovalFilter
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
canRemoveVersions
(CoreSession session, DocumentModel doc, List<String> uuids) getRemovableVersionIds
(CoreSession session, ShallowDocumentModel deletedLiveDoc, List<String> versionUUIDs) This method will be called by theOrphanVersionRemoverListener
.
-
Constructor Details
-
SnapshotRemovalPolicy
public SnapshotRemovalPolicy()
-
-
Method Details
-
canRemoveVersions
-
getRemovableVersionIds
public List<String> getRemovableVersionIds(CoreSession session, ShallowDocumentModel deletedLiveDoc, List<String> versionUUIDs) Description copied from interface:OrphanVersionRemovalFilter
This method will be called by theOrphanVersionRemoverListener
. The method should return the List<String> versionUUIDs that can be deleted.A "dummy" implementation will return the same list as the one received as parameter.
- Specified by:
getRemovableVersionIds
in interfaceOrphanVersionRemovalFilter
- Parameters:
session
- the CoreSessiondeletedLiveDoc
- the Shallow DocumentModel that was deletedversionUUIDs
- the UUIDs of the versions associated to the deleted document- Returns:
- the "filtered" list of versions that can be removed
-