jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1151431 - in /jackrabbit/sandbox/spi2microkernel/src: main/resources/org/apache/jackrabbit/spi2microkernel/default-nodetypes.cnd test/java/org/apache/jackrabbit/spi2microkernel/RepositoryTest.java
Date Wed, 27 Jul 2011 11:25:30 GMT
Author: mduerig
Date: Wed Jul 27 11:25:29 2011
New Revision: 1151431

URL: http://svn.apache.org/viewvc?rev=1151431&view=rev
Log:
spi2microkernel (WIP)
- add node types 

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=1151431&r1=1151430&r2=1151431&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 27 11:25:29 2011
@@ -24,14 +24,19 @@
 <xml='http://www.w3.org/XML/1998/namespace'>
 
 //------------------------------------------------------------------------------
-// B A S E  T Y P E S
+// B A S E  T Y P E
 //------------------------------------------------------------------------------
 
+/**
+ * nt:base is an abstract primary node type that is the base type for all other
+ * primary node types. It is the only primary node type without supertypes.
+ *
+ * @since 1.0
+ */
 [nt:base]
-  - jcr:primaryType (name) mandatory autocreated protected compute
-  - jcr:mixinTypes (name) protected multiple compute
-
-[rep:root] > nt:unstructured
+  abstract
+  - jcr:primaryType (NAME) mandatory autocreated protected COMPUTE
+  - jcr:mixinTypes (NAME) protected multiple COMPUTE
 
 
 //------------------------------------------------------------------------------
@@ -42,7 +47,7 @@
  * This abstract node type serves as the supertype of nt:file and nt:folder.
  * @since 1.0
  */
-[nt:hierarchyNode] > mix:created, nt:base
+[nt:hierarchyNode] > mix:created
   abstract
 
 /**
@@ -91,7 +96,7 @@
  *
  * @since 1.0
  */
-[nt:resource] > mix:mimeType, mix:lastModified, mix:referenceable, nt:base
+[nt:resource] > mix:mimeType, mix:lastModified, mix:referenceable
   primaryitem jcr:data
   - jcr:data (BINARY) mandatory
   
@@ -210,7 +215,7 @@
  *
  * @since 2.0
  */
-[nt:address] > nt:base
+[nt:address]
   - jcr:protocol (STRING)
   - jcr:host (STRING)
   - jcr:port (STRING)
@@ -255,7 +260,7 @@
  *
  * @since 1.0
  */
-[nt:unstructured] > nt:base
+[nt:unstructured]
   orderable
   - * (UNDEFINED) multiple
   - * (UNDEFINED)
@@ -345,7 +350,7 @@
 /**
  * @since 1.0
  */
-[nt:versionLabels] > nt:base
+[nt:versionLabels]
   - * (REFERENCE) protected ABORT < 'nt:version'
 
 /**
@@ -362,7 +367,7 @@
 /**
  * @since 1.0
  */
-[nt:frozenNode] > mix:referenceable, nt:base
+[nt:frozenNode] > mix:referenceable
   orderable
   - jcr:frozenPrimaryType (NAME) mandatory autocreated protected ABORT
   - jcr:frozenMixinTypes (NAME) protected multiple ABORT
@@ -374,19 +379,19 @@
 /**
  * @since 1.0
  */
-[nt:versionedChild] > nt:base
+[nt:versionedChild]
   - jcr:childVersionHistory (REFERENCE) mandatory autocreated protected ABORT < 'nt:versionHistory'
 
 /**
  * @since 2.0
  */
-[nt:activity] > mix:referenceable, nt:base
+[nt:activity] > mix:referenceable
   - jcr:activityTitle (STRING) mandatory autocreated protected
 
 /**
  * @since 2.0
  */
-[nt:configuration] > mix:versionable, nt:base
+[nt:configuration] > mix:versionable
   - jcr:root (REFERENCE) mandatory autocreated protected
 
 //------------------------------------------------------------------------------
@@ -400,7 +405,7 @@
  *
  * @since 1.0
  */
-[nt:nodeType] > nt:base
+[nt:nodeType]
   - jcr:nodeTypeName (NAME) protected mandatory
   - jcr:supertypes (NAME) protected multiple
   - jcr:isAbstract (BOOLEAN) protected mandatory
