Author: nfilotto
Date: 2012-03-06 10:56:08 -0500 (Tue, 06 Mar 2012)
New Revision: 5823
Added:
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestValidation.java
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/invalid-configuration.xml.bad
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/test-validation.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/invalid-configuration.xml.bad
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/test-validation.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_2/invalid-configuration.xml.bad
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_2/test-validation.xml
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_OLD.xsd
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_OLD.xsd
kernel/trunk/exo.kernel.container/src/main/resources/org/exoplatform/container/configuration/kernel-configuration_1_2.xsd
kernel/trunk/exo.kernel.container/src/main/resources/org/exoplatform/container/configuration/kernel-configuration_1_2_OLD.xsd
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestXSD_1_0.java
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestXSD_1_1.java
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestXSD_1_2.java
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-18.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-19.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_2/sample-configuration-18.xml
Log:
EXOJCR-1781: XSD files don't match with how the kernel validates the configuration
files
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 2012-03-06
15:55:33 UTC (rev 5822)
+++
kernel/trunk/exo.kernel.container/src/main/resources/org/exoplatform/container/configuration/kernel-configuration_1_0.xsd 2012-03-06
15:56:08 UTC (rev 5823)
@@ -131,12 +131,12 @@
</xsd:complexType>
<xsd:complexType name="initParamsType">
- <xsd:choice minOccurs="0" maxOccurs="unbounded">
- <xsd:element name="object-param"
type="objectParamType"/>
- <xsd:element name="properties-param"
type="propertiesParamType"/>
- <xsd:element name="value-param"
type="valueParamType"/>
- <xsd:element name="values-param"
type="valuesParamType"/>
- </xsd:choice>
+ <xsd:sequence>
+ <xsd:element name="value-param" type="valueParamType"
minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="values-param"
type="valuesParamType" minOccurs="0"
maxOccurs="unbounded"/>
+ <xsd:element name="properties-param"
type="propertiesParamType" minOccurs="0"
maxOccurs="unbounded"/>
+ <xsd:element name="object-param"
type="objectParamType" minOccurs="0"
maxOccurs="unbounded"/>
+ </xsd:sequence>
</xsd:complexType>
<xsd:complexType name="componentPluginType">
@@ -184,8 +184,8 @@
<xsd:element name="jmx-name" type="xsd:string"
minOccurs="0" maxOccurs="1"/>
<xsd:element name="type" type="xsd:string"
minOccurs="1" maxOccurs="1"/>
<xsd:element name="description" type="xsd:string"
minOccurs="0" maxOccurs="1"/>
- <xsd:element name="show-deploy-info" type="xsd:string"
minOccurs="0" maxOccurs="1"/>
- <xsd:element name="multi-instance" type="xsd:string"
minOccurs="0" maxOccurs="1"/>
+ <xsd:element name="show-deploy-info"
type="xsd:boolean" minOccurs="0" maxOccurs="1"/>
+ <xsd:element name="multi-instance" type="xsd:boolean"
minOccurs="0" maxOccurs="1"/>
<xsd:element name="component-plugins" minOccurs="0"
maxOccurs="1">
<xsd:complexType>
<xsd:sequence>
Modified:
kernel/trunk/exo.kernel.container/src/main/resources/org/exoplatform/container/configuration/kernel-configuration_1_0_OLD.xsd
===================================================================
---
kernel/trunk/exo.kernel.container/src/main/resources/org/exoplatform/container/configuration/kernel-configuration_1_0_OLD.xsd 2012-03-06
15:55:33 UTC (rev 5822)
+++
kernel/trunk/exo.kernel.container/src/main/resources/org/exoplatform/container/configuration/kernel-configuration_1_0_OLD.xsd 2012-03-06
15:56:08 UTC (rev 5823)
@@ -131,12 +131,12 @@
</xsd:complexType>
<xsd:complexType name="initParamsType">
- <xsd:choice minOccurs="0" maxOccurs="unbounded">
- <xsd:element name="object-param"
type="objectParamType"/>
- <xsd:element name="properties-param"
type="propertiesParamType"/>
- <xsd:element name="value-param"
type="valueParamType"/>
- <xsd:element name="values-param"
type="valuesParamType"/>
- </xsd:choice>
+ <xsd:sequence>
+ <xsd:element name="value-param" type="valueParamType"
minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="values-param"
type="valuesParamType" minOccurs="0"
maxOccurs="unbounded"/>
+ <xsd:element name="properties-param"
type="propertiesParamType" minOccurs="0"
maxOccurs="unbounded"/>
+ <xsd:element name="object-param"
type="objectParamType" minOccurs="0"
maxOccurs="unbounded"/>
+ </xsd:sequence>
</xsd:complexType>
<xsd:complexType name="componentPluginType">
@@ -184,8 +184,8 @@
<xsd:element name="jmx-name" type="xsd:string"
minOccurs="0" maxOccurs="1"/>
<xsd:element name="type" type="xsd:string"
minOccurs="1" maxOccurs="1"/>
<xsd:element name="description" type="xsd:string"
minOccurs="0" maxOccurs="1"/>
- <xsd:element name="show-deploy-info" type="xsd:string"
minOccurs="0" maxOccurs="1"/>
- <xsd:element name="multi-instance" type="xsd:string"
minOccurs="0" maxOccurs="1"/>
+ <xsd:element name="show-deploy-info"
type="xsd:boolean" minOccurs="0" maxOccurs="1"/>
+ <xsd:element name="multi-instance" type="xsd:boolean"
minOccurs="0" maxOccurs="1"/>
<xsd:element name="component-plugins" minOccurs="0"
maxOccurs="1">
<xsd:complexType>
<xsd:sequence>
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 2012-03-06
15:55:33 UTC (rev 5822)
+++
kernel/trunk/exo.kernel.container/src/main/resources/org/exoplatform/container/configuration/kernel-configuration_1_1.xsd 2012-03-06
15:56:08 UTC (rev 5823)
@@ -146,12 +146,12 @@
</xsd:complexType>
<xsd:complexType name="initParamsType">
- <xsd:choice minOccurs="0" maxOccurs="unbounded">
- <xsd:element name="object-param"
type="objectParamType"/>
- <xsd:element name="properties-param"
type="propertiesParamType"/>
- <xsd:element name="value-param"
type="valueParamType"/>
- <xsd:element name="values-param"
type="valuesParamType"/>
- </xsd:choice>
+ <xsd:sequence>
+ <xsd:element name="value-param" type="valueParamType"
minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="values-param"
type="valuesParamType" minOccurs="0"
maxOccurs="unbounded"/>
+ <xsd:element name="properties-param"
type="propertiesParamType" minOccurs="0"
maxOccurs="unbounded"/>
+ <xsd:element name="object-param"
type="objectParamType" minOccurs="0"
maxOccurs="unbounded"/>
+ </xsd:sequence>
</xsd:complexType>
<xsd:complexType name="componentPluginType">
@@ -200,8 +200,8 @@
<xsd:element name="jmx-name" type="xsd:string"
minOccurs="0" maxOccurs="1"/>
<xsd:element name="type" type="xsd:string"
minOccurs="1" maxOccurs="1"/>
<xsd:element name="description" type="xsd:string"
minOccurs="0" maxOccurs="1"/>
- <xsd:element name="show-deploy-info" type="xsd:string"
minOccurs="0" maxOccurs="1"/>
- <xsd:element name="multi-instance" type="xsd:string"
minOccurs="0" maxOccurs="1"/>
+ <xsd:element name="show-deploy-info"
type="xsd:boolean" minOccurs="0" maxOccurs="1"/>
+ <xsd:element name="multi-instance" type="xsd:boolean"
minOccurs="0" maxOccurs="1"/>
<xsd:element name="component-plugins" minOccurs="0"
maxOccurs="1">
<xsd:complexType>
<xsd:sequence>
Modified:
kernel/trunk/exo.kernel.container/src/main/resources/org/exoplatform/container/configuration/kernel-configuration_1_1_OLD.xsd
===================================================================
---
kernel/trunk/exo.kernel.container/src/main/resources/org/exoplatform/container/configuration/kernel-configuration_1_1_OLD.xsd 2012-03-06
15:55:33 UTC (rev 5822)
+++
kernel/trunk/exo.kernel.container/src/main/resources/org/exoplatform/container/configuration/kernel-configuration_1_1_OLD.xsd 2012-03-06
15:56:08 UTC (rev 5823)
@@ -146,12 +146,12 @@
</xsd:complexType>
<xsd:complexType name="initParamsType">
- <xsd:choice minOccurs="0" maxOccurs="unbounded">
- <xsd:element name="object-param"
type="objectParamType"/>
- <xsd:element name="properties-param"
type="propertiesParamType"/>
- <xsd:element name="value-param"
type="valueParamType"/>
- <xsd:element name="values-param"
type="valuesParamType"/>
- </xsd:choice>
+ <xsd:sequence>
+ <xsd:element name="value-param" type="valueParamType"
minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="values-param"
type="valuesParamType" minOccurs="0"
maxOccurs="unbounded"/>
+ <xsd:element name="properties-param"
type="propertiesParamType" minOccurs="0"
maxOccurs="unbounded"/>
+ <xsd:element name="object-param"
type="objectParamType" minOccurs="0"
maxOccurs="unbounded"/>
+ </xsd:sequence>
</xsd:complexType>
<xsd:complexType name="componentPluginType">
@@ -200,8 +200,8 @@
<xsd:element name="jmx-name" type="xsd:string"
minOccurs="0" maxOccurs="1"/>
<xsd:element name="type" type="xsd:string"
minOccurs="1" maxOccurs="1"/>
<xsd:element name="description" type="xsd:string"
minOccurs="0" maxOccurs="1"/>
- <xsd:element name="show-deploy-info" type="xsd:string"
minOccurs="0" maxOccurs="1"/>
- <xsd:element name="multi-instance" type="xsd:string"
minOccurs="0" maxOccurs="1"/>
+ <xsd:element name="show-deploy-info"
type="xsd:boolean" minOccurs="0" maxOccurs="1"/>
+ <xsd:element name="multi-instance" type="xsd:boolean"
minOccurs="0" maxOccurs="1"/>
<xsd:element name="component-plugins" minOccurs="0"
maxOccurs="1">
<xsd:complexType>
<xsd:sequence>
Modified:
kernel/trunk/exo.kernel.container/src/main/resources/org/exoplatform/container/configuration/kernel-configuration_1_2.xsd
===================================================================
---
kernel/trunk/exo.kernel.container/src/main/resources/org/exoplatform/container/configuration/kernel-configuration_1_2.xsd 2012-03-06
15:55:33 UTC (rev 5822)
+++
kernel/trunk/exo.kernel.container/src/main/resources/org/exoplatform/container/configuration/kernel-configuration_1_2.xsd 2012-03-06
15:56:08 UTC (rev 5823)
@@ -146,12 +146,12 @@
</xsd:complexType>
<xsd:complexType name="initParamsType">
- <xsd:choice minOccurs="0" maxOccurs="unbounded">
- <xsd:element name="object-param"
type="objectParamType"/>
- <xsd:element name="properties-param"
type="propertiesParamType"/>
- <xsd:element name="value-param"
type="valueParamType"/>
- <xsd:element name="values-param"
type="valuesParamType"/>
- </xsd:choice>
+ <xsd:sequence>
+ <xsd:element name="value-param" type="valueParamType"
minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="values-param"
type="valuesParamType" minOccurs="0"
maxOccurs="unbounded"/>
+ <xsd:element name="properties-param"
type="propertiesParamType" minOccurs="0"
maxOccurs="unbounded"/>
+ <xsd:element name="object-param"
type="objectParamType" minOccurs="0"
maxOccurs="unbounded"/>
+ </xsd:sequence>
</xsd:complexType>
<xsd:complexType name="componentPluginType">
@@ -203,8 +203,8 @@
<xsd:element name="jmx-name" type="xsd:string"
minOccurs="0" maxOccurs="1"/>
<xsd:element name="type" type="xsd:string"
minOccurs="1" maxOccurs="1"/>
<xsd:element name="description" type="xsd:string"
minOccurs="0" maxOccurs="1"/>
- <xsd:element name="show-deploy-info" type="xsd:string"
minOccurs="0" maxOccurs="1"/>
- <xsd:element name="multi-instance" type="xsd:string"
minOccurs="0" maxOccurs="1"/>
+ <xsd:element name="show-deploy-info"
type="xsd:boolean" minOccurs="0" maxOccurs="1"/>
+ <xsd:element name="multi-instance" type="xsd:boolean"
minOccurs="0" maxOccurs="1"/>
<xsd:element name="component-plugins" minOccurs="0"
maxOccurs="1">
<xsd:complexType>
<xsd:sequence>
Modified:
kernel/trunk/exo.kernel.container/src/main/resources/org/exoplatform/container/configuration/kernel-configuration_1_2_OLD.xsd
===================================================================
---
kernel/trunk/exo.kernel.container/src/main/resources/org/exoplatform/container/configuration/kernel-configuration_1_2_OLD.xsd 2012-03-06
15:55:33 UTC (rev 5822)
+++
kernel/trunk/exo.kernel.container/src/main/resources/org/exoplatform/container/configuration/kernel-configuration_1_2_OLD.xsd 2012-03-06
15:56:08 UTC (rev 5823)
@@ -146,12 +146,12 @@
</xsd:complexType>
<xsd:complexType name="initParamsType">
- <xsd:choice minOccurs="0" maxOccurs="unbounded">
- <xsd:element name="object-param"
type="objectParamType"/>
- <xsd:element name="properties-param"
type="propertiesParamType"/>
- <xsd:element name="value-param"
type="valueParamType"/>
- <xsd:element name="values-param"
type="valuesParamType"/>
- </xsd:choice>
+ <xsd:sequence>
+ <xsd:element name="value-param" type="valueParamType"
minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="values-param"
type="valuesParamType" minOccurs="0"
maxOccurs="unbounded"/>
+ <xsd:element name="properties-param"
type="propertiesParamType" minOccurs="0"
maxOccurs="unbounded"/>
+ <xsd:element name="object-param"
type="objectParamType" minOccurs="0"
maxOccurs="unbounded"/>
+ </xsd:sequence>
</xsd:complexType>
<xsd:complexType name="componentPluginType">
@@ -203,8 +203,8 @@
<xsd:element name="jmx-name" type="xsd:string"
minOccurs="0" maxOccurs="1"/>
<xsd:element name="type" type="xsd:string"
minOccurs="1" maxOccurs="1"/>
<xsd:element name="description" type="xsd:string"
minOccurs="0" maxOccurs="1"/>
- <xsd:element name="show-deploy-info" type="xsd:string"
minOccurs="0" maxOccurs="1"/>
- <xsd:element name="multi-instance" type="xsd:string"
minOccurs="0" maxOccurs="1"/>
+ <xsd:element name="show-deploy-info"
type="xsd:boolean" minOccurs="0" maxOccurs="1"/>
+ <xsd:element name="multi-instance" type="xsd:boolean"
minOccurs="0" maxOccurs="1"/>
<xsd:element name="component-plugins" minOccurs="0"
maxOccurs="1">
<xsd:complexType>
<xsd:sequence>
Added:
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestValidation.java
===================================================================
---
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestValidation.java
(rev 0)
+++
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestValidation.java 2012-03-06
15:56:08 UTC (rev 5823)
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2012 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.exoplatform.container.configuration;
+
+import org.exoplatform.commons.utils.ExoProperties;
+import org.exoplatform.container.xml.InitParams;
+import org.exoplatform.container.xml.PropertiesParam;
+import org.exoplatform.container.xml.ValueParam;
+import org.exoplatform.container.xml.ValuesParam;
+
+/**
+ * @author <a href="mailto:nfilotto@exoplatform.com">Nicolas
Filotto</a>
+ * @version $Id$
+ *
+ */
+public class TestValidation
+{
+ public TestValidation(InitParams params)
+ {
+ PropertiesParam pp = params.getPropertiesParam("properties-param");
+ ExoProperties ep = pp.getProperties();
+ check(ep.containsKey("p1"));
+ check(ep.containsKey("p2"));
+ check(ep.containsKey("p3"));
+ pp = params.getPropertiesParam("properties-param2");
+ ep = pp.getProperties();
+ check(ep.containsKey("p1"));
+ check(ep.containsKey("p2"));
+ check(ep.containsKey("p3"));
+ MyBean bean = (MyBean)params.getObjectParam("object-param").getObject();
+ check(bean.value.equals("value"));
+ bean = (MyBean)params.getObjectParam("object-param2").getObject();
+ check(bean.value.equals("value"));
+ ValueParam vp = params.getValueParam("value-param");
+ check(vp.getValue().equals("value"));
+ vp = params.getValueParam("value-param2");
+ check(vp.getValue().equals("value"));
+ ValuesParam vps = params.getValuesParam("values-param");
+ check(vps.getValues().get(0).equals("value1"));
+ check(vps.getValues().get(1).equals("value2"));
+ check(vps.getValues().get(2).equals("value3"));
+ vps = params.getValuesParam("values-param2");
+ check(vps.getValues().get(0).equals("value1"));
+ check(vps.getValues().get(1).equals("value2"));
+ check(vps.getValues().get(2).equals("value3"));
+ }
+
+ public void check(boolean ok)
+ {
+ if (!ok)
+ {
+ throw new IllegalArgumentException();
+ }
+ }
+
+ public static class MyBean
+ {
+ public String value;
+ }
+}
Modified:
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestXSD_1_0.java
===================================================================
---
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestXSD_1_0.java 2012-03-06
15:55:33 UTC (rev 5822)
+++
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestXSD_1_0.java 2012-03-06
15:56:08 UTC (rev 5823)
@@ -18,6 +18,8 @@
*/
package org.exoplatform.container.configuration;
+import org.exoplatform.container.RootContainer;
+import org.exoplatform.container.support.ContainerBuilder;
import org.exoplatform.test.BasicTestCase;
import java.io.File;
@@ -57,6 +59,26 @@
fail("Was not expecting such exception " + e.getMessage());
}
}
- assertEquals(18, count);
+ assertEquals(19, count);
+ try
+ {
+ File f = new File(baseDir, "invalid-configuration.xml.bad");
+ URL url = f.toURI().toURL();
+ assertFalse("XML configuration file " + url + " is valid",
unmarshaller.isValid(url));
+ }
+ catch (MalformedURLException e)
+ {
+ // Expected
+ }
}
+
+ public void testInitParams() throws Exception
+ {
+ String baseDirPath = System.getProperty("basedir");
+ File file = new File(baseDirPath +
"/src/test/resources/xsd_1_0/test-validation.xml");
+ URL url = file.toURI().toURL();
+ assertNotNull(url);
+ RootContainer container = new ContainerBuilder().withRoot(url).build();
+ container.getComponentInstanceOfType(TestValidation.class);
+ }
}
Modified:
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestXSD_1_1.java
===================================================================
---
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestXSD_1_1.java 2012-03-06
15:55:33 UTC (rev 5822)
+++
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestXSD_1_1.java 2012-03-06
15:56:08 UTC (rev 5823)
@@ -18,6 +18,8 @@
*/
package org.exoplatform.container.configuration;
+import org.exoplatform.container.RootContainer;
+import org.exoplatform.container.support.ContainerBuilder;
import org.exoplatform.test.BasicTestCase;
import java.io.File;
@@ -57,6 +59,26 @@
fail("Was not expecting such exception " + e.getMessage());
}
}
- assertEquals(19, count);
+ assertEquals(20, count);
+ try
+ {
+ File f = new File(baseDir,"invalid-configuration.xml.bad");
+ URL url = f.toURI().toURL();
+ assertFalse("XML configuration file " + url + " is valid",
unmarshaller.isValid(url));
+ }
+ catch (MalformedURLException e)
+ {
+ // Expected
+ }
}
+
+ public void testInitParams() throws Exception
+ {
+ String baseDirPath = System.getProperty("basedir");
+ File file = new File(baseDirPath +
"/src/test/resources/xsd_1_1/test-validation.xml");
+ URL url = file.toURI().toURL();
+ assertNotNull(url);
+ RootContainer container = new ContainerBuilder().withRoot(url).build();
+ container.getComponentInstanceOfType(TestValidation.class);
+ }
}
\ No newline at end of file
Modified:
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestXSD_1_2.java
===================================================================
---
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestXSD_1_2.java 2012-03-06
15:55:33 UTC (rev 5822)
+++
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestXSD_1_2.java 2012-03-06
15:56:08 UTC (rev 5823)
@@ -18,6 +18,8 @@
*/
package org.exoplatform.container.configuration;
+import org.exoplatform.container.RootContainer;
+import org.exoplatform.container.support.ContainerBuilder;
import org.exoplatform.test.BasicTestCase;
import java.io.File;
@@ -57,6 +59,26 @@
fail("Was not expecting such exception " + e.getMessage());
}
}
- assertEquals(20, count);
+ assertEquals(21, count);
+ try
+ {
+ File f = new File(baseDir, "invalid-configuration.xml.bad");
+ URL url = f.toURI().toURL();
+ assertFalse("XML configuration file " + url + " is valid",
unmarshaller.isValid(url));
+ }
+ catch (MalformedURLException e)
+ {
+ // Expected
+ }
}
+
+ public void testInitParams() throws Exception
+ {
+ String baseDirPath = System.getProperty("basedir");
+ File file = new File(baseDirPath +
"/src/test/resources/xsd_1_2/test-validation.xml");
+ URL url = file.toURI().toURL();
+ assertNotNull(url);
+ RootContainer container = new ContainerBuilder().withRoot(url).build();
+ container.getComponentInstanceOfType(TestValidation.class);
+ }
}
\ No newline at end of file
Added:
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/invalid-configuration.xml.bad
===================================================================
---
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/invalid-configuration.xml.bad
(rev 0)
+++
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/invalid-configuration.xml.bad 2012-03-06
15:56:08 UTC (rev 5823)
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+<configuration
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.exoplatform.org/xml/ns/kernel_1_0.xsd
http://www.exoplatform.org/xml/ns/kernel_1_0.xsd"
+
xmlns="http://www.exoplatform.org/xml/ns/kernel_1_0.xsd">
+ <component>
+ <type>org.exoplatform.container.configuration.TestValidation</type>
+ <init-params>
+ <properties-param>
+ <name>properties-param</name>
+ <property name="p1" value="v1"></property>
+ <property name="p2" value="v2"></property>
+ <property name="p3" value="v3"></property>
+ </properties-param>
+ <value-param>
+ <name>value-param</name>
+ <value>value</value>
+ </value-param>
+ <values-param>
+ <name>values-param</name>
+ <value>value1</value>
+ <value>value2</value>
+ <value>value3</value>
+ </values-param>
+ <value-param>
+ <name>value-param2</name>
+ <value>value</value>
+ </value-param>
+ <values-param>
+ <name>values-param2</name>
+ <value>value1</value>
+ <value>value2</value>
+ <value>value3</value>
+ </values-param>
+ <object-param>
+ <name>object-param</name>
+ <description>description</description>
+ <object
type="org.exoplatform.container.configuration.TestValidation$MyBean">
+ <field name="value">
+ <string>value</string>
+ </field>
+ </object>
+ </object-param>
+ <properties-param>
+ <name>properties-param2</name>
+ <property name="p1" value="v1"></property>
+ <property name="p2" value="v2"></property>
+ <property name="p3" value="v3"></property>
+ </properties-param>
+ <object-param>
+ <name>object-param2</name>
+ <description>description</description>
+ <object
type="org.exoplatform.container.configuration.TestValidation$MyBean">
+ <field name="value">
+ <string>value</string>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component>
+</configuration>
\ No newline at end of file
Added: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/test-validation.xml
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/test-validation.xml
(rev 0)
+++
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/test-validation.xml 2012-03-06
15:56:08 UTC (rev 5823)
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+<configuration
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.exoplatform.org/xml/ns/kernel_1_0.xsd
http://www.exoplatform.org/xml/ns/kernel_1_0.xsd"
+
xmlns="http://www.exoplatform.org/xml/ns/kernel_1_0.xsd">
+ <component>
+ <type>org.exoplatform.container.configuration.TestValidation</type>
+ <init-params>
+ <value-param>
+ <name>value-param</name>
+ <value>value</value>
+ </value-param>
+ <value-param>
+ <name>value-param2</name>
+ <value>value</value>
+ </value-param>
+ <values-param>
+ <name>values-param</name>
+ <value>value1</value>
+ <value>value2</value>
+ <value>value3</value>
+ </values-param>
+ <values-param>
+ <name>values-param2</name>
+ <value>value1</value>
+ <value>value2</value>
+ <value>value3</value>
+ </values-param>
+ <properties-param>
+ <name>properties-param</name>
+ <property name="p1" value="v1"></property>
+ <property name="p2" value="v2"></property>
+ <property name="p3" value="v3"></property>
+ </properties-param>
+ <properties-param>
+ <name>properties-param2</name>
+ <property name="p1" value="v1"></property>
+ <property name="p2" value="v2"></property>
+ <property name="p3" value="v3"></property>
+ </properties-param>
+ <object-param>
+ <name>object-param</name>
+ <description>description</description>
+ <object
type="org.exoplatform.container.configuration.TestValidation$MyBean">
+ <field name="value">
+ <string>value</string>
+ </field>
+ </object>
+ </object-param>
+ <object-param>
+ <name>object-param2</name>
+ <description>description</description>
+ <object
type="org.exoplatform.container.configuration.TestValidation$MyBean">
+ <field name="value">
+ <string>value</string>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component>
+</configuration>
\ No newline at end of file
Added:
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/invalid-configuration.xml.bad
===================================================================
---
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/invalid-configuration.xml.bad
(rev 0)
+++
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/invalid-configuration.xml.bad 2012-03-06
15:56:08 UTC (rev 5823)
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+<configuration
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.exoplatform.org/xml/ns/kernel_1_1.xsd
http://www.exoplatform.org/xml/ns/kernel_1_1.xsd"
+
xmlns="http://www.exoplatform.org/xml/ns/kernel_1_1.xsd">
+ <component>
+ <type>org.exoplatform.container.configuration.TestValidation</type>
+ <init-params>
+ <properties-param>
+ <name>properties-param</name>
+ <property name="p1" value="v1"></property>
+ <property name="p2" value="v2"></property>
+ <property name="p3" value="v3"></property>
+ </properties-param>
+ <value-param>
+ <name>value-param</name>
+ <value>value</value>
+ </value-param>
+ <values-param>
+ <name>values-param</name>
+ <value>value1</value>
+ <value>value2</value>
+ <value>value3</value>
+ </values-param>
+ <value-param>
+ <name>value-param2</name>
+ <value>value</value>
+ </value-param>
+ <values-param>
+ <name>values-param2</name>
+ <value>value1</value>
+ <value>value2</value>
+ <value>value3</value>
+ </values-param>
+ <object-param>
+ <name>object-param</name>
+ <description>description</description>
+ <object
type="org.exoplatform.container.configuration.TestValidation$MyBean">
+ <field name="value">
+ <string>value</string>
+ </field>
+ </object>
+ </object-param>
+ <properties-param>
+ <name>properties-param2</name>
+ <property name="p1" value="v1"></property>
+ <property name="p2" value="v2"></property>
+ <property name="p3" value="v3"></property>
+ </properties-param>
+ <object-param>
+ <name>object-param2</name>
+ <description>description</description>
+ <object
type="org.exoplatform.container.configuration.TestValidation$MyBean">
+ <field name="value">
+ <string>value</string>
+ </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-18.xml
===================================================================
---
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-18.xml 2012-03-06
15:55:33 UTC (rev 5822)
+++
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-18.xml 2012-03-06
15:56:08 UTC (rev 5823)
@@ -43,27 +43,6 @@
<key>org.exoplatform.services.naming.InitialContextInitializer</key>
<type>org.exoplatform.services.naming.InitialContextInitializer</type>
<init-params>
- <object-param>
- <name>object</name>
- <object type="object"></object>
- </object-param>
- <object-param profiles="a">
- <name>object</name>
- <object type="object"></object>
- </object-param>
- <object-param profiles="a,b">
- <name>object</name>
- <object type="object"></object>
- </object-param>
- <properties-param>
- <name>properties</name>
- </properties-param>
- <properties-param profiles="a">
- <name>properties</name>
- </properties-param>
- <properties-param profiles="a,b">
- <name>properties</name>
- </properties-param>
<value-param>
<name>value</name>
<value>value</value>
@@ -85,6 +64,27 @@
<values-param profiles="a,b">
<name>values</name>
</values-param>
+ <properties-param>
+ <name>properties</name>
+ </properties-param>
+ <properties-param profiles="a">
+ <name>properties</name>
+ </properties-param>
+ <properties-param profiles="a,b">
+ <name>properties</name>
+ </properties-param>
+ <object-param>
+ <name>object</name>
+ <object type="object"></object>
+ </object-param>
+ <object-param profiles="a">
+ <name>object</name>
+ <object type="object"></object>
+ </object-param>
+ <object-param profiles="a,b">
+ <name>object</name>
+ <object type="object"></object>
+ </object-param>
</init-params>
</component>
Modified:
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-19.xml
===================================================================
---
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-19.xml 2012-03-06
15:55:33 UTC (rev 5822)
+++
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-19.xml 2012-03-06
15:56:08 UTC (rev 5823)
@@ -43,27 +43,6 @@
<key>org.exoplatform.services.naming.InitialContextInitializer</key>
<type>org.exoplatform.services.naming.InitialContextInitializer</type>
<init-params>
- <object-param>
- <name>object</name>
- <object type="object"></object>
- </object-param>
- <object-param profiles="a">
- <name>object</name>
- <object type="object"></object>
- </object-param>
- <object-param profiles="a,b">
- <name>object</name>
- <object type="object"></object>
- </object-param>
- <properties-param>
- <name>properties</name>
- </properties-param>
- <properties-param profiles="a">
- <name>properties</name>
- </properties-param>
- <properties-param profiles="a,b">
- <name>properties</name>
- </properties-param>
<value-param>
<name>value</name>
<value>value</value>
@@ -85,6 +64,27 @@
<values-param profiles="a,b">
<name>values</name>
</values-param>
+ <properties-param>
+ <name>properties</name>
+ </properties-param>
+ <properties-param profiles="a">
+ <name>properties</name>
+ </properties-param>
+ <properties-param profiles="a,b">
+ <name>properties</name>
+ </properties-param>
+ <object-param>
+ <name>object</name>
+ <object type="object"></object>
+ </object-param>
+ <object-param profiles="a">
+ <name>object</name>
+ <object type="object"></object>
+ </object-param>
+ <object-param profiles="a,b">
+ <name>object</name>
+ <object type="object"></object>
+ </object-param>
</init-params>
</component>
Added: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/test-validation.xml
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/test-validation.xml
(rev 0)
+++
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/test-validation.xml 2012-03-06
15:56:08 UTC (rev 5823)
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+<configuration
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.exoplatform.org/xml/ns/kernel_1_1.xsd
http://www.exoplatform.org/xml/ns/kernel_1_1.xsd"
+
xmlns="http://www.exoplatform.org/xml/ns/kernel_1_1.xsd">
+ <component>
+ <type>org.exoplatform.container.configuration.TestValidation</type>
+ <init-params>
+ <value-param>
+ <name>value-param</name>
+ <value>value</value>
+ </value-param>
+ <value-param>
+ <name>value-param2</name>
+ <value>value</value>
+ </value-param>
+ <values-param>
+ <name>values-param</name>
+ <value>value1</value>
+ <value>value2</value>
+ <value>value3</value>
+ </values-param>
+ <values-param>
+ <name>values-param2</name>
+ <value>value1</value>
+ <value>value2</value>
+ <value>value3</value>
+ </values-param>
+ <properties-param>
+ <name>properties-param</name>
+ <property name="p1" value="v1"></property>
+ <property name="p2" value="v2"></property>
+ <property name="p3" value="v3"></property>
+ </properties-param>
+ <properties-param>
+ <name>properties-param2</name>
+ <property name="p1" value="v1"></property>
+ <property name="p2" value="v2"></property>
+ <property name="p3" value="v3"></property>
+ </properties-param>
+ <object-param>
+ <name>object-param</name>
+ <description>description</description>
+ <object
type="org.exoplatform.container.configuration.TestValidation$MyBean">
+ <field name="value">
+ <string>value</string>
+ </field>
+ </object>
+ </object-param>
+ <object-param>
+ <name>object-param2</name>
+ <description>description</description>
+ <object
type="org.exoplatform.container.configuration.TestValidation$MyBean">
+ <field name="value">
+ <string>value</string>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component>
+</configuration>
\ No newline at end of file
Added:
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_2/invalid-configuration.xml.bad
===================================================================
---
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_2/invalid-configuration.xml.bad
(rev 0)
+++
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_2/invalid-configuration.xml.bad 2012-03-06
15:56:08 UTC (rev 5823)
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+<configuration
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd
http://www.exoplatform.org/xml/ns/kernel_1_2.xsd"
+
xmlns="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd">
+ <component>
+ <type>org.exoplatform.container.configuration.TestValidation</type>
+ <init-params>
+ <properties-param>
+ <name>properties-param</name>
+ <property name="p1" value="v1"></property>
+ <property name="p2" value="v2"></property>
+ <property name="p3" value="v3"></property>
+ </properties-param>
+ <value-param>
+ <name>value-param</name>
+ <value>value</value>
+ </value-param>
+ <values-param>
+ <name>values-param</name>
+ <value>value1</value>
+ <value>value2</value>
+ <value>value3</value>
+ </values-param>
+ <value-param>
+ <name>value-param2</name>
+ <value>value</value>
+ </value-param>
+ <values-param>
+ <name>values-param2</name>
+ <value>value1</value>
+ <value>value2</value>
+ <value>value3</value>
+ </values-param>
+ <object-param>
+ <name>object-param</name>
+ <description>description</description>
+ <object
type="org.exoplatform.container.configuration.TestValidation$MyBean">
+ <field name="value">
+ <string>value</string>
+ </field>
+ </object>
+ </object-param>
+ <properties-param>
+ <name>properties-param2</name>
+ <property name="p1" value="v1"></property>
+ <property name="p2" value="v2"></property>
+ <property name="p3" value="v3"></property>
+ </properties-param>
+ <object-param>
+ <name>object-param2</name>
+ <description>description</description>
+ <object
type="org.exoplatform.container.configuration.TestValidation$MyBean">
+ <field name="value">
+ <string>value</string>
+ </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_2/sample-configuration-18.xml
===================================================================
---
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_2/sample-configuration-18.xml 2012-03-06
15:55:33 UTC (rev 5822)
+++
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_2/sample-configuration-18.xml 2012-03-06
15:56:08 UTC (rev 5823)
@@ -43,27 +43,6 @@
<key>org.exoplatform.services.naming.InitialContextInitializer</key>
<type>org.exoplatform.services.naming.InitialContextInitializer</type>
<init-params>
- <object-param>
- <name>object</name>
- <object type="object"></object>
- </object-param>
- <object-param profiles="a">
- <name>object</name>
- <object type="object"></object>
- </object-param>
- <object-param profiles="a,b">
- <name>object</name>
- <object type="object"></object>
- </object-param>
- <properties-param>
- <name>properties</name>
- </properties-param>
- <properties-param profiles="a">
- <name>properties</name>
- </properties-param>
- <properties-param profiles="a,b">
- <name>properties</name>
- </properties-param>
<value-param>
<name>value</name>
<value>value</value>
@@ -85,6 +64,27 @@
<values-param profiles="a,b">
<name>values</name>
</values-param>
+ <properties-param>
+ <name>properties</name>
+ </properties-param>
+ <properties-param profiles="a">
+ <name>properties</name>
+ </properties-param>
+ <properties-param profiles="a,b">
+ <name>properties</name>
+ </properties-param>
+ <object-param>
+ <name>object</name>
+ <object type="object"></object>
+ </object-param>
+ <object-param profiles="a">
+ <name>object</name>
+ <object type="object"></object>
+ </object-param>
+ <object-param profiles="a,b">
+ <name>object</name>
+ <object type="object"></object>
+ </object-param>
</init-params>
</component>
Added: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_2/test-validation.xml
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_2/test-validation.xml
(rev 0)
+++
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_2/test-validation.xml 2012-03-06
15:56:08 UTC (rev 5823)
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+<configuration
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd
http://www.exoplatform.org/xml/ns/kernel_1_2.xsd"
+
xmlns="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd">
+ <component>
+ <type>org.exoplatform.container.configuration.TestValidation</type>
+ <init-params>
+ <value-param>
+ <name>value-param</name>
+ <value>value</value>
+ </value-param>
+ <value-param>
+ <name>value-param2</name>
+ <value>value</value>
+ </value-param>
+ <values-param>
+ <name>values-param</name>
+ <value>value1</value>
+ <value>value2</value>
+ <value>value3</value>
+ </values-param>
+ <values-param>
+ <name>values-param2</name>
+ <value>value1</value>
+ <value>value2</value>
+ <value>value3</value>
+ </values-param>
+ <properties-param>
+ <name>properties-param</name>
+ <property name="p1" value="v1"></property>
+ <property name="p2" value="v2"></property>
+ <property name="p3" value="v3"></property>
+ </properties-param>
+ <properties-param>
+ <name>properties-param2</name>
+ <property name="p1" value="v1"></property>
+ <property name="p2" value="v2"></property>
+ <property name="p3" value="v3"></property>
+ </properties-param>
+ <object-param>
+ <name>object-param</name>
+ <description>description</description>
+ <object
type="org.exoplatform.container.configuration.TestValidation$MyBean">
+ <field name="value">
+ <string>value</string>
+ </field>
+ </object>
+ </object-param>
+ <object-param>
+ <name>object-param2</name>
+ <description>description</description>
+ <object
type="org.exoplatform.container.configuration.TestValidation$MyBean">
+ <field name="value">
+ <string>value</string>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component>
+</configuration>
\ No newline at end of file