jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexparvule...@apache.org
Subject svn commit: r1400857 - in /jackrabbit/oak/trunk/oak-core/src: main/java/org/apache/jackrabbit/oak/plugins/index/property/ main/java/org/apache/jackrabbit/oak/plugins/nodetype/ test/java/org/apache/jackrabbit/oak/plugins/index/property/
Date Mon, 22 Oct 2012 12:13:41 GMT
Author: alexparvulescu
Date: Mon Oct 22 12:13:41 2012
New Revision: 1400857

URL: http://svn.apache.org/viewvc?rev=1400857&view=rev
Log:
OAK-388 Add NodeType Index

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndex.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexDiff.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/InitialContent.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexTest.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndex.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndex.java?rev=1400857&r1=1400856&r2=1400857&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndex.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndex.java
Mon Oct 22 12:13:41 2012
@@ -45,11 +45,11 @@ import com.google.common.collect.Sets;
  * How to define a property index on a subtree you have to add an
  * <code>oak:index<code> node. Under it follows the index definition node that
must be of type <code>oak:queryIndexDefinition</code>
  * and contain the
- * <code>pnames<code> property that indicates what property will be stored in
the index.
+ * <code>propertyNames<code> property that indicates what property will be stored
in the index.
  * </p>
  * 
  * <p>
- * <code>pnames<code> can be a list of properties, and it is optional.in case
it is missing, the node name will be used as a property name reference value
+ * <code>propertyNames<code> can be a list of properties, and it is optional.in
case it is missing, the node name will be used as a property name reference value
  * </p>
  * 
  * <p>
@@ -63,7 +63,7 @@ import com.google.common.collect.Sets;
  *     NodeBuilder index = root.child("oak:index");
  *     index.child("uuid")
  *         .setProperty("jcr:primaryType", "oak:queryIndexDefinition", Type.NAME)
- *         .setProperty("pnames", "jcr:uuid")
+ *         .setProperty("propertyNames", "jcr:uuid")
  *         .setProperty("unique", true);
  * }
  * </code>

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexDiff.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexDiff.java?rev=1400857&r1=1400856&r2=1400857&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexDiff.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexDiff.java
Mon Oct 22 12:13:41 2012
@@ -65,7 +65,7 @@ class PropertyIndexDiff implements NodeS
             NodeBuilder index = node.child(INDEX_DEFINITIONS_NAME);
             for (String indexName : index.getChildNodeNames()) {
                 NodeBuilder indexChild = index.child(indexName);
-                PropertyState ps = indexChild.getProperty("pnames");
+                PropertyState ps = indexChild.getProperty("propertyNames");
                 Iterable<String> propertyNames = ps != null ? ps
                         .getValue(Type.STRINGS) : ImmutableList.of(indexName);
                 for (String pname : propertyNames) {

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/InitialContent.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/InitialContent.java?rev=1400857&r1=1400856&r2=1400857&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/InitialContent.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/InitialContent.java
Mon Oct 22 12:13:41 2012
@@ -91,20 +91,20 @@ public class InitialContent implements R
             NodeBuilder index = root.child("oak:index");
             index.child("uuid")
                 .setProperty("jcr:primaryType", "oak:queryIndexDefinition", Type.NAME)
-                .setProperty("pnames", "jcr:uuid")
+                .setProperty("propertyNames", "jcr:uuid")
                 .setProperty("unique", true);
             index.child("primaryType")
                 .setProperty("jcr:primaryType", "oak:queryIndexDefinition", Type.NAME)
-                .setProperty("pnames", "jcr:primaryType");
+                .setProperty("propertyNames", "jcr:primaryType");
             // FIXME: user-mgt related unique properties (rep:authorizableId, rep:principalName)
are implementation detail and not generic for repo
             // FIXME: rep:principalName only needs to be unique if defined with user/group
nodes -> add defining nt-info to uniqueness constraint otherwise ac-editing will fail.
             index.child("authorizableId")
                 .setProperty("jcr:primaryType", "oak:queryIndexDefinition", Type.NAME)
-                .setProperty("pnames", "rep:authorizableId")
+                .setProperty("propertyNames", "rep:authorizableId")
                 .setProperty("unique", true);
             index.child("principalName")
                 .setProperty("jcr:primaryType", "oak:queryIndexDefinition", Type.NAME)
-                .setProperty("pnames", "rep:principalName")
+                .setProperty("propertyNames", "rep:principalName")
                 .setProperty("unique", true);
         }
         try {

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexTest.java?rev=1400857&r1=1400856&r2=1400857&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexTest.java
Mon Oct 22 12:13:41 2012
@@ -79,7 +79,7 @@ public class PropertyIndexTest {
 
         // Add index definition
         NodeBuilder builder = root.builder();
-        builder.child("oak:index").child("fooIndex").setProperty("pnames", Arrays.asList("foo",
"extrafoo"), Type.STRINGS);
+        builder.child("oak:index").child("fooIndex").setProperty("propertyNames", Arrays.asList("foo",
"extrafoo"), Type.STRINGS);
         NodeState before = builder.getNodeState();
 
         // Add some content and process it through the property index hook



Mime
View raw message