public class ClientVersionHistory extends ClientNode implements VersionHistory
RemoteVersionHistory
interface. This class makes a remote version history locally available using
the JCR VersionHistory interface.VersionHistory,
RemoteVersionHistoryJCR_CHILD_NODE_DEFINITION, JCR_CONTENT, JCR_FROZEN_NODE, JCR_PROPERTY_DEFINITION, JCR_ROOT_VERSION, JCR_VERSION_LABELS| Constructor and Description |
|---|
ClientVersionHistory(Session session,
RemoteVersionHistory remote,
LocalAdapterFactory factory)
Creates a local adapter for the given remote version history.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addVersionLabel(String versionName,
String label,
boolean moveLabel) |
NodeIterator |
getAllFrozenNodes() |
NodeIterator |
getAllLinearFrozenNodes() |
VersionIterator |
getAllLinearVersions() |
VersionIterator |
getAllVersions() |
Version |
getRootVersion() |
Version |
getVersion(String versionName) |
String |
getVersionableIdentifier() |
String |
getVersionableUUID()
Deprecated.
As of JCR 2.0,
getVersionableIdentifier() should be
used instead. |
Version |
getVersionByLabel(String label) |
String[] |
getVersionLabels() |
String[] |
getVersionLabels(Version version) |
boolean |
hasVersionLabel(String label) |
boolean |
hasVersionLabel(Version version,
String label) |
void |
removeVersion(String versionName) |
void |
removeVersionLabel(String label) |
accept, addMixin, addNode, addNode, canAddMixin, cancelMerge, checkin, checkout, doneMerge, followLifecycleTransition, getAllowedLifecycleTransistions, getBaseVersion, getCorrespondingNodePath, getDefinition, getIdentifier, getIndex, getLock, getMixinNodeTypes, getNode, getNodes, getNodes, getNodes, getPrimaryItem, getPrimaryNodeType, getProperties, getProperties, getProperties, getProperty, getReferences, getReferences, getSharedSet, getUUID, getVersionHistory, getWeakReferences, getWeakReferences, hasNode, hasNodes, hasProperties, hasProperty, holdsLock, isCheckedOut, isLocked, isNode, isNodeType, lock, merge, orderBefore, removeMixin, removeShare, removeSharedSet, restore, restore, restore, restoreByLabel, setPrimaryType, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, unlock, updategetAncestor, getDepth, getName, getParent, getPath, getSession, isModified, isNew, isSame, refresh, remove, savegetFactory, getItem, getNode, getNodeTypeArrayclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddMixin, addNode, addNode, canAddMixin, cancelMerge, checkin, checkout, doneMerge, followLifecycleTransition, getAllowedLifecycleTransistions, getBaseVersion, getCorrespondingNodePath, getDefinition, getIdentifier, getIndex, getLock, getMixinNodeTypes, getNode, getNodes, getNodes, getNodes, getPrimaryItem, getPrimaryNodeType, getProperties, getProperties, getProperties, getProperty, getReferences, getReferences, getSharedSet, getUUID, getVersionHistory, getWeakReferences, getWeakReferences, hasNode, hasNodes, hasProperties, hasProperty, holdsLock, isCheckedOut, isLocked, isNodeType, lock, merge, orderBefore, removeMixin, removeShare, removeSharedSet, restore, restore, restore, restoreByLabel, setPrimaryType, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, unlock, updateaccept, getAncestor, getDepth, getName, getParent, getPath, getSession, isModified, isNew, isNode, isSame, refresh, remove, savepublic ClientVersionHistory(Session session, RemoteVersionHistory remote, LocalAdapterFactory factory)
session - current sessionremote - remote version historyfactory - local adapter factorypublic Version getRootVersion() throws RepositoryException
getRootVersion in interface VersionHistoryRepositoryExceptionpublic VersionIterator getAllVersions() throws RepositoryException
getAllVersions in interface VersionHistoryRepositoryExceptionpublic Version getVersion(String versionName) throws VersionException, RepositoryException
getVersion in interface VersionHistoryVersionExceptionRepositoryExceptionpublic Version getVersionByLabel(String label) throws RepositoryException
getVersionByLabel in interface VersionHistoryRepositoryExceptionpublic void addVersionLabel(String versionName, String label, boolean moveLabel) throws VersionException, RepositoryException
addVersionLabel in interface VersionHistoryVersionExceptionRepositoryExceptionpublic void removeVersionLabel(String label) throws VersionException, RepositoryException
removeVersionLabel in interface VersionHistoryVersionExceptionRepositoryExceptionpublic boolean hasVersionLabel(String label) throws RepositoryException
hasVersionLabel in interface VersionHistoryRepositoryExceptionpublic boolean hasVersionLabel(Version version, String label) throws VersionException, RepositoryException
hasVersionLabel in interface VersionHistoryVersionExceptionRepositoryExceptionpublic String[] getVersionLabels() throws RepositoryException
getVersionLabels in interface VersionHistoryRepositoryExceptionpublic String[] getVersionLabels(Version version) throws VersionException, RepositoryException
getVersionLabels in interface VersionHistoryVersionExceptionRepositoryExceptionpublic void removeVersion(String versionName) throws UnsupportedRepositoryOperationException, VersionException, RepositoryException
removeVersion in interface VersionHistoryUnsupportedRepositoryOperationExceptionVersionExceptionRepositoryExceptionpublic String getVersionableUUID() throws RepositoryException
getVersionableIdentifier() should be
used instead.getVersionableUUID in interface VersionHistoryRepositoryExceptionpublic NodeIterator getAllFrozenNodes() throws RepositoryException
getAllFrozenNodes in interface VersionHistoryRepositoryExceptionpublic NodeIterator getAllLinearFrozenNodes() throws RepositoryException
getAllLinearFrozenNodes in interface VersionHistoryRepositoryExceptionpublic VersionIterator getAllLinearVersions() throws RepositoryException
getAllLinearVersions in interface VersionHistoryRepositoryExceptionpublic String getVersionableIdentifier() throws RepositoryException
getVersionableIdentifier in interface VersionHistoryRepositoryExceptionCopyright © 2004–2021 The Apache Software Foundation. All rights reserved.