org.apache.jackrabbit.core.version
Class VersionManagerImplMerge

java.lang.Object
  extended by org.apache.jackrabbit.core.version.VersionManagerImplBase
      extended by org.apache.jackrabbit.core.version.VersionManagerImplRestore
          extended by org.apache.jackrabbit.core.version.VersionManagerImplMerge
Direct Known Subclasses:
VersionManagerImplConfig

public abstract class VersionManagerImplMerge
extends VersionManagerImplRestore

The JCR Version Manager impementation is split in several classes in order to group related methods together.

this class provides methods for the merge operations.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.jackrabbit.core.version.VersionManagerImplBase
VersionManagerImplBase.WriteOperation
 
Field Summary
 
Fields inherited from class org.apache.jackrabbit.core.version.VersionManagerImplBase
context, currentActivity, hierMgr, ntReg, session, stateMgr, vMgr
 
Constructor Summary
protected VersionManagerImplMerge(SessionContext context, UpdatableItemStateManager stateMgr, HierarchyManager hierMgr)
          Creates a new version manager for the given session
 
Method Summary
protected  void finishMerge(NodeStateEx state, Version version, boolean cancel)
          Perform Node.cancelMerge(Version) or Node.doneMerge(Version) depending on the value of cancel.
protected  void merge(InternalActivity activity, List<ItemId> failedIds)
          Merge the given activity to this workspace
protected  void merge(NodeStateEx state, NodeStateEx srcRoot, List<ItemId> failedIds, boolean bestEffort, boolean shallow)
          Merges/Updates this node with its corresponding ones
 
Methods inherited from class org.apache.jackrabbit.core.version.VersionManagerImplRestore
internalRestore, internalRestore, internalRestoreFrozen, restore, restore, restore, restoreByLabel
 
Methods inherited from class org.apache.jackrabbit.core.version.VersionManagerImplBase
acquireReadLock, acquireWriteLock, checkModify, checkModify, checkoutCheckin, checkVersionable, getBaseVersion, getBaseVersionId, getNodeStateEx, getVersion, getVersionHistory, isCheckedOut, safeGetJCRPath, startWriteOperation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VersionManagerImplMerge

protected VersionManagerImplMerge(SessionContext context,
                                  UpdatableItemStateManager stateMgr,
                                  HierarchyManager hierMgr)
Creates a new version manager for the given session

Parameters:
context - component context of the current session
stateMgr - the underlying state manager
hierMgr - local hierarchy manager
Method Detail

merge

protected void merge(NodeStateEx state,
                     NodeStateEx srcRoot,
                     List<ItemId> failedIds,
                     boolean bestEffort,
                     boolean shallow)
              throws RepositoryException,
                     ItemStateException
Merges/Updates this node with its corresponding ones

Parameters:
state - state to merge or update
srcRoot - src workspace root node
failedIds - list of failed ids
bestEffort - best effor flag
shallow - is shallow flag
Throws:
RepositoryException - if an error occurs
ItemStateException - if an error occurs

finishMerge

protected void finishMerge(NodeStateEx state,
                           Version version,
                           boolean cancel)
                    throws RepositoryException
Perform Node.cancelMerge(Version) or Node.doneMerge(Version) depending on the value of cancel.

Parameters:
state - state to finish
version - version
cancel - flag inidicates if this is a cancel operation
Throws:
RepositoryException - if an error occurs

merge

protected void merge(InternalActivity activity,
                     List<ItemId> failedIds)
              throws RepositoryException
Merge the given activity to this workspace

Parameters:
activity - internal activity
failedIds - list of failed ids
Throws:
RepositoryException - if an error occurs


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.