public class SQLDocumentVersion extends SQLDocumentLive
| Modifier and Type | Class and Description |
|---|---|
static class |
SQLDocumentVersion.VersionNotModifiableException |
BaseDocument.BlobWriteContext<T extends StateAccessor>, BaseDocument.BlobWriteInfo<T extends StateAccessor>, BaseDocument.StateBlobAccessor, BaseDocument.VisitDocument.BlobAccessor, Document.WriteContextnode, proxySchemas, readonly, session, systemPropNameMap, typeBLOB_DATA, BLOB_DIGEST, BLOB_ENCODING, BLOB_LENGTH, BLOB_MIME_TYPE, BLOB_NAME, DC_ISSUED, DC_MODIFIED, DC_PREFIX, EMPTY_STRING_ARRAY, FULLTEXT_BINARYTEXT_PROP, FULLTEXT_JOBID_PROP, FULLTEXT_SIMPLETEXT_PROP, LOCK_CREATED_PROP, LOCK_OWNER_PROP, MISC_LIFECYCLE_STATE_PROP, NO_DIRTY, NON_CANONICAL_INDEX, RELATED_TEXT, RELATED_TEXT_ID, RELATED_TEXT_RESOURCES, TOKEN_SEP, VERSION_WRITABLE_PROPSBINARY_TEXT_SYS_PROP, FULLTEXT_JOBID_SYS_PROP, SIMPLE_TEXT_SYS_PROP| Modifier | Constructor and Description |
|---|---|
protected |
SQLDocumentVersion(Node node,
ComplexType type,
SQLSession session,
boolean readonly) |
| Modifier and Type | Method and Description |
|---|---|
Document |
addChild(String name,
String typeName)
Creates a new child document of the given type.
|
Document |
checkIn(String label,
String description)
Creates a new version.
|
void |
checkOut() |
boolean |
equals(Object other) |
Document |
getBaseVersion()
Gets the version to which a checked in document is linked.
|
Document |
getChild(String name)
Gets a child document given its name.
|
List<Document> |
getChildren()
Gets the children of the document.
|
List<String> |
getChildrenIds()
Gets a list of the children ids.
|
Document |
getParent()
Gets the parent document, or
null if this is the root document. |
String |
getPath()
Gets the path of this document.
|
Document |
getSourceDocument()
Gets the source for this document.
|
Document |
getVersion(String label)
Gets a version of this document, given its label.
|
String |
getVersionSeriesId()
Gets the version series id.
|
Document |
getWorkingCopy()
Gets the working copy for this document.
|
boolean |
hasChild(String name)
Checks whether this document has a child of the given name.
|
boolean |
hasChildren()
Tests if the document has any children.
|
int |
hashCode() |
boolean |
isCheckedOut()
Checks whether this document is checked out.
|
boolean |
isFolder()
Checks whether this document is a folder.
|
boolean |
isLatestMajorVersion()
Checks whether this document is the latest major version.
|
boolean |
isLatestVersion()
Checks whether this document is the latest version.
|
boolean |
isMajorVersion()
Checks whether this document is a major version.
|
protected boolean |
isReadOnlyProperty(String name) |
boolean |
isVersion()
Checks whether this document is a version document.
|
boolean |
isVersionSeriesCheckedOut()
Checks if there is a checked out working copy for the version series of this document.
|
void |
orderBefore(String src,
String dest)
Orders the given source child before the destination child.
|
void |
restore(Document version)
Replaces this document's content with the version specified.
|
void |
setPropertyValue(String name,
Serializable value)
Sets a simple property value.
|
addFacet, followTransition, getAllFacets, getAllowedStateTransitions, getChangeToken, getCheckinComment, getChild, getChildAsList, getChildForWrite, getDocumentLock, getFacets, getLastVersion, getLifeCyclePolicy, getLifeCycleState, getName, getNode, getPos, getPropertyValue, getProxySchemas, getRepositoryName, getSession, getSystemProp, getTargetDocument, getType, getUUID, getValue, getVersionCreationDate, getVersionLabel, getVersions, getVersionsIds, hasFacet, internalName, isProxy, isReadOnly, isRetentionActive, markUserChange, readDocumentPart, readPrefetch, remove, removeDocumentLock, removeFacet, setCurrentLifeCycleState, setDocumentLock, setLifeCyclePolicy, setReadOnly, setRetentionActive, setSystemProp, setTargetDocument, setValue, toString, updateList, updateList, validateUserVisibleChangeToken, visitBlobs, writeDocumentPartbuildUserVisibleChangeToken, canonicalXPath, checkReadOnlyIgnoredWrite, clearDirtyFlags, getBlobInfo, getLegacyChangeToken, getLock, getTopLevelSchema, getValueBlob, getValueComplex, getValueField, getValueObject, getWriteContext, isVersionWritableProperty, readComplexProperty, readPrefetch, readPrefetch, readPrefetchField, removeLock, setBlobInfo, setLock, setValueBlob, setValueComplex, setValueField, setValueObject, typedArray, updateChangeToken, validateLegacyChangeToken, validateUserVisibleChangeToken, visitBlobs, writeComplexProperty, writeComplexPropertyclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetLock, getWriteContext, removeLock, setLockprotected SQLDocumentVersion(Node node, ComplexType type, SQLSession session, boolean readonly)
public boolean isVersion()
DocumentisVersion in interface DocumentisVersion in class SQLDocumentLivetrue if it's a version, false otherwisepublic boolean isCheckedOut()
DocumentisCheckedOut in interface DocumentisCheckedOut in class SQLDocumentLivetrue if the document is checked out, or false otherwisepublic boolean isVersionSeriesCheckedOut()
DocumentisVersionSeriesCheckedOut in interface DocumentisVersionSeriesCheckedOut in class SQLDocumentLivetrue if there is a checked out working copypublic boolean isMajorVersion()
DocumentisMajorVersion in interface DocumentisMajorVersion in class SQLDocumentLivetrue if this is a major version, or false otherwisepublic boolean isLatestVersion()
DocumentisLatestVersion in interface DocumentisLatestVersion in class SQLDocumentLivetrue if this is the latest version, or false otherwisepublic boolean isLatestMajorVersion()
DocumentisLatestMajorVersion in interface DocumentisLatestMajorVersion in class SQLDocumentLivetrue if this is the latest major version, or false otherwisepublic Document getWorkingCopy()
DocumentgetWorkingCopy in interface DocumentgetWorkingCopy in class SQLDocumentLivepublic Document getBaseVersion()
Document
Returns null for a checked out document or a version or a proxy.
getBaseVersion in interface DocumentgetBaseVersion in class SQLDocumentLivenullpublic String getVersionSeriesId()
DocumentgetVersionSeriesId in interface DocumentgetVersionSeriesId in class SQLDocumentLivepublic Document getSourceDocument()
DocumentFor a version, it's the working copy.
For a proxy, it's the version the proxy points to.
getSourceDocument in interface DocumentgetSourceDocument in class SQLDocumentLivepublic String getPath()
DocumentgetPath in interface DocumentgetPath in class SQLDocumentLivepublic Document getParent()
Documentnull if this is the root document.getParent in interface DocumentgetParent in class SQLDocumentLivenullpublic boolean isFolder()
DocumentisFolder in interface DocumentisFolder in class SQLDocumentLivetrue if the document is a folder, false otherwisepublic void orderBefore(String src, String dest)
Document
Both source and destination must be names that point to child documents of this document. The source document
will be placed before the destination one. If destination is null, the source document will be appended
at the end of the children list.
orderBefore in interface DocumentorderBefore in class SQLDocumentLivesrc - the document to movedest - the document before which to place the source documentpublic Document addChild(String name, String typeName)
DocumentThrows an error if this document is not a folder.
addChild in interface DocumentaddChild in class SQLDocumentLivename - the name of the new child to createtypeName - the type of the child to createpublic Document getChild(String name)
Document
Throws DocumentNotFoundException if the document could not be found.
getChild in interface DocumentgetChild in class SQLDocumentLivename - the name of the child to retrievepublic List<Document> getChildren()
DocumentReturns an empty list for non-folder documents.
getChildren in interface DocumentgetChildren in class SQLDocumentLivepublic List<String> getChildrenIds()
DocumentReturns an empty list for non-folder documents.
getChildrenIds in interface DocumentgetChildrenIds in class SQLDocumentLivepublic boolean hasChild(String name)
Document
Returns false for non-folder documents.
hasChild in interface DocumenthasChild in class SQLDocumentLivename - the name of the child to checktrue if the child exists, false otherwisepublic boolean hasChildren()
Document
Returns false for non-folder documents.
hasChildren in interface DocumenthasChildren in class SQLDocumentLivetrue if the document has children, false otherwisepublic Document checkIn(String label, String description)
DocumentcheckIn in interface DocumentcheckIn in class SQLDocumentLivelabel - the version labeldescription - the checkin commentpublic void checkOut()
checkOut in interface DocumentcheckOut in class SQLDocumentLivepublic void restore(Document version)
Documentrestore in interface Documentrestore in class SQLDocumentLiveversion - the version to replace withpublic Document getVersion(String label)
DocumentgetVersion in interface DocumentgetVersion in class SQLDocumentLivelabel - the version labelpublic void setPropertyValue(String name, Serializable value)
Document
For more generic properties described by an xpath, use Document.setValue(java.lang.String, java.lang.Object) instead.
setPropertyValue in interface DocumentsetPropertyValue in class SQLDocumentLivename - the name of the property to setvalue - the value to setDocument.setValue(java.lang.String, java.lang.Object)protected boolean isReadOnlyProperty(String name)
public boolean equals(Object other)
equals in class SQLDocumentLivepublic int hashCode()
hashCode in class SQLDocumentLiveCopyright © 2018 Nuxeo. All rights reserved.