jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1146106 - in /jackrabbit/sandbox/spi2microkernel/src: main/resources/org/apache/jackrabbit/spi2microkernel/default-nodetypes.cnd test/java/org/apache/jackrabbit/spi2microkernel/RepositoryTest.java
Date Wed, 13 Jul 2011 15:57:28 GMT
Author: mduerig
Date: Wed Jul 13 15:57:28 2011
New Revision: 1146106

URL: http://svn.apache.org/viewvc?rev=1146106&view=rev
Log:
spi2microkernel (WIP)
- cnd need to explicitely declare inheritance from nt:base

Modified:
    jackrabbit/sandbox/spi2microkernel/src/main/resources/org/apache/jackrabbit/spi2microkernel/default-nodetypes.cnd
    jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/RepositoryTest.java

Modified: jackrabbit/sandbox/spi2microkernel/src/main/resources/org/apache/jackrabbit/spi2microkernel/default-nodetypes.cnd
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi2microkernel/src/main/resources/org/apache/jackrabbit/spi2microkernel/default-nodetypes.cnd?rev=1146106&r1=1146105&r2=1146106&view=diff
==============================================================================
--- jackrabbit/sandbox/spi2microkernel/src/main/resources/org/apache/jackrabbit/spi2microkernel/default-nodetypes.cnd
(original)
+++ jackrabbit/sandbox/spi2microkernel/src/main/resources/org/apache/jackrabbit/spi2microkernel/default-nodetypes.cnd
Wed Jul 13 15:57:28 2011
@@ -31,21 +31,9 @@
   - jcr:primaryType (name) mandatory autocreated protected compute
   - jcr:mixinTypes (name) protected multiple compute
 
-[nt:unstructured] > nt:base
-  orderable
-  - * (undefined) multiple
-  - * (undefined)
-  + * (nt:base) = nt:unstructured version
-
 [rep:root] > nt:unstructured
 
-[mix:referenceable]
-mixin
-  - jcr:uuid (STRING) mandatory autocreated protected
-  
-  
-  
-  
+
 //------------------------------------------------------------------------------
 // S T A N D A R D   A P P L I C A T I O N   N O D E   T Y P E S
 //------------------------------------------------------------------------------
@@ -54,7 +42,7 @@ mixin
  * This abstract node type serves as the supertype of nt:file and nt:folder.
  * @since 1.0
  */
-[nt:hierarchyNode] > mix:created
+[nt:hierarchyNode] > mix:created, nt:base
   abstract
 
 /**
@@ -103,7 +91,7 @@ mixin
  *
  * @since 1.0
  */
-[nt:resource] > mix:mimeType, mix:lastModified, mix:referenceable
+[nt:resource] > mix:mimeType, mix:lastModified, mix:referenceable, nt:base
   primaryitem jcr:data
   - jcr:data (BINARY) mandatory
   
@@ -222,7 +210,7 @@ mixin
  *
  * @since 2.0
  */
-[nt:address]
+[nt:address] > nt:base
   - jcr:protocol (STRING)
   - jcr:host (STRING)
   - jcr:port (STRING)
@@ -267,7 +255,7 @@ mixin
  *
  * @since 1.0
  */
-[nt:unstructured]
+[nt:unstructured] > nt:base
   orderable
   - * (UNDEFINED) multiple
   - * (UNDEFINED)
@@ -294,7 +282,7 @@ mixin
  */
 [mix:referenceable]
   mixin
-  - jcr:uuid (STRING) mandatory autocreated protected INITIALIZE 
+  - jcr:uuid (STRING) mandatory autocreated protected INITIALIZE
 
 //------------------------------------------------------------------------------
 // L O C K I N G
@@ -357,7 +345,7 @@ mixin
 /**
  * @since 1.0
  */
-[nt:versionLabels]
+[nt:versionLabels] > nt:base
   - * (REFERENCE) protected ABORT < 'nt:version'
 
 /**
@@ -374,7 +362,7 @@ mixin
 /**
  * @since 1.0
  */
-[nt:frozenNode] > mix:referenceable
+[nt:frozenNode] > mix:referenceable, nt:base
   orderable
   - jcr:frozenPrimaryType (NAME) mandatory autocreated protected ABORT
   - jcr:frozenMixinTypes (NAME) protected multiple ABORT
@@ -386,19 +374,19 @@ mixin
 /**
  * @since 1.0
  */
-[nt:versionedChild]
+[nt:versionedChild] > nt:base
   - jcr:childVersionHistory (REFERENCE) mandatory autocreated protected ABORT < 'nt:versionHistory'
 
 /**
  * @since 2.0
  */
-[nt:activity] > mix:referenceable
+[nt:activity] > mix:referenceable, nt:base
   - jcr:activityTitle (STRING) mandatory autocreated protected
 
 /**
  * @since 2.0
  */
-[nt:configuration] > mix:versionable
+[nt:configuration] > mix:versionable, nt:base
   - jcr:root (REFERENCE) mandatory autocreated protected
 
 //------------------------------------------------------------------------------
@@ -412,7 +400,7 @@ mixin
  *
  * @since 1.0
  */
-[nt:nodeType]
+[nt:nodeType] > nt:base
   - jcr:nodeTypeName (NAME) protected mandatory
   - jcr:supertypes (NAME) protected multiple
   - jcr:isAbstract (BOOLEAN) protected mandatory
@@ -429,7 +417,7 @@ mixin
  *
  * @since 1.0
  */
-[nt:propertyDefinition]
+[nt:propertyDefinition] > nt:base
   - jcr:name (NAME) protected 
   - jcr:autoCreated (BOOLEAN) protected mandatory
   - jcr:mandatory (BOOLEAN) protected mandatory
@@ -453,7 +441,7 @@ mixin
  *
  * @since 1.0
  */
-[nt:childNodeDefinition]
+[nt:childNodeDefinition] > nt:base
   - jcr:name (NAME) protected
   - jcr:autoCreated (BOOLEAN) protected mandatory
   - jcr:mandatory (BOOLEAN) protected mandatory
@@ -471,6 +459,6 @@ mixin
 /**
  * @since 1.0
  */
-[nt:query]
+[nt:query] > nt:base
   - jcr:statement (STRING)
   - jcr:language (STRING)

Modified: jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/RepositoryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/RepositoryTest.java?rev=1146106&r1=1146105&r2=1146106&view=diff
==============================================================================
--- jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/RepositoryTest.java
(original)
+++ jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/RepositoryTest.java
Wed Jul 13 15:57:28 2011
@@ -271,12 +271,10 @@ public class RepositoryTest {
     @Test
     public void addNodeWithNodeType() throws RepositoryException {
         Session session = getSession();
-        String newNode = testPath + "/newResource\"";
-        assertFalse(session.nodeExists(newNode));
 
         Node node = getNode(testPath);
-        node.addNode("new", "nt:resource");
-        session.refresh(false);
+        node.addNode("new", "nt:folder");
+        session.save();
     }
 
     @Test



Mime
View raw message