Class VersionManagerImpl
- java.lang.Object
-
- org.apache.jackrabbit.jcr2spi.version.VersionManagerImpl
-
- All Implemented Interfaces:
VersionManager
public class VersionManagerImpl extends Object implements VersionManager
VersionManagerImpl
...
-
-
Constructor Summary
Constructors Constructor Description VersionManagerImpl(WorkspaceManager workspaceManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
-
-
Constructor Detail
-
VersionManagerImpl
public VersionManagerImpl(WorkspaceManager workspaceManager)
-
-
Method Detail
-
checkin
public NodeEntry checkin(NodeState nodeState) throws RepositoryException
- Specified by:
checkin
in interfaceVersionManager
- 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 interfaceVersionManager
- Throws:
UnsupportedRepositoryOperationException
LockException
RepositoryException
- See Also:
Node.checkout()
-
checkout
public void checkout(NodeState nodeState, NodeId activityId) throws RepositoryException
- Specified by:
checkout
in interfaceVersionManager
- Throws:
RepositoryException
-
checkpoint
public NodeEntry checkpoint(NodeState nodeState) throws RepositoryException
- Specified by:
checkpoint
in interfaceVersionManager
- Throws:
RepositoryException
- See Also:
VersionManager.checkpoint(String)
-
checkpoint
public NodeEntry checkpoint(NodeState nodeState, NodeId activityId) throws RepositoryException
- Specified by:
checkpoint
in interfaceVersionManager
- 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 interfaceVersionManager
- Parameters:
nodeState
-- Returns:
- Throws:
RepositoryException
- See Also:
Node.isCheckedOut()
-
checkIsCheckedOut
public void checkIsCheckedOut(NodeState nodeState) throws VersionException, RepositoryException
- Specified by:
checkIsCheckedOut
in interfaceVersionManager
- Throws:
VersionException
- If theNode
represented by the givenNodeState
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 interfaceVersionManager
- 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 interfaceVersionManager
- 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 interfaceVersionManager
- 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 interfaceVersionManager
- 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 interfaceVersionManager
- Throws:
ItemExistsException
UnsupportedRepositoryOperationException
VersionException
LockException
InvalidItemStateException
RepositoryException
- See Also:
Workspace.restore(Version[], boolean)
-
merge
public Iterator<NodeId> merge(NodeState nodeState, String workspaceName, boolean bestEffort) throws RepositoryException
- Specified by:
merge
in interfaceVersionManager
- Returns:
- An Iterator over
NodeId
s of allNode
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)
-
merge
public Iterator<NodeId> merge(NodeState nodeState, String workspaceName, boolean bestEffort, boolean isShallow) throws NoSuchWorkspaceException, AccessDeniedException, MergeException, LockException, InvalidItemStateException, RepositoryException
- Specified by:
merge
in interfaceVersionManager
- Returns:
- An Iterator over
NodeId
s of allNode
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 interfaceVersionManager
- 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 interfaceVersionManager
- Returns:
- Throws:
UnsupportedRepositoryOperationException
RepositoryException
-
createActivity
public NodeEntry createActivity(String title) throws UnsupportedRepositoryOperationException, RepositoryException
- Specified by:
createActivity
in interfaceVersionManager
- Returns:
- Throws:
UnsupportedRepositoryOperationException
RepositoryException
-
removeActivity
public void removeActivity(NodeState activityState) throws UnsupportedRepositoryOperationException, RepositoryException
- Specified by:
removeActivity
in interfaceVersionManager
- Throws:
UnsupportedRepositoryOperationException
RepositoryException
-
mergeActivity
public Iterator<NodeId> mergeActivity(NodeState activityState) throws UnsupportedRepositoryOperationException, RepositoryException
- Specified by:
mergeActivity
in interfaceVersionManager
- Returns:
- Throws:
UnsupportedRepositoryOperationException
RepositoryException
-
getVersionableNodeEntry
public NodeEntry getVersionableNodeEntry(NodeState versionState) throws RepositoryException
- Specified by:
getVersionableNodeEntry
in interfaceVersionManager
- Returns:
- Throws:
RepositoryException
-
getVersionHistoryEntry
public NodeEntry getVersionHistoryEntry(NodeState versionableState) throws RepositoryException
- Specified by:
getVersionHistoryEntry
in interfaceVersionManager
- Returns:
- Throws:
RepositoryException
-
-