Class VersionManagerDelegate
- java.lang.Object
-
- org.apache.jackrabbit.oak.jcr.delegate.VersionManagerDelegate
-
public final class VersionManagerDelegate extends Object
VersionManagerDelegate...
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddVersionLabel(@NotNull VersionHistoryDelegate versionHistory, @NotNull VersionDelegate version, @NotNull String oakVersionLabel, boolean moveLabel)Add a version label to the given version history.@NotNull VersionDelegatecheckin(@NotNull NodeDelegate nodeDelegate)voidcheckout(@NotNull NodeDelegate nodeDelegate)static VersionManagerDelegatecreate(SessionDelegate sessionDelegate)@NotNull VersionDelegatecreateVersion(@NotNull NodeDelegate version)@NotNull VersionHistoryDelegatecreateVersionHistory(@NotNull NodeDelegate versionHistory)@NotNull VersionDelegategetBaseVersion(@NotNull NodeDelegate versionable)@NotNull VersionDelegategetVersionByIdentifier(@NotNull String identifier)@NotNull VersionHistoryDelegategetVersionHistory(@NotNull NodeDelegate versionable)booleanisCheckedOut(@NotNull NodeDelegate nodeDelegate)voidremoveVersion(@NotNull VersionHistoryDelegate versionHistory, @NotNull String oakVersionName)Removes a version from the given history.voidremoveVersionLabel(@NotNull VersionHistoryDelegate versionHistory, @NotNull String oakVersionLabel)Removes a version label from the given history.voidrestore(@NotNull NodeDelegate parent, @NotNull String oakName, @NotNull VersionDelegate vd)
-
-
-
Method Detail
-
create
public static VersionManagerDelegate create(SessionDelegate sessionDelegate)
-
checkin
@NotNull public @NotNull VersionDelegate checkin(@NotNull @NotNull NodeDelegate nodeDelegate) throws RepositoryException
- Throws:
RepositoryException
-
checkout
public void checkout(@NotNull @NotNull NodeDelegate nodeDelegate) throws RepositoryException- Throws:
RepositoryException
-
isCheckedOut
public boolean isCheckedOut(@NotNull @NotNull NodeDelegate nodeDelegate) throws RepositoryException- Throws:
RepositoryException
-
createVersionHistory
@NotNull public @NotNull VersionHistoryDelegate createVersionHistory(@NotNull @NotNull NodeDelegate versionHistory) throws RepositoryException
- Throws:
RepositoryException
-
createVersion
@NotNull public @NotNull VersionDelegate createVersion(@NotNull @NotNull NodeDelegate version) throws RepositoryException
- Throws:
RepositoryException
-
getVersionHistory
@NotNull public @NotNull VersionHistoryDelegate getVersionHistory(@NotNull @NotNull NodeDelegate versionable) throws RepositoryException
- Throws:
RepositoryException
-
getBaseVersion
@NotNull public @NotNull VersionDelegate getBaseVersion(@NotNull @NotNull NodeDelegate versionable) throws RepositoryException
- Throws:
RepositoryException
-
getVersionByIdentifier
@NotNull public @NotNull VersionDelegate getVersionByIdentifier(@NotNull @NotNull String identifier) throws RepositoryException
- Throws:
RepositoryException
-
restore
public void restore(@NotNull @NotNull NodeDelegate parent, @NotNull @NotNull String oakName, @NotNull @NotNull VersionDelegate vd) throws RepositoryException- Throws:
RepositoryException
-
addVersionLabel
public void addVersionLabel(@NotNull @NotNull VersionHistoryDelegate versionHistory, @NotNull @NotNull VersionDelegate version, @NotNull @NotNull String oakVersionLabel, boolean moveLabel) throws InvalidItemStateException, LabelExistsVersionException, VersionException, RepositoryExceptionAdd a version label to the given version history.- Parameters:
versionHistory- the version history.version- the version.oakVersionLabel- the version label.moveLabel- whether to move the label if it already exists.- Throws:
InvalidItemStateException- if any of the nodes is stale.LabelExistsVersionException- if moveLabel is false, and an attempt is made to add a label that already exists in this version history.VersionException- if the specified version does not exist in this version history or if the specified version is the root version (jcr:rootVersion).RepositoryException- if another error occurs.
-
removeVersionLabel
public void removeVersionLabel(@NotNull @NotNull VersionHistoryDelegate versionHistory, @NotNull @NotNull String oakVersionLabel) throws InvalidItemStateException, VersionException, RepositoryExceptionRemoves a version label from the given history.- Parameters:
versionHistory- the version history.oakVersionLabel- the version label.- Throws:
InvalidItemStateException- if any of the nodes is stale.VersionException- if the name label does not exist in this version history.RepositoryException- if another error occurs.
-
removeVersion
public void removeVersion(@NotNull @NotNull VersionHistoryDelegate versionHistory, @NotNull @NotNull String oakVersionName) throws RepositoryExceptionRemoves a version from the given history.- Parameters:
versionHistory- the version history delegate.oakVersionName- the version name- Throws:
RepositoryException- if an error occurs.
-
-