org.apache.jackrabbit.jcr2spi.version
Class VersionImpl

java.lang.Object
  extended by org.apache.jackrabbit.jcr2spi.ItemImpl
      extended by org.apache.jackrabbit.jcr2spi.NodeImpl
          extended by org.apache.jackrabbit.jcr2spi.version.VersionImpl
All Implemented Interfaces:
Item, Node, Version, ItemStateLifeCycleListener

public class VersionImpl
extends NodeImpl
implements Version

VersionImpl...


Field Summary
 
Fields inherited from class org.apache.jackrabbit.jcr2spi.ItemImpl
listeners, session
 
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
VersionImpl(SessionImpl session, NodeState state, ItemLifeCycleListener[] listeners)
           
 
Method Summary
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.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
 
Methods inherited from interface javax.jcr.Item
accept, getAncestor, getDepth, getName, getParent, getPath, getSession, isModified, isNew, isNode, refresh, remove, save
 

Constructor Detail

VersionImpl

public VersionImpl(SessionImpl session,
                   NodeState state,
                   ItemLifeCycleListener[] listeners)
Method Detail

getContainingHistory

public VersionHistory getContainingHistory()
                                    throws RepositoryException
Specified by:
getContainingHistory in interface Version
Throws:
RepositoryException
See Also:
Version.getContainingHistory()

getCreated

public Calendar getCreated()
                    throws RepositoryException
Specified by:
getCreated in interface Version
Throws:
RepositoryException
See Also:
Version.getCreated()

getSuccessors

public Version[] getSuccessors()
                        throws RepositoryException
Specified by:
getSuccessors in interface Version
Throws:
RepositoryException
See Also:
Version.getSuccessors()

getLinearSuccessor

public Version getLinearSuccessor()
                           throws RepositoryException
Specified by:
getLinearSuccessor in interface Version
Throws:
RepositoryException
See Also:
Version.getLinearSuccessor()

getPredecessors

public Version[] getPredecessors()
                          throws RepositoryException
Specified by:
getPredecessors in interface Version
Throws:
RepositoryException
See Also:
Version.getPredecessors()

getLinearPredecessor

public Version getLinearPredecessor()
                             throws RepositoryException
Specified by:
getLinearPredecessor in interface Version
Throws:
RepositoryException
See Also:
Version.getLinearPredecessor()

getFrozenNode

public Node getFrozenNode()
                   throws RepositoryException
Specified by:
getFrozenNode in interface Version
Throws:
RepositoryException
See Also:
Version.getFrozenNode()

isSame

public boolean isSame(Item otherItem)
               throws RepositoryException
Specified by:
isSame in interface Item
Overrides:
isSame in class ItemImpl
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 class ItemImpl
Throws:
UnsupportedRepositoryOperationException
ConstraintViolationException
RepositoryException
See Also:
ItemStateValidator

isWritable

protected boolean isWritable()
                      throws RepositoryException
Always returns false

Overrides:
isWritable in class ItemImpl
Throws:
RepositoryException
UnsupportedRepositoryOperationException
See Also:
ItemImpl.isWritable()


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.