@@ -417,7 +422,7 @@
  *
  * @since 1.0
  */
-[nt:propertyDefinition] > nt:base
+[nt:propertyDefinition]
   - jcr:name (NAME) protected 
   - jcr:autoCreated (BOOLEAN) protected mandatory
   - jcr:mandatory (BOOLEAN) protected mandatory
@@ -441,7 +446,7 @@
  *
  * @since 1.0
  */
-[nt:childNodeDefinition] > nt:base
+[nt:childNodeDefinition]
   - jcr:name (NAME) protected
   - jcr:autoCreated (BOOLEAN) protected mandatory
   - jcr:mandatory (BOOLEAN) protected mandatory
@@ -459,22 +464,66 @@
 /**
  * @since 1.0
  */
-[nt:query] > nt:base
+[nt:query]
   - jcr:statement (STRING)
   - jcr:language (STRING)
 
+//------------------------------------------------------------------------------
+// J A C K R A B B I T   I N T E R N A L S
+//------------------------------------------------------------------------------
+
+[rep:root] > nt:unstructured
+
+// -----------------------------------------------------------------------------
+// J A C K R A B B I T  S E C U R I T Y
+// -----------------------------------------------------------------------------
+
+[rep:AccessControllable]
+  mixin
+  + rep:policy (rep:Policy) protected IGNORE
+
+[rep:Policy]
+  abstract
+
+[rep:ACL] > rep:Policy
+  orderable
+  + * (rep:ACE) = rep:GrantACE protected IGNORE
+
+[rep:ACE]
+  - rep:principalName (STRING) protected mandatory
+  - rep:privileges (NAME) protected mandatory multiple
+  - rep:nodePath (PATH) protected
+  - rep:glob (STRING) protected
+  - * (UNDEFINED) protected
+
+[rep:GrantACE] > rep:ACE
+
+[rep:DenyACE] > rep:ACE
+
+// -----------------------------------------------------------------------------
+// Principal based AC
+// -----------------------------------------------------------------------------
+
+[rep:AccessControl]
+  + * (rep:AccessControl) protected IGNORE
+  + * (rep:PrincipalAccessControl) protected IGNORE
+
+[rep:PrincipalAccessControl] > rep:AccessControl
+  + rep:policy (rep:Policy) protected IGNORE
+
+
 // -----------------------------------------------------------------------------
 // User Management
 // -----------------------------------------------------------------------------
 
-[rep:Authorizable] > mix:referenceable, nt:hierarchyNode, nt:base
+[rep:Authorizable] > mix:referenceable, nt:hierarchyNode
   abstract
   + * (nt:base) = nt:unstructured VERSION
   - rep:principalName (STRING) protected mandatory
   - * (UNDEFINED)
   - * (UNDEFINED) multiple
 
-[rep:Impersonatable] > nt:base
+[rep:Impersonatable]
   mixin
   - rep:impersonators (STRING) protected multiple
 
@@ -490,7 +539,7 @@
   + * (rep:Authorizable) = rep:User VERSION
   + * (rep:AuthorizableFolder) = rep:AuthorizableFolder VERSION
 
-[rep:Members] > nt:base
+[rep:Members]
   orderable
   + * (rep:Members) = rep:Members protected multiple
   - * (WEAKREFERENCE) protected < 'rep:Authorizable'

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=1151431&r1=1151430&r2=1151431&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 27 11:25:29 2011
@@ -914,14 +914,14 @@ public class RepositoryTest {
         assertEquals("nt:unstructured", testNode.getPrimaryNodeType().getName());
         assertEquals("nt:unstructured", testNode.getProperty("jcr:primaryType").getString());
 
-        testNode.setPrimaryType("nt:base");
+        testNode.setPrimaryType("nt:folder");
         getSession().save();
 
         Session session2 = getRepository().login();
         try {
             testNode = session2.getNode(testPath);
-            assertEquals("nt:base", testNode.getPrimaryNodeType().getName());
-            assertEquals("nt:base", testNode.getProperty("jcr:primaryType").getString());
+            assertEquals("nt:folder", testNode.getPrimaryNodeType().getName());
+            assertEquals("nt:folder", testNode.getProperty("jcr:primaryType").getString());
         }
         finally {
             session2.logout();



Mime
View raw message