jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexparvule...@apache.org
Subject svn commit: r1475782 - in /jackrabbit/oak/trunk: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/nodetype/ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/...
Date Thu, 25 Apr 2013 14:07:09 GMT
Author: alexparvulescu
Date: Thu Apr 25 14:07:08 2013
New Revision: 1475782

URL: http://svn.apache.org/r1475782
Log:
OAK-734 Refactor indexing code to use Editors
 - renamed 'p2' index package to 'property'

Added:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/strategy/
      - copied from r1475736, jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/strategy/
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexQueryTest.java
  (contents, props changed)
      - copied, changed from r1475736, jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexQueryTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexTest.java
  (contents, props changed)
      - copied, changed from r1475754, jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/RelativePathTest.java
  (contents, props changed)
      - copied, changed from r1475736, jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/p2/RelativePathTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/strategy/
      - copied from r1475736, jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/p2/strategy/
Removed:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2Index.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexHook.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexHookProvider.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexHookUpdate.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexLookup.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexProvider.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/strategy/
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexQueryTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/p2/RelativePathTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/p2/strategy/
Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexUtils.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndex.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndexLookup.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/strategy/ContentMirrorStoreStrategy.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/strategy/IndexStoreStrategy.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/AbstractSecurityTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/api/UniquePropertyTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/IndexUpdateTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndexTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/UserInitializerTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/UserProviderTest.java
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/Jcr.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexUtils.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexUtils.java?rev=1475782&r1=1475781&r2=1475782&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexUtils.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexUtils.java
Thu Apr 25 14:07:08 2013
@@ -24,7 +24,7 @@ import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 
 import org.apache.jackrabbit.oak.api.PropertyState;
-import org.apache.jackrabbit.oak.plugins.index.p2.Property2IndexHookProvider;
+import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditorProvider;
 import org.apache.jackrabbit.oak.plugins.memory.PropertyStates;
 import org.apache.jackrabbit.oak.spi.state.ChildNodeEntry;
 import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
