org.apache.jackrabbit.jcr2spi.version
Class VersionHistoryImpl

java.lang.Object
  extended by org.apache.jackrabbit.jcr2spi.ItemImpl
      extended by org.apache.jackrabbit.jcr2spi.NodeImpl
          extended by 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 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
VersionHistoryImpl(SessionImpl session, NodeState state, ItemLifeCycleListener[] listeners)
           
 
Method Summary
 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)
           
 
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

VersionHistoryImpl

public VersionHistoryImpl(SessionImpl session,
                          NodeState state,
                          ItemLifeCycleListener[] listeners)
                   throws VersionException,
                          RepositoryException
Throws:
VersionException
RepositoryException
Method Detail

getVersionableUUID

public String getVersionableUUID()
                          throws RepositoryException
Specified by:
getVersionableUUID in interface VersionHistory
Throws:
RepositoryException
See Also:
VersionHistory.getVersionableUUID()

getRootVersion

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

getAllVersions

public VersionIterator getAllVersions()
                               throws RepositoryException
Specified by:
getAllVersions in interface VersionHistory
Throws:
RepositoryException
See Also:
VersionHistory.getAllVersions()

getAllLinearVersions

public VersionIterator getAllLinearVersions()
                                     throws RepositoryException
Specified by:
getAllLinearVersions in interface VersionHistory
Throws:
RepositoryException
See Also:
VersionHistory.getAllLinearVersions()

getAllFrozenNodes

public NodeIterator getAllFrozenNodes()
                               throws RepositoryException
Specified by:
getAllFrozenNodes in interface VersionHistory
Throws:
RepositoryException
See Also:
VersionHistory.getAllFrozenNodes()

getAllLinearFrozenNodes

public NodeIterator getAllLinearFrozenNodes()
                                     throws RepositoryException
Specified by:
getAllLinearFrozenNodes in interface VersionHistory
Throws:
RepositoryException
See Also:
VersionHistory.getAllLinearFrozenNodes()

getVersion

public Version getVersion(String versionName)
                   throws VersionException,
                          RepositoryException
Specified by:
getVersion in interface VersionHistory
Throws:
VersionException
RepositoryException
See Also:
VersionHistory.getVersion(String)

getVersionByLabel

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

addVersionLabel

public void addVersionLabel(String versionName,
                            String label,
                            boolean moveLabel)
                     throws VersionException,
                            RepositoryException
Specified by:
addVersionLabel in interface VersionHistory
Throws:
VersionException
RepositoryException
See Also:
VersionHistory.addVersionLabel(String, String, boolean)

removeVersionLabel

public void removeVersionLabel(String label)
                        throws VersionException,
                               RepositoryException
Specified by:
removeVersionLabel in interface VersionHistory
Throws:
VersionException
RepositoryException
See Also:
VersionHistory.removeVersionLabel(String)

hasVersionLabel

public boolean hasVersionLabel(String label)
                        throws RepositoryException
Specified by:
hasVersionLabel in interface VersionHistory
Throws:
RepositoryException
See Also:
VersionHistory.hasVersionLabel(String)

hasVersionLabel

public boolean hasVersionLabel(Version version,
                               String label)
                        throws VersionException,
                               RepositoryException
Specified by:
hasVersionLabel in interface VersionHistory
Throws:
VersionException
RepositoryException
See Also:
VersionHistory.hasVersionLabel(Version, String)

getVersionLabels

public String[] getVersionLabels()
                          throws RepositoryException
Specified by:
getVersionLabels in interface VersionHistory
Throws:
RepositoryException
See Also:
VersionHistory.getVersionLabels()

getVersionLabels

public String[] getVersionLabels(Version version)
                          throws VersionException,
                                 RepositoryException
Specified by:
getVersionLabels in interface VersionHistory
Throws:
VersionException
RepositoryException
See Also:
VersionHistory.getVersionLabels(Version)

removeVersion

public void removeVersion(String versionName)
                   throws ReferentialIntegrityException,
                          AccessDeniedException,
                          UnsupportedRepositoryOperationException,
                          VersionException,
                          RepositoryException
Specified by:
removeVersion in interface VersionHistory
Throws:
ReferentialIntegrityException
AccessDeniedException
UnsupportedRepositoryOperationException
VersionException
RepositoryException
See Also:
VersionHistory.removeVersion(String)

getVersionableIdentifier

public String getVersionableIdentifier()
                                throws RepositoryException
Specified by:
getVersionableIdentifier in interface VersionHistory
Throws:
RepositoryException
See Also:
VersionHistory.getVersionableIdentifier()

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
Description copied from class: ItemImpl
Checks 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:
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.