jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r429326 - in /jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state: NodeState.java PathElementReference.java TransientChangeLog.java
Date Mon, 07 Aug 2006 13:02:00 GMT
Author: angela
Date: Mon Aug  7 06:01:59 2006
New Revision: 429326

URL: http://svn.apache.org/viewvc?rev=429326&view=rev
Log:
work in progress

- remove NodeState constructor which is marked for removal

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/PathElementReference.java
    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/NodeState.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/NodeState.java?rev=429326&r1=429325&r2=429326&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
Mon Aug  7 06:01:59 2006
@@ -151,26 +151,6 @@
     }
 
     /**
-     * Constructs a new node state that is not connected.
-     *
-     * @param id            id of this node
-     * @param nodeTypeName  node type of this node
-     * @param parent        the parent node state
-     * @param initialStatus the initial status of the node state object
-     * @param isTransient   flag indicating whether this state is transient or not
-     */
-    public NodeState(NodeId id, QName nodeTypeName, NodeState parent,
-                     int initialStatus, boolean isTransient, IdFactory idFactory) {
-        super(initialStatus, isTransient);
-        this.id = id;
-        this.parent = parent;
-        this.nodeTypeName = nodeTypeName;
-        this.idFactory = idFactory;
-        // TODO: remove this constructor
-        this.isf = null;
-    }
-
-    /**
      * {@inheritDoc}
      */
     protected synchronized void copy(ItemState state) {
@@ -201,6 +181,9 @@
         return true;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public NodeState getParentState() {
         return parent;
     }
@@ -1171,9 +1154,9 @@
          */
         private ChildNodeEntry createChildNodeEntry(QName nodeName, NodeId id) {
             if (id.getRelativePath() != null) {
-                return new PathElementReference(NodeState.this, nodeName, NodeState.this.isf,
NodeState.this.idFactory);
+                return new PathElementReference(NodeState.this, nodeName, isf, idFactory);
             } else {
-                return new UUIDReference(NodeState.this, id, NodeState.this.isf, nodeName);
+                return new UUIDReference(NodeState.this, id, isf, nodeName);
             }
         }
 

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/PathElementReference.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/PathElementReference.java?rev=429326&r1=429325&r2=429326&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/PathElementReference.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/PathElementReference.java
Mon Aug  7 06:01:59 2006
@@ -63,7 +63,6 @@
      * @see ChildNodeEntry#getId()
      */
     public NodeId getId() {
-        return idFactory.createNodeId(parent.getNodeId(),
-                Path.create(getName(), getIndex()));
+        return idFactory.createNodeId(parent.getNodeId(), Path.create(getName(), getIndex()));
     }
 }

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=429326&r1=429325&r2=429326&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
Mon Aug  7 06:01:59 2006
@@ -143,7 +143,8 @@
 //            return state;
 //        }
 
-        return new NodeState(id, nodeTypeName, parent, ItemState.STATUS_NEW, true, idFactory);
+        ItemStateFactory isf = null; // TODO: probably not correct
+        return new NodeState(id, parent, nodeTypeName, ItemState.STATUS_NEW, true, isf);
     }
 
     /**



Mime
View raw message