Interface InternalVersionHistory
-
- All Superinterfaces:
InternalVersionItem
public interface InternalVersionHistory extends InternalVersionItem
This interface defines the internal version history.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getNumVersions()
Returns the number of versions in this version history.InternalVersion
getRootVersion()
Equivalent toVersionHistory.getRootVersion()
.InternalVersion
getVersion(NodeId id)
Returns the version with the given uuid ornull
if the respective version does not exist.InternalVersion
getVersion(Name versionName)
Equivalent toVersionHistory.getVersion(java.lang.String)
.NodeId
getVersionableId()
Returns the id of the versionable node that this history belongs to.InternalVersion
getVersionByLabel(Name label)
Equivalent toVersionHistory.getVersionByLabel(java.lang.String)
but returnsnull
if the version does not exists.Name[]
getVersionLabels()
Returns a name array of all version labels that exist in this version historyNodeId
getVersionLabelsId()
Returns the Id of the version labels node.Name[]
getVersionNames()
Returns a name array of all version names that exist in this version history.boolean
hasVersion(Name 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
InternalVersion getRootVersion()
Equivalent toVersionHistory.getRootVersion()
.- Returns:
- the root version
- See Also:
VersionHistory.getRootVersion()
-
getVersion
InternalVersion getVersion(Name versionName) throws VersionException
Equivalent toVersionHistory.getVersion(java.lang.String)
.- Parameters:
versionName
- the name of the version- Returns:
- the version
- Throws:
VersionException
- if the version does not exist- See Also:
VersionHistory.getVersion(java.lang.String)
-
hasVersion
boolean hasVersion(Name 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.
-
getVersion
InternalVersion getVersion(NodeId id)
Returns the version with the given uuid ornull
if the respective version does not exist.- Parameters:
id
- the id of the version- Returns:
- the internal version ot
null
-
getVersionByLabel
InternalVersion getVersionByLabel(Name label)
Equivalent toVersionHistory.getVersionByLabel(java.lang.String)
but returnsnull
if the version does not exists.- Parameters:
label
- the lable- Returns:
- the version or
null
if not exists - See Also:
VersionHistory.getVersionByLabel(java.lang.String)
-
getNumVersions
int getNumVersions()
Returns the number of versions in this version history.- Returns:
- the number of versions, including the root version.
-
getVersionableId
NodeId getVersionableId()
Returns the id of the versionable node that this history belongs to.- Returns:
- the id of the versionable node.
-
getVersionLabels
Name[] getVersionLabels()
Returns a name array of all version labels that exist in this version history- Returns:
- the labels
-
getVersionNames
Name[] getVersionNames()
Returns a name array of all version names that exist in this version history.- Returns:
- the names
-
getVersionLabelsId
NodeId getVersionLabelsId()
Returns the Id of the version labels node.- Returns:
- the id of the version labels node.
-
-