public class VersionHistoryImpl extends NodeImpl implements VersionHistory
VersionHistoryImpl
...JCR_CHILD_NODE_DEFINITION, JCR_CONTENT, JCR_FROZEN_NODE, JCR_PROPERTY_DEFINITION, JCR_ROOT_VERSION, JCR_VERSION_LABELS
Constructor and Description |
---|
VersionHistoryImpl(SessionImpl session,
NodeState state,
ItemLifeCycleListener[] listeners) |
Modifier and Type | Method and Description |
---|---|
void |
addVersionLabel(String versionName,
String label,
boolean moveLabel) |
protected void |
checkIsWritable()
Checks if the repository supports level 2 (writing) and the status of
this item.
|
NodeIterator |
getAllFrozenNodes() |
NodeIterator |
getAllLinearFrozenNodes() |
VersionIterator |
getAllLinearVersions() |
VersionIterator |
getAllVersions() |
Version |
getRootVersion() |
Version |
getVersion(String versionName) |
String |
getVersionableIdentifier() |
String |
getVersionableUUID() |
Version |
getVersionByLabel(String label) |
String[] |
getVersionLabels() |
String[] |
getVersionLabels(Version version) |
boolean |
hasVersionLabel(String label) |
boolean |
hasVersionLabel(Version version,
String label) |
boolean |
isSame(Item otherItem) |
protected boolean |
isWritable()
Always returns false
|
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, getName, getNode, getNode, getNodes, getNodes, getNodes, getPrimaryItem, getPrimaryNodeType, getProperties, getProperties, getProperties, getProperty, getProperty, getReferences, getReferences, getSharedSet, getUUID, getVersionHistory, getWeakReferences, getWeakReferences, hasNode, hasNodes, hasProperties, hasProperty, holdsLock, isCheckedOut, isLocked, isNode, isNodeType, lock, lock, merge, 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
checkStatus, getAncestor, getDepth, getItemManager, getItemState, getParent, getPath, getSession, isModified, isNew, refresh, remove, save, statusChanged
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, refresh, remove, save
public VersionHistoryImpl(SessionImpl session, NodeState state, ItemLifeCycleListener[] listeners) throws VersionException, RepositoryException
VersionException
RepositoryException
public String getVersionableUUID() throws RepositoryException
getVersionableUUID
in interface VersionHistory
RepositoryException
VersionHistory.getVersionableUUID()
public Version getRootVersion() throws RepositoryException
getRootVersion
in interface VersionHistory
RepositoryException
VersionHistory.getRootVersion()
public VersionIterator getAllVersions() throws RepositoryException
getAllVersions
in interface VersionHistory
RepositoryException
VersionHistory.getAllVersions()
public VersionIterator getAllLinearVersions() throws RepositoryException
getAllLinearVersions
in interface VersionHistory
RepositoryException
VersionHistory.getAllLinearVersions()
public NodeIterator getAllFrozenNodes() throws RepositoryException
getAllFrozenNodes
in interface VersionHistory
RepositoryException
VersionHistory.getAllFrozenNodes()
public NodeIterator getAllLinearFrozenNodes() throws RepositoryException
getAllLinearFrozenNodes
in interface VersionHistory
RepositoryException
VersionHistory.getAllLinearFrozenNodes()
public Version getVersion(String versionName) throws VersionException, RepositoryException
getVersion
in interface VersionHistory
VersionException
RepositoryException
VersionHistory.getVersion(String)
public Version getVersionByLabel(String label) throws RepositoryException
getVersionByLabel
in interface VersionHistory
RepositoryException
VersionHistory.getVersionByLabel(String)
public void addVersionLabel(String versionName, String label, boolean moveLabel) throws VersionException, RepositoryException
addVersionLabel
in interface VersionHistory
VersionException
RepositoryException
VersionHistory.addVersionLabel(String, String, boolean)
public void removeVersionLabel(String label) throws VersionException, RepositoryException
removeVersionLabel
in interface VersionHistory
VersionException
RepositoryException
VersionHistory.removeVersionLabel(String)
public boolean hasVersionLabel(String label) throws RepositoryException
hasVersionLabel
in interface VersionHistory
RepositoryException
VersionHistory.hasVersionLabel(String)
public boolean hasVersionLabel(Version version, String label) throws VersionException, RepositoryException
hasVersionLabel
in interface VersionHistory
VersionException
RepositoryException
VersionHistory.hasVersionLabel(Version, String)
public String[] getVersionLabels() throws RepositoryException
getVersionLabels
in interface VersionHistory
RepositoryException
VersionHistory.getVersionLabels()
public String[] getVersionLabels(Version version) throws VersionException, RepositoryException
getVersionLabels
in interface VersionHistory
VersionException
RepositoryException
VersionHistory.getVersionLabels(Version)
public void removeVersion(String versionName) throws ReferentialIntegrityException, AccessDeniedException, UnsupportedRepositoryOperationException, VersionException, RepositoryException
removeVersion
in interface VersionHistory
ReferentialIntegrityException
AccessDeniedException
UnsupportedRepositoryOperationException
VersionException
RepositoryException
VersionHistory.removeVersion(String)
public String getVersionableIdentifier() throws RepositoryException
getVersionableIdentifier
in interface VersionHistory
RepositoryException
VersionHistory.getVersionableIdentifier()
public boolean isSame(Item otherItem) throws RepositoryException
isSame
in interface Item
isSame
in class ItemImpl
otherItem
- RepositoryException
Item.isSame(Item)
protected void checkIsWritable() throws UnsupportedRepositoryOperationException, ConstraintViolationException, RepositoryException
ItemImpl
checkIsWritable
in class ItemImpl
UnsupportedRepositoryOperationException
ConstraintViolationException
RepositoryException
ItemStateValidator
protected boolean isWritable() throws RepositoryException
isWritable
in class ItemImpl
RepositoryException
UnsupportedRepositoryOperationException
ItemImpl.isWritable()
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.