jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1394119 - in /jackrabbit/oak/trunk/oak-core/src: main/java/org/apache/jackrabbit/oak/plugins/type/ main/resources/org/apache/jackrabbit/oak/plugins/type/ test/java/org/apache/jackrabbit/oak/query/
Date Thu, 04 Oct 2012 15:46:35 GMT
Author: mduerig
Date: Thu Oct  4 15:46:34 2012
New Revision: 1394119

URL: http://svn.apache.org/viewvc?rev=1394119&view=rev
Log:
Reverting changes from revisions 1394092, 1394101, 1394112 which cause QueryTest and NodeDefTests
to fail

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/InitialContent.java
    jackrabbit/oak/trunk/oak-core/src/main/resources/org/apache/jackrabbit/oak/plugins/type/builtin_nodetypes.cnd
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/query/QueryTest.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/InitialContent.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/InitialContent.java?rev=1394119&r1=1394118&r2=1394119&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/InitialContent.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/InitialContent.java
Thu Oct  4 15:46:34 2012
@@ -1,72 +1,72 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.oak.plugins.type;
-
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Service;
-import org.apache.jackrabbit.mk.api.MicroKernel;
-import org.apache.jackrabbit.oak.Oak;
-import org.apache.jackrabbit.oak.api.Root;
-import org.apache.jackrabbit.oak.spi.lifecycle.DefaultMicroKernelTracker;
-import org.apache.jackrabbit.oak.spi.lifecycle.MicroKernelTracker;
-import org.apache.jackrabbit.oak.spi.security.OpenSecurityProvider;
-import org.apache.jackrabbit.oak.spi.state.NodeState;
-import org.apache.jackrabbit.oak.spi.state.NodeStore;
-
-/**
- * <code>InitialContent</code> implements a {@link MicroKernelTracker} and
- * registers built-in node types when the micro kernel becomes available.
- */
-@Component
-@Service(MicroKernelTracker.class)
-public class InitialContent extends DefaultMicroKernelTracker {
-
-    @Override
-    public void available(MicroKernel mk) {
-        NodeStore nodeStore = new Oak(mk).createNodeStore();
-        // FIXME: depends on CoreValue's name mangling
-        NodeState root = nodeStore.getRoot();
-        if (root.hasChildNode("jcr:system")) {
-            mk.commit("/", "^\"jcr:primaryType\":\"nam:rep:root\" ", null, null);
-        } else {
-            mk.commit("/", "^\"jcr:primaryType\":\"nam:rep:root\"" +
-                    "+\"jcr:system\":{" +
-                    "\"jcr:primaryType\"    :\"nam:rep:system\"," +
-                    "\"jcr:versionStorage\" :{\"jcr:primaryType\":\"nam:rep:versionStorage\"},"
+
-                    "\"jcr:nodeTypes\"      :{\"jcr:primaryType\":\"nam:rep:nodeTypes\"},"
+
-                    "\"jcr:activities\"     :{\"jcr:primaryType\":\"nam:rep:Activities\"},"
+
-                    "\"rep:privileges\"     :{\"jcr:primaryType\":\"nam:rep:Privileges\"}}",
null, null);
-        }
-        if (!root.hasChildNode("oak:index")) {
-            // 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.
-            mk.commit("/", "+\"oak:index\":{\"jcr:uuid\":{\"jcr:primaryType\":\"nam:oak:queryIndexDefinition\",
\"type\":\"property\", \"unique\":true},\"rep:authorizableId\":{\"jcr:primaryType\":\"nam:oak:queryIndexDefinition\",
\"type\":\"property\",\"unique\":true},\"rep:principalName\":{\"jcr:primaryType\":\"nam:oak:queryIndexDefinition\",
\"type\":\"property\",\"unique\":true}}", null, null);
-        }
-
-        BuiltInNodeTypes.register(createRoot(mk));
-    }
-
-    private Root createRoot(MicroKernel mk) {
-        Oak oak = new Oak(mk);
-        oak.with(new OpenSecurityProvider()); // TODO: this shouldn't be needed
-        try {
-            return oak.createContentRepository().login(null, null).getLatestRoot();
-        } catch (Exception e) {
-            throw new IllegalStateException("Unable to create a Root", e);
-        }
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.oak.plugins.type;
+
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Service;
+import org.apache.jackrabbit.mk.api.MicroKernel;
+import org.apache.jackrabbit.oak.Oak;
+import org.apache.jackrabbit.oak.api.Root;
+import org.apache.jackrabbit.oak.spi.lifecycle.DefaultMicroKernelTracker;
+import org.apache.jackrabbit.oak.spi.lifecycle.MicroKernelTracker;
+import org.apache.jackrabbit.oak.spi.security.OpenSecurityProvider;
+import org.apache.jackrabbit.oak.spi.state.NodeState;
+import org.apache.jackrabbit.oak.spi.state.NodeStore;
+
+/**
+ * <code>InitialContent</code> implements a {@link MicroKernelTracker} and
+ * registers built-in node types when the micro kernel becomes available.
+ */
+@Component
+@Service(MicroKernelTracker.class)
+public class InitialContent extends DefaultMicroKernelTracker {
+
+    @Override
+    public void available(MicroKernel mk) {
+        NodeStore nodeStore = new Oak(mk).createNodeStore();
+        // FIXME: depends on CoreValue's name mangling
+        NodeState root = nodeStore.getRoot();
+        if (root.hasChildNode("jcr:system")) {
+            mk.commit("/", "^\"jcr:primaryType\":\"nam:rep:root\" ", null, null);
+        } else {
+            mk.commit("/", "^\"jcr:primaryType\":\"nam:rep:root\"" +
+                    "+\"jcr:system\":{" +
+                    "\"jcr:primaryType\"    :\"nam:rep:system\"," +
+                    "\"jcr:versionStorage\" :{\"jcr:primaryType\":\"nam:rep:versionStorage\"},"
+
+                    "\"jcr:nodeTypes\"      :{\"jcr:primaryType\":\"nam:rep:nodeTypes\"},"
+
+                    "\"jcr:activities\"     :{\"jcr:primaryType\":\"nam:rep:Activities\"},"
+
+                    "\"rep:privileges\"     :{\"jcr:primaryType\":\"nam:rep:Privileges\"}}",
null, null);
+        }
+        if (!root.hasChildNode("oak:index")) {
+            // 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.
+            mk.commit("/", "+\"oak:index\":{\"jcr:uuid\":{\"unique\":true},\"rep:authorizableId\":{\"unique\":true},\"rep:principalName\":{\"unique\":true}}",
null, null);
+        }
+
+        BuiltInNodeTypes.register(createRoot(mk));
+    }
+
+    private Root createRoot(MicroKernel mk) {
+        Oak oak = new Oak(mk);
+        oak.with(new OpenSecurityProvider()); // TODO: this shouldn't be needed
+        try {
+            return oak.createContentRepository().login(null, null).getLatestRoot();
+        } catch (Exception e) {
+            throw new IllegalStateException("Unable to create a Root", e);
+        }
+    }
+}

Modified: jackrabbit/oak/trunk/oak-core/src/main/resources/org/apache/jackrabbit/oak/plugins/type/builtin_nodetypes.cnd
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/resources/org/apache/jackrabbit/oak/plugins/type/builtin_nodetypes.cnd?rev=1394119&r1=1394118&r2=1394119&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/resources/org/apache/jackrabbit/oak/plugins/type/builtin_nodetypes.cnd
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/resources/org/apache/jackrabbit/oak/plugins/type/builtin_nodetypes.cnd
Thu Oct  4 15:46:34 2012
@@ -19,7 +19,6 @@
 <jcr='http://www.jcp.org/jcr/1.0'>
 <nt='http://www.jcp.org/jcr/nt/1.0'>
 <mix='http://www.jcp.org/jcr/mix/1.0'>
-<oak='http://jackrabbit.apache.org/oak/ns/1.0'>
 
 //------------------------------------------------------------------------------
 // B A S E  T Y P E
@@ -465,15 +464,6 @@
   - jcr:statement (STRING)
   - jcr:language (STRING)
 
-/**
- * Index definitions storage
- *
- * @since oak 0.6
- */
-[oak:queryIndexDefinition] > nt:unstructured
-  - type (STRING) mandatory
-  + reindex (BOOLEAN)
-
 //------------------------------------------------------------------------------
 // L I F E C Y C L E   M A N A G E M E N T
 //------------------------------------------------------------------------------

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/query/QueryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/query/QueryTest.java?rev=1394119&r1=1394118&r2=1394119&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/query/QueryTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/query/QueryTest.java
Thu Oct  4 15:46:34 2012
@@ -39,7 +39,6 @@ import org.apache.jackrabbit.oak.plugins
 import org.apache.jackrabbit.oak.spi.commit.CompositeHook;
 import org.apache.jackrabbit.oak.spi.query.CompositeQueryIndexProvider;
 import org.apache.jackrabbit.oak.spi.query.QueryIndexProvider;
-import org.junit.Ignore;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -84,7 +83,6 @@ public class QueryTest extends AbstractQ
     }
 
     @Test
-    @Ignore
     public void sql2_measure() throws Exception {
         test("sql2_measure.txt");
     }



Mime
View raw message