org.apache.jackrabbit.core.version
Class VersionManagerImplConfig

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
              extended by org.apache.jackrabbit.core.version.VersionManagerImplConfig
Direct Known Subclasses:
VersionManagerImpl

public abstract class VersionManagerImplConfig
extends VersionManagerImplMerge

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

this class provides methods for the configuration and baselines related operations.

Implementation note: methods starting with "internal" are considered to be executed within a "write operations" block.


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 VersionManagerImplConfig(SessionContext context, UpdatableItemStateManager stateMgr, HierarchyManager hierMgr)
          Creates a new version manager for the given session
 
Method Summary
protected  NodeId createConfiguration(NodeStateEx state)
          Creates a new configuration node.
protected  NodeId restore(NodeStateEx parent, Name name, InternalBaseline baseline)
          Restores the versions recorded in the given baseline below the specified path.
 
Methods inherited from class org.apache.jackrabbit.core.version.VersionManagerImplMerge
finishMerge, merge, merge
 
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

VersionManagerImplConfig

protected VersionManagerImplConfig(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

restore

protected NodeId restore(NodeStateEx parent,
                         Name name,
                         InternalBaseline baseline)
                  throws RepositoryException
Restores the versions recorded in the given baseline below the specified path.

Parameters:
parent - the parent state
name - the name of the new node (tree)
baseline - the baseline that recorded the versions
Returns:
the node id of the configuration
Throws:
RepositoryException - if an error occurs

createConfiguration

protected NodeId createConfiguration(NodeStateEx state)
                              throws RepositoryException
Creates a new configuration node.

The nt:confguration is stored within the nt:configurations storage using the nodeid of the configuration root (rootId) as path.

Parameters:
state - the node of the workspace configuration
Returns:
the node id of the created configuration
Throws:
RepositoryException - if an error occurs


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