jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1370751 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/NodeTypeManagerImpl.java
Date Wed, 08 Aug 2012 13:04:59 GMT
Author: angela
Date: Wed Aug  8 13:04:52 2012
New Revision: 1370751

URL: http://svn.apache.org/viewvc?rev=1370751&view=rev
Log:
OAK-66 : JCR Node Type Management 

- set jcr:primaryType property for node type definition nodes

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/NodeTypeManagerImpl.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/NodeTypeManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/NodeTypeManagerImpl.java?rev=1370751&r1=1370750&r2=1370751&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/NodeTypeManagerImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/NodeTypeManagerImpl.java
Wed Aug  8 13:04:52 2012
@@ -264,6 +264,7 @@ public class NodeTypeManagerImpl impleme
 
         CoreValueFactory factory = session.getCoreValueFactory();
         NodeUtil node = new NodeUtil(factory, mapper, type);
+        node.setName(JcrConstants.JCR_PRIMARYTYPE, JcrConstants.NT_NODETYPE);
         node.setName(JcrConstants.JCR_NODETYPENAME, jcrName);
         node.setNames(JcrConstants.JCR_SUPERTYPES, ntd.getDeclaredSupertypeNames());
         node.setBoolean("jcr:isAbstract", ntd.isAbstract());
@@ -307,8 +308,8 @@ public class NodeTypeManagerImpl impleme
     }
 
     private void internalRegisterPropertyDefinition(
-            NodeUtil node, PropertyDefinition def)
-            throws RepositoryException {
+            NodeUtil node, PropertyDefinition def) {
+        node.setName(JcrConstants.JCR_PRIMARYTYPE, JcrConstants.NT_PROPERTYDEFINITION);
         internalRegisterItemDefinition(node, def);
 
         node.setString(
@@ -330,8 +331,8 @@ public class NodeTypeManagerImpl impleme
         }
     }
 
-    private void internalRegisterNodeDefinition(
-            NodeUtil node, NodeDefinition def) {
+    private void internalRegisterNodeDefinition(NodeUtil node, NodeDefinition def) {
+        node.setName(JcrConstants.JCR_PRIMARYTYPE, JcrConstants.NT_CHILDNODEDEFINITION);
         internalRegisterItemDefinition(node, def);
 
         node.setBoolean(JcrConstants.JCR_SAMENAMESIBLINGS, def.allowsSameNameSiblings());



Mime
View raw message