jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r430321 - in /jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state: NodeState.java TransientChangeLog.java WorkspaceItemStateFactory.java
Date Thu, 10 Aug 2006 08:59:19 GMT
Author: mreutegg
Date: Thu Aug 10 01:59:13 2006
New Revision: 430321

URL: http://svn.apache.org/viewvc?rev=430321&view=rev
Log:
IdFactory is not properly initialized in NodeState

Modified:
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/NodeState.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/TransientChangeLog.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/WorkspaceItemStateFactory.java

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/NodeState.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/NodeState.java?rev=430321&r1=430320&r2=430321&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/NodeState.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/NodeState.java
Thu Aug 10 01:59:13 2006
@@ -117,13 +117,16 @@
      *                      not.
      * @param isf           the item state factory responsible for creating node
      *                      states.
+     * @param idFactory     the <code>IdFactory</code> to create new id
+     *                      instance.
      */
     public NodeState(NodeId id, NodeState parent, QName nodeTypeName,
-                     int initialStatus, boolean isTransient, ItemStateFactory isf) {
+                     int initialStatus, boolean isTransient,
+                     ItemStateFactory isf, IdFactory idFactory) {
         super(initialStatus, isTransient);
         this.id = id;
         this.parent = parent;
-        this.idFactory = parent.idFactory;
+        this.idFactory = idFactory;
         this.nodeTypeName = nodeTypeName;
         this.isf = isf;
     }
@@ -137,13 +140,16 @@
      * @param initialStatus  the initial status of the node state object
      * @param isTransient    flag indicating whether this state is transient or
      *                       not
+     * @param idFactory      the <code>IdFactory</code> to create new id
+     *                       instance.
      */
-    public NodeState(NodeState overlayedState, NodeState parent, int initialStatus,
-                     boolean isTransient, ItemStateFactory isf) {
+    public NodeState(NodeState overlayedState, NodeState parent,
+                     int initialStatus, boolean isTransient,
+                     ItemStateFactory isf, IdFactory idFactory) {
         super(overlayedState, initialStatus, isTransient);
         pull();
         this.parent = parent;
-        idFactory = parent.idFactory;
+        this.idFactory = idFactory;
         this.isf = isf;
     }
 

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/TransientChangeLog.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/TransientChangeLog.java?rev=430321&r1=430320&r2=430321&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/TransientChangeLog.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/TransientChangeLog.java
Thu Aug 10 01:59:13 2006
@@ -352,7 +352,7 @@
             id = idFactory.createNodeId(uuid);
         }
         NodeState nodeState = new NodeState(id, parent, null,
-                ItemState.STATUS_NEW, true, this);
+                ItemState.STATUS_NEW, true, this, idFactory);
         // get a notification when this item state is saved or invalidated
         nodeState.addListener(this);
         added(nodeState);
@@ -383,7 +383,7 @@
         NodeId parentId = overlayedState.getParent().getNodeId();
         NodeState parentState = (NodeState) ism.getItemState(parentId);
         NodeState nodeState = new NodeState(overlayedState, parentState,
-                ItemState.STATUS_EXISTING, true, this);
+                ItemState.STATUS_EXISTING, true, this, idFactory);
         nodeState.addListener(this);
         return nodeState;
     }
@@ -397,7 +397,7 @@
         // retrieve state to overlay
         NodeState overlayedState = (NodeState) parent.getItemState(nodeId);
         NodeState nodeState = new NodeState(overlayedState, parentState,
-                ItemState.STATUS_EXISTING, true, this);
+                ItemState.STATUS_EXISTING, true, this, idFactory);
         nodeState.addListener(this);
         return nodeState;
     }

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/WorkspaceItemStateFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/WorkspaceItemStateFactory.java?rev=430321&r1=430320&r2=430321&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/WorkspaceItemStateFactory.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/WorkspaceItemStateFactory.java
Thu Aug 10 01:59:13 2006
@@ -108,7 +108,8 @@
             // 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(), parent, ntName, ItemState.STATUS_EXISTING,
false, this);
+            NodeState state = new NodeState(info.getId(), parent, ntName,
+                    ItemState.STATUS_EXISTING, false, this, service.getIdFactory());
             // set mixin nodetypes
             state.setMixinTypeNames(info.getMixins());
 



Mime
View raw message