jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1214907 - in /jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi: hierarchy/NodeEntry.java state/WorkspaceItemStateFactory.java
Date Thu, 15 Dec 2011 18:39:41 GMT
Author: mduerig
Date: Thu Dec 15 18:39:41 2011
New Revision: 1214907

URL: http://svn.apache.org/viewvc?rev=1214907&view=rev
Log:
Microkernel based Jackrabbit prototype (WIP)
remove dead code

Modified:
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntry.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/WorkspaceItemStateFactory.java

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntry.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntry.java?rev=1214907&r1=1214906&r2=1214907&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntry.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntry.java
Thu Dec 15 18:39:41 2011
@@ -30,7 +30,6 @@ import org.apache.jackrabbit.jcr2spi.sta
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
 import org.apache.jackrabbit.jcr2spi.state.PropertyState;
 import org.apache.jackrabbit.jcr2spi.state.Status;
-import org.apache.jackrabbit.spi.ChildInfo;
 import org.apache.jackrabbit.spi.IdFactory;
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.NodeId;
@@ -715,24 +714,6 @@ public class NodeEntry extends Hierarchy
     }
 
     /**
-     * Creates or updates the {@code ChildNodeEntries} of this node.
-     *
-     * @param childInfos
-     */
-    public void setNodeEntries(Iterator<ChildInfo> childInfos) throws UnsupportedRepositoryOperationException
{
-        if (!childNodeAttic.isEmpty()) {
-            // filter those entries that have been moved to the attic.
-            List<ChildInfo> remaining = new ArrayList<ChildInfo>();
-            while (childInfos.hasNext()) {
-                ChildInfo ci = childInfos.next();
-                if (!childNodeAttic.contains(ci.getName(), ci.getIndex(), ci.getUniqueID()))
{
-                    remaining.add(ci);
-                }
-            }
-        }
-    }
-
-    /**
      * Adds a child NodeEntry to this entry if it not yet present with this
      * node entry.
      *

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/WorkspaceItemStateFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/WorkspaceItemStateFactory.java?rev=1214907&r1=1214906&r2=1214907&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/WorkspaceItemStateFactory.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/WorkspaceItemStateFactory.java
Thu Dec 15 18:39:41 2011
@@ -296,13 +296,6 @@ public class WorkspaceItemStateFactory e
         }
         entry.setPropertyEntries(propNames);
 
-        // unless the child-info are omitted by the SPI impl -> make sure
-        // the child entries the node entry are initialized or updated.
-        Iterator<ChildInfo> childInfos = info.getChildInfos();
-        if (childInfos != null) {
-            entry.setNodeEntries(childInfos);
-        }
-
         // now build or update the node state itself
         entry.setItemState(new NodeState(entry, info, this, definitionProvider));
 
@@ -397,15 +390,7 @@ public class WorkspaceItemStateFactory e
         return entry;
     }
 
-    private NodeEntry createNodeEntry(NodeEntry parentEntry, Name name, int index) throws
RepositoryException {
-        NodeInfo info = cache.getNodeInfo(parentEntry.getWorkspaceId());
-        if (info != null) {
-            Iterator<ChildInfo> childInfos = info.getChildInfos();
-            if (childInfos != null) {
-                parentEntry.setNodeEntries(childInfos);
-            }
-        }
-
+    private static NodeEntry createNodeEntry(NodeEntry parentEntry, Name name, int index)
throws RepositoryException {
         return parentEntry.getOrAddNodeEntry(name, index, null);
     }
 



Mime
View raw message