public final class VersionManagerDelegate extends Object
VersionManagerDelegate
...Modifier and Type | Method and Description |
---|---|
void |
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) |
public static VersionManagerDelegate create(SessionDelegate sessionDelegate)
@NotNull public @NotNull VersionDelegate checkin(@NotNull @NotNull NodeDelegate nodeDelegate) throws RepositoryException
RepositoryException
public void checkout(@NotNull @NotNull NodeDelegate nodeDelegate) throws RepositoryException
RepositoryException
public boolean isCheckedOut(@NotNull @NotNull NodeDelegate nodeDelegate) throws RepositoryException
RepositoryException
@NotNull public @NotNull VersionHistoryDelegate createVersionHistory(@NotNull @NotNull NodeDelegate versionHistory) throws RepositoryException
RepositoryException
@NotNull public @NotNull VersionDelegate createVersion(@NotNull @NotNull NodeDelegate version) throws RepositoryException
RepositoryException
@NotNull public @NotNull VersionHistoryDelegate getVersionHistory(@NotNull @NotNull NodeDelegate versionable) throws RepositoryException
RepositoryException
@NotNull public @NotNull VersionDelegate getBaseVersion(@NotNull @NotNull NodeDelegate versionable) throws RepositoryException
RepositoryException
@NotNull public @NotNull VersionDelegate getVersionByIdentifier(@NotNull @NotNull String identifier) throws RepositoryException
RepositoryException
public void restore(@NotNull @NotNull NodeDelegate parent, @NotNull @NotNull String oakName, @NotNull @NotNull VersionDelegate vd) throws RepositoryException
RepositoryException
public void addVersionLabel(@NotNull @NotNull VersionHistoryDelegate versionHistory, @NotNull @NotNull VersionDelegate version, @NotNull @NotNull String oakVersionLabel, boolean moveLabel) throws InvalidItemStateException, LabelExistsVersionException, VersionException, RepositoryException
versionHistory
- the version history.version
- the version.oakVersionLabel
- the version label.moveLabel
- whether to move the label if it already exists.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.public void removeVersionLabel(@NotNull @NotNull VersionHistoryDelegate versionHistory, @NotNull @NotNull String oakVersionLabel) throws InvalidItemStateException, VersionException, RepositoryException
versionHistory
- the version history.oakVersionLabel
- the version label.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.public void removeVersion(@NotNull @NotNull VersionHistoryDelegate versionHistory, @NotNull @NotNull String oakVersionName) throws RepositoryException
versionHistory
- the version history delegate.oakVersionName
- the version nameRepositoryException
- if an error occurs.Copyright © 2012–2020 The Apache Software Foundation. All rights reserved.