public class ClientVersionHistory extends ClientNode implements VersionHistory
RemoteVersionHistory
interface. This class makes a remote version history locally available using
the JCR VersionHistory
interface.VersionHistory
,
RemoteVersionHistory
JCR_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, update
getAncestor, getDepth, getName, getParent, getPath, getSession, isModified, isNew, isSame, refresh, remove, save
getFactory, getItem, getNode, getNodeTypeArray
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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, 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, update
accept, getAncestor, getDepth, getName, getParent, getPath, getSession, isModified, isNew, isNode, isSame, refresh, remove, save
public ClientVersionHistory(Session session, RemoteVersionHistory remote, LocalAdapterFactory factory)
session
- current sessionremote
- remote version historyfactory
- local adapter factorypublic Version getRootVersion() throws RepositoryException
getRootVersion
in interface VersionHistory
RepositoryException
public VersionIterator getAllVersions() throws RepositoryException
getAllVersions
in interface VersionHistory
RepositoryException
public Version getVersion(String versionName) throws VersionException, RepositoryException
getVersion
in interface VersionHistory
VersionException
RepositoryException
public Version getVersionByLabel(String label) throws RepositoryException
getVersionByLabel
in interface VersionHistory
RepositoryException
public void addVersionLabel(String versionName, String label, boolean moveLabel) throws VersionException, RepositoryException
addVersionLabel
in interface VersionHistory
VersionException
RepositoryException
public void removeVersionLabel(String label) throws VersionException, RepositoryException
removeVersionLabel
in interface VersionHistory
VersionException
RepositoryException
public boolean hasVersionLabel(String label) throws RepositoryException
hasVersionLabel
in interface VersionHistory
RepositoryException
public boolean hasVersionLabel(Version version, String label) throws VersionException, RepositoryException
hasVersionLabel
in interface VersionHistory
VersionException
RepositoryException
public String[] getVersionLabels() throws RepositoryException
getVersionLabels
in interface VersionHistory
RepositoryException
public String[] getVersionLabels(Version version) throws VersionException, RepositoryException
getVersionLabels
in interface VersionHistory
VersionException
RepositoryException
public void removeVersion(String versionName) throws UnsupportedRepositoryOperationException, VersionException, RepositoryException
removeVersion
in interface VersionHistory
UnsupportedRepositoryOperationException
VersionException
RepositoryException
public String getVersionableUUID() throws RepositoryException
getVersionableIdentifier()
should be
used instead.getVersionableUUID
in interface VersionHistory
RepositoryException
public NodeIterator getAllFrozenNodes() throws RepositoryException
getAllFrozenNodes
in interface VersionHistory
RepositoryException
public NodeIterator getAllLinearFrozenNodes() throws RepositoryException
getAllLinearFrozenNodes
in interface VersionHistory
RepositoryException
public VersionIterator getAllLinearVersions() throws RepositoryException
getAllLinearVersions
in interface VersionHistory
RepositoryException
public String getVersionableIdentifier() throws RepositoryException
getVersionableIdentifier
in interface VersionHistory
RepositoryException
Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.