jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r428726 - /jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java
Date Fri, 04 Aug 2006 13:53:59 GMT
Author: mreutegg
Date: Fri Aug  4 06:53:56 2006
New Revision: 428726

URL: http://svn.apache.org/viewvc?rev=428726&view=rev
Log:
- Use new NodeState constructor

Modified:
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java?rev=428726&r1=428725&r2=428726&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java
Fri Aug  4 06:53:56 2006
@@ -144,16 +144,20 @@
     private Set listeners = new HashSet();
 
     public WorkspaceManager(RepositoryService service, SessionInfo sessionInfo) throws RepositoryException
{
-        this.service = service;
-        this.sessionInfo = sessionInfo;
+        try {
+            this.service = service;
+            this.sessionInfo = sessionInfo;
 
-        cache = new CachingItemStateManager(this, service.getIdFactory());
-        addEventListener(cache);
+            cache = new CachingItemStateManager(this, service.getIdFactory());
+            addEventListener(cache);
 
-        nsRegistry = createNamespaceRegistry();
-        ntRegistry = createNodeTypeRegistry(nsRegistry);
-        rootNodeId = createRootNodeId();
-        externalChangeListener = createChangeListener();
+            nsRegistry = createNamespaceRegistry();
+            ntRegistry = createNodeTypeRegistry(nsRegistry);
+            rootNodeId = createRootNodeId();
+            externalChangeListener = createChangeListener();
+        } catch (ItemStateException e) {
+            throw new RepositoryException(e);
+        }
     }
 
     public NamespaceRegistryImpl getNamespaceRegistryImpl() {
@@ -507,12 +511,10 @@
         try {
             QName ntName = info.getNodetype();
 
-            // TODO pass parent in constructor of NodeState
-
             // build the node state
             // NOTE: unable to retrieve definitionId -> needs to be retrieved
             // by the itemManager upon Node creation.
-            NodeState state = new NodeState(info.getId(), ntName, parent.getNodeId(), ItemState.STATUS_EXISTING,
false, getIdFactory());
+            NodeState state = new NodeState(info.getId(), parent, ntName, ItemState.STATUS_EXISTING,
false, this);
             // set mixin nodetypes
             state.setMixinTypeNames(info.getMixins());
 



Mime
View raw message