jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r429623 - /jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/TransientChangeLog.java
Date Tue, 08 Aug 2006 10:10:15 GMT
Author: mreutegg
Date: Tue Aug  8 03:10:12 2006
New Revision: 429623

URL: http://svn.apache.org/viewvc?rev=429623&view=rev
Log:
- Attach listener to item states created by transient item state manager

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

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=429623&r1=429622&r2=429623&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
Tue Aug  8 03:10:12 2006
@@ -404,7 +404,8 @@
         } else {
             id = idFactory.createNodeId(uuid);
         }
-        NodeState nodeState = new NodeState(id, parent, null, ItemState.STATUS_NEW, true,
this);
+        NodeState nodeState = new NodeState(id, parent, null,
+                ItemState.STATUS_NEW, true, this);
         // get a notification when this item state is saved or invalidated
         nodeState.addListener(this);
         added(nodeState);
@@ -417,7 +418,8 @@
      */
     public PropertyState createNewPropertyState(QName name, NodeState parent) {
         PropertyId id = idFactory.createPropertyId(parent.getNodeId(), name);
-        PropertyState propState = new PropertyState(id, parent, ItemState.STATUS_NEW, true);
+        PropertyState propState = new PropertyState(id, parent,
+                ItemState.STATUS_NEW, true);
         // get a notification when this item state is saved or invalidated
         propState.addListener(this);
         added(propState);
@@ -434,7 +436,10 @@
         NodeState overlayedState = (NodeState) parent.getItemState(nodeId);
         NodeId parentId = overlayedState.getParent().getNodeId();
         NodeState parentState = (NodeState) ism.getItemState(parentId);
-        return new NodeState(overlayedState, parentState, ItemState.STATUS_EXISTING, true,
this);
+        NodeState nodeState = new NodeState(overlayedState, parentState,
+                ItemState.STATUS_EXISTING, true, this);
+        nodeState.addListener(this);
+        return nodeState;
     }
 
     /**
@@ -445,7 +450,10 @@
             throws NoSuchItemStateException, ItemStateException {
         // retrieve state to overlay
         NodeState overlayedState = (NodeState) parent.getItemState(nodeId);
-        return new NodeState(overlayedState, parentState, ItemState.STATUS_EXISTING, true,
this);
+        NodeState nodeState = new NodeState(overlayedState, parentState,
+                ItemState.STATUS_EXISTING, true, this);
+        nodeState.addListener(this);
+        return nodeState;
     }
 
     /**
@@ -459,7 +467,10 @@
         PropertyState overlayedState = (PropertyState) parent.getItemState(propertyId);
         NodeId parentId = overlayedState.getParent().getNodeId();
         NodeState parentState = (NodeState) ism.getItemState(parentId);
-        return new PropertyState(overlayedState, parentState, ItemState.STATUS_EXISTING,
true);
+        PropertyState propState = new PropertyState(overlayedState, parentState,
+                ItemState.STATUS_EXISTING, true);
+        propState.addListener(this);
+        return propState;
     }
 
     /**
@@ -471,7 +482,10 @@
             throws NoSuchItemStateException, ItemStateException {
         // retrieve state to overlay
         PropertyState overlayedState = (PropertyState) parent.getItemState(propertyId);
-        return new PropertyState(overlayedState, parentState, ItemState.STATUS_EXISTING,
true);
+        PropertyState propState = new PropertyState(overlayedState, parentState,
+                ItemState.STATUS_EXISTING, true);
+        propState.addListener(this);
+        return propState;
     }
 
     //-----------------------< ItemStateLifeCycleListener >---------------------



Mime
View raw message