Class VersionHistoryImpl
- java.lang.Object
-
- org.apache.jackrabbit.jcr2spi.ItemImpl
-
- org.apache.jackrabbit.jcr2spi.NodeImpl
-
- org.apache.jackrabbit.jcr2spi.version.VersionHistoryImpl
-
- All Implemented Interfaces:
Item,Node,VersionHistory,ItemStateLifeCycleListener
public class VersionHistoryImpl extends NodeImpl implements VersionHistory
VersionHistoryImpl...
-
-
Field Summary
-
Fields inherited from interface javax.jcr.Node
JCR_CHILD_NODE_DEFINITION, JCR_CONTENT, JCR_FROZEN_NODE, JCR_PROPERTY_DEFINITION, JCR_ROOT_VERSION, JCR_VERSION_LABELS
-
-
Constructor Summary
Constructors Constructor Description VersionHistoryImpl(SessionImpl session, NodeState state, ItemLifeCycleListener[] listeners)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddVersionLabel(String versionName, String label, boolean moveLabel)protected voidcheckIsWritable()Checks if the repository supports level 2 (writing) and the status of this item.NodeIteratorgetAllFrozenNodes()NodeIteratorgetAllLinearFrozenNodes()VersionIteratorgetAllLinearVersions()VersionIteratorgetAllVersions()VersiongetRootVersion()VersiongetVersion(String versionName)StringgetVersionableIdentifier()StringgetVersionableUUID()VersiongetVersionByLabel(String label)String[]getVersionLabels()String[]getVersionLabels(Version version)booleanhasVersionLabel(String label)booleanhasVersionLabel(Version version, String label)booleanisSame(Item otherItem)protected booleanisWritable()Always returns falsevoidremoveVersion(String versionName)voidremoveVersionLabel(String label)-
Methods inherited from class org.apache.jackrabbit.jcr2spi.NodeImpl
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
-
Methods inherited from class org.apache.jackrabbit.jcr2spi.ItemImpl
checkStatus, getAncestor, getDepth, getItemManager, getItemState, getParent, getPath, getSession, isModified, isNew, refresh, remove, save, statusChanged
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.jcr.Item
accept, getAncestor, getDepth, getName, getParent, getPath, getSession, isModified, isNew, isNode, refresh, remove, save
-
Methods inherited from interface javax.jcr.Node
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
-
-
-
-
Constructor Detail
-
VersionHistoryImpl
public VersionHistoryImpl(SessionImpl session, NodeState state, ItemLifeCycleListener[] listeners) throws VersionException, RepositoryException
- Throws:
VersionExceptionRepositoryException
-
-
Method Detail
-
getVersionableUUID
public String getVersionableUUID() throws RepositoryException
- Specified by:
getVersionableUUIDin interfaceVersionHistory- Throws:
RepositoryException- See Also:
VersionHistory.getVersionableUUID()
-
getRootVersion
public Version getRootVersion() throws RepositoryException
- Specified by:
getRootVersionin interfaceVersionHistory- Throws:
RepositoryException- See Also:
VersionHistory.getRootVersion()
-
getAllVersions
public VersionIterator getAllVersions() throws RepositoryException
- Specified by:
getAllVersionsin interfaceVersionHistory- Throws:
RepositoryException- See Also:
VersionHistory.getAllVersions()
-
getAllLinearVersions
public VersionIterator getAllLinearVersions() throws RepositoryException
- Specified by:
getAllLinearVersionsin interfaceVersionHistory- Throws:
RepositoryException- See Also:
VersionHistory.getAllLinearVersions()
-
getAllFrozenNodes
public NodeIterator getAllFrozenNodes() throws RepositoryException
- Specified by:
getAllFrozenNodesin interfaceVersionHistory- Throws:
RepositoryException- See Also:
VersionHistory.getAllFrozenNodes()
-
getAllLinearFrozenNodes
public NodeIterator getAllLinearFrozenNodes() throws RepositoryException
- Specified by:
getAllLinearFrozenNodesin interfaceVersionHistory- Throws:
RepositoryException- See Also:
VersionHistory.getAllLinearFrozenNodes()
-
getVersion
public Version getVersion(String versionName) throws VersionException, RepositoryException
- Specified by:
getVersionin interfaceVersionHistory- Throws:
VersionExceptionRepositoryException- See Also:
VersionHistory.getVersion(String)
-
getVersionByLabel
public Version getVersionByLabel(String label) throws RepositoryException
- Specified by:
getVersionByLabelin interfaceVersionHistory- Throws:
RepositoryException- See Also:
VersionHistory.getVersionByLabel(String)
-
addVersionLabel
public void addVersionLabel(String versionName, String label, boolean moveLabel) throws VersionException, RepositoryException
- Specified by:
addVersionLabelin interfaceVersionHistory- Throws:
VersionExceptionRepositoryException- See Also:
VersionHistory.addVersionLabel(String, String, boolean)
-
removeVersionLabel
public void removeVersionLabel(String label) throws VersionException, RepositoryException
- Specified by:
removeVersionLabelin interfaceVersionHistory- Throws:
VersionExceptionRepositoryException- See Also:
VersionHistory.removeVersionLabel(String)
-
hasVersionLabel
public boolean hasVersionLabel(String label) throws RepositoryException
- Specified by:
hasVersionLabelin interfaceVersionHistory- Throws:
RepositoryException- See Also:
VersionHistory.hasVersionLabel(String)
-
hasVersionLabel
public boolean hasVersionLabel(Version version, String label) throws VersionException, RepositoryException
- Specified by:
hasVersionLabelin interfaceVersionHistory- Throws:
VersionExceptionRepositoryException- See Also:
VersionHistory.hasVersionLabel(Version, String)
-
getVersionLabels
public String[] getVersionLabels() throws RepositoryException
- Specified by:
getVersionLabelsin interfaceVersionHistory- Throws:
RepositoryException- See Also:
VersionHistory.getVersionLabels()
-
getVersionLabels
public String[] getVersionLabels(Version version) throws VersionException, RepositoryException
- Specified by:
getVersionLabelsin interfaceVersionHistory- Throws:
VersionExceptionRepositoryException- See Also:
VersionHistory.getVersionLabels(Version)
-
removeVersion
public void removeVersion(String versionName) throws ReferentialIntegrityException, AccessDeniedException, UnsupportedRepositoryOperationException, VersionException, RepositoryException
- Specified by:
removeVersionin interfaceVersionHistory- Throws:
ReferentialIntegrityExceptionAccessDeniedExceptionUnsupportedRepositoryOperationExceptionVersionExceptionRepositoryException- See Also:
VersionHistory.removeVersion(String)
-
getVersionableIdentifier
public String getVersionableIdentifier() throws RepositoryException
- Specified by:
getVersionableIdentifierin interfaceVersionHistory- Throws:
RepositoryException- See Also:
VersionHistory.getVersionableIdentifier()
-
isSame
public boolean isSame(Item otherItem) throws RepositoryException
- Specified by:
isSamein interfaceItem- Overrides:
isSamein classItemImpl- Parameters:
otherItem-- Returns:
- Throws:
RepositoryException- See Also:
Item.isSame(Item)
-
checkIsWritable
protected void checkIsWritable() throws UnsupportedRepositoryOperationException, ConstraintViolationException, RepositoryExceptionDescription copied from class:ItemImplChecks if the repository supports level 2 (writing) and the status of this item. Note, that this method does not perform any additional validation checks such as access restrictions, locking, checkin status or protection that affect the writing to nodes and properties.- Overrides:
checkIsWritablein classItemImpl- Throws:
UnsupportedRepositoryOperationExceptionConstraintViolationExceptionRepositoryException- See Also:
ItemStateValidator
-
isWritable
protected boolean isWritable() throws RepositoryExceptionAlways returns false- Overrides:
isWritablein classItemImpl- Throws:
RepositoryExceptionUnsupportedRepositoryOperationException- See Also:
ItemImpl.isWritable()
-
-