jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r125154 - /incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/builtin_nodetypes.xml /incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/PersistentNode.java
Date Fri, 14 Jan 2005 09:20:17 GMT
Author: tripod
Date: Fri Jan 14 01:20:13 2005
New Revision: 125154

URL: http://svn.apache.org/viewcvs?view=rev&rev=125154
Log:
- JCR-38: Cannot version the root node
Modified:
   incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/builtin_nodetypes.xml
   incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/PersistentNode.java

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/builtin_nodetypes.xml
Url: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/builtin_nodetypes.xml?view=diff&rev=125154&p1=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/builtin_nodetypes.xml&r1=125153&p2=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/builtin_nodetypes.xml&r2=125154
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/builtin_nodetypes.xml
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/builtin_nodetypes.xml
Fri Jan 14 01:20:13 2005
@@ -281,7 +281,7 @@
         <supertypes>
             <supertype>nt:unstructured</supertype>
         </supertypes>
-        <childNodeDef name="jcr:system" defaultPrimaryType="rep:system" autoCreate="false"
mandatory="true" onParentVersion="COPY" protected="false" primaryItem="false" sameNameSibs="false">
+        <childNodeDef name="jcr:system" defaultPrimaryType="rep:system" autoCreate="false"
mandatory="true" onParentVersion="IGNORE" protected="false" primaryItem="false" sameNameSibs="false">
             <requiredPrimaryTypes>
                 <requiredPrimaryType>rep:system</requiredPrimaryType>
             </requiredPrimaryTypes>
@@ -289,9 +289,14 @@
     </nodeType>
     <nodeType name="rep:system" mixin="false" orderableChildNodes="true">
         <supertypes>
-            <supertype>nt:unstructured</supertype>
+            <supertype>nt:base</supertype>
         </supertypes>
-        <childNodeDef name="jcr:versionStorage" defaultPrimaryType="nt:unstructured" autoCreate="true"
mandatory="true" onParentVersion="COPY" protected="false" primaryItem="false" sameNameSibs="false">
+        <childNodeDef name="jcr:versionStorage" defaultPrimaryType="nt:unstructured" autoCreate="true"
mandatory="true" onParentVersion="IGNORE" protected="false" primaryItem="false" sameNameSibs="false">
+            <requiredPrimaryTypes>
+                <requiredPrimaryType>nt:base</requiredPrimaryType>
+            </requiredPrimaryTypes>
+        </childNodeDef>
+        <childNodeDef name="*" defaultPrimaryType="nt:unstructured" autoCreate="false"
mandatory="false" onParentVersion="IGNORE" protected="false" primaryItem="false" sameNameSibs="true">
             <requiredPrimaryTypes>
                 <requiredPrimaryType>nt:base</requiredPrimaryType>
             </requiredPrimaryTypes>

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/PersistentNode.java
Url: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/PersistentNode.java?view=diff&rev=125154&p1=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/PersistentNode.java&r1=125153&p2=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/PersistentNode.java&r2=125154
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/PersistentNode.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/PersistentNode.java
Fri Jan 14 01:20:13 2005
@@ -586,7 +586,8 @@
     protected void copyFrom(PropertyImpl prop) throws RepositoryException {
         if (prop.getDefinition().isMultiple()) {
             InternalValue[] values = prop.internalGetValues();
-            setPropertyValues(prop.getQName(), values[0].getType(), values);
+            int type = values.length>0 ? values[0].getType() : prop.getDefinition().getRequiredType();
+            setPropertyValues(prop.getQName(), type, values);
         } else {
             setPropertyValue(prop.getQName(), prop.internalGetValue());
         }

Mime
View raw message