Class VersionImpl
- java.lang.Object
-
- org.apache.jackrabbit.jcr2spi.ItemImpl
-
- org.apache.jackrabbit.jcr2spi.NodeImpl
-
- org.apache.jackrabbit.jcr2spi.version.VersionImpl
-
-
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 VersionImpl(SessionImpl session, NodeState state, ItemLifeCycleListener[] listeners)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkIsWritable()
Always throws ConstraintViolationException since the version storage is protected.VersionHistory
getContainingHistory()
Calendar
getCreated()
Node
getFrozenNode()
Version
getLinearPredecessor()
Version
getLinearSuccessor()
Version[]
getPredecessors()
Version[]
getSuccessors()
boolean
isSame(Item otherItem)
protected boolean
isWritable()
Always returns false-
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
-
VersionImpl
public VersionImpl(SessionImpl session, NodeState state, ItemLifeCycleListener[] listeners)
-
-
Method Detail
-
getContainingHistory
public VersionHistory getContainingHistory() throws RepositoryException
- Specified by:
getContainingHistory
in interfaceVersion
- Throws:
RepositoryException
- See Also:
Version.getContainingHistory()
-
getCreated
public Calendar getCreated() throws RepositoryException
- Specified by:
getCreated
in interfaceVersion
- Throws:
RepositoryException
- See Also:
Version.getCreated()
-
getSuccessors
public Version[] getSuccessors() throws RepositoryException
- Specified by:
getSuccessors
in interfaceVersion
- Throws:
RepositoryException
- See Also:
Version.getSuccessors()
-
getLinearSuccessor
public Version getLinearSuccessor() throws RepositoryException
- Specified by:
getLinearSuccessor
in interfaceVersion
- Throws:
RepositoryException
- See Also:
Version.getLinearSuccessor()
-
getPredecessors
public Version[] getPredecessors() throws RepositoryException
- Specified by:
getPredecessors
in interfaceVersion
- Throws:
RepositoryException
- See Also:
Version.getPredecessors()
-
getLinearPredecessor
public Version getLinearPredecessor() throws RepositoryException
- Specified by:
getLinearPredecessor
in interfaceVersion
- Throws:
RepositoryException
- See Also:
Version.getLinearPredecessor()
-
getFrozenNode
public Node getFrozenNode() throws RepositoryException
- Specified by:
getFrozenNode
in interfaceVersion
- Throws:
RepositoryException
- See Also:
Version.getFrozenNode()
-
isSame
public boolean isSame(Item otherItem) throws RepositoryException
- Specified by:
isSame
in interfaceItem
- Overrides:
isSame
in classItemImpl
- Parameters:
otherItem
-- Returns:
- Throws:
RepositoryException
- See Also:
Item.isSame(Item)
-
checkIsWritable
protected void checkIsWritable() throws UnsupportedRepositoryOperationException, ConstraintViolationException, RepositoryException
Always throws ConstraintViolationException since the version storage is protected.- Overrides:
checkIsWritable
in classItemImpl
- Throws:
UnsupportedRepositoryOperationException
ConstraintViolationException
RepositoryException
- See Also:
ItemStateValidator
-
isWritable
protected boolean isWritable() throws RepositoryException
Always returns false- Overrides:
isWritable
in classItemImpl
- Throws:
RepositoryException
UnsupportedRepositoryOperationException
- See Also:
ItemImpl.isWritable()
-
-