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 javax.jcr.RepositoryException
javax.jcr.RepositoryException
public void checkout(@Nonnull NodeDelegate nodeDelegate) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public boolean isCheckedOut(@Nonnull NodeDelegate nodeDelegate) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
@Nonnull public VersionHistoryDelegate createVersionHistory(@Nonnull NodeDelegate versionHistory) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
@Nonnull public VersionDelegate createVersion(@Nonnull NodeDelegate version) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
@Nonnull public VersionHistoryDelegate getVersionHistory(@Nonnull NodeDelegate versionable) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
@Nonnull public VersionDelegate getBaseVersion(@Nonnull NodeDelegate versionable) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
@Nonnull public VersionDelegate getVersionByIdentifier(@Nonnull String identifier) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public void restore(@Nonnull NodeDelegate parent, @Nonnull String oakName, @Nonnull VersionDelegate vd) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public void addVersionLabel(@Nonnull VersionHistoryDelegate versionHistory, @Nonnull VersionDelegate version, @Nonnull String oakVersionLabel, boolean moveLabel) throws javax.jcr.InvalidItemStateException, javax.jcr.version.LabelExistsVersionException, javax.jcr.version.VersionException, javax.jcr.RepositoryException
versionHistory
- the version history.version
- the version.oakVersionLabel
- the version label.moveLabel
- whether to move the label if it already exists.javax.jcr.InvalidItemStateException
- if any of the nodes is stale.javax.jcr.version.LabelExistsVersionException
- if moveLabel is false, and an attempt
is made to add a label that already exists in this version history.javax.jcr.version.VersionException
- if the specified version does not exist in this
version history or if the specified version is the root version (jcr:rootVersion).javax.jcr.RepositoryException
- if another error occurs.public void removeVersionLabel(@Nonnull VersionHistoryDelegate versionHistory, @Nonnull String oakVersionLabel) throws javax.jcr.InvalidItemStateException, javax.jcr.version.VersionException, javax.jcr.RepositoryException
versionHistory
- the version history.oakVersionLabel
- the version label.javax.jcr.InvalidItemStateException
- if any of the nodes is stale.javax.jcr.version.VersionException
- if the name label does not exist in this version history.javax.jcr.RepositoryException
- if another error occurs.public void removeVersion(@Nonnull VersionHistoryDelegate versionHistory, @Nonnull String oakVersionName) throws javax.jcr.RepositoryException
versionHistory
- the version history delegate.oakVersionName
- the version namejavax.jcr.RepositoryException
- if an error occurs.Copyright © 2012-2014 The Apache Software Foundation. All Rights Reserved.