|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.repo.version.common.VersionHistoryImpl
public class VersionHistoryImpl
Version History implementation.
Nested Class Summary | |
---|---|
static class |
VersionHistoryImpl.VersionComparatorAsc
Version Comparator Note: Ascending (last modified) date order |
static class |
VersionHistoryImpl.VersionComparatorDesc
Version Comparator Note: Descending (last modified) date order |
Constructor Summary | |
---|---|
VersionHistoryImpl(Version rootVersion)
Constructor, ensures the root version is set. |
Method Summary | |
---|---|
void |
addVersion(Version version,
Version predecessor)
Add a version to the version history. |
java.util.Collection |
getAllVersions()
Gets a collection containing all the versions within the version history. |
Version |
getHeadVersion()
Gets the head (current / most recent) version of the version history. |
Version |
getPredecessor(Version version)
Gets the predecessor of a specified version |
Version |
getRootVersion()
Gets the root (initial / least recent) version of the version history. |
java.util.Collection |
getSuccessors(Version version)
Gets the succeeding versions of a specified version. |
Version |
getVersion(java.lang.String versionLabel)
Gets a version with a specified version label. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VersionHistoryImpl(Version rootVersion)
rootVersion
- the root version, can not be null.Method Detail |
---|
public Version getRootVersion()
getRootVersion
in interface VersionHistory
public Version getHeadVersion()
getHeadVersion
in interface VersionHistory
public java.util.Collection getAllVersions()
Versions are returned in descending create date order (most recent first).
getAllVersions
in interface VersionHistory
public Version getPredecessor(Version version)
getPredecessor
in interface VersionHistory
version
- the version object
public java.util.Collection getSuccessors(Version version)
getSuccessors
in interface VersionHistory
version
- the version object
public Version getVersion(java.lang.String versionLabel)
getVersion
in interface VersionHistory
versionLabel
- the version label
VersionDoesNotExistException
- indicates requested version does not exisitpublic void addVersion(Version version, Version predecessor)
Used internally to build the version history tree.
version
- the version objectpredecessor
- the preceeding version
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |