public class VersionManagerImpl extends Object implements VersionManager
VersionManagerImpl
...Constructor and Description |
---|
VersionManagerImpl(WorkspaceManager workspaceManager) |
Modifier and Type | Method and Description |
---|---|
void |
addVersionLabel(NodeState versionHistoryState,
NodeState versionState,
Name qLabel,
boolean moveLabel) |
NodeEntry |
checkin(NodeState nodeState) |
void |
checkIsCheckedOut(NodeState nodeState) |
void |
checkout(NodeState nodeState) |
void |
checkout(NodeState nodeState,
NodeId activityId) |
NodeEntry |
checkpoint(NodeState nodeState) |
NodeEntry |
checkpoint(NodeState nodeState,
NodeId activityId) |
NodeEntry |
createActivity(String title) |
NodeEntry |
createConfiguration(NodeState nodeState) |
NodeEntry |
getVersionableNodeEntry(NodeState versionState) |
NodeEntry |
getVersionHistoryEntry(NodeState versionableState) |
boolean |
isCheckedOut(NodeState nodeState)
Search nearest ancestor that is versionable.
|
Iterator<NodeId> |
merge(NodeState nodeState,
String workspaceName,
boolean bestEffort) |
Iterator<NodeId> |
merge(NodeState nodeState,
String workspaceName,
boolean bestEffort,
boolean isShallow) |
Iterator<NodeId> |
mergeActivity(NodeState activityState) |
void |
removeActivity(NodeState activityState) |
void |
removeVersion(NodeState versionHistoryState,
NodeState versionState) |
void |
removeVersionLabel(NodeState versionHistoryState,
NodeState versionState,
Name qLabel) |
void |
resolveMergeConflict(NodeState nodeState,
NodeState versionState,
boolean done) |
void |
restore(NodeState[] versionStates,
boolean removeExisting) |
void |
restore(NodeState nodeState,
Path relativePath,
NodeState versionState,
boolean removeExisting) |
public VersionManagerImpl(WorkspaceManager workspaceManager)
public NodeEntry checkin(NodeState nodeState) throws javax.jcr.RepositoryException
checkin
in interface VersionManager
NodeEntry
of newly created versionjavax.jcr.version.VersionException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.InvalidItemStateException
javax.jcr.lock.LockException
javax.jcr.RepositoryException
Node.checkin()
public void checkout(NodeState nodeState) throws javax.jcr.RepositoryException
checkout
in interface VersionManager
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.lock.LockException
javax.jcr.RepositoryException
Node.checkout()
public void checkout(NodeState nodeState, NodeId activityId) throws javax.jcr.RepositoryException
checkout
in interface VersionManager
javax.jcr.RepositoryException
public NodeEntry checkpoint(NodeState nodeState) throws javax.jcr.RepositoryException
checkpoint
in interface VersionManager
javax.jcr.RepositoryException
VersionManager.checkpoint(String)
public NodeEntry checkpoint(NodeState nodeState, NodeId activityId) throws javax.jcr.RepositoryException
checkpoint
in interface VersionManager
javax.jcr.RepositoryException
VersionManager.checkpoint(String)
public boolean isCheckedOut(NodeState nodeState) throws javax.jcr.RepositoryException
true
is returned.isCheckedOut
in interface VersionManager
nodeState
- javax.jcr.RepositoryException
Node.isCheckedOut()
public void checkIsCheckedOut(NodeState nodeState) throws javax.jcr.version.VersionException, javax.jcr.RepositoryException
checkIsCheckedOut
in interface VersionManager
javax.jcr.version.VersionException
- If the Node
represented by the given
NodeState
is checkedin.javax.jcr.RepositoryException
- If another error occurs.Node.isCheckedOut()
public void removeVersion(NodeState versionHistoryState, NodeState versionState) throws javax.jcr.RepositoryException
removeVersion
in interface VersionManager
javax.jcr.ReferentialIntegrityException
javax.jcr.AccessDeniedException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.version.VersionException
javax.jcr.RepositoryException
VersionHistory.removeVersion(String)
public void addVersionLabel(NodeState versionHistoryState, NodeState versionState, Name qLabel, boolean moveLabel) throws javax.jcr.RepositoryException
addVersionLabel
in interface VersionManager
javax.jcr.version.VersionException
javax.jcr.RepositoryException
VersionHistory.addVersionLabel(String, String, boolean)
public void removeVersionLabel(NodeState versionHistoryState, NodeState versionState, Name qLabel) throws javax.jcr.RepositoryException
removeVersionLabel
in interface VersionManager
javax.jcr.version.VersionException
javax.jcr.RepositoryException
VersionHistory.removeVersionLabel(String)
public void restore(NodeState nodeState, Path relativePath, NodeState versionState, boolean removeExisting) throws javax.jcr.RepositoryException
restore
in interface VersionManager
javax.jcr.version.VersionException
javax.jcr.ItemExistsException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.lock.LockException
javax.jcr.InvalidItemStateException
javax.jcr.RepositoryException
Node.restore(String, boolean)
,
Node.restore(Version, boolean)
,
Node.restore(Version, String, boolean)
,
Node.restoreByLabel(String, boolean)
public void restore(NodeState[] versionStates, boolean removeExisting) throws javax.jcr.RepositoryException
restore
in interface VersionManager
javax.jcr.ItemExistsException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.InvalidItemStateException
javax.jcr.RepositoryException
Workspace.restore(Version[], boolean)
public Iterator<NodeId> merge(NodeState nodeState, String workspaceName, boolean bestEffort) throws javax.jcr.RepositoryException
merge
in interface VersionManager
NodeId
s of all Node
s
that failed to be merged and need manual resolution by the user of the API.javax.jcr.NoSuchWorkspaceException
javax.jcr.AccessDeniedException
javax.jcr.MergeException
javax.jcr.lock.LockException
javax.jcr.InvalidItemStateException
javax.jcr.RepositoryException
VersionManager.resolveMergeConflict(NodeState,NodeState,boolean)
,
Node.merge(String, boolean)
public Iterator<NodeId> merge(NodeState nodeState, String workspaceName, boolean bestEffort, boolean isShallow) throws javax.jcr.NoSuchWorkspaceException, javax.jcr.AccessDeniedException, javax.jcr.MergeException, javax.jcr.lock.LockException, javax.jcr.InvalidItemStateException, javax.jcr.RepositoryException
merge
in interface VersionManager
NodeId
s of all Node
s
that failed to be merged and need manual resolution by the user of the API.javax.jcr.NoSuchWorkspaceException
javax.jcr.AccessDeniedException
javax.jcr.MergeException
javax.jcr.lock.LockException
javax.jcr.InvalidItemStateException
javax.jcr.RepositoryException
VersionManager.resolveMergeConflict(NodeState,NodeState,boolean)
,
Node.merge(String, boolean)
public void resolveMergeConflict(NodeState nodeState, NodeState versionState, boolean done) throws javax.jcr.RepositoryException
resolveMergeConflict
in interface VersionManager
javax.jcr.version.VersionException
javax.jcr.InvalidItemStateException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.RepositoryException
Node.cancelMerge(Version)
,
Node.doneMerge(Version)
public NodeEntry createConfiguration(NodeState nodeState) throws javax.jcr.UnsupportedRepositoryOperationException, javax.jcr.RepositoryException
createConfiguration
in interface VersionManager
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.RepositoryException
public NodeEntry createActivity(String title) throws javax.jcr.UnsupportedRepositoryOperationException, javax.jcr.RepositoryException
createActivity
in interface VersionManager
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.RepositoryException
public void removeActivity(NodeState activityState) throws javax.jcr.UnsupportedRepositoryOperationException, javax.jcr.RepositoryException
removeActivity
in interface VersionManager
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.RepositoryException
public Iterator<NodeId> mergeActivity(NodeState activityState) throws javax.jcr.UnsupportedRepositoryOperationException, javax.jcr.RepositoryException
mergeActivity
in interface VersionManager
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.RepositoryException
public NodeEntry getVersionableNodeEntry(NodeState versionState) throws javax.jcr.RepositoryException
getVersionableNodeEntry
in interface VersionManager
javax.jcr.RepositoryException
public NodeEntry getVersionHistoryEntry(NodeState versionableState) throws javax.jcr.RepositoryException
getVersionHistoryEntry
in interface VersionManager
javax.jcr.RepositoryException
Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.