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 StringCHILDREN_PROPprotected DocumentModeldocstatic StringNAME_PROPstatic StringSCHEMA-
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 DocumentRefcreateLeafVersion(DocumentModel targetDoc, VersioningOption option)protected DocumentModelcreateLeafVersionAndFetch(VersioningOption option)SnapshotcreateSnapshot(VersioningOption option)protected voiddump(int level, StringBuilder sb)protected voidfillFlatTree(List<Snapshot> list)protected DocumentModelgetCheckoutDocument(DocumentModel target)List<DocumentModel>getChildren()protected List<DocumentModel>getChildren(DocumentModel target)List<Snapshot>getChildrenSnapshots()DocumentModelgetDocument()List<Snapshot>getFlatTree()DocumentRefgetRef()protected DocumentModelgetVersionForLabel(DocumentModel target, String versionLabel)DocumentModelrestore(String versionLabel)protected DocumentModelrestore(DocumentModel leafVersion, DocumentModel target, boolean first, DocumentModelList olddocs)StringtoString()
-
-
-
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:
getDocumentin 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:
createSnapshotin interfaceSnapshotable
-
getChildren
protected List<DocumentModel> getChildren(DocumentModel target)
-
getChildren
public List<DocumentModel> getChildren()
- Specified by:
getChildrenin interfaceSnapshot
-
getChildrenSnapshots
public List<Snapshot> getChildrenSnapshots()
- Specified by:
getChildrenSnapshotsin interfaceSnapshot
-
getFlatTree
public List<Snapshot> getFlatTree()
- Specified by:
getFlatTreein 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)
-
-