You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by fm...@apache.org on 2008/09/19 09:02:30 UTC

svn commit: r696946 - in /incubator/sling/trunk/jcr/resource: ./ src/main/resources/SLING-INF/nodetypes/ src/test/java/org/apache/sling/jcr/resource/internal/

Author: fmeschbe
Date: Fri Sep 19 00:02:29 2008
New Revision: 696946

URL: http://svn.apache.org/viewvc?rev=696946&view=rev
Log:
SLING-667 Split node type definitions into three files to
minimize effects of node type definition failure

Added:
    incubator/sling/trunk/jcr/resource/src/main/resources/SLING-INF/nodetypes/folder.cnd
    incubator/sling/trunk/jcr/resource/src/main/resources/SLING-INF/nodetypes/vanitypath.cnd
Modified:
    incubator/sling/trunk/jcr/resource/pom.xml
    incubator/sling/trunk/jcr/resource/src/main/resources/SLING-INF/nodetypes/resource.cnd
    incubator/sling/trunk/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverTest.java

Modified: incubator/sling/trunk/jcr/resource/pom.xml
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/resource/pom.xml?rev=696946&r1=696945&r2=696946&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/resource/pom.xml (original)
+++ incubator/sling/trunk/jcr/resource/pom.xml Fri Sep 19 00:02:29 2008
@@ -66,7 +66,9 @@
                         </Sling-Namespaces>
 
                         <Sling-Nodetypes>
-                            SLING-INF/nodetypes/resource.cnd
+                            SLING-INF/nodetypes/folder.cnd,
+                            SLING-INF/nodetypes/resource.cnd,
+                            SLING-INF/nodetypes/vanitypath.cnd
                         </Sling-Nodetypes>
 
                     </instructions>

Added: incubator/sling/trunk/jcr/resource/src/main/resources/SLING-INF/nodetypes/folder.cnd
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/resource/src/main/resources/SLING-INF/nodetypes/folder.cnd?rev=696946&view=auto
==============================================================================
--- incubator/sling/trunk/jcr/resource/src/main/resources/SLING-INF/nodetypes/folder.cnd (added)
+++ incubator/sling/trunk/jcr/resource/src/main/resources/SLING-INF/nodetypes/folder.cnd Fri Sep 19 00:02:29 2008
@@ -0,0 +1,46 @@
+//
+//  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.
+//
+
+<sling = 'http://sling.apache.org/jcr/sling/1.0'>
+
+//-----------------------------------------------------------------------------
+// Node type to be used as a replacement for nt:folder: it can be used
+// as a child of nt:folder and allows to add unstructured content
+// (See SLING-663)
+[sling:Folder] > nt:folder
+  - * (undefined) multiple
+  - * (undefined)
+  + * (nt:hierarchyNode) = sling:Folder version
+
+
+//-----------------------------------------------------------------------------
+// Mixin node type to turn any node into an nt:hierarchyNode to place
+// below any nt:folder (or extension thereof such as sling:Folder) 
+// (See SLING-663)
+[sling:HierarchyNode] > nt:hierarchyNode
+    mixin
+
+
+//-----------------------------------------------------------------------------
+// Node type extending sling:Folder supporting the creation of folder
+// structured with child node ordering.
+// (See SLING-663)
+[sling:OrderedFolder] > sling:Folder
+    orderable
+  + * (nt:hierarchyNode) = sling:OrderedFolder version 

Modified: incubator/sling/trunk/jcr/resource/src/main/resources/SLING-INF/nodetypes/resource.cnd
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/resource/src/main/resources/SLING-INF/nodetypes/resource.cnd?rev=696946&r1=696945&r2=696946&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/resource/src/main/resources/SLING-INF/nodetypes/resource.cnd (original)
+++ incubator/sling/trunk/jcr/resource/src/main/resources/SLING-INF/nodetypes/resource.cnd Fri Sep 19 00:02:29 2008
@@ -31,39 +31,3 @@
 [sling:ResourceSuperType]
     mixin
   - sling:resourceSuperType (string)
-
-
-//-----------------------------------------------------------------------------
-// Node type to be used as a replacement for nt:folder: it can be used
-// as a child of nt:folder and allows to add unstructured content
-// (See SLING-663)
-[sling:Folder] > nt:folder
-  - * (undefined) multiple
-  - * (undefined)
-  + * (nt:hierarchyNode) = sling:Folder version
-
-
-//-----------------------------------------------------------------------------
-// Mixin node type to turn any node into an nt:hierarchyNode to place
-// below any nt:folder (or extension thereof such as sling:Folder) 
-// (See SLING-663)
-[sling:HierarchyNode] > nt:hierarchyNode
-    mixin
-
-
-//-----------------------------------------------------------------------------
-// Node type extending sling:Folder supporting the creation of folder
-// structured with child node ordering.
-// (See SLING-663)
-[sling:OrderedFolder] > sling:Folder
-    orderable
-  + * (nt:hierarchyNode) = sling:OrderedFolder version 
- 
-
-//-----------------------------------------------------------------------------
-// Mixin node type for defining vanity resource path.
-[sling:VanityPath]
-    mixin
-  - sling:vanityPath (string)
-  - sling:redirect (boolean)
-  - sling:vanityOrder (long)

Added: incubator/sling/trunk/jcr/resource/src/main/resources/SLING-INF/nodetypes/vanitypath.cnd
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/resource/src/main/resources/SLING-INF/nodetypes/vanitypath.cnd?rev=696946&view=auto
==============================================================================
--- incubator/sling/trunk/jcr/resource/src/main/resources/SLING-INF/nodetypes/vanitypath.cnd (added)
+++ incubator/sling/trunk/jcr/resource/src/main/resources/SLING-INF/nodetypes/vanitypath.cnd Fri Sep 19 00:02:29 2008
@@ -0,0 +1,28 @@
+//
+//  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.
+//
+
+<sling = 'http://sling.apache.org/jcr/sling/1.0'>
+
+//-----------------------------------------------------------------------------
+// Mixin node type for defining vanity resource path.
+[sling:VanityPath]
+    mixin
+  - sling:vanityPath (string)
+  - sling:redirect (boolean)
+  - sling:vanityOrder (long)

Modified: incubator/sling/trunk/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverTest.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverTest.java?rev=696946&r1=696945&r2=696946&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverTest.java (original)
+++ incubator/sling/trunk/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverTest.java Fri Sep 19 00:02:29 2008
@@ -55,7 +55,11 @@
     protected void setUp() throws Exception {
         super.setUp();
         assertTrue(RepositoryUtil.registerNodeType(getSession(),
-                this.getClass().getResourceAsStream("/SLING-INF/nodetypes/resource.cnd")));
+            this.getClass().getResourceAsStream("/SLING-INF/nodetypes/folder.cnd")));
+        assertTrue(RepositoryUtil.registerNodeType(getSession(),
+            this.getClass().getResourceAsStream("/SLING-INF/nodetypes/resource.cnd")));
+        assertTrue(RepositoryUtil.registerNodeType(getSession(),
+                this.getClass().getResourceAsStream("/SLING-INF/nodetypes/vanitypath.cnd")));
 
         JcrResourceResolverFactoryImpl resFac = new JcrResourceResolverFactoryImpl();