[exo-jcr-commits] exo-jcr SVN: r1318 - in kernel/trunk/exo.kernel.container/src: test/resources/xsd_1_0 and 1 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Jan 7 16:14:04 EST 2010


Author: julien_viet
Date: 2010-01-07 16:14:03 -0500 (Thu, 07 Jan 2010)
New Revision: 1318

Modified:
   kernel/trunk/exo.kernel.container/src/main/resources/org/exoplatform/container/configuration/kernel-configuration_1_0.xsd
   kernel/trunk/exo.kernel.container/src/main/resources/org/exoplatform/container/configuration/kernel-configuration_1_1.xsd
   kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-17.xml
   kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-17.xml
Log:
EXOJCR-374 : Wrong type declaration for map in kernel XSD


Modified: kernel/trunk/exo.kernel.container/src/main/resources/org/exoplatform/container/configuration/kernel-configuration_1_0.xsd
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/resources/org/exoplatform/container/configuration/kernel-configuration_1_0.xsd	2010-01-07 20:38:29 UTC (rev 1317)
+++ kernel/trunk/exo.kernel.container/src/main/resources/org/exoplatform/container/configuration/kernel-configuration_1_0.xsd	2010-01-07 21:14:03 UTC (rev 1318)
@@ -39,16 +39,16 @@
 
     <xsd:complexType name="mapType">
         <xsd:sequence>
-            <xsd:element name="type" type="xsd:string" minOccurs="1" maxOccurs="1"/>
             <xsd:element name="entry" type="entryType" minOccurs="0" maxOccurs="unbounded"/>
         </xsd:sequence>
+        <xsd:attribute name="type" type="xsd:string" use="required"/>
     </xsd:complexType>
 
     <xsd:complexType name="collectionType">
         <xsd:sequence>
             <xsd:element name="value" type="valueType" minOccurs="0" maxOccurs="unbounded"/>
         </xsd:sequence>
-        <xsd:attribute name="type" type="xsd:string"/>
+        <xsd:attribute name="type" type="xsd:string" use="required"/>
         <xsd:attribute name="item-type" type="xsd:string"/>
     </xsd:complexType>
 

Modified: kernel/trunk/exo.kernel.container/src/main/resources/org/exoplatform/container/configuration/kernel-configuration_1_1.xsd
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/resources/org/exoplatform/container/configuration/kernel-configuration_1_1.xsd	2010-01-07 20:38:29 UTC (rev 1317)
+++ kernel/trunk/exo.kernel.container/src/main/resources/org/exoplatform/container/configuration/kernel-configuration_1_1.xsd	2010-01-07 21:14:03 UTC (rev 1318)
@@ -37,9 +37,9 @@
 
     <xsd:complexType name="mapType">
         <xsd:sequence>
-            <xsd:element name="type" type="xsd:string" minOccurs="1" maxOccurs="1"/>
             <xsd:element name="entry" type="entryType" minOccurs="0" maxOccurs="unbounded"/>
         </xsd:sequence>
+        <xsd:attribute name="type" type="xsd:string" use="required"/>
     </xsd:complexType>
 
     <xsd:complexType name="collectionType">
@@ -54,7 +54,7 @@
                 </xsd:complexType>
             </xsd:element>
         </xsd:sequence>
-        <xsd:attribute name="type" type="xsd:string"/>
+        <xsd:attribute name="type" type="xsd:string" use="required"/>
         <xsd:attribute name="item-type" type="xsd:string"/>
     </xsd:complexType>
 

Modified: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-17.xml
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-17.xml	2010-01-07 20:38:29 UTC (rev 1317)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-17.xml	2010-01-07 21:14:03 UTC (rev 1318)
@@ -32,8 +32,7 @@
         <name>configuration</name>
         <object type="org.exoplatform.services.organization.idm.Config">
           <field name="typeMappings">
-            <map>
-              <type>java.util.HashMap</type>
+            <map type="java">
               <entry>
                 <key><string>/</string></key>
                 <value><string>root</string></value>
@@ -45,4 +44,44 @@
     </init-params>
   </component>
 
