org.apache.jackrabbit.jcr2spi.version
Class VersionManagerImpl
java.lang.Object
org.apache.jackrabbit.jcr2spi.version.VersionManagerImpl
- All Implemented Interfaces:
- VersionManager
public class VersionManagerImpl
- extends 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)
|
NodeEntry |
getVersionableNodeEntry(NodeState versionState)
|
NodeEntry |
getVersionHistoryEntry(NodeState versionableState)
|
boolean |
isCheckedOut(NodeState nodeState)
Search nearest ancestor that is versionable. |
Iterator |
merge(NodeState nodeState,
String workspaceName,
boolean bestEffort)
|
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()
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 Iterator merge(NodeState nodeState,
String workspaceName,
boolean bestEffort)
throws RepositoryException
- Specified by:
merge
in interface VersionManager
- Returns:
- An Iterator over
NodeId
s of all Node
s
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)
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-2009 The Apache Software Foundation. All Rights Reserved.