org.priha.version
Class VersionImpl

java.lang.Object
  extended by org.priha.core.ItemImpl
      extended by org.priha.core.NodeImpl
          extended by org.priha.version.AbstractVersion
              extended by org.priha.version.VersionImpl
All Implemented Interfaces:
java.lang.Comparable<Node>

public class VersionImpl
extends AbstractVersion

Implements a JCR Version. The JCR specification is slightly ambiguous on whether a Version with no predecessors/successors should return an empty array, but we will return an empty array if no such beast exists.


Field Summary
 
Fields inherited from class org.priha.core.NodeImpl
m_cachedUUID, Q_PRIHA_TMPMOVE
 
Fields inherited from class org.priha.core.ItemImpl
m_isNew, m_path, m_session
 
Constructor Summary
VersionImpl(SessionImpl session, Path path, QNodeType primaryType, QNodeDefinition nDef, boolean initDefaults)
           
 
Method Summary
 VersionHistory getContainingHistory()
          
 java.util.Calendar getCreated()
          
 Version[] getPredecessors()
          Priha returns a valid array unless there was something weird going on.
 Version[] getSuccessors()
          Priha returns a valid array unless there was something weird going on.
 
Methods inherited from class org.priha.version.AbstractVersion
addMixin, addNode, addNode, canAddMixin, checkout, getBaseVersion, getLock, lock, merge, prepareProperty, prepareProperty, removeMixin, restore, restore, update
 
Methods inherited from class org.priha.core.NodeImpl
cancelMerge, checkin, compareTo, doneMerge, equals, findPropertyDefinition, getChildOrder, getChildProperty, getCorrespondingNodePath, getDefinition, getIndex, getMixinNodeTypes, getNode, getNode, getNode, getNodes, getNodes, getPrimaryItem, getPrimaryNodeType, getPrimaryQNodeType, getProperties, getProperties, getProperty, getProperty, getQDefinition, getReferences, getUUID, getVersionHistory, hasMixinType, hasNode, hasNode, hasNodes, hasProperties, hasProperty, hasProperty, hasTag, holdsLock, internalSave, isCheckedOut, isLocked, isLockedWithoutToken, isNode, isNodeType, orderBefore, preSave, remove, removeNodeOnly, removeProperty, restoreByLabel, sanitize, save, setChildOrder, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, tag, tag, unlock
 
Methods inherited from class org.priha.core.ItemImpl
accept, enterState, getAncestor, getCreationTime, getDepth, getInternalPath, getName, getParent, getPath, getPathReference, getQName, getSession, getState, hashCode, isModified, isNew, isSame, postSave, refresh, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VersionImpl

public VersionImpl(SessionImpl session,
                   Path path,
                   QNodeType primaryType,
                   QNodeDefinition nDef,
                   boolean initDefaults)
            throws ValueFormatException,
                   VersionException,
                   LockException,
                   ConstraintViolationException,
                   RepositoryException
Throws:
ValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryException
Method Detail

getContainingHistory

public VersionHistory getContainingHistory()
                                    throws RepositoryException

Throws:
RepositoryException

getCreated

public java.util.Calendar getCreated()
                              throws RepositoryException

Throws:
RepositoryException

getPredecessors

public Version[] getPredecessors()
                          throws RepositoryException
Priha returns a valid array unless there was something weird going on. If there are no predecessors, an empty array is returned.

Throws:
RepositoryException

getSuccessors

public Version[] getSuccessors()
                        throws RepositoryException
Priha returns a valid array unless there was something weird going on. If there are no successors, an empty array is returned.

Throws:
RepositoryException