org.apache.jackrabbit.core.version
Interface InternalVersionHistory

All Superinterfaces:
InternalVersionItem

public interface InternalVersionHistory
extends InternalVersionItem

This interface defines the internal version history.


Method Summary
 int getNumVersions()
          Returns the number of versions in this version history.
 InternalVersion getRootVersion()
          Equivalalent to VersionHistory.getRootVersion().
 InternalVersion getVersion(NodeId id)
          Returns the version with the given uuid or null if the respective version does not exist.
 InternalVersion getVersion(QName versionName)
          Equivalalent to VersionHistory.getVersion(java.lang.String).
 UUID getVersionableUUID()
          Returns the UUID of the versionable node that this history belongs to.
 InternalVersion getVersionByLabel(QName label)
          Equivalalent to VersionHistory.getVersionByLabel(java.lang.String) but returns null if the version does not exists.
 QName[] getVersionLabels()
          Returns a string iterator over all version labels that exist in this version history
 NodeId getVersionLabelsId()
          Returns the Id of the version labels node.
 Iterator getVersions()
          Returns an iterator over all versions (not ordered yet), including the root version.
 boolean hasVersion(NodeId id)
          Checks if the version for the given uuid exists in this history.
 boolean hasVersion(QName versionName)
          Checks if the version with the given name exists in this version history.
 
Methods inherited from interface org.apache.jackrabbit.core.version.InternalVersionItem
getId, getParent
 

Method Detail

getRootVersion

public InternalVersion getRootVersion()
Equivalalent to VersionHistory.getRootVersion().

See Also:
VersionHistory.getRootVersion()

getVersion

public InternalVersion getVersion(QName versionName)
                           throws VersionException
Equivalalent to VersionHistory.getVersion(java.lang.String).

Throws:
VersionException
See Also:
VersionHistory.getVersion(java.lang.String)

hasVersion

public boolean hasVersion(QName versionName)
Checks if the version with the given name exists in this version history.

Parameters:
versionName - the name of the version
Returns:
true if the version exists; false otherwise.

hasVersion

public boolean hasVersion(NodeId id)
Checks if the version for the given uuid exists in this history.

Parameters:
id - the id of the version
Returns:
true if the version exists; false otherwise.

getVersion

public InternalVersion getVersion(NodeId id)
Returns the version with the given uuid or null if the respective version does not exist.

Parameters:
id - the id of the version
Returns:
the internal version ot null

getVersionByLabel

public InternalVersion getVersionByLabel(QName label)
Equivalalent to VersionHistory.getVersionByLabel(java.lang.String) but returns null if the version does not exists.

See Also:
VersionHistory.getVersionByLabel(java.lang.String)

getVersions

public Iterator getVersions()
Returns an iterator over all versions (not ordered yet), including the root version.

Returns:
an iterator over InternalVersion objects.

getNumVersions

public int getNumVersions()
Returns the number of versions in this version history.

Returns:
the number of versions, including the root version.

getVersionableUUID

public UUID getVersionableUUID()
Returns the UUID of the versionable node that this history belongs to.

Returns:
the UUID of the versionable node.

getVersionLabels

public QName[] getVersionLabels()
Returns a string iterator over all version labels that exist in this version history

Returns:
the labels

getVersionLabelsId

public NodeId getVersionLabelsId()
Returns the Id of the version labels node.

Returns:
the id of the version labels node.


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