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

All Superinterfaces:
Item, Node, VersionHistory

public interface VersionHistory
extends VersionHistory

A VersionHistory object wraps an nt:versionHistory node. It provides convenient access to version history information.


Method Summary
 NodeIterator getAllFrozenNodes()
          Returns an iterator over all the frozen nodes of all the versions of this version history.
 NodeIterator getAllLinearFrozenNodes()
          This method returns all the frozen nodes of all the versions in this verison history in the same order as getAllLinearVersions().
 VersionIterator getAllLinearVersions()
          This method returns an iterator over all the versions in the line of descent from the root version to that base version within this history that is bound to the workspace through which this VersionHistory was accessed.
 String getVersionableIdentifier()
          Returns the identifier of the versionable node for which this is the version history.
 
Methods inherited from interface javax.jcr.version.VersionHistory
addVersionLabel, getAllVersions, getRootVersion, getVersion, getVersionableUUID, getVersionByLabel, getVersionLabels, getVersionLabels, hasVersionLabel, hasVersionLabel, removeVersion, removeVersionLabel
 
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

getVersionableIdentifier

String getVersionableIdentifier()
                                throws RepositoryException
Returns the identifier of the versionable node for which this is the version history.

Returns:
the identifier of the versionable node for which this is the version history.
Throws:
RepositoryException - if an error occurs.
Since:
JCR 2.0

getAllLinearVersions

VersionIterator getAllLinearVersions()
                                     throws RepositoryException
This method returns an iterator over all the versions in the line of descent from the root version to that base version within this history that is bound to the workspace through which this VersionHistory was accessed.

Within a version history H, B is the base version bound to workspace W if and only if there exists a versionable node N in W whose version history is H and B is the base version of N.

The line of descent from version V1 to V2, where V2 is a successor of V1, is the ordered list of versions starting with V1 and proceeding through each direct successor to V2.

The versions are returned in order of creation date, from oldest to newest.

Note that in a simple versioning repository the behavior of this method is equivalent to returning all versions in the version history in order from oldest to newest.

Returns:
a VersionIterator object.
Throws:
RepositoryException - if an error occurs.

getAllLinearFrozenNodes

NodeIterator getAllLinearFrozenNodes()
                                     throws RepositoryException
This method returns all the frozen nodes of all the versions in this verison history in the same order as getAllLinearVersions().

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

getAllFrozenNodes

NodeIterator getAllFrozenNodes()
                               throws RepositoryException
Returns an iterator over all the frozen nodes of all the versions of this version history. Under simple versioning the order of the returned nodes will be the order of their creation. Under full versioning the order is implementation-dependent.

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


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