public class VersionManagerDelegate extends Object
VersionManagerDelegate...| Modifier and Type | Method and Description |
|---|---|
void |
addVersionLabel(VersionHistoryDelegate versionHistory,
VersionDelegate version,
String oakVersionLabel,
boolean moveLabel)
Add a version label to the given version history.
|
VersionDelegate |
checkin(NodeDelegate nodeDelegate) |
void |
checkout(NodeDelegate nodeDelegate) |
static VersionManagerDelegate |
create(SessionDelegate sessionDelegate) |
VersionDelegate |
createVersion(NodeDelegate version) |
VersionHistoryDelegate |
createVersionHistory(NodeDelegate versionHistory) |
VersionDelegate |
getBaseVersion(NodeDelegate versionable) |
VersionDelegate |
getVersionByIdentifier(String identifier) |
VersionHistoryDelegate |
getVersionHistory(NodeDelegate versionable) |
boolean |
isCheckedOut(NodeDelegate nodeDelegate) |
void |
removeVersion(VersionHistoryDelegate versionHistory,
String oakVersionName)
Removes a version from the given history.
|
void |
removeVersionLabel(VersionHistoryDelegate versionHistory,
String oakVersionLabel)
Removes a version label from the given history.
|
void |
restore(NodeDelegate parent,
String oakName,
VersionDelegate vd) |
public static VersionManagerDelegate create(SessionDelegate sessionDelegate)
@Nonnull public VersionDelegate checkin(@Nonnull NodeDelegate nodeDelegate) throws RepositoryException
RepositoryExceptionpublic void checkout(@Nonnull NodeDelegate nodeDelegate) throws RepositoryException
RepositoryExceptionpublic boolean isCheckedOut(@Nonnull NodeDelegate nodeDelegate) throws RepositoryException
RepositoryException@Nonnull public VersionHistoryDelegate createVersionHistory(@Nonnull NodeDelegate versionHistory) throws RepositoryException
RepositoryException@Nonnull public VersionDelegate createVersion(@Nonnull NodeDelegate version) throws RepositoryException
RepositoryException@Nonnull public VersionHistoryDelegate getVersionHistory(@Nonnull NodeDelegate versionable) throws RepositoryException
RepositoryException@Nonnull public VersionDelegate getBaseVersion(@Nonnull NodeDelegate versionable) throws RepositoryException
RepositoryException@Nonnull public VersionDelegate getVersionByIdentifier(@Nonnull String identifier) throws RepositoryException
RepositoryExceptionpublic void restore(@Nonnull NodeDelegate parent, @Nonnull String oakName, @Nonnull VersionDelegate vd) throws RepositoryException
RepositoryExceptionpublic void addVersionLabel(@Nonnull VersionHistoryDelegate versionHistory, @Nonnull VersionDelegate version, @Nonnull 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(@Nonnull VersionHistoryDelegate versionHistory, @Nonnull 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(@Nonnull VersionHistoryDelegate versionHistory, @Nonnull String oakVersionName) throws RepositoryException
versionHistory - the version history delegate.oakVersionName - the version nameRepositoryException - if an error occurs.Copyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.