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 voidaddVersionLabel(NodeState versionHistoryState, NodeState versionState, Name qLabel, boolean moveLabel)NodeEntrycheckin(NodeState nodeState)voidcheckIsCheckedOut(NodeState nodeState)voidcheckout(NodeState nodeState)voidcheckout(NodeState nodeState, NodeId activityId)NodeEntrycheckpoint(NodeState nodeState)NodeEntrycheckpoint(NodeState nodeState, NodeId activityId)NodeEntrycreateActivity(String title)NodeEntrycreateConfiguration(NodeState nodeState)NodeEntrygetVersionableNodeEntry(NodeState versionState)NodeEntrygetVersionHistoryEntry(NodeState versionableState)booleanisCheckedOut(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)voidremoveActivity(NodeState activityState)voidremoveVersion(NodeState versionHistoryState, NodeState versionState)voidremoveVersionLabel(NodeState versionHistoryState, NodeState versionState, Name qLabel)voidresolveMergeConflict(NodeState nodeState, NodeState versionState, boolean done)voidrestore(NodeState[] versionStates, boolean removeExisting)voidrestore(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:
checkinin interfaceVersionManager- Returns:
NodeEntryof newly created version- Throws:
VersionExceptionUnsupportedRepositoryOperationExceptionInvalidItemStateExceptionLockExceptionRepositoryException- See Also:
Node.checkin()
-
checkout
public void checkout(NodeState nodeState) throws RepositoryException
- Specified by:
checkoutin interfaceVersionManager- Throws:
UnsupportedRepositoryOperationExceptionLockExceptionRepositoryException- See Also:
Node.checkout()
-
checkout
public void checkout(NodeState nodeState, NodeId activityId) throws RepositoryException
- Specified by:
checkoutin interfaceVersionManager- Throws:
RepositoryException
-
checkpoint
public NodeEntry checkpoint(NodeState nodeState) throws RepositoryException
- Specified by:
checkpointin interfaceVersionManager- Throws:
RepositoryException- See Also:
VersionManager.checkpoint(String)
-
checkpoint
public NodeEntry checkpoint(NodeState nodeState, NodeId activityId) throws RepositoryException
- Specified by:
checkpointin 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,trueis returned.- Specified by:
isCheckedOutin interfaceVersionManager- Parameters:
nodeState-- Returns:
- Throws:
RepositoryException- See Also:
Node.isCheckedOut()
-
checkIsCheckedOut
public void checkIsCheckedOut(NodeState nodeState) throws VersionException, RepositoryException
- Specified by:
checkIsCheckedOutin interfaceVersionManager- Throws:
VersionException- If theNoderepresented by the givenNodeStateis checkedin.RepositoryException- If another error occurs.- See Also:
Node.isCheckedOut()
-
removeVersion
public void removeVersion(NodeState versionHistoryState, NodeState versionState) throws RepositoryException
- Specified by:
removeVersionin interfaceVersionManager- Throws:
ReferentialIntegrityExceptionAccessDeniedExceptionUnsupportedRepositoryOperationExceptionVersionExceptionRepositoryException- See Also:
VersionHistory.removeVersion(String)
-
addVersionLabel
public void addVersionLabel(NodeState versionHistoryState, NodeState versionState, Name qLabel, boolean moveLabel) throws RepositoryException
- Specified by:
addVersionLabelin interfaceVersionManager- Throws:
VersionExceptionRepositoryException- See Also:
VersionHistory.addVersionLabel(String, String, boolean)
-
removeVersionLabel
public void removeVersionLabel(NodeState versionHistoryState, NodeState versionState, Name qLabel) throws RepositoryException
- Specified by:
removeVersionLabelin interfaceVersionManager- Throws:
VersionExceptionRepositoryException- See Also:
VersionHistory.removeVersionLabel(String)
-
restore
public void restore(NodeState nodeState, Path relativePath, NodeState versionState, boolean removeExisting) throws RepositoryException
- Specified by:
restorein interfaceVersionManager- Throws:
VersionExceptionItemExistsExceptionUnsupportedRepositoryOperationExceptionLockExceptionInvalidItemStateExceptionRepositoryException- 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:
restorein interfaceVersionManager- Throws:
ItemExistsExceptionUnsupportedRepositoryOperationExceptionVersionExceptionLockExceptionInvalidItemStateExceptionRepositoryException- See Also:
Workspace.restore(Version[], boolean)
-
merge
public Iterator<NodeId> merge(NodeState nodeState, String workspaceName, boolean bestEffort) throws RepositoryException
- Specified by:
mergein interfaceVersionManager- Returns:
- An Iterator over
NodeIds of allNodes that failed to be merged and need manual resolution by the user of the API. - Throws:
NoSuchWorkspaceExceptionAccessDeniedExceptionMergeExceptionLockExceptionInvalidItemStateExceptionRepositoryException- 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:
mergein interfaceVersionManager- Returns:
- An Iterator over
NodeIds of allNodes that failed to be merged and need manual resolution by the user of the API. - Throws:
NoSuchWorkspaceExceptionAccessDeniedExceptionMergeExceptionLockExceptionInvalidItemStateExceptionRepositoryException- 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:
resolveMergeConflictin interfaceVersionManager- Throws:
VersionExceptionInvalidItemStateExceptionUnsupportedRepositoryOperationExceptionRepositoryException- See Also:
Node.cancelMerge(Version),Node.doneMerge(Version)
-
createConfiguration
public NodeEntry createConfiguration(NodeState nodeState) throws UnsupportedRepositoryOperationException, RepositoryException
- Specified by:
createConfigurationin interfaceVersionManager- Returns:
- Throws:
UnsupportedRepositoryOperationExceptionRepositoryException
-
createActivity
public NodeEntry createActivity(String title) throws UnsupportedRepositoryOperationException, RepositoryException
- Specified by:
createActivityin interfaceVersionManager- Returns:
- Throws:
UnsupportedRepositoryOperationExceptionRepositoryException
-
removeActivity
public void removeActivity(NodeState activityState) throws UnsupportedRepositoryOperationException, RepositoryException
- Specified by:
removeActivityin interfaceVersionManager- Throws:
UnsupportedRepositoryOperationExceptionRepositoryException
-
mergeActivity
public Iterator<NodeId> mergeActivity(NodeState activityState) throws UnsupportedRepositoryOperationException, RepositoryException
- Specified by:
mergeActivityin interfaceVersionManager- Returns:
- Throws:
UnsupportedRepositoryOperationExceptionRepositoryException
-
getVersionableNodeEntry
public NodeEntry getVersionableNodeEntry(NodeState versionState) throws RepositoryException
- Specified by:
getVersionableNodeEntryin interfaceVersionManager- Returns:
- Throws:
RepositoryException
-
getVersionHistoryEntry
public NodeEntry getVersionHistoryEntry(NodeState versionableState) throws RepositoryException
- Specified by:
getVersionHistoryEntryin interfaceVersionManager- Returns:
- Throws:
RepositoryException
-
-