public class SnapshotableAdapter extends Object implements Snapshot, Serializable
Modifier and Type | Field and Description |
---|---|
static String |
CHILDREN_PROP |
protected DocumentModel |
doc |
static String |
NAME_PROP |
static String |
SCHEMA |
ABOUT_TO_CREATE_LEAF_VERSION_EVENT, ROOT_DOCUMENT_PROPERTY
Constructor and Description |
---|
SnapshotableAdapter(DocumentModel doc) |
Modifier and Type | Method and Description |
---|---|
protected DocumentRef |
createLeafVersion(DocumentModel targetDoc,
VersioningOption option) |
protected DocumentModel |
createLeafVersionAndFetch(VersioningOption option) |
Snapshot |
createSnapshot(VersioningOption option) |
protected void |
dump(int level,
StringBuffer 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) |
protected DocumentModel |
restore(DocumentModel leafVersion,
DocumentModel target,
boolean first,
DocumentModelList olddocs) |
DocumentModel |
restore(String versionLabel) |
String |
toString() |
protected DocumentModel doc
public static final String SCHEMA
public static final String CHILDREN_PROP
public static final String NAME_PROP
public SnapshotableAdapter(DocumentModel doc)
public DocumentModel getDocument()
getDocument
in interface Snapshot
public DocumentRef getRef()
protected DocumentRef createLeafVersion(DocumentModel targetDoc, VersioningOption option)
protected DocumentModel createLeafVersionAndFetch(VersioningOption option)
public Snapshot createSnapshot(VersioningOption option)
createSnapshot
in interface Snapshotable
protected List<DocumentModel> getChildren(DocumentModel target)
public List<DocumentModel> getChildren()
getChildren
in interface Snapshot
public List<Snapshot> getChildrenSnapshots()
getChildrenSnapshots
in interface Snapshot
protected void fillFlatTree(List<Snapshot> list)
public List<Snapshot> getFlatTree()
getFlatTree
in interface Snapshot
protected void dump(int level, StringBuffer sb)
protected DocumentModel getVersionForLabel(DocumentModel target, String versionLabel)
protected DocumentModel getCheckoutDocument(DocumentModel target)
protected DocumentModel restore(DocumentModel leafVersion, DocumentModel target, boolean first, DocumentModelList olddocs)
public DocumentModel restore(String versionLabel)
Copyright © 2018 Nuxeo. All rights reserved.