Package org.nuxeo.snapshot
Class SnapshotableAdapter
- java.lang.Object
-
- org.nuxeo.snapshot.SnapshotableAdapter
-
- All Implemented Interfaces:
Serializable
,Snapshot
,Snapshotable
public class SnapshotableAdapter extends Object implements Snapshot, Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
CHILDREN_PROP
protected DocumentModel
doc
static String
NAME_PROP
static String
SCHEMA
-
Fields inherited from interface org.nuxeo.snapshot.Snapshotable
ABOUT_TO_CREATE_LEAF_VERSION_EVENT, ROOT_DOCUMENT_PROPERTY
-
-
Constructor Summary
Constructors Constructor Description SnapshotableAdapter(DocumentModel doc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected DocumentRef
createLeafVersion(DocumentModel targetDoc, VersioningOption option)
protected DocumentModel
createLeafVersionAndFetch(VersioningOption option)
Snapshot
createSnapshot(VersioningOption option)
protected void
dump(int level, StringBuilder sb)
protected void
fillFlatTree(List<Snapshot> list)
protected DocumentModel
getCheckoutDocument(DocumentModel target)
List<DocumentModel>
getChildren()
protected List<DocumentModel>
getChildren(DocumentModel target)
List<Snapshot>
getChildrenSnapshots()
DocumentModel
getDocument()
List<Snapshot>
getFlatTree()
DocumentRef
getRef()
protected DocumentModel
getVersionForLabel(DocumentModel target, String versionLabel)
DocumentModel
restore(String versionLabel)
protected DocumentModel
restore(DocumentModel leafVersion, DocumentModel target, boolean first, DocumentModelList olddocs)
String
toString()
-
-
-
Field Detail
-
doc
protected DocumentModel doc
-
SCHEMA
public static final String SCHEMA
- See Also:
- Constant Field Values
-
CHILDREN_PROP
public static final String CHILDREN_PROP
- See Also:
- Constant Field Values
-
NAME_PROP
public static final String NAME_PROP
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SnapshotableAdapter
public SnapshotableAdapter(DocumentModel doc)
-
-
Method Detail
-
getDocument
public DocumentModel getDocument()
- Specified by:
getDocument
in interfaceSnapshot
-
getRef
public DocumentRef getRef()
-
createLeafVersion
protected DocumentRef createLeafVersion(DocumentModel targetDoc, VersioningOption option)
-
createLeafVersionAndFetch
protected DocumentModel createLeafVersionAndFetch(VersioningOption option)
-
createSnapshot
public Snapshot createSnapshot(VersioningOption option)
- Specified by:
createSnapshot
in interfaceSnapshotable
-
getChildren
protected List<DocumentModel> getChildren(DocumentModel target)
-
getChildren
public List<DocumentModel> getChildren()
- Specified by:
getChildren
in interfaceSnapshot
-
getChildrenSnapshots
public List<Snapshot> getChildrenSnapshots()
- Specified by:
getChildrenSnapshots
in interfaceSnapshot
-
getFlatTree
public List<Snapshot> getFlatTree()
- Specified by:
getFlatTree
in interfaceSnapshot
-
dump
protected void dump(int level, StringBuilder sb)
-
getVersionForLabel
protected DocumentModel getVersionForLabel(DocumentModel target, String versionLabel)
-
getCheckoutDocument
protected DocumentModel getCheckoutDocument(DocumentModel target)
-
restore
protected DocumentModel restore(DocumentModel leafVersion, DocumentModel target, boolean first, DocumentModelList olddocs)
-
restore
public DocumentModel restore(String versionLabel)
-
-