@@ -84,7 +84,7 @@ public class IndexUtils {
                                              @Nullable Collection<String> declaringNodeTypeNames)
{
         NodeBuilder entry = index.child(indexDefName)
                 .setProperty(JCR_PRIMARYTYPE, INDEX_DEFINITIONS_NODE_TYPE, NAME)
-                .setProperty(TYPE_PROPERTY_NAME, Property2IndexHookProvider.TYPE)
+                .setProperty(TYPE_PROPERTY_NAME, PropertyIndexEditorProvider.TYPE)
                 .setProperty(REINDEX_PROPERTY_NAME, reindex);
         if (unique) {
             entry.setProperty(UNIQUE_PROPERTY_NAME, unique);
@@ -111,7 +111,7 @@ public class IndexUtils {
                                              @Nonnull String[] propertyNames,
                                              @Nullable String[] declaringNodeTypeNames) {
         NodeUtil entry = indexNode.getOrAddChild(indexDefName, INDEX_DEFINITIONS_NODE_TYPE);
-        entry.setString(TYPE_PROPERTY_NAME, Property2IndexHookProvider.TYPE);
+        entry.setString(TYPE_PROPERTY_NAME, PropertyIndexEditorProvider.TYPE);
         entry.setBoolean(REINDEX_PROPERTY_NAME, true);
         if (unique) {
             entry.setBoolean(UNIQUE_PROPERTY_NAME, true);

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndex.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndex.java?rev=1475782&r1=1475781&r2=1475782&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndex.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndex.java
Thu Apr 25 14:07:08 2013
@@ -19,7 +19,7 @@
 package org.apache.jackrabbit.oak.plugins.index.nodetype;
 
 import org.apache.jackrabbit.JcrConstants;
-import org.apache.jackrabbit.oak.plugins.index.p2.Property2IndexLookup;
+import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexLookup;
 import org.apache.jackrabbit.oak.spi.query.Cursor;
 import org.apache.jackrabbit.oak.spi.query.Cursors;
 import org.apache.jackrabbit.oak.spi.query.Filter;
@@ -28,10 +28,10 @@ import org.apache.jackrabbit.oak.spi.sta
 
 /**
  * <code>NodeTypeIndex</code> implements a {@link QueryIndex} using
- * {@link Property2IndexLookup}s on <code>jcr:primaryType</code> and
+ * {@link PropertyIndexLookup}s on <code>jcr:primaryType</code> and
  * <code>jcr:mixinTypes</code> to evaluate a node type restriction on
  * {@link Filter}. The cost for this index is the sum of the costs of the
- * {@link Property2IndexLookup} for queries on <code>jcr:primaryType</code> and
+ * {@link PropertyIndexLookup} for queries on <code>jcr:primaryType</code> and
  * <code>jcr:mixinTypes</code>.
  */
 class NodeTypeIndex implements QueryIndex, JcrConstants {

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndexLookup.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndexLookup.java?rev=1475782&r1=1475781&r2=1475782&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndexLookup.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndexLookup.java
Thu Apr 25 14:07:08 2013
@@ -19,14 +19,14 @@ package org.apache.jackrabbit.oak.plugin
 import static org.apache.jackrabbit.oak.spi.query.PropertyValues.newName;
 
 import org.apache.jackrabbit.JcrConstants;
-import org.apache.jackrabbit.oak.plugins.index.p2.Property2IndexLookup;
+import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexLookup;
 import org.apache.jackrabbit.oak.spi.query.Filter;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
 
 import com.google.common.collect.Iterables;
 
 /**
- * <code>NodeTypeIndexLookup</code> uses {@link Property2IndexLookup} internally
+ * <code>NodeTypeIndexLookup</code> uses {@link PropertyIndexLookup} internally
  * for cost calculation and queries.
  */
 class NodeTypeIndexLookup implements JcrConstants {
@@ -46,7 +46,7 @@ class NodeTypeIndexLookup implements Jcr
      *         otherwise.
      */
     public boolean isIndexed(String path) {
-        Property2IndexLookup lookup = new Property2IndexLookup(root);
+        PropertyIndexLookup lookup = new PropertyIndexLookup(root);
         if (lookup.isIndexed(JCR_PRIMARYTYPE, path, null)
                 && lookup.isIndexed(JCR_MIXINTYPES, path, null)) {
             return true;
@@ -66,7 +66,7 @@ class NodeTypeIndexLookup implements Jcr
     }
 
     public double getCost(Filter filter) {
-        Property2IndexLookup lookup = new Property2IndexLookup(root);
+        PropertyIndexLookup lookup = new PropertyIndexLookup(root);
         return lookup.getCost(null, JCR_PRIMARYTYPE, newName(filter.getPrimaryTypes()))
                 + lookup.getCost(null, JCR_MIXINTYPES, newName(filter.getMixinTypes()));
     }
@@ -79,7 +79,7 @@ class NodeTypeIndexLookup implements Jcr
      * @return the matched paths (the result might contain duplicate entries)
      */
     public Iterable<String> query(Filter filter) {
-        Property2IndexLookup lookup = new Property2IndexLookup(root);
+        PropertyIndexLookup lookup = new PropertyIndexLookup(root);
         return Iterables.concat(
                 lookup.query(filter, JCR_PRIMARYTYPE, newName(filter.getPrimaryTypes())),
                 lookup.query(filter, JCR_MIXINTYPES, newName(filter.getMixinTypes())));

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/strategy/ContentMirrorStoreStrategy.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/strategy/ContentMirrorStoreStrategy.java?rev=1475782&r1=1475736&r2=1475782&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/strategy/ContentMirrorStoreStrategy.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/strategy/ContentMirrorStoreStrategy.java
Thu Apr 25 14:07:08 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.oak.plugins.index.p2.strategy;
+package org.apache.jackrabbit.oak.plugins.index.property.strategy;
 
 import java.util.Collections;
 import java.util.Deque;

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/strategy/IndexStoreStrategy.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/strategy/IndexStoreStrategy.java?rev=1475782&r1=1475736&r2=1475782&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/strategy/IndexStoreStrategy.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/strategy/IndexStoreStrategy.java
Thu Apr 25 14:07:08 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.oak.plugins.index.p2.strategy;
+package org.apache.jackrabbit.oak.plugins.index.property.strategy;
 
 import java.util.List;
 

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/AbstractSecurityTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/AbstractSecurityTest.java?rev=1475782&r1=1475781&r2=1475782&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/AbstractSecurityTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/AbstractSecurityTest.java
Thu Apr 25 14:07:08 2013
@@ -37,8 +37,8 @@ import org.apache.jackrabbit.oak.api.Con
 import org.apache.jackrabbit.oak.api.ContentSession;
 import org.apache.jackrabbit.oak.api.Root;
 import org.apache.jackrabbit.oak.namepath.NamePathMapper;
-import org.apache.jackrabbit.oak.plugins.index.p2.Property2IndexHookProvider;
-import org.apache.jackrabbit.oak.plugins.index.p2.Property2IndexProvider;
+import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditorProvider;
+import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexProvider;
 import org.apache.jackrabbit.oak.plugins.nodetype.RegistrationEditorProvider;
 import org.apache.jackrabbit.oak.plugins.nodetype.write.InitialContent;
 import org.apache.jackrabbit.oak.plugins.value.ValueFactoryImpl;
@@ -70,8 +70,8 @@ public abstract class AbstractSecurityTe
     public void before() throws Exception {
         contentRepository = new Oak()
                 .with(new InitialContent())
-                .with(new Property2IndexHookProvider())
-                .with(new Property2IndexProvider())
+                .with(new PropertyIndexEditorProvider())
+                .with(new PropertyIndexProvider())
                 .with(new RegistrationEditorProvider())
                 .with(getSecurityProvider())
                 .createContentRepository();

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/api/UniquePropertyTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/api/UniquePropertyTest.java?rev=1475782&r1=1475781&r2=1475782&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/api/UniquePropertyTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/api/UniquePropertyTest.java
Thu Apr 25 14:07:08 2013
@@ -20,7 +20,7 @@ import java.util.UUID;
 
 import org.apache.jackrabbit.JcrConstants;
 import org.apache.jackrabbit.oak.Oak;
-import org.apache.jackrabbit.oak.plugins.index.p2.Property2IndexHookProvider;
+import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditorProvider;
 import org.apache.jackrabbit.oak.plugins.nodetype.write.InitialContent;
 import org.apache.jackrabbit.oak.spi.security.OpenSecurityProvider;
 import org.apache.jackrabbit.oak.util.NodeUtil;
@@ -38,7 +38,7 @@ public class UniquePropertyTest {
 
         Root root = new Oak()
                 .with(new OpenSecurityProvider())
-                .with(new Property2IndexHookProvider())
+                .with(new PropertyIndexEditorProvider())
                 .with(new InitialContent()).createRoot();
 
         NodeUtil node = new NodeUtil(root.getTree("/"));

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/IndexUpdateTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/IndexUpdateTest.java?rev=1475782&r1=1475781&r2=1475782&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/IndexUpdateTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/IndexUpdateTest.java
Thu Apr 25 14:07:08 2013
@@ -31,8 +31,8 @@ import java.util.Set;
 
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.api.Type;
-import org.apache.jackrabbit.oak.plugins.index.p2.Property2IndexHookProvider;
-import org.apache.jackrabbit.oak.plugins.index.p2.Property2IndexLookup;
+import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditorProvider;
+import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexLookup;
 import org.apache.jackrabbit.oak.plugins.nodetype.write.InitialContent;
 import org.apache.jackrabbit.oak.query.ast.SelectorImpl;
 import org.apache.jackrabbit.oak.query.index.FilterImpl;
@@ -79,7 +79,7 @@ public class IndexUpdateTest {
         NodeState after = builder.getNodeState();
 
         IndexUpdateProvider p = new IndexUpdateProvider(
-                new Property2IndexHookProvider());
+                new PropertyIndexEditorProvider());
         EditorHook hook = new EditorHook(p);
         NodeState indexed = hook.processCommit(before, after);
 
@@ -88,10 +88,10 @@ public class IndexUpdateTest {
         checkPathExists(indexed, "newchild", "other", "oak:index", "subIndex",
                 ":index");
 
-        Property2IndexLookup lookup = new Property2IndexLookup(indexed);
+        PropertyIndexLookup lookup = new PropertyIndexLookup(indexed);
         assertEquals(ImmutableSet.of("testRoot"), find(lookup, "foo", "abc"));
 
-        Property2IndexLookup lookupChild = new Property2IndexLookup(indexed
+        PropertyIndexLookup lookupChild = new PropertyIndexLookup(indexed
                 .getChildNode("newchild").getChildNode("other"));
         assertEquals(ImmutableSet.of("testChild"),
                 find(lookupChild, "foo", "xyz"));
@@ -117,7 +117,7 @@ public class IndexUpdateTest {
         NodeState after = builder.getNodeState();
 
         IndexUpdateProvider p = new IndexUpdateProvider(
-                new Property2IndexHookProvider());
+                new PropertyIndexEditorProvider());
         EditorHook hook = new EditorHook(p);
         NodeState indexed = hook.processCommit(before, after);
 
@@ -129,7 +129,7 @@ public class IndexUpdateTest {
         assertFalse(ps.getValue(Type.BOOLEAN));
 
         // next, lookup
-        Property2IndexLookup lookup = new Property2IndexLookup(indexed);
+        PropertyIndexLookup lookup = new PropertyIndexLookup(indexed);
         assertEquals(ImmutableSet.of("testRoot"), find(lookup, "foo", "abc"));
     }
 
@@ -154,7 +154,7 @@ public class IndexUpdateTest {
         NodeState after = builder.getNodeState();
 
         IndexUpdateProvider p = new IndexUpdateProvider(
-                new Property2IndexHookProvider());
+                new PropertyIndexEditorProvider());
         EditorHook hook = new EditorHook(p);
         NodeState indexed = hook.processCommit(before, after);
 
@@ -166,7 +166,7 @@ public class IndexUpdateTest {
         assertFalse(ps.getValue(Type.BOOLEAN));
 
         // next, lookup
-        Property2IndexLookup lookup = new Property2IndexLookup(indexed);
+        PropertyIndexLookup lookup = new PropertyIndexLookup(indexed);
         assertEquals(ImmutableSet.of("testRoot"), find(lookup, "foo", "abc"));
     }
 
@@ -185,7 +185,7 @@ public class IndexUpdateTest {
         NodeState after = builder.getNodeState();
 
         IndexUpdateProvider p = new IndexUpdateProvider(
-                new Property2IndexHookProvider());
+                new PropertyIndexEditorProvider());
         EditorHook hook = new EditorHook(p);
         NodeState indexed = hook.processCommit(before, after);
 
@@ -195,7 +195,7 @@ public class IndexUpdateTest {
                 ":index");
     }
 
-    private Set<String> find(Property2IndexLookup lookup, String name,
+    private Set<String> find(PropertyIndexLookup lookup, String name,
             String value) {
         NodeState system = root.getChildNode(JCR_SYSTEM);
         NodeState types = system.getChildNode(JCR_NODE_TYPES);

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndexTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndexTest.java?rev=1475782&r1=1475781&r2=1475782&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndexTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndexTest.java
Thu Apr 25 14:07:08 2013
@@ -31,7 +31,7 @@ import org.apache.jackrabbit.oak.kernel.
 import org.apache.jackrabbit.oak.plugins.index.CompositeIndexEditorProvider;
 import org.apache.jackrabbit.oak.plugins.index.IndexUpdateProvider;
 import org.apache.jackrabbit.oak.plugins.index.IndexEditorProvider;
-import org.apache.jackrabbit.oak.plugins.index.p2.Property2IndexHookProvider;
+import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditorProvider;
 import org.apache.jackrabbit.oak.plugins.nodetype.write.InitialContent;
 import org.apache.jackrabbit.oak.query.ast.SelectorImpl;
 import org.apache.jackrabbit.oak.query.index.FilterImpl;
@@ -80,7 +80,7 @@ public class NodeTypeIndexTest {
 
         branch.setRoot(root.getNodeState());
         branch.merge(new EditorHook(new IndexUpdateProvider(
-                new Property2IndexHookProvider())));
+                new PropertyIndexEditorProvider())));
 
         NodeState rootState = store.getRoot();
         NodeTypeIndex index = new NodeTypeIndex();

Copied: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexQueryTest.java
(from r1475736, jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexQueryTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexQueryTest.java?p2=jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexQueryTest.java&p1=jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexQueryTest.java&r1=1475736&r2=1475782&rev=1475782&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexQueryTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexQueryTest.java
Thu Apr 25 14:07:08 2013
@@ -14,10 +14,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.oak.plugins.index.p2;
+package org.apache.jackrabbit.oak.plugins.index.property;
 
 import org.apache.jackrabbit.oak.Oak;
 import org.apache.jackrabbit.oak.api.ContentRepository;
+import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditorProvider;
+import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexProvider;
 import org.apache.jackrabbit.oak.plugins.nodetype.write.InitialContent;
 import org.apache.jackrabbit.oak.query.AbstractQueryTest;
 import org.apache.jackrabbit.oak.spi.security.OpenSecurityProvider;
@@ -26,16 +28,16 @@ import org.junit.Test;
 
 /**
  * Tests the query engine using the default index implementation: the
- * {@link Property2IndexProvider}
+ * {@link PropertyIndexProvider}
  */
-public class Property2IndexQueryTest extends AbstractQueryTest {
+public class PropertyIndexQueryTest extends AbstractQueryTest {
 
     @Override
     protected ContentRepository createRepository() {
         return new Oak().with(new InitialContent())
                 .with(new OpenSecurityProvider())
-                .with(new Property2IndexProvider())
-                .with(new Property2IndexHookProvider())
+                .with(new PropertyIndexProvider())
+                .with(new PropertyIndexEditorProvider())
                 .createContentRepository();
     }
 

Propchange: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexQueryTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexQueryTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexTest.java
(from r1475754, jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexTest.java?p2=jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexTest.java&p1=jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexTest.java&r1=1475754&r2=1475782&rev=1475782&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexTest.java
Thu Apr 25 14:07:08 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.oak.plugins.index.p2;
+package org.apache.jackrabbit.oak.plugins.index.property;
 
 import static junit.framework.Assert.assertNotNull;
 import static junit.framework.Assert.assertNull;
@@ -31,6 +31,8 @@ import java.util.Set;
 
 import org.apache.jackrabbit.oak.api.CommitFailedException;
 import org.apache.jackrabbit.oak.api.Type;
+import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditor;
+import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexLookup;
 import org.apache.jackrabbit.oak.plugins.nodetype.write.InitialContent;
 import org.apache.jackrabbit.oak.query.ast.SelectorImpl;
 import org.apache.jackrabbit.oak.query.index.FilterImpl;
@@ -47,7 +49,7 @@ import com.google.common.collect.Sets;
 /**
  * Test the Property2 index mechanism.
  */
-public class Property2IndexTest {
+public class PropertyIndexTest {
 
     private static final int MANY = 100;
 
@@ -75,13 +77,13 @@ public class Property2IndexTest {
         }
         NodeState after = builder.getNodeState();
 
-        EditorDiff.process(new Property2IndexHook(builder), before, after);
+        EditorDiff.process(new PropertyIndexEditor(builder), before, after);
         NodeState indexed = builder.getNodeState();
 
         FilterImpl f = createFilter(indexed, NT_BASE);
 
         // Query the index
-        Property2IndexLookup lookup = new Property2IndexLookup(indexed);
+        PropertyIndexLookup lookup = new PropertyIndexLookup(indexed);
         assertEquals(ImmutableSet.of("a", "b"), find(lookup, "foo", "abc", f));
         assertEquals(ImmutableSet.of("b"), find(lookup, "foo", "def", f));
         assertEquals(ImmutableSet.of(), find(lookup, "foo", "ghi", f));
@@ -95,7 +97,7 @@ public class Property2IndexTest {
         assertTrue("cost: " + cost, cost >= MANY);
     }
 
-    private static Set<String> find(Property2IndexLookup lookup, String name,
+    private static Set<String> find(PropertyIndexLookup lookup, String name,
             String value, Filter filter) {
         return Sets.newHashSet(lookup.query(filter, name, value == null ? null
                 : PropertyValues.newString(value)));
@@ -129,13 +131,13 @@ public class Property2IndexTest {
         NodeState after = builder.getNodeState();
 
         // Add an index
-        EditorDiff.process(new Property2IndexHook(builder), before, after);
+        EditorDiff.process(new PropertyIndexEditor(builder), before, after);
         NodeState indexed = builder.getNodeState();
 
         FilterImpl f = createFilter(indexed, NT_BASE);
 
         // Query the index
-        Property2IndexLookup lookup = new Property2IndexLookup(indexed);
+        PropertyIndexLookup lookup = new PropertyIndexLookup(indexed);
         assertEquals(ImmutableSet.of("a", "b"), find(lookup, "foo", "abc", f));
         assertEquals(ImmutableSet.of("b"), find(lookup, "foo", "def", f));
         assertEquals(ImmutableSet.of(), find(lookup, "foo", "ghi", f));
@@ -190,13 +192,13 @@ public class Property2IndexTest {
                 .setProperty("foo", Arrays.asList("abc", "def"), Type.STRINGS);
         NodeState after = builder.getNodeState();
 
-        EditorDiff.process(new Property2IndexHook(builder), before, after);
+        EditorDiff.process(new PropertyIndexEditor(builder), before, after);
         NodeState indexed = builder.getNodeState();
 
         FilterImpl f = createFilter(indexed, "nt:unstructured");
 
         // Query the index
-        Property2IndexLookup lookup = new Property2IndexLookup(indexed);
+        PropertyIndexLookup lookup = new PropertyIndexLookup(indexed);
         assertEquals(ImmutableSet.of("a", "b"), find(lookup, "foo", "abc", f));
         assertEquals(ImmutableSet.of("b"), find(lookup, "foo", "def", f));
         assertEquals(ImmutableSet.of(), find(lookup, "foo", "ghi", f));
@@ -256,13 +258,13 @@ public class Property2IndexTest {
         NodeState after = builder.getNodeState();
 
         // Add an index
-        EditorDiff.process(new Property2IndexHook(builder), before, after);
+        EditorDiff.process(new PropertyIndexEditor(builder), before, after);
         NodeState indexed = builder.getNodeState();
 
         FilterImpl f = createFilter(after, "nt:unstructured");
 
         // Query the index
-        Property2IndexLookup lookup = new Property2IndexLookup(indexed);
+        PropertyIndexLookup lookup = new PropertyIndexLookup(indexed);
         assertEquals(ImmutableSet.of("a", "b"), find(lookup, "foo", "abc", f));
         assertEquals(ImmutableSet.of("b"), find(lookup, "foo", "def", f));
         assertEquals(ImmutableSet.of(), find(lookup, "foo", "ghi", f));
@@ -298,7 +300,7 @@ public class Property2IndexTest {
         NodeState after = builder.getNodeState();
 
         CommitFailedException expected =
-                EditorDiff.process(new Property2IndexHook(builder), before, after);
+                EditorDiff.process(new PropertyIndexEditor(builder), before, after);
         assertNotNull("Unique constraint should be respected", expected);
     }
 
@@ -316,7 +318,7 @@ public class Property2IndexTest {
                 .setProperty("unique", "true")
                 .setProperty("propertyNames", Arrays.asList("foo"),
                         Type.NAMES)
-                .setProperty(Property2IndexHook.declaringNodeTypes,
+                .setProperty(PropertyIndexEditor.declaringNodeTypes,
                         Arrays.asList("typeFoo"), Type.NAMES);
         NodeState before = builder.getNodeState();
         builder = before.builder();
@@ -327,7 +329,7 @@ public class Property2IndexTest {
         NodeState after = builder.getNodeState();
 
         CommitFailedException unexpected = EditorDiff.process(
-                new Property2IndexHook(builder), before, after);
+                new PropertyIndexEditor(builder), before, after);
         assertNull(unexpected);
     }
 
@@ -345,7 +347,7 @@ public class Property2IndexTest {
                 .setProperty("unique", "true")
                 .setProperty("propertyNames", Arrays.asList("foo"),
                         Type.NAMES)
-                .setProperty(Property2IndexHook.declaringNodeTypes,
+                .setProperty(PropertyIndexEditor.declaringNodeTypes,
                         Arrays.asList("typeFoo"), Type.NAMES);
         NodeState before = builder.getNodeState();
         builder = before.builder();
@@ -356,7 +358,7 @@ public class Property2IndexTest {
         NodeState after = builder.getNodeState();
 
         CommitFailedException expected = EditorDiff.process(
-                new Property2IndexHook(builder), before, after);
+                new PropertyIndexEditor(builder), before, after);
         assertNotNull("Unique constraint should be respected", expected);
     }
 
@@ -374,7 +376,7 @@ public class Property2IndexTest {
                 .setProperty("unique", "true")
                 .setProperty("propertyNames", Arrays.asList("foo"),
                         Type.NAMES)
-                .setProperty(Property2IndexHook.declaringNodeTypes,
+                .setProperty(PropertyIndexEditor.declaringNodeTypes,
                         Arrays.asList("typeFoo"), Type.NAMES);
         builder.child("a").setProperty("jcr:primaryType", "typeFoo", Type.NAME)
                 .setProperty("foo", "abc");
@@ -386,7 +388,7 @@ public class Property2IndexTest {
         NodeState after = builder.getNodeState();
 
         CommitFailedException unexpected = EditorDiff.process(
-                new Property2IndexHook(builder), before, after);
+                new PropertyIndexEditor(builder), before, after);
         assertNull(unexpected);
     }
 

Propchange: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/RelativePathTest.java
(from r1475736, jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/p2/RelativePathTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/RelativePathTest.java?p2=jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/RelativePathTest.java&p1=jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/p2/RelativePathTest.java&r1=1475736&r2=1475782&rev=1475782&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/p2/RelativePathTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/RelativePathTest.java
Thu Apr 25 14:07:08 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.oak.plugins.index.p2;
+package org.apache.jackrabbit.oak.plugins.index.property;
 
 import java.util.List;
 
@@ -24,6 +24,8 @@ import org.apache.jackrabbit.oak.Oak;
 import org.apache.jackrabbit.oak.api.ContentRepository;
 import org.apache.jackrabbit.oak.api.Tree;
 import org.apache.jackrabbit.oak.plugins.index.IndexUtils;
+import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditorProvider;
+import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexProvider;
 import org.apache.jackrabbit.oak.plugins.nodetype.write.InitialContent;
 import org.apache.jackrabbit.oak.query.AbstractQueryTest;
 import org.apache.jackrabbit.oak.spi.lifecycle.RepositoryInitializer;
@@ -56,8 +58,8 @@ public class RelativePathTest extends Ab
                     }
                 })
                 .with(new OpenSecurityProvider())
-                .with(new Property2IndexProvider())
-                .with(new Property2IndexHookProvider())
+                .with(new PropertyIndexProvider())
+                .with(new PropertyIndexEditorProvider())
                 .createContentRepository();
     }
 

Propchange: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/RelativePathTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/RelativePathTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev URL

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/UserInitializerTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/UserInitializerTest.java?rev=1475782&r1=1475781&r2=1475782&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/UserInitializerTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/UserInitializerTest.java
Thu Apr 25 14:07:08 2013
@@ -35,8 +35,8 @@ import org.apache.jackrabbit.oak.api.Roo
 import org.apache.jackrabbit.oak.api.Tree;
 import org.apache.jackrabbit.oak.namepath.NamePathMapper;
 import org.apache.jackrabbit.oak.plugins.index.IndexConstants;
-import org.apache.jackrabbit.oak.plugins.index.p2.Property2IndexHookProvider;
-import org.apache.jackrabbit.oak.plugins.index.p2.Property2IndexProvider;
+import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditorProvider;
+import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexProvider;
 import org.apache.jackrabbit.oak.plugins.nodetype.RegistrationEditorProvider;
 import org.apache.jackrabbit.oak.plugins.nodetype.write.InitialContent;
 import org.apache.jackrabbit.oak.security.SecurityProviderImpl;
@@ -145,8 +145,8 @@ public class UserInitializerTest extends
         ConfigurationParameters params = new ConfigurationParameters(ImmutableMap.of(UserConfiguration.PARAM_USER_OPTIONS,
new ConfigurationParameters(userParams)));
         SecurityProvider sp = new SecurityProviderImpl(params);
         final ContentRepository repo = new Oak().with(new InitialContent())
-                .with(new Property2IndexHookProvider())
-                .with(new Property2IndexProvider())
+                .with(new PropertyIndexEditorProvider())
+                .with(new PropertyIndexProvider())
                 .with(new RegistrationEditorProvider())
                 .with(sp)
                 .createContentRepository();

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/UserProviderTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/UserProviderTest.java?rev=1475782&r1=1475781&r2=1475782&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/UserProviderTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/UserProviderTest.java
Thu Apr 25 14:07:08 2013
@@ -24,7 +24,7 @@ import org.apache.jackrabbit.oak.Oak;
 import org.apache.jackrabbit.oak.api.CommitFailedException;
 import org.apache.jackrabbit.oak.api.Root;
 import org.apache.jackrabbit.oak.api.Tree;
-import org.apache.jackrabbit.oak.plugins.index.p2.Property2IndexHookProvider;
+import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditorProvider;
 import org.apache.jackrabbit.oak.plugins.nodetype.write.InitialContent;
 import org.apache.jackrabbit.oak.spi.security.ConfigurationParameters;
 import org.apache.jackrabbit.oak.spi.security.OpenSecurityProvider;
@@ -59,7 +59,7 @@ public class UserProviderTest {
         root = new Oak()
                 .with(new OpenSecurityProvider())
                 .with(new InitialContent())
-                .with(new Property2IndexHookProvider())
+                .with(new PropertyIndexEditorProvider())
                 .createRoot();
 
         defaultConfig = new ConfigurationParameters();

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/Jcr.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/Jcr.java?rev=1475782&r1=1475781&r2=1475782&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/Jcr.java (original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/Jcr.java Thu
Apr 25 14:07:08 2013
@@ -27,8 +27,8 @@ import org.apache.jackrabbit.oak.plugins
 import org.apache.jackrabbit.oak.plugins.commit.JcrConflictHandler;
 import org.apache.jackrabbit.oak.plugins.index.IndexEditorProvider;
 import org.apache.jackrabbit.oak.plugins.index.nodetype.NodeTypeIndexProvider;
-import org.apache.jackrabbit.oak.plugins.index.p2.Property2IndexHookProvider;
-import org.apache.jackrabbit.oak.plugins.index.p2.Property2IndexProvider;
+import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditorProvider;
+import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexProvider;
 import org.apache.jackrabbit.oak.plugins.name.NameValidatorProvider;
 import org.apache.jackrabbit.oak.plugins.name.NamespaceValidatorProvider;
 import org.apache.jackrabbit.oak.plugins.nodetype.RegistrationEditorProvider;
@@ -69,9 +69,9 @@ public class Jcr {
         with(new RegistrationEditorProvider());
         with(new ConflictValidatorProvider());
 
-        with(new Property2IndexHookProvider());
+        with(new PropertyIndexEditorProvider());
 
-        with(new Property2IndexProvider());
+        with(new PropertyIndexProvider());
         with(new NodeTypeIndexProvider());
     }
 



Mime
View raw message