Class VersionManagerDelegate
java.lang.Object
org.apache.jackrabbit.oak.jcr.delegate.VersionManagerDelegate
VersionManagerDelegate
...-
Method Summary
Modifier and TypeMethodDescriptionvoid
addVersionLabel
(@NotNull VersionHistoryDelegate versionHistory, @NotNull VersionDelegate version, @NotNull String oakVersionLabel, boolean moveLabel) Add a version label to the given version history.@NotNull VersionDelegate
checkin
(@NotNull NodeDelegate nodeDelegate) void
checkout
(@NotNull NodeDelegate nodeDelegate) static VersionManagerDelegate
create
(SessionDelegate sessionDelegate) @NotNull VersionDelegate
createVersion
(@NotNull NodeDelegate version) @NotNull VersionHistoryDelegate
createVersionHistory
(@NotNull NodeDelegate versionHistory) @NotNull VersionDelegate
getBaseVersion
(@NotNull NodeDelegate versionable) @NotNull VersionDelegate
getVersionByIdentifier
(@NotNull String identifier) @NotNull VersionHistoryDelegate
getVersionHistory
(@NotNull NodeDelegate versionable) boolean
isCheckedOut
(@NotNull NodeDelegate nodeDelegate) void
removeVersion
(@NotNull VersionHistoryDelegate versionHistory, @NotNull String oakVersionName) Removes a version from the given history.void
removeVersionLabel
(@NotNull VersionHistoryDelegate versionHistory, @NotNull String oakVersionLabel) Removes a version label from the given history.void
restore
(@NotNull NodeDelegate parent, @NotNull String oakName, @NotNull VersionDelegate vd)
-
Method Details
-
create
-
checkin
@NotNull public @NotNull VersionDelegate checkin(@NotNull @NotNull NodeDelegate nodeDelegate) throws RepositoryException - Throws:
RepositoryException
-
checkout
- Throws:
RepositoryException
-
isCheckedOut
- 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, RepositoryException Add 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, RepositoryException Removes 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 RepositoryException Removes a version from the given history.- Parameters:
versionHistory
- the version history delegate.oakVersionName
- the version name- Throws:
RepositoryException
- if an error occurs.
-