org.apache.jackrabbit.jcr2spi.version
Class VersionManagerImpl
java.lang.Object
org.apache.jackrabbit.jcr2spi.version.VersionManagerImpl
- All Implemented Interfaces:
- VersionManager
public class VersionManagerImpl
- extends java.lang.Object
- implements VersionManager
VersionManagerImpl...
|
Method Summary |
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(java.lang.String title)
|
NodeEntry |
createConfiguration(NodeState nodeState)
|
NodeEntry |
getVersionableNodeEntry(NodeState versionState)
|
NodeEntry |
getVersionHistoryEntry(NodeState versionableState)
|
boolean |
isCheckedOut(NodeState nodeState)
Search nearest ancestor that is versionable. |
java.util.Iterator<NodeId> |
merge(NodeState nodeState,
java.lang.String workspaceName,
boolean bestEffort)
|
java.util.Iterator<NodeId> |
merge(NodeState nodeState,
java.lang.String workspaceName,
boolean bestEffort,
boolean isShallow)
|
java.util.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)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VersionManagerImpl
public VersionManagerImpl(WorkspaceManager workspaceManager)
checkin
public NodeEntry checkin(NodeState nodeState)
throws RepositoryException
- Specified by:
checkin in interface VersionManager
- Returns:
NodeEntry of newly created version
- Throws:
VersionException
UnsupportedRepositoryOperationException
InvalidItemStateException
LockException
RepositoryException- See Also:
Node.checkin()
checkout
public void checkout(NodeState nodeState)
throws RepositoryException
- Specified by:
checkout in interface VersionManager
- Throws:
UnsupportedRepositoryOperationException
LockException
RepositoryException- See Also:
Node.checkout()
checkout
public void checkout(NodeState nodeState,
NodeId activityId)
throws RepositoryException
- Specified by:
checkout in interface VersionManager
- Throws:
RepositoryException
checkpoint
public NodeEntry checkpoint(NodeState nodeState)
throws RepositoryException
- Specified by:
checkpoint in interface VersionManager
- Throws:
RepositoryException- See Also:
VersionManager.checkpoint(String)
checkpoint
public NodeEntry checkpoint(NodeState nodeState,
NodeId activityId)
throws RepositoryException
- Specified by:
checkpoint in interface VersionManager
- Throws:
RepositoryException- See Also:
VersionManager.checkpoint(String)
isCheckedOut
public boolean isCheckedOut(NodeState nodeState)
throws RepositoryException
- Search nearest ancestor that is versionable. If no versionable ancestor
can be found,
true is returned.
- Specified by:
isCheckedOut in interface VersionManager
- Parameters:
nodeState -
- Returns:
-
- Throws:
RepositoryException- See Also:
Node.isCheckedOut()
checkIsCheckedOut
public void checkIsCheckedOut(NodeState nodeState)
throws VersionException,
RepositoryException
- Specified by:
checkIsCheckedOut in interface VersionManager
- Throws:
VersionException - If the Node represented by the given
NodeState is checkedin.
RepositoryException - If another error occurs.- See Also:
Node.isCheckedOut()
removeVersion
public void removeVersion(NodeState versionHistoryState,
NodeState versionState)
throws RepositoryException
- Specified by:
removeVersion in interface VersionManager
- Throws:
ReferentialIntegrityException
AccessDeniedException
UnsupportedRepositoryOperationException
VersionException
RepositoryException- See Also:
VersionHistory.removeVersion(String)
addVersionLabel
public void addVersionLabel(NodeState versionHistoryState,
NodeState versionState,
Name qLabel,
boolean moveLabel)
throws RepositoryException
- Specified by:
addVersionLabel in interface VersionManager
- Throws:
VersionException
RepositoryException- See Also:
VersionHistory.addVersionLabel(String, String, boolean)
removeVersionLabel
public void removeVersionLabel(NodeState versionHistoryState,
NodeState versionState,
Name qLabel)
throws RepositoryException
- Specified by:
removeVersionLabel in interface VersionManager
- Throws:
VersionException
RepositoryException- See Also:
VersionHistory.removeVersionLabel(String)
restore
public void restore(NodeState nodeState,
Path relativePath,
NodeState versionState,
boolean removeExisting)
throws RepositoryException
- Specified by:
restore in interface VersionManager
- Throws:
VersionException
ItemExistsException
UnsupportedRepositoryOperationException
LockException
InvalidItemStateException
RepositoryException- See Also:
Node.restore(String, boolean),
Node.restore(Version, boolean),
Node.restore(Version, String, boolean),
Node.restoreByLabel(String, boolean)
restore
public void restore(NodeState[] versionStates,
boolean removeExisting)
throws RepositoryException
- Specified by:
restore in interface VersionManager
- Throws:
ItemExistsException
UnsupportedRepositoryOperationException
VersionException
LockException
InvalidItemStateException
RepositoryException- See Also:
Workspace.restore(Version[], boolean)
merge
public java.util.Iterator<NodeId> merge(NodeState nodeState,
java.lang.String workspaceName,
boolean bestEffort)
throws RepositoryException
- Specified by:
merge in interface VersionManager
- Returns:
- An Iterator over
NodeIds of all Nodes
that failed to be merged and need manual resolution by the user of the API.
- Throws:
NoSuchWorkspaceException
AccessDeniedException
MergeException
LockException
InvalidItemStateException
RepositoryException- See Also:
VersionManager.resolveMergeConflict(NodeState,NodeState,boolean),
Node.merge(String, boolean)
merge
public java.util.Iterator<NodeId> merge(NodeState nodeState,
java.lang.String workspaceName,
boolean bestEffort,
boolean isShallow)
throws NoSuchWorkspaceException,
AccessDeniedException,
MergeException,
LockException,
InvalidItemStateException,
RepositoryException
- Specified by:
merge in interface VersionManager
- Returns:
- An Iterator over
NodeIds of all Nodes
that failed to be merged and need manual resolution by the user of the API.
- Throws:
NoSuchWorkspaceException
AccessDeniedException
MergeException
LockException
InvalidItemStateException
RepositoryException- See Also:
VersionManager.resolveMergeConflict(NodeState,NodeState,boolean),
Node.merge(String, boolean)
resolveMergeConflict
public void resolveMergeConflict(NodeState nodeState,
NodeState versionState,
boolean done)
throws RepositoryException
- Specified by:
resolveMergeConflict in interface VersionManager
- Throws:
VersionException
InvalidItemStateException
UnsupportedRepositoryOperationException
RepositoryException- See Also:
Node.cancelMerge(Version),
Node.doneMerge(Version)
createConfiguration
public NodeEntry createConfiguration(NodeState nodeState)
throws UnsupportedRepositoryOperationException,
RepositoryException
- Specified by:
createConfiguration in interface VersionManager
- Returns:
-
- Throws:
UnsupportedRepositoryOperationException
RepositoryException
createActivity
public NodeEntry createActivity(java.lang.String title)
throws UnsupportedRepositoryOperationException,
RepositoryException
- Specified by:
createActivity in interface VersionManager
- Returns:
-
- Throws:
UnsupportedRepositoryOperationException
RepositoryException
removeActivity
public void removeActivity(NodeState activityState)
throws UnsupportedRepositoryOperationException,
RepositoryException
- Specified by:
removeActivity in interface VersionManager
- Throws:
UnsupportedRepositoryOperationException
RepositoryException
mergeActivity
public java.util.Iterator<NodeId> mergeActivity(NodeState activityState)
throws UnsupportedRepositoryOperationException,
RepositoryException
- Specified by:
mergeActivity in interface VersionManager
- Returns:
-
- Throws:
UnsupportedRepositoryOperationException
RepositoryException
getVersionableNodeEntry
public NodeEntry getVersionableNodeEntry(NodeState versionState)
throws RepositoryException
- Specified by:
getVersionableNodeEntry in interface VersionManager
- Returns:
-
- Throws:
RepositoryException
getVersionHistoryEntry
public NodeEntry getVersionHistoryEntry(NodeState versionableState)
throws RepositoryException
- Specified by:
getVersionHistoryEntry in interface VersionManager
- Returns:
-
- Throws:
RepositoryException
Copyright © 2004-2011 The Apache Software Foundation. All Rights Reserved.