jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1414668 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexHookManagerDiff.java
Date Wed, 28 Nov 2012 13:28:04 GMT
Author: angela
Date: Wed Nov 28 13:28:03 2012
New Revision: 1414668

URL: http://svn.apache.org/viewvc?rev=1414668&view=rev
Log:
minor improvement

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexHookManagerDiff.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexHookManagerDiff.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexHookManagerDiff.java?rev=1414668&r1=1414667&r2=1414668&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexHookManagerDiff.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexHookManagerDiff.java
Wed Nov 28 13:28:03 2012
@@ -16,14 +16,6 @@
  */
 package org.apache.jackrabbit.oak.plugins.index;
 
-import static org.apache.jackrabbit.JcrConstants.JCR_PRIMARYTYPE;
-import static org.apache.jackrabbit.oak.commons.PathUtils.concat;
-import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.INDEX_DEFINITIONS_NAME;
-import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.INDEX_DEFINITIONS_NODE_TYPE;
-import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.REINDEX_PROPERTY_NAME;
-import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.TYPE_PROPERTY_NAME;
-import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.TYPE_UNKNOWN;
-
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -33,6 +25,7 @@ import java.util.Map;
 import java.util.Set;
 import java.util.TreeMap;
 
+import com.google.common.collect.Lists;
 import org.apache.jackrabbit.oak.api.CommitFailedException;
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.api.Type;
@@ -45,7 +38,13 @@ import org.apache.jackrabbit.oak.spi.sta
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.collect.Lists;
+import static org.apache.jackrabbit.JcrConstants.JCR_PRIMARYTYPE;
+import static org.apache.jackrabbit.oak.commons.PathUtils.concat;
+import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.INDEX_DEFINITIONS_NAME;
+import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.INDEX_DEFINITIONS_NODE_TYPE;
+import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.REINDEX_PROPERTY_NAME;
+import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.TYPE_PROPERTY_NAME;
+import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.TYPE_UNKNOWN;
 
 /**
  * Acts as a composite NodeStateDiff, it delegates all the diff's events to the
@@ -76,6 +75,19 @@ class IndexHookManagerDiff implements No
      */
     private final Map<String, Map<String, List<IndexHook>>> updates;
 
+    public IndexHookManagerDiff(IndexHookProvider provider, NodeBuilder root,
+            Map<String, Map<String, List<IndexHook>>> updates)
+            throws CommitFailedException {
+        this(provider, null, root, null, "/", updates);
+    }
+
+    private IndexHookManagerDiff(IndexHookProvider provider,
+            IndexHookManagerDiff parent, String name)
+            throws CommitFailedException {
+        this(provider, parent, getChildNode(parent.node, name), name, null,
+                parent.updates);
+    }
+
     private IndexHookManagerDiff(IndexHookProvider provider,
             IndexHookManagerDiff parent, NodeBuilder node, String name,
             String path, Map<String, Map<String, List<IndexHook>>> updates)
@@ -167,19 +179,6 @@ class IndexHookManagerDiff implements No
         }
     }
 
-    private IndexHookManagerDiff(IndexHookProvider provider,
-            IndexHookManagerDiff parent, String name)
-            throws CommitFailedException {
-        this(provider, parent, getChildNode(parent.node, name), name, null,
-                parent.updates);
-    }
-
-    public IndexHookManagerDiff(IndexHookProvider provider, NodeBuilder root,
-            Map<String, Map<String, List<IndexHook>>> updates)
-            throws CommitFailedException {
-        this(provider, null, root, null, "/", updates);
-    }
-
     private static NodeBuilder getChildNode(NodeBuilder node, String name) {
         if (node != null && node.hasChildNode(name)) {
             return node.child(name);
@@ -196,10 +195,8 @@ class IndexHookManagerDiff implements No
     }
 
     /**
-     * 
      * Returns IndexHooks of all types that have the best match (are situated
      * the closest on the hierarchy) for the given path.
-     * 
      */
     private Map<String, List<IndexHook>> getIndexes() {
         Map<String, List<IndexHook>> hooks = new HashMap<String, List<IndexHook>>();
@@ -217,10 +214,8 @@ class IndexHookManagerDiff implements No
     }
 
     /**
-     * 
      * Returns IndexHooks of the given type that have the best match (are
      * situated the closest on the hierarchy) for the current path.
-     * 
      */
     private Map<String, List<IndexHook>> getIndexes(String type) {
         Map<String, List<IndexHook>> hooks = new HashMap<String, List<IndexHook>>();
@@ -271,7 +266,7 @@ class IndexHookManagerDiff implements No
                 && ps.getValue(Type.STRING).equals(INDEX_DEFINITIONS_NODE_TYPE);
     }
 
-    // -----------------------------------------------------< NodeStateDiff >--
+    // -----------------------------------------------------< NodeStateDiff >---
 
     @Override
     public void propertyAdded(PropertyState after) {



Mime
View raw message