jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r239575 - /incubator/jackrabbit/trunk/core/src/java/org/apache/jackrabbit/core/SessionImpl.java
Date Wed, 24 Aug 2005 09:09:18 GMT
Author: mreutegg
Date: Wed Aug 24 02:09:13 2005
New Revision: 239575

URL: http://svn.apache.org/viewcvs?rev=239575&view=rev
Log:
- Allow for subclassing of WorkspaceImpl

Modified:
    incubator/jackrabbit/trunk/core/src/java/org/apache/jackrabbit/core/SessionImpl.java

Modified: incubator/jackrabbit/trunk/core/src/java/org/apache/jackrabbit/core/SessionImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/core/src/java/org/apache/jackrabbit/core/SessionImpl.java?rev=239575&r1=239574&r2=239575&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/core/src/java/org/apache/jackrabbit/core/SessionImpl.java (original)
+++ incubator/jackrabbit/trunk/core/src/java/org/apache/jackrabbit/core/SessionImpl.java Wed
Aug 24 02:09:13 2005
@@ -31,6 +31,7 @@
 import org.apache.jackrabbit.core.state.NodeState;
 import org.apache.jackrabbit.core.state.SessionItemStateManager;
 import org.apache.jackrabbit.core.state.UpdatableItemStateManager;
+import org.apache.jackrabbit.core.state.SharedItemStateManager;
 import org.apache.jackrabbit.value.ValueFactoryImpl;
 import org.apache.jackrabbit.core.version.VersionManager;
 import org.apache.jackrabbit.core.xml.DocViewSAXEventGenerator;
@@ -236,8 +237,8 @@
         nsMappings = new LocalNamespaceMappings(rep.getNamespaceRegistry());
         ntMgr = new NodeTypeManagerImpl(rep.getNodeTypeRegistry(), getNamespaceResolver());
         String wspName = wspConfig.getName();
-        wsp = new WorkspaceImpl(wspConfig, rep.getWorkspaceStateManager(wspName),
-                rep, this);
+        wsp = createWorkspaceInstance(wspConfig,
+                rep.getWorkspaceStateManager(wspName), rep, this);
         itemStateMgr = createSessionItemStateManager(wsp.getItemStateManager());
         hierMgr = itemStateMgr.getHierarchyMgr();
         itemMgr = createItemManager(itemStateMgr, hierMgr);
@@ -253,6 +254,23 @@
     protected SessionItemStateManager createSessionItemStateManager(UpdatableItemStateManager
manager) {
         return new SessionItemStateManager(rep.getRootNodeUUID(),
                 manager, getNamespaceResolver());
+    }
+
+    /**
+     * Creates the workspace instance backing this session.
+     *
+     * @param wspConfig The workspace configuration
+     * @param stateMgr  The shared item state manager
+     * @param rep       The repository
+     * @param session   The session
+     * @return An instance of the {@link WorkspaceImpl} class or an extension
+     *         thereof.
+     */
+    protected WorkspaceImpl createWorkspaceInstance(WorkspaceConfig wspConfig,
+                                                    SharedItemStateManager stateMgr,
+                                                    RepositoryImpl rep,
+                                                    SessionImpl session) {
+        return new WorkspaceImpl(wspConfig, stateMgr, rep, this);
     }
 
     /**



Mime
View raw message