Package org.nuxeo.snapshot
Class SnapshotRemovalPolicy
- java.lang.Object
-
- org.nuxeo.snapshot.SnapshotRemovalPolicy
-
- All Implemented Interfaces:
OrphanVersionRemovalFilter
public class SnapshotRemovalPolicy extends Object implements OrphanVersionRemovalFilter
-
-
Constructor Summary
Constructors Constructor Description SnapshotRemovalPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canRemoveVersions(CoreSession session, DocumentModel doc, List<String> uuids)
List<String>
getRemovableVersionIds(CoreSession session, ShallowDocumentModel deletedLiveDoc, List<String> versionUUIDs)
This method will be called by theOrphanVersionRemoverListener
.
-
-
-
Method Detail
-
canRemoveVersions
protected boolean canRemoveVersions(CoreSession session, DocumentModel doc, List<String> uuids)
-
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
-
-