+  <component>
+  <key>org.exoplatform.services.naming.InitialContextInitializer</key>
+  <type>org.exoplatform.services.naming.InitialContextInitializer</type>
+  <init-params>
+    <object-param>
+      <name>configuration</name>
+      <object type="package.name">
+        <field  name="string"><string>This is a string</string></field>
+        <field  name="int"><int>1234</int></field>
+        <field  name="long"><long>123456</long></field>
+        <field  name="double"><double>1.1234</double></field>
+        <field  name="boolean"><boolean>true</boolean></field>
+        <field  name="name">
+          <object type="package.name">
+            <field  name="nested 1"><string>value</string></field>
+            <field  name="nested 2"><int>1234</int></field>
+          </object>
+        </field>
+        <field  name="map">
+          <map type="java.util.HashMap">
+            <entry>
+              <key><string>akey</string></key>
+              <value><string>a value</string></value>
+            </entry>
+            <entry>
+              <key><int>1234</int></key>
+              <value><string>a value</string></value>
+            </entry>
+          </map>
+        </field>
+        <field  name="list">
+          <collection type="java.util.ArrayList">
+            <value><string>a value</string></value>
+          </collection>
+        </field>
+      </object>
+    </object-param>
+  </init-params>
+</component>
+
 </configuration>
\ No newline at end of file

Modified: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-17.xml
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-17.xml	2010-01-07 20:38:29 UTC (rev 1317)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-17.xml	2010-01-07 21:14:03 UTC (rev 1318)
@@ -24,25 +24,64 @@
    xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd http://www.exoplaform.org/xml/ns/kernel_1_1.xsd"
    xmlns="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd">
 
-    <component>
-    <key>org.exoplatform.services.naming.InitialContextInitializer</key>
-    <type>org.exoplatform.services.naming.InitialContextInitializer</type>
-    <init-params>
-      <object-param>
-        <name>configuration</name>
-        <object type="org.exoplatform.services.organization.idm.Config">
-          <field name="typeMappings">
-            <map>
-              <type>java.util.HashMap</type>
-              <entry>
-                <key><string>/</string></key>
-                <value><string>root</string></value>
-              </entry>
-            </map>
-          </field>
+  <component>
+  <key>org.exoplatform.services.naming.InitialContextInitializer</key>
+  <type>org.exoplatform.services.naming.InitialContextInitializer</type>
+  <init-params>
+    <object-param>
+      <name>configuration</name>
+      <object type="org.exoplatform.services.organization.idm.Config">
+        <field name="typeMappings">
+          <map type="java">
+            <entry>
+              <key><string>/</string></key>
+              <value><string>root</string></value>
+            </entry>
+          </map>
+        </field>
+      </object>
+    </object-param>
+  </init-params>
+</component>
+
+<component>
+<key>org.exoplatform.services.naming.InitialContextInitializer</key>
+<type>org.exoplatform.services.naming.InitialContextInitializer</type>
+<init-params>
+  <object-param>
+    <name>configuration</name>
+    <object type="package.name">
+      <field  name="string"><string>This is a string</string></field>
+      <field  name="int"><int>1234</int></field>
+      <field  name="long"><long>123456</long></field>
+      <field  name="double"><double>1.1234</double></field>
+      <field  name="boolean"><boolean>true</boolean></field>
+      <field  name="name">
+        <object type="package.name">
+          <field  name="nested 1"><string>value</string></field>
+          <field  name="nested 2"><int>1234</int></field>
         </object>
-      </object-param>
-    </init-params>
-  </component>
+      </field>
+      <field  name="map">
+        <map type="java.util.HashMap">
+          <entry>
+            <key><string>akey</string></key>
+            <value><string>a value</string></value>
+          </entry>
+          <entry>
+            <key><int>1234</int></key>
+            <value><string>a value</string></value>
+          </entry>
+        </map>
+      </field>
+      <field  name="list">
+        <collection type="java.util.ArrayList">
+          <value><string>a value</string></value>
+        </collection>
+      </field>
+    </object>
+  </object-param>
+</init-params>
+</component>
 
 </configuration>
\ No newline at end of file



More information about the exo-jcr-commits mailing list