org.apache.jackrabbit.api.jsr283.version
Interface Version

All Superinterfaces:
Item, Node, Version

public interface Version
extends Version

A Version object wraps an nt:version node. It provides convenient access to version information.


Method Summary
 Node getFrozenNode()
          Returns the frozen node of this version.
 Version getLinearPredecessor()
          Assuming that this Version object was acquired through a Workspace W and is within the VersionHistory H, this method returns the predecessor of this version along the same line of descent as is returned by H.getAllLinearVersions() where H was also acquired through W.
 Version getLinearSuccessor()
          Assuming that this Version object was acquired through a Workspace W and is within the VersionHistory H, this method returns the successor of this version along the same line of descent as is returned by H.getAllLinearVersions() where H was also acquired through W.
 
Methods inherited from interface javax.jcr.version.Version
getContainingHistory, getCreated, getPredecessors, getSuccessors
 
Methods inherited from interface javax.jcr.Node
addMixin, addNode, addNode, canAddMixin, cancelMerge, checkin, checkout, doneMerge, getBaseVersion, getCorrespondingNodePath, getDefinition, getIndex, getLock, getMixinNodeTypes, getNode, getNodes, getNodes, getPrimaryItem, getPrimaryNodeType, getProperties, getProperties, getProperty, getReferences, getUUID, getVersionHistory, hasNode, hasNodes, hasProperties, hasProperty, holdsLock, isCheckedOut, isLocked, isNodeType, lock, merge, orderBefore, removeMixin, restore, restore, restore, restoreByLabel, 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, isSame, refresh, remove, save
 

Method Detail

getLinearSuccessor

Version getLinearSuccessor()
                           throws RepositoryException
Assuming that this Version object was acquired through a Workspace W and is within the VersionHistory H, this method returns the successor of this version along the same line of descent as is returned by H.getAllLinearVersions() where H was also acquired through W.

Note that under simple versioing the behavior of this method is equivalent to getting the unique successor (if any) of this version.

Returns:
a Version or null if no linear successor exists.
Throws:
RepositoryException - if an error occurs.
See Also:
VersionHistory.getAllLinearVersions()

getLinearPredecessor

Version getLinearPredecessor()
                             throws RepositoryException
Assuming that this Version object was acquired through a Workspace W and is within the VersionHistory H, this method returns the predecessor of this version along the same line of descent as is returned by H.getAllLinearVersions() where H was also acquired through W.

Note that under simple versioning the behavior of this method is equivalent to getting the unique predecessor (if any) of this version.

Returns:
a Version or null if no linear predecessor exists.
Throws:
RepositoryException - if an error occurs.
See Also:
VersionHistory.getAllLinearVersions()

getFrozenNode

Node getFrozenNode()
                   throws RepositoryException
Returns the frozen node of this version.

Returns:
a Node object
Throws:
RepositoryException - if an error occurs.
Since:
JCR 2.0


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