exo-jcr SVN: r1082 - kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/mc.
by do-not-reply@jboss.org
Author: mstruk
Date: 2009-12-15 17:45:01 -0500 (Tue, 15 Dec 2009)
New Revision: 1082
Modified:
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegrationInvoker.java
Log:
Reduced 'MC integration not available' log from warn to debug
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegrationInvoker.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegrationInvoker.java 2009-12-15 22:35:36 UTC (rev 1081)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegrationInvoker.java 2009-12-15 22:45:01 UTC (rev 1082)
@@ -127,7 +127,7 @@
catch (ClassNotFoundException ignored)
{
permFailure = true;
- log.warn("MC integration not available in this environment (missing class: "
+ log.debug("MC integration not available in this environment (missing class: "
+ ignored.getMessage() + ")");
return null;
16 years, 7 months
exo-jcr SVN: r1081 - kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/jmx.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2009-12-15 17:35:36 -0500 (Tue, 15 Dec 2009)
New Revision: 1081
Modified:
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/jmx/ManageableContainer.java
Log:
add the capability to obtain the list of registered component on a container
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/jmx/ManageableContainer.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/jmx/ManageableContainer.java 2009-12-15 22:10:59 UTC (rev 1080)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/jmx/ManageableContainer.java 2009-12-15 22:35:36 UTC (rev 1081)
@@ -20,14 +20,22 @@
import org.exoplatform.container.CachingContainer;
import org.exoplatform.management.ManagementContext;
+import org.exoplatform.management.annotations.Managed;
+import org.exoplatform.management.annotations.ManagedDescription;
+import org.exoplatform.management.annotations.ManagedName;
import org.picocontainer.ComponentAdapter;
import org.picocontainer.PicoContainer;
+import org.picocontainer.PicoException;
import org.picocontainer.PicoRegistrationException;
import org.picocontainer.defaults.ComponentAdapterFactory;
import org.picocontainer.defaults.DuplicateComponentKeyRegistrationException;
+import java.util.Collection;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
import java.util.Set;
import javax.management.MBeanAttributeInfo;
@@ -77,6 +85,22 @@
init(null);
}
+ @Managed
+ @ManagedName("RegisteredComponentNames")
+ @ManagedDescription("Return the list of the registered component names")
+ public Set<String> getRegisteredComponentNames() throws PicoException
+ {
+ Set<String> names = new HashSet<String>();
+ Collection<ComponentAdapter> adapters = getComponentAdapters();
+ for (ComponentAdapter adapter : adapters)
+ {
+ Object key = adapter.getComponentKey();
+ String name = String.valueOf(key);
+ names.add(name);
+ }
+ return names;
+ }
+
private static ManageableComponentAdapterFactory getComponentAdapterFactory(
ComponentAdapterFactory componentAdapterFactory)
{
16 years, 7 months
exo-jcr SVN: r1080 - kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2009-12-15 17:10:59 -0500 (Tue, 15 Dec 2009)
New Revision: 1080
Modified:
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/PortalContainer.java
Log:
update JMX name of portal container to allow several portal container to be present in JMX registry
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/PortalContainer.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/PortalContainer.java 2009-12-15 20:43:40 UTC (rev 1079)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/PortalContainer.java 2009-12-15 22:10:59 UTC (rev 1080)
@@ -47,7 +47,7 @@
*/
@Managed
@NamingContext(@Property(key = "portal", value = "{Name}"))
-@NameTemplate(@Property(key = "container", value = "portal"))
+@NameTemplate({@Property(key = "container", value = "portal"),@Property(key = "name", value = "{Name}")})
public class PortalContainer extends ExoContainer implements SessionManagerContainer
{
16 years, 7 months
exo-jcr SVN: r1079 - in kernel/branches/mc-int-branch: exo.kernel.container and 1 other directories.
by do-not-reply@jboss.org
Author: mstruk
Date: 2009-12-15 15:43:40 -0500 (Tue, 15 Dec 2009)
New Revision: 1079
Modified:
kernel/branches/mc-int-branch/exo.kernel.container/pom.xml
kernel/branches/mc-int-branch/exo.kernel.mc-integration/pom.xml
kernel/branches/mc-int-branch/pom.xml
Log:
Merged trunk changes up to r1074
Modified: kernel/branches/mc-int-branch/exo.kernel.container/pom.xml
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.container/pom.xml 2009-12-15 20:42:57 UTC (rev 1078)
+++ kernel/branches/mc-int-branch/exo.kernel.container/pom.xml 2009-12-15 20:43:40 UTC (rev 1079)
@@ -1,120 +1,120 @@
-<!--
-
- 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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>kernel-parent</artifactId>
- <version>2.2.0-Beta05-SNAPSHOT</version>
- </parent>
-
- <artifactId>exo.kernel.container</artifactId>
-
- <name>eXo Kernel :: Container</name>
- <description>eXo Kernel Container</description>
-
- <dependencies>
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.commons</artifactId>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.tool</groupId>
- <artifactId>exo.tool.framework.junit</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- </dependency>
- <dependency>
- <groupId>picocontainer</groupId>
- <artifactId>picocontainer</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-beanutils</groupId>
- <artifactId>commons-beanutils</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jibx</groupId>
- <artifactId>jibx-run</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.codehaus.woodstox</groupId>
- <artifactId>wstx-asl</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.jibx</groupId>
- <artifactId>jibx-bind</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.codehaus.woodstox</groupId>
- <artifactId>wstx-asl</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.jibx</groupId>
- <artifactId>jibx-extras</artifactId>
- </dependency>
- <dependency>
- <groupId>xpp3</groupId>
- <artifactId>xpp3</artifactId>
- <version>1.1.3.4.O</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.jibx</groupId>
- <artifactId>maven-jibx-plugin</artifactId>
- <configuration>
- <directory>src/main/resources</directory>
- <includes>
- <includes>binding.xml</includes>
- </includes>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>bind</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <!--
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>apt-maven-plugin</artifactId>
- <configuration>
- <factory>org.exoplatform.management.apt.ManagementAPF</factory>
- </configuration>
- </plugin>
- -->
- </plugins>
- </build>
+<!--
+
+ 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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>kernel-parent</artifactId>
+ <version>2.2.0-Beta05-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>exo.kernel.container</artifactId>
+
+ <name>eXo Kernel :: Container</name>
+ <description>eXo Kernel Container</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.commons</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.tool</groupId>
+ <artifactId>exo.tool.framework.junit</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>picocontainer</groupId>
+ <artifactId>picocontainer</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-beanutils</groupId>
+ <artifactId>commons-beanutils</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jibx</groupId>
+ <artifactId>jibx-run</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.woodstox</groupId>
+ <artifactId>wstx-asl</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.jibx</groupId>
+ <artifactId>jibx-bind</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.woodstox</groupId>
+ <artifactId>wstx-asl</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.jibx</groupId>
+ <artifactId>jibx-extras</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>xpp3</groupId>
+ <artifactId>xpp3</artifactId>
+ <version>1.1.3.4.O</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jibx</groupId>
+ <artifactId>maven-jibx-plugin</artifactId>
+ <configuration>
+ <directory>src/main/resources</directory>
+ <includes>
+ <includes>binding.xml</includes>
+ </includes>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>bind</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <!--
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>apt-maven-plugin</artifactId>
+ <configuration>
+ <factory>org.exoplatform.management.apt.ManagementAPF</factory>
+ </configuration>
+ </plugin>
+ -->
+ </plugins>
+ </build>
</project>
\ No newline at end of file
Modified: kernel/branches/mc-int-branch/exo.kernel.mc-integration/pom.xml
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.mc-integration/pom.xml 2009-12-15 20:42:57 UTC (rev 1078)
+++ kernel/branches/mc-int-branch/exo.kernel.mc-integration/pom.xml 2009-12-15 20:43:40 UTC (rev 1079)
@@ -43,9 +43,19 @@
</dependency>
<dependency>
<groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.mc-int</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
<artifactId>exo.kernel.mc-int-demo</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.mc-kernel-extras</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>org.jboss.microcontainer</groupId>
<artifactId>jboss-dependency</artifactId>
Modified: kernel/branches/mc-int-branch/pom.xml
===================================================================
--- kernel/branches/mc-int-branch/pom.xml 2009-12-15 20:42:57 UTC (rev 1078)
+++ kernel/branches/mc-int-branch/pom.xml 2009-12-15 20:43:40 UTC (rev 1079)
@@ -18,8 +18,7 @@
02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -86,38 +85,8 @@
<groupId>org.exoplatform.kernel</groupId>
<artifactId>exo.kernel.component.cache</artifactId>
<version>${project.version}</version>
- </dependency>
+ </dependency>
<dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.mc-int</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.mc-kernel-extras</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.kernel.demos</groupId>
- <artifactId>exo.kernel.demos.mc-injection</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.tool</groupId>
- <artifactId>exo.tool.framework.junit</artifactId>
- <version>1.2.0</version>
- </dependency>
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- <version>2.3</version>
- </dependency>
- <dependency>
- <groupId>commons-chain</groupId>
- <artifactId>commons-chain</artifactId>
- <version>1.0</version>
- </dependency>
- <dependency>
<groupId>xpp3</groupId>
<artifactId>xpp3</artifactId>
<version>1.1.3.4.O</version>
@@ -206,8 +175,8 @@
<dependency>
<groupId>org.jboss.cache</groupId>
<artifactId>jbosscache-core</artifactId>
- <version>3.2.0.GA</version>
- </dependency>
+ <version>3.2.0.GA</version>
+ </dependency>
<dependency>
<groupId>org.jibx</groupId>
<artifactId>jibx-bind</artifactId>
16 years, 7 months
exo-jcr SVN: r1078 - kernel/branches.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2009-12-15 15:42:57 -0500 (Tue, 15 Dec 2009)
New Revision: 1078
Removed:
kernel/branches/config-branch/
Log:
removed temporary config branch
16 years, 7 months
exo-jcr SVN: r1077 - kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2009-12-15 15:37:59 -0500 (Tue, 15 Dec 2009)
New Revision: 1077
Removed:
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/RootContainerBootstrap.java
Log:
remove useless class
Deleted: kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/RootContainerBootstrap.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/RootContainerBootstrap.java 2009-12-15 20:31:17 UTC (rev 1076)
+++ kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/RootContainerBootstrap.java 2009-12-15 20:37:59 UTC (rev 1077)
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2003-2007 eXo Platform SAS.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Affero General Public License
- * as published by the Free Software Foundation; either version 3
- * of the License, or (at your option) any later version.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see<http://www.gnu.org/licenses/>.
- */
-package org.exoplatform.container;
-
-import org.exoplatform.container.configuration.ConfigurationManager;
-import org.exoplatform.container.configuration.ConfigurationManagerImpl;
-
-import java.net.URL;
-import java.util.Arrays;
-import java.util.HashSet;
-
-/**
- * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
- * @version $Revision$
- */
-public class RootContainerBootstrap
-{
-
- public static RootContainer bootstrap(URL configurationURL, String... profiles)
- {
- try
- {
- RootContainer container = new RootContainer();
- ConfigurationManager manager = new ConfigurationManagerImpl(new HashSet<String>(Arrays.asList(profiles)));
- manager.addConfiguration(configurationURL);
- container.registerComponentInstance(ConfigurationManager.class, manager);
- container.initContainer();
- container.start();
- return container;
- }
- catch (Exception e)
- {
- AssertionError err = new AssertionError("Could not start root container");
- err.initCause(e);
- throw err;
- }
- }
-}
16 years, 7 months
exo-jcr SVN: r1076 - core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/auth.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2009-12-15 15:31:17 -0500 (Tue, 15 Dec 2009)
New Revision: 1076
Modified:
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/auth/OrganizationAuthenticatorImpl.java
Log:
EXOJCR-319 : Have OrganizationAuthenticatorImpl use the RequestLifeCycle instead of doing its own request scheduling
Modified: core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/auth/OrganizationAuthenticatorImpl.java
===================================================================
--- core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/auth/OrganizationAuthenticatorImpl.java 2009-12-15 20:27:24 UTC (rev 1075)
+++ core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/auth/OrganizationAuthenticatorImpl.java 2009-12-15 20:31:17 UTC (rev 1076)
@@ -19,6 +19,7 @@
package org.exoplatform.services.organization.auth;
import org.exoplatform.container.component.ComponentRequestLifecycle;
+import org.exoplatform.container.component.RequestLifeCycle;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
import org.exoplatform.services.organization.Membership;
@@ -140,7 +141,7 @@
{
if (orgService instanceof ComponentRequestLifecycle)
{
- ((ComponentRequestLifecycle)orgService).startRequest(null);
+ RequestLifeCycle.begin((ComponentRequestLifecycle)orgService);
}
}
@@ -148,7 +149,7 @@
{
if (orgService instanceof ComponentRequestLifecycle)
{
- ((ComponentRequestLifecycle)orgService).endRequest(null);
+ RequestLifeCycle.end();
}
}
16 years, 7 months
exo-jcr SVN: r1075 - in kernel/trunk: exo.kernel.commons/src/main/java/org/exoplatform/commons/utils and 21 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2009-12-15 15:27:24 -0500 (Tue, 15 Dec 2009)
New Revision: 1075
Added:
kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/PropertiesLoader.java
kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/Tools.java
kernel/trunk/exo.kernel.commons/src/test/java/org/exoplatform/commons/utils/TestPropertiesLoader.java
kernel/trunk/exo.kernel.commons/src/test/java/org/exoplatform/commons/utils/TestTools.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/PropertyConfigurator.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/component/RequestLifeCycle.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/component/RequestLifeCycleStack.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/EntityResolverImpl.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/Namespaces.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ProfileDOMFilter.java
kernel/trunk/exo.kernel.container/src/main/resources/org/exoplatform/container/configuration/kernel-configuration_1_1.xsd
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/ComponentWithRequestLifeCycle.java
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/LifeCycle.java
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/RootContainerBootstrap.java
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/TestPropertyManagerConfigurator.java
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/TestRequestLifeCycle.java
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/AbstractProfileTest.java
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/ConfigParam.java
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/InitParamsHolder.java
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestCollectionValue.java
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestComponentPluginProfile.java
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestComponentProfile.java
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestConfigurationService.java
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestField.java
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestImportProfile.java
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestInitParamProfile.java
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/jmx/TestPortalContainerManagedIntegration.java
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/support/ManagedComponentRequestLifeCycle.java
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/support/SimpleManagementAware.java
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/support/
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/support/ContainerBuilder.java
kernel/trunk/exo.kernel.container/src/test/resources/configuration-bad-schema.xml
kernel/trunk/exo.kernel.container/src/test/resources/configuration-no-schema.xml
kernel/trunk/exo.kernel.container/src/test/resources/configuration.xml
kernel/trunk/exo.kernel.container/src/test/resources/object.xml
kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/
kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/collection-configuration.xml
kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/component-configuration.xml
kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/component-plugin-configuration.xml
kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/field-configuration.xml
kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/import-configuration.xml
kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/init-param-configuration.xml
kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/jmx/configuration5.xml
kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/jmx/portal-configuration.xml
kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/jmx/root-configuration.xml
kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/property-configurator-configuration.xml
kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/property-configurator-with-path-configuration.xml
kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/property-configurator-with-profile-configuration.xml
kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/property-configurator.properties
kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/property-configurator.xml
kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/request-lifecycle-configuration.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-01.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-02.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-03.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-04.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-05.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-06.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-07.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-08.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-09.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-10.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-11.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-12.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-13.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-14.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-15.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-16.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-01.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-02.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-03.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-04.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-05.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-06.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-07.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-08.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-09.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-10.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-11.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-12.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-13.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-14.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-15.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-16.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-17.xml
Removed:
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/Environnment.java
kernel/trunk/exo.kernel.container/src/main/resources/configuration-bad-schema.xml
kernel/trunk/exo.kernel.container/src/main/resources/configuration-no-schema.xml
kernel/trunk/exo.kernel.container/src/main/resources/configuration.xml
kernel/trunk/exo.kernel.container/src/main/resources/object.xml
kernel/trunk/exo.kernel.container/src/main/resources/xsd_1_0/
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/test/
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/support/ContainerBuilder.java
kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/collection-configuration.xml
kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/component-configuration.xml
kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/component-plugin-configuration.xml
kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/field-configuration.xml
kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/import-configuration.xml
kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/init-param-configuration.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-01.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-02.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-03.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-04.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-05.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-06.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-07.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-08.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-09.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-10.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-11.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-12.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-13.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-14.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-15.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-16.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-01.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-02.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-03.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-04.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-05.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-06.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-07.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-08.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-09.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-10.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-11.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-12.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-13.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-14.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-15.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-16.xml
kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-17.xml
Modified:
kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/Environment.java
kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/ExoProperties.java
kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/PropertyManager.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/ExoContainer.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/RootContainer.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/StandaloneContainer.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ConfigurationManagerImpl.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ConfigurationUnmarshaller.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/MockConfigurationManagerImpl.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/NoKernelNamespaceSAXFilter.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/jmx/ExoModelMBean.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/jmx/ManageableContainer.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/jmx/ManagementContextImpl.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/monitor/jvm/J2EEServerInfo.java
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/AbstractTestContainer.java
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/TestRootContainerManagedIntegration.java
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/xml/test/TestDataXML.java
kernel/trunk/exo.kernel.container/src/test/resources/conf/portal/test-configuration.xml
Log:
merging changes from config branch:
- EXOJCR-317 : JMX component request life cycle management
- EXOJCR-316 : Component request life cycle management
- EXOJCR-315 : Property manager configurator
- EXOJCR-314 : Kernel configuration profile
Modified: kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/Environment.java
===================================================================
--- kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/Environment.java 2009-12-15 17:38:27 UTC (rev 1074)
+++ kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/Environment.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -93,4 +93,4 @@
}
return singleton_;
}
-}
+}
\ No newline at end of file
Modified: kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/ExoProperties.java
===================================================================
--- kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/ExoProperties.java 2009-12-15 17:38:27 UTC (rev 1074)
+++ kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/ExoProperties.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -20,6 +20,7 @@
import java.util.HashMap;
import java.util.Iterator;
+import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
@@ -30,7 +31,7 @@
* @email: tuan08(a)users.sourceforge.net
* @version: $Id: ExoProperties.java,v 1.1 2004/09/11 14:08:53 tuan08 Exp $
*/
-public class ExoProperties extends HashMap<String, String>
+public class ExoProperties extends LinkedHashMap<String, String>
{
public ExoProperties()
{
Copied: kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/PropertiesLoader.java (from rev 1059, kernel/branches/config-branch/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/PropertiesLoader.java)
===================================================================
--- kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/PropertiesLoader.java (rev 0)
+++ kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/PropertiesLoader.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2003-2007 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.commons.utils;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+import java.util.LinkedHashMap;
+import java.util.Properties;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class PropertiesLoader
+{
+
+ private static class LinkedProperties extends Properties
+ {
+
+ /** A list that contains each element at most once. */
+ private LinkedHashMap<String, String> list = new LinkedHashMap<String, String>();
+
+ @Override
+ public Object put(Object key, Object value)
+ {
+ if (list.containsKey(key))
+ {
+ list.remove(key);
+ }
+ list.put((String)key, (String)value);
+ return super.put(key, value);
+ }
+
+ @Override
+ public Object remove(Object key)
+ {
+ list.remove(key);
+ return super.remove(key);
+ }
+
+ }
+
+ public static LinkedHashMap<String, String> load(InputStream in) throws IOException
+ {
+ LinkedProperties props = new LinkedProperties();
+ props.load(in);
+ return props.list;
+ }
+
+ public static LinkedHashMap<String, String> loadFromXML(InputStream in) throws IOException
+ {
+ LinkedProperties props = new LinkedProperties();
+ props.loadFromXML(in);
+ return props.list;
+ }
+}
Modified: kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/PropertyManager.java
===================================================================
--- kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/PropertyManager.java 2009-12-15 17:38:27 UTC (rev 1074)
+++ kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/PropertyManager.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -38,6 +38,12 @@
public static final String DEVELOPING = "exo.product.developing";
/** . */
+ public static final String RUNTIME_PROFILES = "exo.profiles";
+
+ /** . */
+ public static final String PROPERTIES_URL = "exo.properties.url";
+
+ /** . */
private static final ConcurrentMap<String, String> cache = new ConcurrentHashMap<String, String>();
/** This is read only once at startup. */
Copied: kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/Tools.java (from rev 1059, kernel/branches/config-branch/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/Tools.java)
===================================================================
--- kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/Tools.java (rev 0)
+++ kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/Tools.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,156 @@
+/*
+ * Copyright (C) 2003-2007 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.commons.utils;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class Tools
+{
+
+ /**
+ * Instantiates a {@link HashSet} object and fills it with the provided element array.
+ *
+ * @param elements the list of elements to add
+ * @param <E> the element type
+ * @return the set of elements
+ * @throws NullPointerException if the element array is null
+ */
+ public static <E> Set<E> set(E... elements) throws NullPointerException
+ {
+ if (elements == null)
+ {
+ throw new NullPointerException("No null element array accepted");
+ }
+ HashSet<E> set = new HashSet<E>();
+ if (elements.length > 0)
+ {
+ for (E element : elements)
+ {
+ set.add(element);
+ }
+ }
+ return set;
+ }
+
+ /**
+ * Parse the provided list according to the comma separator. The string is sliced
+ * first using the {@link String#split(String)} method with the <code>","</code>
+ * argument. Each chunk is then trimmed and if its length is not zero then it is
+ * added to the returned set.
+ *
+ * @param s the list to parse
+ * @return the set of string found in the list
+ * @throws NullPointerException if the string argument is null
+ */
+ public static Set<String> parseCommaList(String s) throws NullPointerException
+ {
+ if (s == null)
+ {
+ throw new NullPointerException("No null string list accepted");
+ }
+ Set<String> set = new HashSet<String>();
+ for (String v : s.split(","))
+ {
+ v = v.trim();
+ if (v.length() > 0)
+ {
+ set.add(v);
+ }
+ }
+ return set;
+ }
+
+ /**
+ * Copy the provided map and returns it as a modifiable properties object.
+ *
+ * @param map the map to copy
+ * @return the properties copy
+ * @throws NullPointerException if the map argument is null
+ */
+ public static Properties asProperties(Map<String, String> map) throws NullPointerException
+ {
+ if (map == null)
+ {
+ throw new NullPointerException("No null map accepted");
+ }
+ Properties props = new Properties();
+ for (Map.Entry<String, String> entry : map.entrySet())
+ {
+ props.setProperty(entry.getKey(), entry.getValue());
+ }
+ return props;
+ }
+
+ /**
+ * Copy the properties state and returns it as a modifiable map. Only the
+ * key and value of type string are copied.
+ *
+ * @param props the properties object to copy
+ * @return the properties copy as a map
+ * @throws NullPointerException if the props argument is null
+ */
+ public static Map<String, String> asMap(Properties props) throws NullPointerException
+ {
+ if (props == null)
+ {
+ throw new NullPointerException("No null properties accepted");
+ }
+ Map<String, String> map = new HashMap<String, String>();
+ for (Object key : props.keySet())
+ {
+ Object value = props.get(key);
+ if (key instanceof String && value instanceof String)
+ {
+ map.put((String)key, (String)value);
+ }
+ }
+ return map;
+ }
+
+ /**
+ * Returns true if the string s ends with the end string ignoring the case.
+ * @param s the string to test
+ * @param end the string suffix
+ * @return true if the string s ends with the end string ignoring the case
+ * @throws NullPointerException if any string is null
+ */
+ public static boolean endsWithIgnoreCase(String s, String end) throws NullPointerException
+ {
+ if (s == null)
+ {
+ throw new NullPointerException();
+ }
+ if (end == null)
+ {
+ throw new NullPointerException();
+ }
+ if (s.length() < end.length())
+ {
+ return false;
+ }
+ String suffix = s.substring(s.length() - end.length());
+ return suffix.equalsIgnoreCase(end);
+ }
+}
Copied: kernel/trunk/exo.kernel.commons/src/test/java/org/exoplatform/commons/utils/TestPropertiesLoader.java (from rev 1059, kernel/branches/config-branch/exo.kernel.commons/src/test/java/org/exoplatform/commons/utils/TestPropertiesLoader.java)
===================================================================
--- kernel/trunk/exo.kernel.commons/src/test/java/org/exoplatform/commons/utils/TestPropertiesLoader.java (rev 0)
+++ kernel/trunk/exo.kernel.commons/src/test/java/org/exoplatform/commons/utils/TestPropertiesLoader.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2003-2007 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.commons.utils;
+
+import junit.framework.TestCase;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.StringReader;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class TestPropertiesLoader extends TestCase
+{
+
+ public void testLoad1() throws IOException
+ {
+ String s = "a=b\nc=d\ne=f";
+ LinkedHashMap<String, String> props = PropertiesLoader.load(new ByteArrayInputStream(s.getBytes("ISO8859-1")));
+ Iterator<Map.Entry<String, String>> i = props.entrySet().iterator();
+ assertTrue(i.hasNext());
+ Map.Entry<String, String> entry = i.next();
+ assertEquals("a", entry.getKey());
+ assertEquals("b", entry.getValue());
+ assertTrue(i.hasNext());
+ entry = i.next();
+ assertEquals("c", entry.getKey());
+ assertEquals("d", entry.getValue());
+ assertTrue(i.hasNext());
+ entry = i.next();
+ assertEquals("e", entry.getKey());
+ assertEquals("f", entry.getValue());
+ assertFalse(i.hasNext());
+ }
+
+ public void testLoad2() throws IOException
+ {
+ String s = "a=b\nc=d\ne=f\na=b";
+ LinkedHashMap<String, String> props = PropertiesLoader.load(new ByteArrayInputStream(s.getBytes("ISO8859-1")));
+ Iterator<Map.Entry<String, String>> i = props.entrySet().iterator();
+ assertTrue(i.hasNext());
+ Map.Entry<String, String> entry = i.next();
+ assertEquals("c", entry.getKey());
+ assertEquals("d", entry.getValue());
+ assertTrue(i.hasNext());
+ entry = i.next();
+ assertEquals("e", entry.getKey());
+ assertEquals("f", entry.getValue());
+ assertTrue(i.hasNext());
+ entry = i.next();
+ assertEquals("a", entry.getKey());
+ assertEquals("b", entry.getValue());
+ assertFalse(i.hasNext());
+ }
+}
Copied: kernel/trunk/exo.kernel.commons/src/test/java/org/exoplatform/commons/utils/TestTools.java (from rev 1059, kernel/branches/config-branch/exo.kernel.commons/src/test/java/org/exoplatform/commons/utils/TestTools.java)
===================================================================
--- kernel/trunk/exo.kernel.commons/src/test/java/org/exoplatform/commons/utils/TestTools.java (rev 0)
+++ kernel/trunk/exo.kernel.commons/src/test/java/org/exoplatform/commons/utils/TestTools.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,188 @@
+/*
+ * Copyright (C) 2003-2007 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.commons.utils;
+
+import junit.framework.TestCase;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class TestTools extends TestCase
+{
+
+ public void testEmtySet()
+ {
+ Set<String> strings = Tools.set();
+ assertTrue(strings instanceof HashSet);
+ assertTrue(strings.isEmpty());
+ }
+
+ public void testSingletonSet1()
+ {
+ Set<String> strings = Tools.set("a");
+ assertTrue(strings instanceof HashSet);
+ assertEquals(1, strings.size());
+ assertTrue(strings.contains("a"));
+ }
+
+ public void testSingletonSet2()
+ {
+ Set<String> strings = Tools.set("a", "a");
+ assertTrue(strings instanceof HashSet);
+ assertEquals(1, strings.size());
+ assertTrue(strings.contains("a"));
+ }
+
+ public void testTwoElementsInSet()
+ {
+ Set<String> strings = Tools.set("a", "b");
+ assertTrue(strings instanceof HashSet);
+ assertEquals(2, strings.size());
+ assertTrue(strings.contains("a"));
+ assertTrue(strings.contains("b"));
+ }
+
+ public void testSetThrowsNPE()
+ {
+ try
+ {
+ Tools.set((String[])null);
+ fail();
+ }
+ catch (NullPointerException expected)
+ {
+ }
+ }
+
+ public void testParseCommaList()
+ {
+ assertEquals(Tools.<String>set(),Tools.parseCommaList(""));
+ assertEquals(Tools.<String>set(),Tools.parseCommaList(","));
+ assertEquals(Tools.set("a"),Tools.parseCommaList("a,"));
+ assertEquals(Tools.set("a"),Tools.parseCommaList(",a"));
+ assertEquals(Tools.set("a", "b"),Tools.parseCommaList("a,,b"));
+ assertEquals(Tools.set("a"),Tools.parseCommaList("a,a"));
+ assertEquals(Tools.set("a", "b"),Tools.parseCommaList("a,b"));
+ }
+
+ public void testParseCommandListThrowsNPE()
+ {
+ try
+ {
+ Tools.parseCommaList(null);
+ fail();
+ }
+ catch (NullPointerException e)
+ {
+ }
+ }
+
+ public void testEndsWithIgnoreCase()
+ {
+ assertFalse(Tools.endsWithIgnoreCase("", "a"));
+ assertFalse(Tools.endsWithIgnoreCase("b", "a"));
+ assertTrue(Tools.endsWithIgnoreCase("a", "a"));
+ assertTrue(Tools.endsWithIgnoreCase("a", "A"));
+ assertTrue(Tools.endsWithIgnoreCase("A", "a"));
+ }
+
+ public void testEndsWithIgnoreCaseThrowsNPE()
+ {
+ try
+ {
+ Tools.endsWithIgnoreCase(null, "a");
+ fail();
+ }
+ catch (NullPointerException e)
+ {
+ }
+ try
+ {
+ Tools.endsWithIgnoreCase("a", null);
+ fail();
+ }
+ catch (NullPointerException e)
+ {
+ }
+ try
+ {
+ Tools.endsWithIgnoreCase(null, null);
+ fail();
+ }
+ catch (NullPointerException e)
+ {
+ }
+ }
+
+ public void testAsMap()
+ {
+ Properties props = new Properties();
+ props.put(new Object(), new Object());
+ props.put("a", "b");
+ Map<String, String> map = Tools.asMap(props);
+ assertEquals(Collections.singletonMap("a", "b"), map);
+ map.put("a", "c");
+ assertEquals(Collections.singletonMap("a", "c"), map);
+ assertEquals(2, props.size());
+ assertEquals("b", props.getProperty("a"));
+ }
+
+ public void testAsMapThrowsNPE()
+ {
+ try
+ {
+ Tools.asMap(null);
+ fail();
+ }
+ catch (NullPointerException e)
+ {
+ }
+ }
+
+ public void testAsProperties()
+ {
+ Map<String, String> map = new HashMap<String, String>();
+ map.put("a", "b");
+ Properties props = Tools.asProperties(map);
+ assertEquals(1, props.size());
+ assertEquals("b", props.getProperty("a"));
+ props.put("a", "c");
+ assertEquals(1, props.size());
+ assertEquals("c", props.getProperty("a"));
+ assertEquals(Collections.singletonMap("a", "b"), map);
+ }
+
+ public void testAsPropertiesThrowsNPE()
+ {
+ try
+ {
+ Tools.asProperties(null);
+ fail();
+ }
+ catch (NullPointerException e)
+ {
+ }
+ }
+}
Deleted: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/Environnment.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/Environnment.java 2009-12-15 17:38:27 UTC (rev 1074)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/Environnment.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,31 +0,0 @@
-/*
- * 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.
- */
-package org.exoplatform.container;
-
-/**
- * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
- * @version $Revision$
- */
-class Environnment
-{
- static boolean isJBoss()
- {
- return System.getProperty("jboss.server.name") != null;
- }
-}
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/ExoContainer.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/ExoContainer.java 2009-12-15 17:38:27 UTC (rev 1074)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/ExoContainer.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -18,6 +18,7 @@
*/
package org.exoplatform.container;
+import org.exoplatform.commons.utils.PropertyManager;
import org.exoplatform.container.component.ComponentLifecyclePlugin;
import org.exoplatform.container.configuration.ConfigurationManager;
import org.exoplatform.container.jmx.ManageableContainer;
@@ -29,11 +30,15 @@
import org.picocontainer.PicoContainer;
import org.picocontainer.defaults.ComponentAdapterFactory;
+import javax.management.MBeanServer;
import java.lang.reflect.Constructor;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
+import java.util.Set;
/**
* Created by The eXo Platform SAS Author : Tuan Nguyen
@@ -42,6 +47,32 @@
public class ExoContainer extends ManageableContainer
{
+ /**
+ * Returns an unmodifable set of profiles defined by the value returned by invoking
+ * {@link PropertyManager#getProperty(String)} with the {@link org.exoplatform.commons.utils.PropertyManager#RUNTIME_PROFILES}
+ * property.
+ *
+ * @return the set of profiles
+ */
+ public static Set<String> getProfiles()
+ {
+ //
+ Set<String> profiles = new HashSet<String>();
+
+ // Obtain profile list by runtime properties
+ String profileList = PropertyManager.getProperty(PropertyManager.RUNTIME_PROFILES);
+ if (profileList != null)
+ {
+ for (String profile : profileList.split(","))
+ {
+ profiles.add(profile.trim());
+ }
+ }
+
+ //
+ return Collections.unmodifiableSet(profiles);
+ }
+
Log log = ExoLogger.getLogger(ExoContainer.class);
private Map<String, ComponentLifecyclePlugin> componentLifecylePlugin_ =
@@ -53,9 +84,17 @@
protected PicoContainer parent;
- public ExoContainer(ManagementContextImpl managementContext)
+ public ExoContainer()
{
- super(managementContext);
+ super(new ManagementContextImpl());
+
+ //
+
+ }
+
+ public ExoContainer(MBeanServer mbeanServer)
+ {
+ super(new ManagementContextImpl(mbeanServer, new HashMap<String, String>()));
context = new ExoContainerContext(this);
context.setName(this.getClass().getName());
registerComponentInstance(context);
Copied: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/PropertyConfigurator.java (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/PropertyConfigurator.java)
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/PropertyConfigurator.java (rev 0)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/PropertyConfigurator.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,178 @@
+/*
+ * Copyright (C) 2003-2007 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.container;
+
+import org.exoplatform.commons.utils.PropertiesLoader;
+import org.exoplatform.commons.utils.PropertyManager;
+import org.exoplatform.commons.utils.Tools;
+import org.exoplatform.container.configuration.ConfigurationManager;
+import org.exoplatform.container.xml.Deserializer;
+import org.exoplatform.container.xml.InitParams;
+import org.exoplatform.container.xml.PropertiesParam;
+import org.exoplatform.container.xml.Property;
+import org.exoplatform.container.xml.ValueParam;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.picocontainer.Startable;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Properties;
+
+/**
+ * <p>The property configurator configures a set of system properties via the {@link PropertyManager}
+ * static methods. It is possible to configure properties from the init params or from an external
+ * file.</p>
+ *
+ * <p>The constructor will inspect the {@link org.exoplatform.container.xml.InitParams} params argument
+ * to find a param named <code>properties</code> with an expected type of {@link PropertiesParam}. The
+ * properties contained in that argument will be sourced into the property manager. When such properties
+ * are loaded from an XML configuration file, the values are evaluated and property substitution occurs.</p>
+ *
+ * <p>When the property {@link PropertyManager#PROPERTIES_URL} is not null and points to a valid property
+ * file it will loaded and sourced. Property values will be evaluated and property substitution will
+ * occur. When the file name ends with the <code>.properties</code> properties are loaded using the
+ * {@link Properties#load(java.io.InputStream)} method. When the file name ends with the <code>.xml</code>
+ * properties are loaded using the {@link Properties#loadFromXML(java.io.InputStream)} method. Suffix
+ * checks are done ignoring the case.</p>
+ *
+ * <p>When properties are loaded from an URL, the order of the properties declarations in the file matters.</p>
+ *
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class PropertyConfigurator implements Startable
+{
+
+ /** The logger. */
+ private final Log log = ExoLogger.getExoLogger(PropertyConfigurator.class);
+
+ public PropertyConfigurator(InitParams params, ConfigurationManager confManager)
+ {
+ PropertiesParam propertiesParam = params.getPropertiesParam("properties");
+ if (propertiesParam != null)
+ {
+ log.debug("Going to initialize properties from init param");
+ for (Iterator<Property> i = propertiesParam.getPropertyIterator();i.hasNext();)
+ {
+ Property property = i.next();
+ String name = property.getName();
+ String value = property.getValue();
+ log.debug("Adding property from init param " + name + " = " + value);
+ PropertyManager.setProperty(name, value);
+ }
+ }
+
+ //
+ String path = null;
+ ValueParam pathParam = params.getValueParam("properties.url");
+ if (pathParam != null)
+ {
+ log.debug("Using file path " + path + " found from configuration");
+ path = pathParam.getValue();
+ }
+
+ //
+ String systemPath = PropertyManager.getProperty(PropertyManager.PROPERTIES_URL);
+ if (systemPath != null)
+ {
+ log.debug("Using file path " + path + " found from system properties");
+ path = systemPath;
+ }
+
+ //
+ if (path != null)
+ {
+ log.debug("Found property file path " + path);
+ InputStream in = null;
+ try
+ {
+ URL url = confManager.getURL(path);
+
+ //
+ if (url != null)
+ {
+ in = url.openStream();
+ }
+
+ //
+ if (in != null)
+ {
+ LinkedHashMap<String, String> props = null;
+ String fileName = url.getFile();
+ if (Tools.endsWithIgnoreCase(path, ".properties"))
+ {
+ log.debug("Attempt to load property file " + path);
+ props = PropertiesLoader.load(in);
+ }
+ else if (Tools.endsWithIgnoreCase(fileName, ".xml"))
+ {
+ log.debug("Attempt to load property file " + path + " with XML format");
+ props = PropertiesLoader.loadFromXML(in);
+ }
+ else
+ {
+ log.debug("Will not load property file" + path + " because its format is not recognized");
+ }
+ if (props != null)
+ {
+ for (Map.Entry<String, String> entry : props.entrySet())
+ {
+ String propertyName = entry.getKey();
+ String propertyValue = entry.getValue();
+ propertyValue = Deserializer.resolveString(propertyValue);
+ PropertyManager.setProperty(propertyName, propertyValue);
+ }
+ }
+ }
+ else
+ {
+ log.error("Could not load property file " + path);
+ }
+ }
+ catch (Exception e)
+ {
+ log.error("Cannot load property file " + path, e);
+ }
+ finally
+ {
+ if (in != null)
+ {
+ try
+ {
+ in.close();
+ }
+ catch (IOException ignore)
+ {
+ }
+ }
+ }
+ }
+ }
+
+ public void start()
+ {
+ }
+
+ public void stop()
+ {
+ }
+}
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/RootContainer.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/RootContainer.java 2009-12-15 17:38:27 UTC (rev 1074)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/RootContainer.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -23,7 +23,6 @@
import org.exoplatform.container.configuration.MockConfigurationManagerImpl;
import org.exoplatform.container.definition.PortalContainerConfig;
import org.exoplatform.container.definition.PortalContainerDefinition;
-import org.exoplatform.container.jmx.ManagementContextImpl;
import org.exoplatform.container.monitor.jvm.J2EEServerInfo;
import org.exoplatform.container.monitor.jvm.OperatingSystemInfo;
import org.exoplatform.container.util.ContainerUtil;
@@ -39,7 +38,7 @@
import java.lang.management.ManagementFactory;
import java.util.Collection;
import java.util.Comparator;
-import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
import java.util.Queue;
import java.util.Set;
@@ -84,6 +83,8 @@
private final J2EEServerInfo serverenv_ = new J2EEServerInfo();
+ private final Set<String> profiles;
+
/**
* The list of all the tasks to execute while initializing the corresponding portal containers
*/
@@ -97,8 +98,27 @@
public RootContainer()
{
- super(new ManagementContextImpl(findMBeanServer(), new HashMap<String, String>()));
+ super(findMBeanServer());
+
+ //
+ Set<String> profiles = new HashSet<String>();
+
+ // Add the profile defined by the server name
+ String envProfile = serverenv_.getServerName();
+ if (envProfile != null)
+ {
+ profiles.add(envProfile);
+ }
+
+ // Obtain profile list by runtime properties
+ profiles.addAll(ExoContainer.getProfiles());
+
+ // Lof the active profiles
+ log.info("Active profiles " + profiles);
+
+ //
Runtime.getRuntime().addShutdownHook(new ShutdownThread(this));
+ this.profiles= profiles;
this.registerComponentInstance(J2EEServerInfo.class, serverenv_);
}
@@ -259,7 +279,7 @@
// Set the full classloader of the portal container
Thread.currentThread().setContextClassLoader(pcontainer.getPortalClassLoader());
hasChanged = true;
- ConfigurationManagerImpl cService = new ConfigurationManagerImpl(pcontainer.getPortalContext());
+ ConfigurationManagerImpl cService = new ConfigurationManagerImpl(pcontainer.getPortalContext(), profiles);
// add configs from services
try
@@ -273,7 +293,7 @@
// Add configuration that depends on the environment
String uri;
- if (Environnment.isJBoss())
+ if (serverenv_.isJBoss())
{
uri = "conf/portal/jboss-configuration.xml";
}
@@ -379,7 +399,7 @@
try
{
RootContainer rootContainer = new RootContainer();
- ConfigurationManagerImpl service = new ConfigurationManagerImpl();
+ ConfigurationManagerImpl service = new ConfigurationManagerImpl(rootContainer.profiles);
service.addConfiguration(ContainerUtil.getConfigurationURL("conf/configuration.xml"));
if (System.getProperty("maven.exoplatform.dir") != null)
{
@@ -400,6 +420,7 @@
}
catch (Exception e)
{
+ e.printStackTrace();
log.error("Could not build root container", e);
return null;
}
@@ -428,20 +449,27 @@
else
{
booting = true;
- log.info("Building root container");
- long time = -System.currentTimeMillis();
- result = buildRootContainer();
- if (result != null)
+ try
{
- time += System.currentTimeMillis();
- log.info("Root container is built (build time " + time + "ms)");
- ExoContainerContext.setTopContainer(result);
- singleton_ = result;
- log.info("Root container booted");
+ log.info("Building root container");
+ long time = -System.currentTimeMillis();
+ result = buildRootContainer();
+ if (result != null)
+ {
+ time += System.currentTimeMillis();
+ log.info("Root container is built (build time " + time + "ms)");
+ ExoContainerContext.setTopContainer(result);
+ singleton_ = result;
+ log.info("Root container booted");
+ }
+ else
+ {
+ log.error("Failed to boot root container");
+ }
}
- else
+ finally
{
- log.error("Failed to boot root container");
+ booting = false;
}
}
}
@@ -638,7 +666,7 @@
* Executes the task
*
* @param context the servlet context of the web application
- * @param container The portal container on which we would like to execute the task
+ * @param portalContainer The portal container on which we would like to execute the task
*/
public void execute(ServletContext context, PortalContainer portalContainer);
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/StandaloneContainer.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/StandaloneContainer.java 2009-12-15 17:38:27 UTC (rev 1074)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/StandaloneContainer.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -18,6 +18,7 @@
*/
package org.exoplatform.container;
+import org.exoplatform.commons.utils.PropertyManager;
import org.exoplatform.container.configuration.ConfigurationException;
import org.exoplatform.container.configuration.ConfigurationManager;
import org.exoplatform.container.configuration.ConfigurationManagerImpl;
@@ -28,7 +29,9 @@
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
/**
* Created by The eXo Platform SAS .
@@ -71,7 +74,9 @@
private StandaloneContainer(ClassLoader configClassLoader)
{
super(new MX4JComponentAdapterFactory(), null);
- configurationManager = new ConfigurationManagerImpl(configClassLoader);
+
+ //
+ configurationManager = new ConfigurationManagerImpl(configClassLoader, ExoContainer.getProfiles());
this.registerComponentInstance(ConfigurationManager.class, configurationManager);
registerComponentImplementation(SessionManagerImpl.class);
}
Copied: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/component/RequestLifeCycle.java (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/component/RequestLifeCycle.java)
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/component/RequestLifeCycle.java (rev 0)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/component/RequestLifeCycle.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,168 @@
+/*
+ * Copyright (C) 2003-2007 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.container.component;
+
+import org.exoplatform.container.ExoContainer;
+
+import java.util.IdentityHashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>The request life cycle object allows a client to demarcate the life cycle of the various components
+ * associated with containers. It allows container stacking and guarantees that the life cycle
+ * of the components will never be called twice in the same stack.</p>
+ *
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class RequestLifeCycle
+{
+
+ /** The current stack. */
+ private static ThreadLocal<RequestLifeCycleStack> current = new ThreadLocal<RequestLifeCycleStack>();
+
+ /** The components of this life cycle. */
+ private List<ComponentRequestLifecycle> components;
+
+ /** The container of this life cycle. */
+ private final ExoContainer container;
+
+ public RequestLifeCycle(ExoContainer container, List<ComponentRequestLifecycle> components)
+ {
+ this.container = container;
+ this.components = components;
+ }
+
+ void doBegin()
+ {
+ for (ComponentRequestLifecycle component : components)
+ {
+ component.startRequest(container);
+ }
+ }
+
+ IdentityHashMap<Object, Throwable> doEnd()
+ {
+ IdentityHashMap<Object, Throwable> result = new IdentityHashMap<Object, Throwable>();
+
+ //
+ for (ComponentRequestLifecycle componentRLF : components)
+ {
+ Throwable t = null;
+ try
+ {
+ componentRLF.endRequest(container);
+ }
+ catch (Throwable throwable)
+ {
+ t = throwable;
+ }
+ finally
+ {
+ result.put(componentRLF, t);
+ }
+ }
+
+ //
+ return result;
+ }
+
+ /**
+ * Starts the life cycle of the provided container and add it to the life cycle stack.
+ * Only the components of the container that have not been previously enrolled in a life cycle
+ * are begun.
+ *
+ * @param container the container to use
+ * @param local will only trigger life cycle for the container and not its ancestors
+ */
+ public static void begin(ExoContainer container, boolean local)
+ {
+ if (container == null)
+ {
+ throw new NullPointerException();
+ }
+ RequestLifeCycleStack lf = current.get();
+ if (lf == null)
+ {
+ lf = new RequestLifeCycleStack();
+ current.set(lf);
+ }
+ lf.begin(container, local);
+ }
+
+ /**
+ * Starts the life cycle of the provided life cycle and add it to the life cycle stack.
+ * If the life cycle has already been triggered before then no operation will be really
+ * performed. When the life cycle is called, the argument container will be null.
+ *
+ * @param lifeCycle the life cycle
+ */
+ public static void begin(ComponentRequestLifecycle lifeCycle)
+ {
+ if (lifeCycle == null)
+ {
+ throw new NullPointerException();
+ }
+ RequestLifeCycleStack lf = current.get();
+ if (lf == null)
+ {
+ lf = new RequestLifeCycleStack();
+ current.set(lf);
+ }
+ lf.begin(lifeCycle);
+ }
+
+ /**
+ * Starts the life cycle of the provided container and add it to the life cycle stack.
+ * Only the components of the container that have not been previously enrolled in a life cycle
+ * are begun.
+ *
+ * @param container the container to use
+ */
+ public static void begin(ExoContainer container)
+ {
+ begin(container, false);
+ }
+
+ /**
+ * <p>Ends the life cycle of the most recent container started. Only the components of the container that
+ * have not been previously enrolled in a life cycle are ended.</p>
+ *
+ * <p>The result map returned has for keys the components whose the life cycle ended during this method call
+ * and the associated value are the potential throwable that were thrown by those components. It is usefull
+ * when writing unit test to be aware of the throwable of the various components involved in a request
+ * life cycle.</p>
+ *
+ * @throws IllegalStateException if no container life cycle is associated with this thread
+ * @return the result map
+ */
+ public static Map<Object, Throwable> end() throws IllegalStateException
+ {
+ RequestLifeCycleStack lf = current.get();
+ if (lf == null)
+ {
+ throw new IllegalStateException();
+ }
+ Map<Object, Throwable> result = lf.end();
+ if (lf.isEmpty())
+ {
+ current.set(null);
+ }
+ return result;
+ }
+}
Copied: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/component/RequestLifeCycleStack.java (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/component/RequestLifeCycleStack.java)
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/component/RequestLifeCycleStack.java (rev 0)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/component/RequestLifeCycleStack.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,105 @@
+/*
+ * Copyright (C) 2003-2007 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.container.component;
+
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.container.component.ComponentRequestLifecycle;
+import org.picocontainer.PicoContainer;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.IdentityHashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+class RequestLifeCycleStack extends LinkedList<RequestLifeCycle>
+{
+
+ /** . */
+ private final Set<ComponentRequestLifecycle> allComponents = new HashSet<ComponentRequestLifecycle>();
+
+ RequestLifeCycleStack()
+ {
+ }
+
+ void begin(ComponentRequestLifecycle lifeCycle)
+ {
+ if (allComponents.contains(lifeCycle))
+ {
+ addLast(new RequestLifeCycle(null, Collections.<ComponentRequestLifecycle>emptyList()));
+ }
+ else
+ {
+ RequestLifeCycle requestLF = new RequestLifeCycle(null, Collections.singletonList(lifeCycle));
+ allComponents.add(lifeCycle);
+ addLast(requestLF);
+ requestLF.doBegin();
+ }
+ }
+
+ void begin(ExoContainer container, boolean local)
+ {
+ // Need to make a copy as modifying the list is cached by the container
+ List<ComponentRequestLifecycle> components = new ArrayList<ComponentRequestLifecycle>((List<ComponentRequestLifecycle>)container.getComponentInstancesOfType(ComponentRequestLifecycle.class));
+
+ //
+ if (!local)
+ {
+ for (PicoContainer current = container.getParent();current != null;current = current.getParent())
+ {
+ components.addAll((List<ComponentRequestLifecycle>)current.getComponentInstancesOfType(ComponentRequestLifecycle.class));
+ }
+
+ }
+
+ // Remove components that have already started their life cycle
+ components.removeAll(allComponents);
+
+ // Contribute to the all component set
+ allComponents.addAll(components);
+
+ //
+ RequestLifeCycle lifeCycle = new RequestLifeCycle(container, components);
+
+ //
+ addLast(lifeCycle);
+
+ //
+ lifeCycle.doBegin();
+ }
+
+ Map<Object, Throwable> end()
+ {
+ RequestLifeCycle lifeCycle = removeLast();
+
+ //
+ IdentityHashMap<Object, Throwable> result = lifeCycle.doEnd();
+
+ //
+ allComponents.removeAll(result.keySet());
+
+ //
+ return result;
+ }
+}
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ConfigurationManagerImpl.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ConfigurationManagerImpl.java 2009-12-15 17:38:27 UTC (rev 1074)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ConfigurationManagerImpl.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -32,8 +32,10 @@
import java.io.InputStream;
import java.net.URL;
import java.util.Collection;
+import java.util.Collections;
import java.util.Iterator;
import java.util.List;
+import java.util.Set;
import javax.servlet.ServletContext;
@@ -67,6 +69,9 @@
private boolean validateSchema = true;
+ /** . */
+ private final Set<String> profiles;
+
/** The URL of the current document being unmarshalled. */
private static final ThreadLocal<URL> currentURL = new ThreadLocal<URL>();
@@ -81,16 +86,24 @@
public ConfigurationManagerImpl()
{
+ this.profiles = Collections.emptySet();
}
- public ConfigurationManagerImpl(ServletContext context)
+ public ConfigurationManagerImpl(Set<String> profiles)
{
+ this.profiles = profiles;
+ }
+
+ public ConfigurationManagerImpl(ServletContext context, Set<String> profiles)
+ {
scontext_ = context;
+ this.profiles = profiles;
}
- public ConfigurationManagerImpl(ClassLoader loader)
+ public ConfigurationManagerImpl(ClassLoader loader, Set<String> profiles)
{
scontextClassLoader_ = loader;
+ this.profiles = profiles;
}
public Configuration getConfiguration()
@@ -156,7 +169,7 @@
//
try
{
- ConfigurationUnmarshaller unmarshaller = new ConfigurationUnmarshaller();
+ ConfigurationUnmarshaller unmarshaller = new ConfigurationUnmarshaller(profiles);
Configuration conf = unmarshaller.unmarshall(url);
if (configurations_ == null)
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ConfigurationUnmarshaller.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ConfigurationUnmarshaller.java 2009-12-15 17:38:27 UTC (rev 1074)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ConfigurationUnmarshaller.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -24,6 +24,8 @@
import org.jibx.runtime.BindingDirectory;
import org.jibx.runtime.IBindingFactory;
import org.jibx.runtime.IUnmarshallingContext;
+import org.w3c.dom.Document;
+import org.xml.sax.EntityResolver;
import org.xml.sax.ErrorHandler;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
@@ -32,13 +34,21 @@
import java.io.IOException;
import java.io.StringReader;
import java.io.StringWriter;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
import java.net.URL;
+import java.util.Collections;
+import java.util.Set;
import javax.xml.XMLConstants;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.FactoryConfigurationError;
+import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.sax.SAXResult;
import javax.xml.transform.sax.SAXTransformerFactory;
import javax.xml.transform.sax.TransformerHandler;
import javax.xml.transform.stream.StreamResult;
@@ -86,8 +96,8 @@
+ "XML declaration similar to\n"
+ "<configuration\n"
+ " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
- + " xsi:schemaLocation=\"http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd\"\n"
- + " xmlns=\"http://www.exoplaform.org/xml/ns/kernel_1_0.xsd\">");
+ + " xsi:schemaLocation=\"http://www.exoplaform.org/xml/ns/kernel_1_1.xsd http://www.exoplaform.org/xml/ns/kernel_1_1.xsd\"\n"
+ + " xmlns=\"http://www.exoplaform.org/xml/ns/kernel_1_1.xsd\">");
}
else
{
@@ -105,6 +115,19 @@
}
}
+ /** . */
+ private final Set<String> profiles;
+
+ public ConfigurationUnmarshaller(Set<String> profiles)
+ {
+ this.profiles = profiles;
+ }
+
+ public ConfigurationUnmarshaller()
+ {
+ this.profiles = Collections.emptySet();
+ }
+
/**
* Returns true if the configuration file is valid according to its schema declaration. If the file
* does not have any schema declaration, the file will be reported as valid.
@@ -116,72 +139,105 @@
*/
public boolean isValid(URL url) throws NullPointerException, IOException
{
- SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
- URL schemaURL = getClass().getResource("kernel-configuration_1_0.xsd");
- if (schemaURL != null)
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ String[] schemas = {
+ Namespaces.KERNEL_1_0_URI,
+ Namespaces.KERNEL_1_1_URI
+ };
+ factory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");
+ factory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaSource", schemas);
+ factory.setNamespaceAware(true);
+ factory.setValidating(true);
+
+ try
{
- try
- {
- Schema schema = factory.newSchema(schemaURL);
- Validator validator = schema.newValidator();
- Reporter reporter = new Reporter(url);
- validator.setErrorHandler(reporter);
-
- // Validate the document
- validator.validate(new StreamSource(url.openStream()));
- return reporter.valid;
- }
- catch (SAXException e)
- {
- log.error("Got a sax exception when doing XSD validation");
- e.printStackTrace(System.err);
- return false;
- }
+ DocumentBuilder builder = factory.newDocumentBuilder();
+ Reporter reporter = new Reporter(url);
+ builder.setErrorHandler(reporter);
+ builder.setEntityResolver(Namespaces.resolver);
+ builder.parse(url.openStream());
+ return reporter.valid;
}
- else
+ catch (ParserConfigurationException e)
{
- return true;
+ log.error("Got a parser configuration exception when doing XSD validation");
+ return false;
}
+ catch (SAXException e)
+ {
+ log.error("Got a sax exception when doing XSD validation");
+ return false;
+ }
}
public Configuration unmarshall(URL url) throws Exception
{
-
- /*
- byte[] bytes = new byte[256];
- InputStream in = url.openStream();
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- for (int s = in.read(bytes);s != -1;s = in.read(bytes)) {
- out.write(bytes, 0, s);
- }
- String s = out.toString();
- log.info("s = " + s);
- */
-
- //
boolean valid = isValid(url);
if (!valid)
{
log.info("The configuration file " + url + " was not found valid according to its XSD");
}
- // The buffer
+ //
+ DocumentBuilderFactory factory = null;
+ try
+ {
+ // With Java 6, it's safer to precise the builder factory class name as it may result:
+ // java.lang.AbstractMethodError: org.apache.xerces.dom.DeferredDocumentImpl.getXmlStandalone()Z
+ // at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.setDocumentInfo(Unknown Source)
+ Method dbfniMethod = DocumentBuilderFactory.class.getMethod("newInstance", String.class, ClassLoader.class);
+ factory = (DocumentBuilderFactory)dbfniMethod.invoke(null, "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl", Thread.currentThread().getContextClassLoader());
+ }
+ catch (InvocationTargetException e)
+ {
+ Throwable cause = e.getCause();
+ if (cause instanceof FactoryConfigurationError)
+ {
+ // do nothing and let try to instantiate later
+ log.debug("Was not able to find document builder factory class in Java > 5, will use default", cause);
+ }
+ else
+ {
+ // Rethrow
+ throw e;
+ }
+ }
+ catch (NoSuchMethodException e)
+ {
+ // Java < 6
+ }
+
+ //
+ if (factory == null)
+ {
+ factory = DocumentBuilderFactory.newInstance();
+ }
+
+ //
+ factory.setNamespaceAware(true);
+ DocumentBuilder builder = factory.newDocumentBuilder();
+ Document doc = builder.parse(url.openStream());
+
+ // Filter DOM
+ ProfileDOMFilter filter = new ProfileDOMFilter(profiles);
+ filter.process(doc.getDocumentElement());
+
+ // SAX event stream -> String
StringWriter buffer = new StringWriter();
-
- // Create a sax transformer result that will serialize the output
SAXTransformerFactory tf = (SAXTransformerFactory)SAXTransformerFactory.newInstance();
- final TransformerHandler hd = tf.newTransformerHandler();
- hd.setResult(new StreamResult(buffer));
+ TransformerHandler hd = tf.newTransformerHandler();
+ StreamResult result = new StreamResult(buffer);
+ hd.setResult(result);
Transformer serializer = tf.newTransformer();
serializer.setOutputProperty(OutputKeys.ENCODING, "UTF8");
serializer.setOutputProperty(OutputKeys.INDENT, "yes");
- // Perform
- InputSource source = new InputSource(url.openStream());
- SAXParserFactory spf = SAXParserFactory.newInstance();
- SAXParser saxParser = spf.newSAXParser();
- saxParser.parse(source, new NoKernelNamespaceSAXFilter(hd));
+ // Transform -> SAX event stream
+ SAXResult saxResult = new SAXResult(new NoKernelNamespaceSAXFilter(hd));
+ // DOM -> Transform
+ serializer.transform(new DOMSource(doc), saxResult);
+
// Reuse the parsed document
String document = buffer.toString();
@@ -193,5 +249,4 @@
IUnmarshallingContext uctx = bfact.createUnmarshallingContext();
return (Configuration)uctx.unmarshalDocument(new StringReader(document), null);
}
-
}
Copied: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/EntityResolverImpl.java (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/EntityResolverImpl.java)
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/EntityResolverImpl.java (rev 0)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/EntityResolverImpl.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,101 @@
+/*
+ * Copyright (C) 2003-2007 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.container.configuration;
+
+import org.exoplatform.commons.utils.IOUtil;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+class EntityResolverImpl implements EntityResolver
+{
+
+ /** . */
+ private final Map<String, String> systemIdToResourcePath;
+
+ /** . */
+ private final ConcurrentMap<String, byte[]> systemIdToSource;
+
+ /** . */
+ private final ClassLoader loader;
+
+ public EntityResolverImpl(ClassLoader loader, Map<String, String> systemIdToResourcePath)
+ {
+ // Defensive copy
+ this.systemIdToResourcePath = new HashMap<String, String>(systemIdToResourcePath);
+ this.systemIdToSource = new ConcurrentHashMap<String, byte[]>();
+ this.loader = loader;
+ }
+
+ public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException
+ {
+ if (systemId != null)
+ {
+ byte[] data = systemIdToSource.get(systemId);
+
+ //
+ if (data == null)
+ {
+ String path = systemIdToResourcePath.get(systemId);
+ if (path != null)
+ {
+ InputStream in = loader.getResourceAsStream(path);
+ if (in != null)
+ {
+ data = IOUtil.getStreamContentAsBytes(in);
+ }
+ }
+
+ // Black list it, we won't find it
+ if (data == null)
+ {
+ data = new byte[0];
+ }
+
+ // Put in cache
+ systemIdToSource.put(systemId, data);
+
+ // Some basic prevention against stupid use of this class that could cause OOME
+ if (systemIdToSource.size() > 1000)
+ {
+ systemIdToSource.clear();
+ }
+ }
+
+ //
+ if (data != null && data.length > 0)
+ {
+ return new InputSource(new ByteArrayInputStream(data));
+ }
+ }
+
+ //
+ return null;
+ }
+}
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/MockConfigurationManagerImpl.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/MockConfigurationManagerImpl.java 2009-12-15 17:38:27 UTC (rev 1074)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/MockConfigurationManagerImpl.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -18,6 +18,8 @@
*/
package org.exoplatform.container.configuration;
+import org.exoplatform.container.ExoContainer;
+
import java.net.URL;
import javax.servlet.ServletContext;
@@ -36,7 +38,7 @@
public MockConfigurationManagerImpl(ServletContext context) throws Exception
{
- super(context);
+ super(context, ExoContainer.getProfiles());
confDir_ = System.getProperty("mock.portal.dir") + "/WEB-INF";
}
Copied: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/Namespaces.java (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/Namespaces.java)
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/Namespaces.java (rev 0)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/Namespaces.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2003-2007 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.container.configuration;
+
+import org.xml.sax.EntityResolver;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class Namespaces
+{
+
+ /** . */
+ public static final String KERNEL_1_0_URI = "http://www.exoplaform.org/xml/ns/kernel_1_0.xsd";
+
+ /** . */
+ public static final String KERNEL_1_1_URI = "http://www.exoplaform.org/xml/ns/kernel_1_1.xsd";
+
+ /** . */
+ static final EntityResolver resolver;
+
+ static
+ {
+ Map<String, String> resourceMap = new HashMap<String, String>();
+ resourceMap.put(KERNEL_1_0_URI, "org/exoplatform/container/configuration/kernel-configuration_1_0.xsd");
+ resourceMap.put(KERNEL_1_1_URI, "org/exoplatform/container/configuration/kernel-configuration_1_1.xsd");
+ resolver = new EntityResolverImpl(Namespaces.class.getClassLoader(), resourceMap);
+ }
+}
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/NoKernelNamespaceSAXFilter.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/NoKernelNamespaceSAXFilter.java 2009-12-15 17:38:27 UTC (rev 1074)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/NoKernelNamespaceSAXFilter.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -18,6 +18,8 @@
*/
package org.exoplatform.container.configuration;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
import org.xml.sax.Attributes;
import org.xml.sax.ContentHandler;
import org.xml.sax.Locator;
@@ -25,8 +27,13 @@
import org.xml.sax.helpers.AttributesImpl;
import org.xml.sax.helpers.DefaultHandler;
+import java.util.HashSet;
+import java.util.Set;
+import static org.exoplatform.container.configuration.Namespaces.*;
+
/**
* Removes kernel namespace declaration from the document to not confuse the jibx thing.
+ * It also filters the active profiles from the XML stream.
*
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
* @version $Revision$
@@ -34,11 +41,22 @@
class NoKernelNamespaceSAXFilter extends DefaultHandler
{
+ /** . */
+ private static final Log log = ExoLogger.getExoLogger(NoKernelNamespaceSAXFilter.class);
+
+ /** . */
+ private static final String XSI_URI = "http://www.w3.org/2001/XMLSchema-instance";
+
+ /** . */
private ContentHandler contentHandler;
+ /** . */
+ private final Set<String> blackListedPrefixes;
+
NoKernelNamespaceSAXFilter(ContentHandler contentHandler)
{
this.contentHandler = contentHandler;
+ this.blackListedPrefixes = new HashSet<String>();
}
public void setDocumentLocator(Locator locator)
@@ -58,27 +76,97 @@
public void startPrefixMapping(String prefix, String uri) throws SAXException
{
- contentHandler.startPrefixMapping(prefix, uri);
+ if (KERNEL_1_0_URI.equals(uri) || KERNEL_1_1_URI.equals(uri) || XSI_URI.equals(uri))
+ {
+ blackListedPrefixes.add(prefix);
+ log.debug("Black listing prefix " + prefix + " with uri " + uri);
+ }
+ else
+ {
+ contentHandler.startPrefixMapping(prefix, uri);
+ log.debug("Start prefix mapping " + prefix + " with uri " + uri);
+ }
}
public void endPrefixMapping(String prefix) throws SAXException
{
- contentHandler.endPrefixMapping(prefix);
+ if (!blackListedPrefixes.remove(prefix))
+ {
+ log.debug("Ending prefix mapping " + prefix);
+ contentHandler.endPrefixMapping(prefix);
+ }
+ else
+ {
+ log.debug("Removed prefix mapping " + prefix + " from black list ");
+ }
}
public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException
{
- if (qName.equals("configuration"))
+ Set<String> profiles = null;
+ AttributesImpl noNSAtts = new AttributesImpl();
+ for (int i = 0;i < atts.getLength();i++)
{
- atts = new AttributesImpl();
+ String attQName = atts.getQName(i);
+ if ((attQName.equals("xmlns")) && blackListedPrefixes.contains(""))
+ {
+ // Skip
+ log.debug("Skipping black listed xmlns attribute");
+ }
+ else if (attQName.startsWith("xmlns:") && blackListedPrefixes.contains(attQName.substring(6)))
+ {
+ // Skip
+ log.debug("Skipping black listed " + attQName + " attribute");
+ }
+ else
+ {
+ String attURI = atts.getURI(i);
+ String attLocalName = atts.getLocalName(i);
+ String attType = atts.getType(i);
+ String attValue = atts.getValue(i);
+
+ //
+ if (XSI_URI.equals(attURI))
+ {
+ // Skip
+ log.debug("Skipping XSI " + attQName + " attribute");
+ continue;
+ }
+ else if (KERNEL_1_0_URI.equals(attURI) || KERNEL_1_1_URI.equals(attURI))
+ {
+ log.debug("Requalifying prefixed attribute " + attQName + " attribute to " + localName);
+ attURI = null;
+ attQName = localName;
+ }
+
+ //
+ noNSAtts.addAttribute(attURI, attLocalName, attQName, attType, attValue);
+ }
}
//
- contentHandler.startElement(uri, localName, qName, atts);
+ if (KERNEL_1_0_URI.equals(uri) || KERNEL_1_1_URI.equals(uri))
+ {
+ log.debug("Requalifying active profile " + qName + " start element to " + localName);
+ qName = localName;
+ uri = null;
+ }
+
+ //
+ contentHandler.startElement(uri, localName, qName, noNSAtts);
}
public void endElement(String uri, String localName, String qName) throws SAXException
{
+ if (KERNEL_1_0_URI.equals(uri) || KERNEL_1_1_URI.equals(uri))
+ {
+ log.debug("Requalifying " + qName + " end element");
+ qName = localName;
+ uri = null;
+ }
+
+ //
+ log.debug("Propagatting " + qName + " end element");
contentHandler.endElement(uri, localName, qName);
}
Copied: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ProfileDOMFilter.java (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ProfileDOMFilter.java)
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ProfileDOMFilter.java (rev 0)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ProfileDOMFilter.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,134 @@
+/*
+ * Copyright (C) 2003-2007 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.container.configuration;
+
+import org.exoplatform.commons.utils.Tools;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+import static org.exoplatform.container.configuration.Namespaces.*;
+
+/**
+ * Filters a kernel DOM according to a list of active profiles.
+ *
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+class ProfileDOMFilter
+{
+
+ /** . */
+ private static final String PROFILE_ATTRIBUTE = "profiles";
+
+ /** . */
+ private static final Set<String> kernelURIs = Tools.set(KERNEL_1_0_URI, KERNEL_1_1_URI);
+
+ /** . */
+ private static final Set<String> kernelWithProfileURIs = Tools.set(KERNEL_1_1_URI);
+
+ /** . */
+ private final Set<String> activeProfiles;
+
+ public ProfileDOMFilter(Set<String> activeProfiles)
+ {
+ this.activeProfiles = activeProfiles;
+ }
+
+ public void process(Element elt)
+ {
+ if (kernelURIs.contains(elt.getNamespaceURI()))
+ {
+ // Check if element must be removed
+ NamedNodeMap attrs = elt.getAttributes();
+ if (attrs != null)
+ {
+ Set<String> profiles = null;
+ List<Attr> toRemove = null;
+ for (int i = 0;i < attrs.getLength();i++)
+ {
+ Attr attr = (Attr)attrs.item(i);
+ String attrURI = attr.getNamespaceURI();
+ if ((attrURI == null || kernelWithProfileURIs.contains(attrURI)) && PROFILE_ATTRIBUTE.equals(attr.getLocalName()))
+ {
+ if (profiles == null)
+ {
+ profiles = Tools.parseCommaList(attr.getValue());
+ }
+ else
+ {
+ profiles.addAll(Tools.parseCommaList(attr.getValue()));
+ }
+
+ //
+ if (toRemove == null)
+ {
+ toRemove = new ArrayList<Attr>();
+ }
+ toRemove.add(attr);
+ }
+ }
+
+ // Check if must we delete this node
+ if (profiles != null && Collections.disjoint(activeProfiles, profiles))
+ {
+ Node parent = elt.getParentNode();
+
+ // Remove it
+ parent.removeChild(elt);
+
+ // No more processing
+ return;
+ }
+
+ // Remove profile attributes
+ if (toRemove != null)
+ {
+ for (Attr attr : toRemove)
+ {
+ elt.removeAttributeNode(attr);
+ }
+ }
+ }
+ }
+
+ // Make a copy as children may be removed and result
+ // in a concurrent modification
+ NodeList children = elt.getChildNodes();
+ ArrayList<Element> childElts = new ArrayList<Element>();
+ for (int i = 0;i < children.getLength();i++)
+ {
+ Node child = children.item(i);
+ if (child.getNodeType() == Node.ELEMENT_NODE)
+ {
+ childElts.add((Element)child);
+ }
+ }
+
+ // Process recursively
+ for (Element childElt : childElts)
+ {
+ process(childElt);
+ }
+ }
+}
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/jmx/ExoModelMBean.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/jmx/ExoModelMBean.java 2009-12-15 17:38:27 UTC (rev 1074)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/jmx/ExoModelMBean.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -18,6 +18,8 @@
*/
package org.exoplatform.container.jmx;
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.container.component.RequestLifeCycle;
import org.exoplatform.management.ManagementAware;
import org.exoplatform.management.ManagementContext;
import org.exoplatform.management.jmx.annotations.NamingContext;
@@ -30,6 +32,7 @@
import javax.management.MBeanRegistration;
import javax.management.MBeanServer;
import javax.management.ObjectName;
+import javax.management.ReflectionException;
import javax.management.RuntimeOperationsException;
import javax.management.modelmbean.InvalidTargetObjectTypeException;
import javax.management.modelmbean.ModelMBeanInfo;
@@ -68,6 +71,28 @@
}
@Override
+ public Object invoke(String opName, Object[] opArgs, String[] sig) throws MBeanException, ReflectionException
+ {
+ final ExoContainer container = context.findContainer();
+ if (container != null)
+ {
+ RequestLifeCycle.begin(container);
+ try
+ {
+ return super.invoke(opName, opArgs, sig);
+ }
+ finally
+ {
+ RequestLifeCycle.end();
+ }
+ }
+ else
+ {
+ return super.invoke(opName, opArgs, sig);
+ }
+ }
+
+ @Override
public ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception
{
name = super.preRegister(server, name);
@@ -148,6 +173,12 @@
//
+
+ public ManagementContext getManagementContext()
+ {
+ return context;
+ }
+
public Object getManagedResource()
{
return mr;
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/jmx/ManageableContainer.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/jmx/ManageableContainer.java 2009-12-15 17:38:27 UTC (rev 1074)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/jmx/ManageableContainer.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -19,6 +19,7 @@
package org.exoplatform.container.jmx;
import org.exoplatform.container.CachingContainer;
+import org.exoplatform.management.ManagementContext;
import org.picocontainer.ComponentAdapter;
import org.picocontainer.PicoContainer;
import org.picocontainer.PicoRegistrationException;
@@ -54,6 +55,7 @@
{
super(getComponentAdapterFactory(new MX4JComponentAdapterFactory()));
this.managementContext = managementContext;
+ managementContext.container = this;
init(null);
}
@@ -97,10 +99,16 @@
if (parentManagementContext != null)
{
managementContext = new ManagementContextImpl(parentManagementContext, new HashMap<String, String>());
+ managementContext.container = this;
}
}
}
+ public ManagementContext getManagementContext()
+ {
+ return managementContext;
+ }
+
public final MBeanServer getMBeanServer()
{
return managementContext != null ? managementContext.server : null;
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/jmx/ManagementContextImpl.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/jmx/ManagementContextImpl.java 2009-12-15 17:38:27 UTC (rev 1074)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/jmx/ManagementContextImpl.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -18,6 +18,7 @@
*/
package org.exoplatform.container.jmx;
+import org.exoplatform.container.ExoContainer;
import org.exoplatform.management.ManagementContext;
import org.exoplatform.management.annotations.ManagedBy;
import org.exoplatform.management.jmx.annotations.NameTemplate;
@@ -32,6 +33,7 @@
import javax.management.InstanceNotFoundException;
import javax.management.MBeanRegistrationException;
import javax.management.MBeanServer;
+import javax.management.MBeanServerFactory;
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
import javax.management.modelmbean.ModelMBeanInfo;
@@ -55,8 +57,20 @@
/** . */
final MBeanServer server;
+ /** An optional container setup when the management context is attached to a container. */
+ ManageableContainer container;
+
+ public ManagementContextImpl()
+ {
+ this(MBeanServerFactory.createMBeanServer(), new HashMap<String, String>());
+ }
+
public ManagementContextImpl(MBeanServer server, Map<String, String> scopingProperties)
{
+ if (server == null)
+ {
+ throw new NullPointerException();
+ }
this.registrations = new HashMap<Object, ObjectName>();
this.parent = null;
this.scopingProperties = scopingProperties;
@@ -65,12 +79,21 @@
public ManagementContextImpl(ManagementContextImpl parent, Map<String, String> scopingProperties)
{
+ if (parent == null)
+ {
+ throw new NullPointerException();
+ }
this.registrations = new HashMap<Object, ObjectName>();
this.parent = parent;
this.scopingProperties = scopingProperties;
this.server = parent.server;
}
+ public ManagementContext getParent()
+ {
+ return parent;
+ }
+
public void register(Object o)
{
ObjectName name = manageMBean(o);
@@ -254,4 +277,25 @@
}
}
}
+
+ public ExoContainer findContainer()
+ {
+ for (ManagementContextImpl current = this;true;current = current.parent)
+ {
+ if (current.container instanceof ExoContainer)
+ {
+ return (ExoContainer)current.container;
+ }
+ else if (current.parent == null)
+ {
+ return null;
+ }
+ }
+ }
+
+ @Override
+ public String toString()
+ {
+ return "ManagementContextImpl[container=" + container + "]";
+ }
}
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/monitor/jvm/J2EEServerInfo.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/monitor/jvm/J2EEServerInfo.java 2009-12-15 17:38:27 UTC (rev 1074)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/monitor/jvm/J2EEServerInfo.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -187,4 +187,9 @@
{
return appDeployDirecotry_;
}
+
+ public boolean isJBoss()
+ {
+ return "jboss".equals(serverName_);
+ }
}
Deleted: kernel/trunk/exo.kernel.container/src/main/resources/configuration-bad-schema.xml
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/resources/configuration-bad-schema.xml 2009-12-15 17:38:27 UTC (rev 1074)
+++ kernel/trunk/exo.kernel.container/src/main/resources/configuration-bad-schema.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-
- 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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
-
- <foo/>
-
- <container-lifecycle-plugin>
- <type>component.type</type>
- <init-params>
- <value-param>
- <name>name</name>
- <description>description</description>
- <value>a value</value>
- </value-param>
- </init-params>
- </container-lifecycle-plugin>
-
-</configuration>
Deleted: kernel/trunk/exo.kernel.container/src/main/resources/configuration-no-schema.xml
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/resources/configuration-no-schema.xml 2009-12-15 17:38:27 UTC (rev 1074)
+++ kernel/trunk/exo.kernel.container/src/main/resources/configuration-no-schema.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-
- 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>
-
- <container-lifecycle-plugin>
- <type>component.type</type>
- <init-params>
- <value-param>
- <name>name</name>
- <description>description</description>
- <value>a value</value>
- </value-param>
- </init-params>
- </container-lifecycle-plugin>
-
-</configuration>
Deleted: kernel/trunk/exo.kernel.container/src/main/resources/configuration.xml
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/resources/configuration.xml 2009-12-15 17:38:27 UTC (rev 1074)
+++ kernel/trunk/exo.kernel.container/src/main/resources/configuration.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-
- 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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
-
- <container-lifecycle-plugin>
- <type>component.type</type>
- <init-params>
- <value-param>
- <name>name</name>
- <description>description</description>
- <value>a value</value>
- </value-param>
- </init-params>
- </container-lifecycle-plugin>
-
- <component-lifecycle-plugin>
- <type>component.type</type>
- <manageable-components>
- <component-type>component.type</component-type>
- <component-type>component.type</component-type>
- <component-type>component.type</component-type>
- </manageable-components>
- <init-params>
- <value-param>
- <name>name</name>
- <description>description</description>
- <value>a value</value>
- </value-param>
- </init-params>
- </component-lifecycle-plugin>
-
- <component>
- <key>org.exoplatform.services.templates.velocity.VelocityService</key>
- <type>org.exoplatform.services.templates.velocity.impl.VelocityServiceImpl</type>
- <component-plugins>
- <component-plugin>
- <name>name plugin 1</name>
- <set-method>class.type</set-method>
- <type>class.type</type>
- <description>description</description>
- <init-params>
- <value-param>
- <name>name</name>
- <description>description</description>
- <value>a value</value>
- </value-param>
- </init-params>
- </component-plugin>
- </component-plugins>
-
- <init-params>
- <value-param>
- <name>name</name>
- <description>description</description>
- <value>a value</value>
- </value-param>
- </init-params>
- </component>
-
- <import>1</import>
- <import>2</import>
- <remove-configuration>1</remove-configuration>
- <remove-configuration>2</remove-configuration>
-</configuration>
Deleted: kernel/trunk/exo.kernel.container/src/main/resources/object.xml
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/resources/object.xml 2009-12-15 17:38:27 UTC (rev 1074)
+++ kernel/trunk/exo.kernel.container/src/main/resources/object.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,50 +0,0 @@
-<!--
-
- 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.
-
--->
-<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 version="1.0" 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>
Copied: kernel/trunk/exo.kernel.container/src/main/resources/org/exoplatform/container/configuration/kernel-configuration_1_1.xsd (from rev 1059, kernel/branches/config-branch/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 (rev 0)
+++ kernel/trunk/exo.kernel.container/src/main/resources/org/exoplatform/container/configuration/kernel-configuration_1_1.xsd 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,236 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema
+ targetNamespace="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ version="1.0">
+
+ <xsd:element name="configuration" type="configurationType"/>
+
+ <xsd:complexType abstract="true" name="profilesdElementType">
+ <xsd:attribute name="profiles" type="xsd:string"/>
+ </xsd:complexType>
+
+ <xsd:complexType abstract="true" name="baseObjectType">
+ <xsd:choice>
+ <xsd:element name="string" type="xsd:string"/>
+ <xsd:element name="int" type="xsd:int"/>
+ <xsd:element name="long" type="xsd:long"/>
+ <xsd:element name="boolean" type="xsd:boolean"/>
+ <xsd:element name="date" type="xsd:date"/>
+ <xsd:element name="double" type="xsd:double"/>
+ <xsd:element name="map" type="mapType"/>
+ <xsd:element name="collection" type="collectionType"/>
+ <xsd:element name="native-array" type="nativeArraytype"/>
+ <xsd:element name="object" type="objectType"/>
+ </xsd:choice>
+ </xsd:complexType>
+
+ <xsd:complexType name="entryType">
+ <xsd:sequence>
+ <xsd:element name="key" type="baseObjectType" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="value" type="baseObjectType" minOccurs="1" maxOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <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:complexType>
+
+ <xsd:complexType name="collectionType">
+ <xsd:sequence>
+ <xsd:element name="value" minOccurs="0" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="baseObjectType">
+ <xsd:attribute name="profiles" type="xsd:string"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="type" type="xsd:string"/>
+ <xsd:attribute name="item-type" type="xsd:string"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="nativeArraytype">
+ <xsd:complexContent>
+ <xsd:extension base="baseObjectType">
+ <xsd:sequence>
+ <xsd:element name="type" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="array" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="fieldType">
+ <xsd:complexContent >
+ <xsd:extension base="baseObjectType">
+ <xsd:attribute name="name" type="xsd:string"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="objectType">
+ <xsd:sequence>
+ <xsd:element name="field" minOccurs="0" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="fieldType">
+ <xsd:attribute name="profiles" type="xsd:string"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="type" type="xsd:string"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="propertyType">
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="value" type="xsd:string"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="paramType" abstract="true">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+ </xsd:sequence>
+ <xsd:attribute name="profiles" type="xsd:string"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="valueParamType">
+ <xsd:complexContent>
+ <xsd:extension base="paramType">
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="valuesParamType">
+ <xsd:complexContent>
+ <xsd:extension base="paramType">
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="propertiesParamType">
+ <xsd:complexContent>
+ <xsd:extension base="paramType">
+ <xsd:sequence>
+ <xsd:element name="property" type="propertyType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="objectParamType">
+ <xsd:complexContent>
+ <xsd:extension base="paramType">
+ <xsd:sequence>
+ <xsd:element name="object" type="objectType" minOccurs="1" maxOccurs="1"/>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </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:complexType>
+
+ <xsd:complexType name="componentPluginType">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="set-method" type="xsd:string" minOccurs="1" 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="priority" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+ <xsd:element name="init-params" type="initParamsType" minOccurs="0" maxOccurs="1"/>
+ </xsd:sequence>
+ <xsd:attribute name="profiles" type="xsd:string"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="externalComponentPluginType">
+ <xsd:sequence>
+ <xsd:element name="target-component" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="component-plugin" type="componentPluginType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="containerLifecyclePluginType">
+ <xsd:sequence>
+ <xsd:element name="type" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="init-params" type="initParamsType" minOccurs="0" maxOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="manageableComponentsType">
+ <xsd:sequence>
+ <xsd:element name="component-type" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="componentLifecyclePluginType">
+ <xsd:sequence>
+ <xsd:element name="type" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="manageable-components" type="manageableComponentsType" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="init-params" type="initParamsType" minOccurs="0" maxOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="componentType">
+ <xsd:sequence>
+ <xsd:element name="key" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+ <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="component-plugins" minOccurs="0" maxOccurs="1">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="component-plugin" type="componentPluginType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="init-params" type="initParamsType" minOccurs="0" maxOccurs="1"/>
+ </xsd:sequence>
+ <xsd:attribute name="profiles" type="xsd:string"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="configurationType">
+ <xsd:sequence>
+ <xsd:element name="container-lifecycle-plugin" type="containerLifecyclePluginType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="component-lifecycle-plugin" type="componentLifecyclePluginType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="component" type="componentType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="external-component-plugins" type="externalComponentPluginType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="import" type="importType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="remove-configuration" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="importType">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="profiles" type="xsd:string"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+</xsd:schema>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/ComponentWithRequestLifeCycle.java (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/ComponentWithRequestLifeCycle.java)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/ComponentWithRequestLifeCycle.java (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/ComponentWithRequestLifeCycle.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2003-2007 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.container;
+
+import junit.framework.Assert;
+import org.exoplatform.container.component.ComponentRequestLifecycle;
+import org.picocontainer.Startable;
+
+import java.util.LinkedList;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class ComponentWithRequestLifeCycle implements ComponentRequestLifecycle, Startable
+{
+
+ /** . */
+ private final LinkedList<LifeCycle> lifeCycles = new LinkedList<LifeCycle>();
+
+ public void startRequest(ExoContainer container)
+ {
+ lifeCycles.addLast(new LifeCycle(true, container));
+ }
+
+ public void endRequest(ExoContainer container)
+ {
+ lifeCycles.addLast(new LifeCycle(false, container));
+ }
+
+ public void start()
+ {
+ }
+
+ public void stop()
+ {
+ }
+
+ public void assertLifeCycle(boolean start, ExoContainer container)
+ {
+ Assert.assertTrue(!lifeCycles.isEmpty());
+ LifeCycle lf = lifeCycles.removeFirst();
+ Assert.assertEquals(start, lf.getStart());
+ Assert.assertSame(container, lf.getContainer());
+ }
+
+ public void assertEmpty()
+ {
+ Assert.assertTrue(lifeCycles.isEmpty());
+ }
+}
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/LifeCycle.java (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/LifeCycle.java)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/LifeCycle.java (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/LifeCycle.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2003-2007 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.container;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class LifeCycle
+{
+
+ /** . */
+ private boolean start;
+
+ /** . */
+ private ExoContainer container;
+
+ public LifeCycle(boolean start, ExoContainer container)
+ {
+ this.start = start;
+ this.container = container;
+ }
+
+ public boolean getStart()
+ {
+ return start;
+ }
+
+ public ExoContainer getContainer()
+ {
+ return container;
+ }
+}
Copied: kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/RootContainerBootstrap.java (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/RootContainerBootstrap.java)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/RootContainerBootstrap.java (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/RootContainerBootstrap.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2003-2007 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.container;
+
+import org.exoplatform.container.configuration.ConfigurationManager;
+import org.exoplatform.container.configuration.ConfigurationManagerImpl;
+
+import java.net.URL;
+import java.util.Arrays;
+import java.util.HashSet;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class RootContainerBootstrap
+{
+
+ public static RootContainer bootstrap(URL configurationURL, String... profiles)
+ {
+ try
+ {
+ RootContainer container = new RootContainer();
+ ConfigurationManager manager = new ConfigurationManagerImpl(new HashSet<String>(Arrays.asList(profiles)));
+ manager.addConfiguration(configurationURL);
+ container.registerComponentInstance(ConfigurationManager.class, manager);
+ container.initContainer();
+ container.start();
+ return container;
+ }
+ catch (Exception e)
+ {
+ AssertionError err = new AssertionError("Could not start root container");
+ err.initCause(e);
+ throw err;
+ }
+ }
+}
Copied: kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/TestPropertyManagerConfigurator.java (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/TestPropertyManagerConfigurator.java)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/TestPropertyManagerConfigurator.java (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/TestPropertyManagerConfigurator.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,165 @@
+/*
+ * Copyright (C) 2003-2007 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.container;
+
+import junit.framework.TestCase;
+import org.exoplatform.commons.utils.PropertyManager;
+import org.exoplatform.commons.utils.Tools;
+import org.exoplatform.container.configuration.ConfigurationManagerImpl;
+import org.exoplatform.container.support.ContainerBuilder;
+import org.exoplatform.container.xml.InitParams;
+import org.exoplatform.container.xml.PropertiesParam;
+import org.exoplatform.container.xml.ValueParam;
+
+import java.net.URL;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class TestPropertyManagerConfigurator extends TestCase
+{
+ /** . */
+ private Map<String, String> previous;
+
+ private Map<String, String> reset()
+ {
+ Map<String, String> current = Tools.asMap(System.getProperties());
+ Map<String, String> additions = new HashMap<String, String>();
+ if (previous != null)
+ {
+ for (Map.Entry<String, String> entry : current.entrySet())
+ {
+ String propertyName = entry.getKey();
+ String propertyValue = entry.getValue();
+ if (!previous.containsKey(propertyName))
+ {
+ additions.put(propertyName, propertyValue);
+ }
+ }
+ System.setProperties(Tools.asProperties(previous));
+ }
+ previous = current;
+ return additions;
+ }
+
+ public void testSimple()
+ {
+ reset();
+ PropertiesParam propertiesParam = new PropertiesParam();
+ propertiesParam.setProperty("property_1", "property_value_1");
+ InitParams params = new InitParams();
+ params.put("properties", propertiesParam);
+ new PropertyConfigurator(params, new ConfigurationManagerImpl(new HashSet<String>()));
+ Map<String, String> additions = reset();
+ assertEquals(Collections.singletonMap("property_1", "property_value_1"), additions);
+ }
+
+ public void testFromConfig() throws Exception
+ {
+ reset();
+ System.setProperty("property_2", "property_value_2");
+ URL url = TestPropertyManagerConfigurator.class.getResource("property-configurator-configuration.xml");
+ assertNotNull(url);
+ ContainerBuilder.bootstrap(url);
+ Map<String, String> additions = reset();
+ assertEquals("property_value_1", additions.get("property_1"));
+ assertEquals("property_value_2", additions.get("property_2"));
+ assertEquals("${property_3}", additions.get("property_3"));
+ }
+
+ public void testFromConfigWithProfile() throws Exception
+ {
+ reset();
+ URL url = TestPropertyManagerConfigurator.class.getResource("property-configurator-with-profile-configuration.xml");
+ assertNotNull(url);
+ ContainerBuilder.bootstrap(url, "foo");
+ Map<String, String> additions = reset();
+ assertEquals("property_value_1_foo", additions.get("property_1"));
+ }
+
+ public void testFromConfigByParam() throws Exception
+ {
+ reset();
+ URL propertiesURL = TestPropertyManagerConfigurator.class.getResource("property-configurator.properties");
+ assertNotNull(propertiesURL);
+ System.setProperty("properties.url", propertiesURL.toString());
+ System.setProperty("property_2", "property_value_2");
+ URL url = TestPropertyManagerConfigurator.class.getResource("property-configurator-with-path-configuration.xml");
+ ContainerBuilder.bootstrap(url);
+ Map<String, String> additions = reset();
+ assertEquals("property_value_1", additions.get("property_1"));
+ assertEquals("property_value_2", additions.get("property_2"));
+ assertEquals("${property_3}", additions.get("property_3"));
+ }
+
+ public void testFromPropertiesByParam() throws Exception
+ {
+ reset();
+ URL propertiesURL = TestPropertyManagerConfigurator.class.getResource("property-configurator.properties");
+ assertNotNull(propertiesURL);
+ System.setProperty("property_2", "property_value_2");
+ ValueParam propertiesPathParam = new ValueParam();
+ propertiesPathParam.setName("properties.url");
+ propertiesPathParam.setValue(propertiesURL.toString());
+ InitParams params = new InitParams();
+ params.put("properties.url", propertiesPathParam);
+ new PropertyConfigurator(params, new ConfigurationManagerImpl(new HashSet<String>()));
+ Map<String, String> additions = reset();
+ assertEquals("property_value_1", additions.get("property_1"));
+ assertEquals("property_value_2", additions.get("property_2"));
+ assertEquals("${property_3}", additions.get("property_3"));
+ }
+
+ public void testFromProperties() throws Exception
+ {
+ reset();
+ URL propertiesURL = TestPropertyManagerConfigurator.class.getResource("property-configurator.properties");
+ assertNotNull(propertiesURL);
+ System.setProperty(PropertyManager.PROPERTIES_URL, propertiesURL.toString());
+ System.setProperty("property_2", "property_value_2");
+ PropertiesParam propertiesParam = new PropertiesParam();
+ InitParams params = new InitParams();
+ params.put("properties", propertiesParam);
+ new PropertyConfigurator(params, new ConfigurationManagerImpl(new HashSet<String>()));
+ Map<String, String> additions = reset();
+ assertEquals("property_value_1", additions.get("property_1"));
+ assertEquals("property_value_2", additions.get("property_2"));
+ assertEquals("${property_3}", additions.get("property_3"));
+ }
+
+ public void testFromXML() throws Exception
+ {
+ reset();
+ URL propertiesURL = TestPropertyManagerConfigurator.class.getResource("property-configurator.xml");
+ assertNotNull(propertiesURL);
+ System.setProperty(PropertyManager.PROPERTIES_URL, propertiesURL.toString());
+ System.setProperty("property_2", "property_value_2");
+ PropertiesParam propertiesParam = new PropertiesParam();
+ InitParams params = new InitParams();
+ params.put("properties", propertiesParam);
+ new PropertyConfigurator(params, new ConfigurationManagerImpl(new HashSet<String>()));
+ Map<String, String> additions = reset();
+ assertEquals("property_value_1", additions.get("property_1"));
+ assertEquals("property_value_2", additions.get("property_2"));
+ assertEquals("${property_3}", additions.get("property_3"));
+ }
+}
Copied: kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/TestRequestLifeCycle.java (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/TestRequestLifeCycle.java)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/TestRequestLifeCycle.java (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/TestRequestLifeCycle.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,235 @@
+/*
+ * Copyright (C) 2003-2007 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.container;
+
+import org.exoplatform.container.component.RequestLifeCycle;
+import org.exoplatform.container.jmx.AbstractTestContainer;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class TestRequestLifeCycle extends AbstractTestContainer
+{
+
+ /** . */
+ private ExoContainer parent;
+
+ /** . */
+ private ExoContainer child;
+
+ /** . */
+ private ComponentWithRequestLifeCycle a;
+
+ /** . */
+ private ComponentWithRequestLifeCycle b;
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ RootContainer parent = createRootContainer("request-lifecycle-configuration.xml");
+ ExoContainer child = new ExoContainer(parent);
+ ComponentWithRequestLifeCycle a = (ComponentWithRequestLifeCycle)parent.getComponentInstance("A");
+ assertNotNull(a);
+ child.registerComponentInstance("B", new ComponentWithRequestLifeCycle());
+ ComponentWithRequestLifeCycle b = (ComponentWithRequestLifeCycle)child.getComponentInstance("B");
+
+ //
+ this.parent = parent;
+ this.child = child;
+ this.a = a;
+ this.b = b;
+ }
+
+ public void testObject()
+ {
+ RequestLifeCycle.begin(a);
+ a.assertLifeCycle(true, null);
+ b.assertEmpty();
+ RequestLifeCycle.end();
+ a.assertLifeCycle(false, null);
+ b.assertEmpty();
+ }
+
+ public void testContainerObject()
+ {
+ RequestLifeCycle.begin(parent, false);
+ a.assertLifeCycle(true, parent);
+ b.assertEmpty();
+ RequestLifeCycle.begin(a);
+ a.assertEmpty();
+ b.assertEmpty();
+ RequestLifeCycle.end();
+ a.assertEmpty();
+ b.assertEmpty();
+ RequestLifeCycle.end();
+ a.assertLifeCycle(false, parent);
+ b.assertEmpty();
+ }
+
+ public void testObjectContainer()
+ {
+ RequestLifeCycle.begin(a);
+ a.assertLifeCycle(true, null);
+ b.assertEmpty();
+ RequestLifeCycle.begin(parent, false);
+ a.assertEmpty();
+ b.assertEmpty();
+ RequestLifeCycle.end();
+ a.assertEmpty();
+ b.assertEmpty();
+ RequestLifeCycle.end();
+ a.assertLifeCycle(false, null);
+ b.assertEmpty();
+ }
+
+ public void testParent()
+ {
+ RequestLifeCycle.begin(parent, false);
+ a.assertLifeCycle(true, parent);
+ b.assertEmpty();
+ RequestLifeCycle.end();
+ a.assertLifeCycle(false, parent);
+ b.assertEmpty();
+ }
+
+ public void testLocalParent()
+ {
+ RequestLifeCycle.begin(parent, true);
+ a.assertLifeCycle(true, parent);
+ b.assertEmpty();
+ RequestLifeCycle.end();
+ a.assertLifeCycle(false, parent);
+ b.assertEmpty();
+ }
+
+ public void testChild()
+ {
+ RequestLifeCycle.begin(child, false);
+ a.assertLifeCycle(true, child);
+ b.assertLifeCycle(true, child);
+ RequestLifeCycle.end();
+ a.assertLifeCycle(false, child);
+ b.assertLifeCycle(false, child);
+ }
+
+ public void testLocalChild()
+ {
+ RequestLifeCycle.begin(child, true);
+ a.assertEmpty();
+ b.assertLifeCycle(true, child);
+ RequestLifeCycle.end();
+ a.assertEmpty();
+ b.assertLifeCycle(false, child);
+ }
+
+ public void testParentParent()
+ {
+ RequestLifeCycle.begin(parent, false);
+ a.assertLifeCycle(true, parent);
+ b.assertEmpty();
+ RequestLifeCycle.begin(parent, false);
+ a.assertEmpty();
+ b.assertEmpty();
+ RequestLifeCycle.end();
+ a.assertEmpty();
+ b.assertEmpty();
+ RequestLifeCycle.end();
+ a.assertLifeCycle(false, parent);
+ b.assertEmpty();
+ }
+
+ public void testChildChild()
+ {
+ RequestLifeCycle.begin(child, false);
+ a.assertLifeCycle(true, child);
+ b.assertLifeCycle(true, child);
+ RequestLifeCycle.begin(child, false);
+ a.assertEmpty();
+ b.assertEmpty();
+ RequestLifeCycle.end();
+ a.assertEmpty();
+ b.assertEmpty();
+ RequestLifeCycle.end();
+ a.assertLifeCycle(false, child);
+ b.assertLifeCycle(false, child);
+ }
+
+ public void testChildParent()
+ {
+ RequestLifeCycle.begin(child, false);
+ a.assertLifeCycle(true, child);
+ b.assertLifeCycle(true, child);
+ RequestLifeCycle.begin(parent, false);
+ a.assertEmpty();
+ b.assertEmpty();
+ RequestLifeCycle.end();
+ a.assertEmpty();
+ b.assertEmpty();
+ RequestLifeCycle.end();
+ a.assertLifeCycle(false, child);
+ b.assertLifeCycle(false, child);
+ }
+
+ public void testLocalChildParent()
+ {
+ RequestLifeCycle.begin(child, true);
+ a.assertEmpty();
+ b.assertLifeCycle(true, child);
+ RequestLifeCycle.begin(parent, true);
+ a.assertLifeCycle(true, parent);
+ b.assertEmpty();
+ RequestLifeCycle.end();
+ a.assertLifeCycle(false, parent);
+ b.assertEmpty();
+ RequestLifeCycle.end();
+ a.assertEmpty();
+ b.assertLifeCycle(false, child);
+ }
+
+ public void testParentChild()
+ {
+ RequestLifeCycle.begin(parent, false);
+ a.assertLifeCycle(true, parent);
+ b.assertEmpty();
+ RequestLifeCycle.begin(child, false);
+ a.assertEmpty();
+ b.assertLifeCycle(true, child);
+ RequestLifeCycle.end();
+ a.assertEmpty();
+ b.assertLifeCycle(false, child);
+ RequestLifeCycle.end();
+ a.assertLifeCycle(false, parent);
+ b.assertEmpty();
+ }
+
+ public void testLocalParentChild()
+ {
+ RequestLifeCycle.begin(parent, true);
+ a.assertLifeCycle(true, parent);
+ b.assertEmpty();
+ RequestLifeCycle.begin(child, true);
+ a.assertEmpty();
+ b.assertLifeCycle(true, child);
+ RequestLifeCycle.end();
+ a.assertEmpty();
+ b.assertLifeCycle(false, child);
+ RequestLifeCycle.end();
+ a.assertLifeCycle(false, parent);
+ b.assertEmpty();
+ }
+}
Copied: kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/AbstractProfileTest.java (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/AbstractProfileTest.java)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/AbstractProfileTest.java (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/AbstractProfileTest.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2003-2007 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.container.configuration;
+
+import junit.framework.TestCase;
+import org.exoplatform.commons.utils.Tools;
+import org.exoplatform.container.RootContainer;
+import org.exoplatform.container.support.ContainerBuilder;
+import org.exoplatform.container.xml.Configuration;
+
+import java.io.File;
+import java.net.URL;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public abstract class AbstractProfileTest extends TestCase
+{
+ protected final Configuration getConfiguration(String configName, String... profiles) throws Exception
+ {
+ String basedir = System.getProperty("basedir");
+ File f = new File(basedir + "/src/test/resources/org/exoplatform/container/configuration/" + configName);
+ ConfigurationUnmarshaller unmarshaller = new ConfigurationUnmarshaller(Tools.<String>set(profiles));
+ URL url = f.toURI().toURL();
+ return unmarshaller.unmarshall(url);
+ }
+
+ protected final RootContainer getKernel(String configName, String... profiles) throws Exception
+ {
+ String basedir = System.getProperty("basedir");
+ File f = new File(basedir + "/src/test/resources/org/exoplatform/container/configuration/" + configName);
+ return ContainerBuilder.bootstrap(f.toURI().toURL(), profiles);
+ }
+}
Copied: kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/ConfigParam.java (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/ConfigParam.java)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/ConfigParam.java (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/ConfigParam.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,89 @@
+/*
+ * 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.
+ */
+package org.exoplatform.container.configuration;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Tuan Nguyen (tuan08(a)users.sourceforge.net)
+ * @since Oct 27, 2004
+ * @version $Id: ConfigParam.java 5799 2006-05-28 17:55:42Z geaz $
+ */
+public class ConfigParam
+{
+ private List role;
+
+ private List group;
+
+ private List ignoredUser;
+
+ public ConfigParam()
+ {
+ role = new ArrayList(3);
+ group = new ArrayList(3);
+ ignoredUser = new ArrayList(5);
+ }
+
+ public List getRole()
+ {
+ return role;
+ }
+
+ public List getGroup()
+ {
+ return group;
+ }
+
+ public List getIgnoredUser()
+ {
+ return ignoredUser;
+ }
+
+ static public class Group
+ {
+ public String name;
+
+ public String membership;
+
+ public Group()
+ {
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String s)
+ {
+ name = s;
+ }
+
+ public String getMembership()
+ {
+ return membership;
+ }
+
+ public void setMembership(String s)
+ {
+ membership = s;
+ }
+ }
+}
Copied: kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/InitParamsHolder.java (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/InitParamsHolder.java)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/InitParamsHolder.java (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/InitParamsHolder.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2003-2007 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.container.configuration;
+
+import org.exoplatform.container.xml.InitParams;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class InitParamsHolder
+{
+
+ /** . */
+ private InitParams params;
+
+ public InitParamsHolder(InitParams params)
+ {
+ this.params = params;
+ }
+
+ public InitParams getParams()
+ {
+ return params;
+ }
+}
Copied: kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestCollectionValue.java (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestCollectionValue.java)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestCollectionValue.java (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestCollectionValue.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,113 @@
+/*
+ * Copyright (C) 2003-2007 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.container.configuration;
+
+import org.exoplatform.container.RootContainer;
+import org.exoplatform.container.xml.Component;
+import org.exoplatform.container.xml.Configuration;
+import org.exoplatform.container.xml.InitParams;
+import org.exoplatform.container.xml.ObjectParam;
+import org.exoplatform.container.xml.ObjectParameter;
+import org.exoplatform.xml.object.XMLCollection;
+import org.exoplatform.xml.object.XMLField;
+import org.exoplatform.xml.object.XMLObject;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class TestCollectionValue extends AbstractProfileTest
+{
+
+ public void testNoProfile() throws Exception
+ {
+ XMLCollection xc = getConfiguredCollection();
+ Collection coll = xc.getCollection();
+ assertEquals(1, coll.size());
+ }
+
+ public void testNoProfileKernel() throws Exception
+ {
+ List l = getCollection();
+ assertEquals(Arrays.asList("manager"), l);
+ }
+
+ public void testFooProfile() throws Exception
+ {
+ XMLCollection xc = getConfiguredCollection("foo");
+ Collection coll = xc.getCollection();
+ assertEquals(3, coll.size());
+ }
+
+ public void testFooProfileKernel() throws Exception
+ {
+ List l = getCollection("foo");
+ assertEquals(Arrays.asList("manager", "foo_manager", "foo_bar_manager"), l);
+ }
+
+ public void testBarProfile() throws Exception
+ {
+ XMLCollection xc = getConfiguredCollection("bar");
+ Collection coll = xc.getCollection();
+ assertEquals(2, coll.size());
+ }
+
+ public void testBarProfileKernel() throws Exception
+ {
+ List l = getCollection("bar");
+ assertEquals(Arrays.asList("manager", "foo_bar_manager"), l);
+ }
+
+ public void testFooBarProfile() throws Exception
+ {
+ XMLCollection xc = getConfiguredCollection("foo", "bar");
+ Collection coll = xc.getCollection();
+ assertEquals(3, coll.size());
+ }
+
+ public void testFooBarProfileKernel() throws Exception
+ {
+ List l = getCollection("foo", "bar");
+ assertEquals(Arrays.asList("manager", "foo_manager", "foo_bar_manager"), l);
+ }
+
+ private XMLCollection getConfiguredCollection(String... profiles)
+ throws Exception
+ {
+ Configuration config = getConfiguration("collection-configuration.xml", profiles);
+ Component a = config.getComponent(InitParamsHolder.class.getName());
+ ObjectParameter op = a.getInitParams().getObjectParam("test.configuration");
+ XMLObject o = op.getXMLObject();
+ XMLField xf = o.getField("role");
+ return xf.getCollection();
+ }
+
+ private List getCollection(String... profiles)
+ throws Exception
+ {
+ RootContainer config = getKernel("collection-configuration.xml", profiles);
+ InitParamsHolder holder = (InitParamsHolder)config.getComponentInstanceOfType(InitParamsHolder.class);
+ InitParams params = holder.getParams();
+ ObjectParameter op = params.getObjectParam("test.configuration");
+ ConfigParam cp = (ConfigParam)op.getObject();
+ return cp.getRole();
+ }
+}
Copied: kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestComponentPluginProfile.java (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestComponentPluginProfile.java)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestComponentPluginProfile.java (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestComponentPluginProfile.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2003-2007 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.container.configuration;
+
+import org.exoplatform.container.xml.Component;
+import org.exoplatform.container.xml.Configuration;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class TestComponentPluginProfile extends AbstractProfileTest
+{
+
+ public void testNoProfile() throws Exception
+ {
+ Configuration config = getConfiguration("component-plugin-configuration.xml");
+ Component component = config.getComponent("Component");
+ assertEquals(1, component.getComponentPlugins().size());
+ }
+
+ public void testFooProfile() throws Exception
+ {
+ Configuration config = getConfiguration("component-plugin-configuration.xml", "foo");
+ Component component = config.getComponent("Component");
+ assertEquals(2, component.getComponentPlugins().size());
+ }
+}
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestComponentProfile.java (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestComponentProfile.java)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestComponentProfile.java (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestComponentProfile.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2003-2007 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.container.configuration;
+
+import org.exoplatform.container.xml.Configuration;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class TestComponentProfile extends AbstractProfileTest
+{
+
+ public void testNoProfile() throws Exception
+ {
+ Configuration config = getConfiguration("component-configuration.xml");
+ assertEquals(0, config.getComponents().size());
+ }
+
+ public void testFooProfile() throws Exception
+ {
+ Configuration config = getConfiguration("component-configuration.xml", "foo");
+ assertEquals(1, config.getComponents().size());
+ }
+
+ public void testFooBarProfiles() throws Exception
+ {
+ Configuration config = getConfiguration("component-configuration.xml", "foo", "bar");
+ assertEquals(1, config.getComponents().size());
+ }
+}
Copied: kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestConfigurationService.java (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestConfigurationService.java)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestConfigurationService.java (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestConfigurationService.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,120 @@
+/*
+ * 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.
+ */
+package org.exoplatform.container.configuration;
+
+import org.exoplatform.container.PortalContainer;
+import org.exoplatform.container.RootContainer;
+import org.exoplatform.container.configuration.ConfigurationManager;
+import org.exoplatform.container.configuration.ConfigurationUnmarshaller;
+import org.exoplatform.container.monitor.jvm.JVMRuntimeInfo;
+import org.exoplatform.container.xml.Configuration;
+import org.exoplatform.container.xml.InitParams;
+import org.exoplatform.container.xml.ObjectParameter;
+import org.exoplatform.test.BasicTestCase;
+import org.jibx.runtime.BindingDirectory;
+import org.jibx.runtime.IBindingFactory;
+import org.jibx.runtime.IMarshallingContext;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.net.URL;
+
+/*
+ * Thu, May 15, 2003 @
+ * @author: Tuan Nguyen
+ * @version: $Id: TestConfigurationService.java 5799 2006-05-28 17:55:42Z geaz $
+ * @since: 0.0
+ * @email: tuan08(a)yahoo.com
+ */
+public class TestConfigurationService extends BasicTestCase
+{
+ private ConfigurationManager service_;
+
+ public TestConfigurationService(String name)
+ {
+ super(name);
+ }
+
+ public void setUp() throws Exception
+ {
+ PortalContainer manager = PortalContainer.getInstance();
+ service_ = (ConfigurationManager)manager.getComponentInstanceOfType(ConfigurationManager.class);
+ }
+
+ public void testXSDBadSchema() throws Exception
+ {
+ String basedir = System.getProperty("basedir");
+ File f = new File(basedir + "/src/test/resources/configuration-bad-schema.xml");
+ ConfigurationUnmarshaller unmarshaller = new ConfigurationUnmarshaller();
+ URL url = f.toURI().toURL();
+ try
+ {
+ unmarshaller.unmarshall(url);
+ fail("JIBX should have failed");
+ }
+ catch (org.jibx.runtime.JiBXException ignore)
+ {
+ // JIBX error is normal
+ }
+ }
+
+ public void testXSDNoSchema() throws Exception
+ {
+ String basedir = System.getProperty("basedir");
+ File f = new File(basedir + "/src/test/resources/configuration-no-schema.xml");
+ ConfigurationUnmarshaller unmarshaller = new ConfigurationUnmarshaller();
+ URL url = f.toURI().toURL();
+ Configuration conf = unmarshaller.unmarshall(url);
+ assertNotNull(conf);
+ }
+
+ public void testMarshallAndUnmarshall() throws Exception
+ {
+ String basedir = System.getProperty("basedir");
+
+ ConfigurationUnmarshaller unmarshaller = new ConfigurationUnmarshaller();
+
+ File f = new File(basedir + "/src/test/resources/configuration.xml");
+
+ Object obj = unmarshaller.unmarshall(f.toURI().toURL());
+ System.out.print(obj);
+
+ IBindingFactory bfact = BindingDirectory.getFactory(Configuration.class);
+ IMarshallingContext mctx = bfact.createMarshallingContext();
+ mctx.setIndent(2);
+ mctx.marshalDocument(obj, "UTF-8", null, new FileOutputStream(basedir + "/target/configuration.xml"));
+ }
+
+ public void testConfigurationService(InitParams params) throws Exception
+ {
+ ObjectParameter objParam = params.getObjectParam("new.user.configuration");
+ objParam.getObject();
+ }
+
+ public void testJVMEnvironment() throws Exception
+ {
+ JVMRuntimeInfo jvm = (JVMRuntimeInfo)RootContainer.getInstance().getComponentInstanceOfType(JVMRuntimeInfo.class);
+ System.out.println(jvm.getSystemPropertiesAsText());
+ }
+
+ protected String getDescription()
+ {
+ return "Test Configuration Service";
+ }
+}
Copied: kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestField.java (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestField.java)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestField.java (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestField.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2003-2007 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.container.configuration;
+
+import org.exoplatform.container.RootContainer;
+import org.exoplatform.container.xml.Component;
+import org.exoplatform.container.xml.Configuration;
+import org.exoplatform.container.xml.InitParams;
+import org.exoplatform.container.xml.ObjectParameter;
+import org.exoplatform.xml.object.XMLCollection;
+import org.exoplatform.xml.object.XMLField;
+import org.exoplatform.xml.object.XMLObject;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class TestField extends AbstractProfileTest
+{
+
+ public void testNoProfile() throws Exception
+ {
+ XMLCollection xc = getConfiguredCollection();
+ assertEquals(Arrays.asList("manager"), xc.getCollection());
+ }
+
+ public void testNoProfileKernel() throws Exception
+ {
+ List l = getCollection();
+ assertEquals(Arrays.asList("manager"), l);
+ }
+
+ public void testFooProfile() throws Exception
+ {
+ XMLCollection xc = getConfiguredCollection("foo");
+ assertEquals(Arrays.asList("foo_manager"), xc.getCollection());
+ }
+
+ public void testFooProfileKernel() throws Exception
+ {
+ List l = getCollection("foo");
+ assertEquals(Arrays.asList("foo_manager"), l);
+ }
+
+ public void testBarProfile() throws Exception
+ {
+ XMLCollection xc = getConfiguredCollection("bar");
+ assertEquals(Arrays.asList("foo_bar_manager"), xc.getCollection());
+ }
+
+ public void testBarProfileKernel() throws Exception
+ {
+ List l = getCollection("bar");
+ assertEquals(Arrays.asList("foo_bar_manager"), l);
+ }
+
+ public void testFooBarProfile() throws Exception
+ {
+ XMLCollection xc = getConfiguredCollection("foo", "bar");
+ assertEquals(Arrays.asList("foo_manager"), xc.getCollection());
+ }
+
+ public void testFooBarProfileKernel() throws Exception
+ {
+ List l = getCollection("foo", "bar");
+ assertEquals(Arrays.asList("foo_manager"), l);
+ }
+
+ private XMLCollection getConfiguredCollection(String... profiles)
+ throws Exception
+ {
+ Configuration config = getConfiguration("field-configuration.xml", profiles);
+ Component a = config.getComponent(InitParamsHolder.class.getName());
+ ObjectParameter op = a.getInitParams().getObjectParam("test.configuration");
+ XMLObject o = op.getXMLObject();
+ XMLField xf = o.getField("role");
+ return xf.getCollection();
+ }
+
+ private List getCollection(String... profiles)
+ throws Exception
+ {
+ RootContainer config = getKernel("field-configuration.xml", profiles);
+ InitParamsHolder holder = (InitParamsHolder)config.getComponentInstanceOfType(InitParamsHolder.class);
+ InitParams params = holder.getParams();
+ ObjectParameter op = params.getObjectParam("test.configuration");
+ ConfigParam cp = (ConfigParam)op.getObject();
+ return cp.getRole();
+ }
+}
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestImportProfile.java (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestImportProfile.java)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestImportProfile.java (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestImportProfile.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2003-2007 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.container.configuration;
+
+import org.exoplatform.container.xml.Configuration;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class TestImportProfile extends AbstractProfileTest
+{
+
+ public void testNoProfile() throws Exception
+ {
+ Configuration config = getConfiguration("import-configuration.xml");
+ assertEquals(1, config.getImports().size());
+ }
+
+ public void testFooProfile() throws Exception
+ {
+ Configuration config = getConfiguration("import-configuration.xml", "foo");
+ assertEquals(2, config.getImports().size());
+ }
+
+ public void testFooBarProfiles() throws Exception
+ {
+ Configuration config = getConfiguration("import-configuration.xml", "foo", "bar");
+ assertEquals(3, config.getImports().size());
+ }
+}
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestInitParamProfile.java (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestInitParamProfile.java)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestInitParamProfile.java (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestInitParamProfile.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2003-2007 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.container.configuration;
+
+import org.exoplatform.container.xml.Component;
+import org.exoplatform.container.xml.Configuration;
+import org.exoplatform.container.xml.InitParams;
+import org.exoplatform.container.xml.ValueParam;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class TestInitParamProfile extends AbstractProfileTest
+{
+
+ public void testNoProfile() throws Exception
+ {
+ Configuration config = getConfiguration("init-param-configuration.xml");
+ Component component = config.getComponent("Component");
+ InitParams initParams = component.getInitParams();
+ ValueParam valueParam = initParams.getValueParam("param");
+ assertEquals("empty", valueParam.getValue());
+ }
+
+ public void testFooProfile() throws Exception
+ {
+ Configuration config = getConfiguration("init-param-configuration.xml", "foo");
+ Component component = config.getComponent("Component");
+ InitParams initParams = component.getInitParams();
+ ValueParam valueParam = initParams.getValueParam("param");
+ assertEquals("foo", valueParam.getValue());
+ }
+
+ public void testFooBarProfiles() throws Exception
+ {
+ Configuration config = getConfiguration("init-param-configuration.xml", "foo", "bar");
+ Component component = config.getComponent("Component");
+ InitParams initParams = component.getInitParams();
+ ValueParam valueParam = initParams.getValueParam("param");
+ assertEquals("bar", valueParam.getValue());
+ }
+}
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestXSD_1_0.java (from rev 1059, kernel/branches/config-branch/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 (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestXSD_1_0.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,63 @@
+/*
+ * 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.
+ */
+package org.exoplatform.container.configuration;
+
+import org.exoplatform.container.configuration.ConfigurationUnmarshaller;
+import org.exoplatform.test.BasicTestCase;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class TestXSD_1_0 extends BasicTestCase
+{
+
+ public void testValidation() throws Exception
+ {
+ ConfigurationUnmarshaller unmarshaller = new ConfigurationUnmarshaller();
+ String baseDirPath = System.getProperty("basedir");
+ File baseDir = new File(baseDirPath + "/src/test/resources/xsd_1_0");
+ int count = 0;
+ for (File f : baseDir.listFiles(new FileFilter()
+ {
+ public boolean accept(File pathname)
+ {
+ return pathname.getName().endsWith(".xml");
+ }
+ }))
+ {
+ count++;
+ try
+ {
+ URL url = f.toURI().toURL();
+ assertTrue("XML configuration file " + url + " is not valid", unmarshaller.isValid(url));
+ }
+ catch (MalformedURLException e)
+ {
+ fail("Was not expecting such exception " + e.getMessage());
+ }
+ }
+ assertEquals(16, count);
+ }
+}
Copied: kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestXSD_1_1.java (from rev 1059, kernel/branches/config-branch/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 (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/TestXSD_1_1.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,63 @@
+/*
+ * 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.
+ */
+package org.exoplatform.container.configuration;
+
+import org.exoplatform.container.configuration.ConfigurationUnmarshaller;
+import org.exoplatform.test.BasicTestCase;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class TestXSD_1_1 extends BasicTestCase
+{
+
+ public void testValidation() throws Exception
+ {
+ ConfigurationUnmarshaller unmarshaller = new ConfigurationUnmarshaller();
+ String baseDirPath = System.getProperty("basedir");
+ File baseDir = new File(baseDirPath + "/src/test/resources/xsd_1_1");
+ int count = 0;
+ for (File f : baseDir.listFiles(new FileFilter()
+ {
+ public boolean accept(File pathname)
+ {
+ return pathname.getName().endsWith(".xml");
+ }
+ }))
+ {
+ count++;
+ try
+ {
+ URL url = f.toURI().toURL();
+ assertTrue("XML configuration file " + url + " is not valid", unmarshaller.isValid(url));
+ }
+ catch (MalformedURLException e)
+ {
+ fail("Was not expecting such exception " + e.getMessage());
+ }
+ }
+ assertEquals(17, count);
+ }
+}
\ No newline at end of file
Modified: kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/AbstractTestContainer.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/AbstractTestContainer.java 2009-12-15 17:38:27 UTC (rev 1074)
+++ kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/AbstractTestContainer.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -21,8 +21,7 @@
import junit.framework.TestCase;
import org.exoplatform.container.RootContainer;
-import org.exoplatform.container.configuration.ConfigurationManager;
-import org.exoplatform.container.configuration.ConfigurationManagerImpl;
+import org.exoplatform.container.support.ContainerBuilder;
import java.net.URL;
@@ -32,27 +31,10 @@
*/
public class AbstractTestContainer extends TestCase
{
-
public RootContainer createRootContainer(String relativeConfigurationFile)
{
- try
- {
- RootContainer container = new RootContainer();
- ConfigurationManager manager = new ConfigurationManagerImpl();
- URL url = AbstractTestContainer.class.getResource(relativeConfigurationFile);
- assertNotNull(url);
- manager.addConfiguration(url);
- container.registerComponentInstance(ConfigurationManager.class, manager);
- container.initContainer();
- container.start();
- return container;
- }
- catch (Exception e)
- {
- AssertionError err = new AssertionError("Could not start root container");
- err.initCause(e);
- throw err;
- }
+ URL url = getClass().getResource(relativeConfigurationFile);
+ assertNotNull(url);
+ return new ContainerBuilder().withRoot(url).build();
}
-
}
Copied: kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/TestPortalContainerManagedIntegration.java (from rev 1074, kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/TestPortalContainerManagedIntegration.java)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/TestPortalContainerManagedIntegration.java (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/TestPortalContainerManagedIntegration.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2003-2007 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.container.jmx;
+
+import org.exoplatform.container.PortalContainer;
+import org.exoplatform.container.RootContainer;
+import org.exoplatform.container.jmx.support.SimpleManagementAware;
+import org.exoplatform.container.support.ContainerBuilder;
+
+import java.net.URL;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class TestPortalContainerManagedIntegration extends AbstractTestContainer
+{
+
+ public void testManagementContext()
+ {
+ URL rootURL = TestPortalContainerManagedIntegration.class.getResource("root-configuration.xml");
+ URL portalURL = TestPortalContainerManagedIntegration.class.getResource("portal-configuration.xml");
+
+ //
+ RootContainer root = new ContainerBuilder().withRoot(rootURL).withPortal(portalURL).build();
+ ManagementContextImpl rootManagementContext = (ManagementContextImpl)root.getManagementContext();
+
+ //
+ PortalContainer portal = PortalContainer.getInstance();
+ ManagementContextImpl portalManagementContext = (ManagementContextImpl)portal.getManagementContext();
+ assertSame(root.getManagementContext(), portalManagementContext.getParent());
+ assertSame(portal, portalManagementContext.findContainer());
+
+ //
+ SimpleManagementAware rootManagementAware = (SimpleManagementAware)root.getComponentInstance("RootManagementAware");
+ ManagementContextImpl rootManagementAwareContext = (ManagementContextImpl)((ExoModelMBean)rootManagementAware.context).getManagementContext();
+ assertSame(rootManagementContext, rootManagementAwareContext.getParent());
+
+ //
+ SimpleManagementAware portalManagementAware = (SimpleManagementAware)portal.getComponentInstance("PortalManagementAware");
+ ManagementContextImpl portalManagementAwareContext = (ManagementContextImpl)((ExoModelMBean)portalManagementAware.context).getManagementContext();
+ assertSame(portalManagementContext, portalManagementAwareContext.getParent());
+ }
+
+}
Modified: kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/TestRootContainerManagedIntegration.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/TestRootContainerManagedIntegration.java 2009-12-15 17:38:27 UTC (rev 1074)
+++ kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/TestRootContainerManagedIntegration.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -19,6 +19,7 @@
package org.exoplatform.container.jmx;
import org.exoplatform.container.RootContainer;
+import org.exoplatform.container.jmx.support.ManagedComponentRequestLifeCycle;
import org.exoplatform.container.jmx.support.ManagedDependent;
import org.exoplatform.container.jmx.support.ManagedManagementAware;
import org.exoplatform.container.jmx.support.ManagedWithObjectNameTemplate;
@@ -104,4 +105,18 @@
aware.context.register(new ManagedWithObjectNameTemplate("juu"));
container.getMBeanServer().getObjectInstance(new ObjectName("exo:object=\"juu\""));
}
+
+ public void testRootManagedRequestLifeCycle() throws Exception
+ {
+ RootContainer container = createRootContainer("configuration5.xml");
+ ManagedComponentRequestLifeCycle component = (ManagedComponentRequestLifeCycle)container.getComponentInstanceOfType(ManagedComponentRequestLifeCycle.class);
+ assertNotNull(component);
+ MBeanServer server = container.getMBeanServer();
+ server.invoke(new ObjectName("exo:object=ManagedComponentRequestLifeCycle"), "foo", new Object[0], new String[0]);
+ assertEquals(1, component.startCount);
+ assertEquals(1, component.fooCount);
+ assertEquals(1, component.endCount);
+ assertSame(container, component.startContainer);
+ assertSame(container, component.endContainer);
+ }
}
Copied: kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/support/ManagedComponentRequestLifeCycle.java (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/support/ManagedComponentRequestLifeCycle.java)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/support/ManagedComponentRequestLifeCycle.java (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/support/ManagedComponentRequestLifeCycle.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2003-2007 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.container.jmx.support;
+
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.container.component.ComponentRequestLifecycle;
+import org.exoplatform.management.annotations.Managed;
+import org.exoplatform.management.jmx.annotations.NameTemplate;
+import org.exoplatform.management.jmx.annotations.Property;
+import org.picocontainer.Startable;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+@Managed
+@NameTemplate(@Property(key = "object", value = "ManagedComponentRequestLifeCycle"))
+public class ManagedComponentRequestLifeCycle implements ComponentRequestLifecycle, Startable
+{
+
+ public int fooCount = 0;
+
+ public int startCount = 0;
+
+ public int endCount = 0;
+
+ public ExoContainer startContainer;
+
+ public ExoContainer endContainer;
+
+ @Managed
+ public void foo()
+ {
+ if (startCount == 1 && endCount == 0)
+ {
+ fooCount++;
+ }
+ }
+
+
+ public void startRequest(ExoContainer container)
+ {
+ if (fooCount == 0 && endCount == 0)
+ {
+ startCount++;
+ startContainer = container;
+ }
+ }
+
+ public void endRequest(ExoContainer container)
+ {
+ if (startCount == 1 && fooCount == 1)
+ {
+ endCount++;
+ endContainer = container;
+ }
+ }
+
+ public void start()
+ {
+ }
+
+ public void stop()
+ {
+ }
+}
Copied: kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/support/SimpleManagementAware.java (from rev 1074, kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/support/SimpleManagementAware.java)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/support/SimpleManagementAware.java (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/support/SimpleManagementAware.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2003-2007 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.container.jmx.support;
+
+import org.exoplatform.management.ManagementAware;
+import org.exoplatform.management.ManagementContext;
+import org.exoplatform.management.annotations.Managed;
+import org.exoplatform.management.jmx.annotations.NameTemplate;
+import org.exoplatform.management.jmx.annotations.NamingContext;
+import org.exoplatform.management.jmx.annotations.Property;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+@Managed
+@NameTemplate(@Property(key = "name", value = "SimpleManagementAware"))
+public class SimpleManagementAware implements ManagementAware
+{
+
+ public ManagementContext context;
+
+ public void setContext(ManagementContext context)
+ {
+ this.context = context;
+ }
+}
Copied: kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/support (from rev 1074, kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/support)
Deleted: kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/support/ContainerBuilder.java
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/support/ContainerBuilder.java 2009-12-15 17:38:27 UTC (rev 1074)
+++ kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/support/ContainerBuilder.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,226 +0,0 @@
-/*
- * Copyright (C) 2003-2007 eXo Platform SAS.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Affero General Public License
- * as published by the Free Software Foundation; either version 3
- * of the License, or (at your option) any later version.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see<http://www.gnu.org/licenses/>.
- */
-package org.exoplatform.container.support;
-
-import junit.framework.AssertionFailedError;
-import org.exoplatform.commons.utils.PropertyManager;
-import org.exoplatform.commons.utils.Tools;
-import org.exoplatform.container.ExoContainerContext;
-import org.exoplatform.container.RootContainer;
-
-import java.io.IOException;
-import java.lang.reflect.Field;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-/**
- * An helper for building a root container and a portal container. I have done several attempt to make easily
- * and safe root/portal container boot for unit test. This one is my best attempt so far.
- *
- * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
- * @version $Revision$
- */
-public class ContainerBuilder
-{
-
- /** . */
- private ClassLoader loader;
-
- /** . */
- private List<URL> configURLs;
-
- /** . */
- private List<URL> portalConfigURLs;
-
- /** . */
- private Set<String> profiles;
-
- public ContainerBuilder()
- {
- this.loader = Thread.currentThread().getContextClassLoader();
- this.configURLs = new ArrayList<URL>();
- this.portalConfigURLs = new ArrayList<URL>();
- }
-
- public ContainerBuilder withRoot(String configPath)
- {
- configURLs.addAll(urls(configPath));
- return this;
- }
-
- public ContainerBuilder withRoot(URL configURL)
- {
- configURLs.add(configURL);
- return this;
- }
-
- public ContainerBuilder withPortal(String configPath)
- {
- portalConfigURLs.addAll(urls(configPath));
- return this;
- }
-
- public ContainerBuilder withPortal(URL configURL)
- {
- portalConfigURLs.add(configURL);
- return this;
- }
-
- private List<URL> urls(String path)
- {
- try
- {
- return Collections.list(loader.getResources(path));
- }
- catch (IOException e)
- {
- AssertionFailedError err = new AssertionFailedError();
- err.initCause(e);
- throw err;
- }
- }
-
- public ContainerBuilder withLoader(ClassLoader loader)
- {
- this.loader = loader;
- return this;
- }
-
- public ContainerBuilder profiledBy(String ... profiles)
- {
- this.profiles = Tools.set(profiles);
- return this;
- }
-
- public RootContainer build()
- {
- try
- {
- return _build();
- }
- catch (Exception e)
- {
- AssertionFailedError err = new AssertionFailedError();
- err.initCause(e);
- throw err;
- }
- }
-
- private RootContainer _build() throws Exception
- {
- //
- if (configURLs.size() == 0)
- {
- throw new IllegalStateException("Must provide at least one URL for building the root container");
- }
-
- // Must clear the top container first otherwise it's not going to work well
- // it's a big ugly but I don't want to change anything in the ExoContainerContext class for now
- // and this is for unit testing
- Field topContainerField = ExoContainerContext.class.getDeclaredField("topContainer");
- topContainerField.setAccessible(true);
- topContainerField.set(null, null);
-
- // Same remark than above
- Field singletonField = RootContainer.class.getDeclaredField("singleton_");
- singletonField.setAccessible(true);
- singletonField.set(null, null);
-
- // Setup profiles
- if (profiles == null)
- {
- PropertyManager.setProperty(PropertyManager.RUNTIME_PROFILES, "");
- }
- else
- {
- StringBuilder builder = new StringBuilder();
- for (Iterator<String> i = profiles.iterator();i.hasNext();)
- {
- builder.append(i.next());
- if (i.hasNext())
- {
- builder.append(',');
- }
- }
- PropertyManager.setProperty(PropertyManager.RUNTIME_PROFILES, builder.toString());
- }
-
- //
- ClassLoader rootCL = new ClassLoader(loader)
- {
- @Override
- public Enumeration<URL> getResources(String name) throws IOException
- {
- if ("conf/configuration.xml".equals(name))
- {
- return Collections.enumeration(configURLs);
- }
- else if ("conf/portal/configuration.xml".equals(name))
- {
- return Collections.enumeration(portalConfigURLs);
- }
- else if ("conf/portal/test-configuration.xml".equals(name))
- {
- return Collections.enumeration(Collections.<URL>emptyList());
- }
- else
- {
- return super.getResources(name);
- }
- }
- };
-
- //
- ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
-
- // Boot root container
- RootContainer root;
- try
- {
- Thread.currentThread().setContextClassLoader(rootCL);
-
- //
- root = RootContainer.getInstance();
-
- //
- if (portalConfigURLs.size() > 0)
- {
- root.getPortalContainer("portal");
- }
- }
- finally
- {
- Thread.currentThread().setContextClassLoader(oldCL);
- }
-
- //
- return root;
- }
-
- public static RootContainer bootstrap(URL configurationURL, String... profiles)
- {
- ContainerBuilder builder = new ContainerBuilder();
- builder.withRoot(configurationURL);
- builder.profiledBy(profiles);
- return builder.build();
- }
-}
Copied: kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/support/ContainerBuilder.java (from rev 1074, kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/support/ContainerBuilder.java)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/support/ContainerBuilder.java (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/support/ContainerBuilder.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,226 @@
+/*
+ * Copyright (C) 2003-2007 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.container.support;
+
+import junit.framework.AssertionFailedError;
+import org.exoplatform.commons.utils.PropertyManager;
+import org.exoplatform.commons.utils.Tools;
+import org.exoplatform.container.ExoContainerContext;
+import org.exoplatform.container.RootContainer;
+
+import java.io.IOException;
+import java.lang.reflect.Field;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * An helper for building a root container and a portal container. I have done several attempt to make easily
+ * and safe root/portal container boot for unit test. This one is my best attempt so far.
+ *
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class ContainerBuilder
+{
+
+ /** . */
+ private ClassLoader loader;
+
+ /** . */
+ private List<URL> configURLs;
+
+ /** . */
+ private List<URL> portalConfigURLs;
+
+ /** . */
+ private Set<String> profiles;
+
+ public ContainerBuilder()
+ {
+ this.loader = Thread.currentThread().getContextClassLoader();
+ this.configURLs = new ArrayList<URL>();
+ this.portalConfigURLs = new ArrayList<URL>();
+ }
+
+ public ContainerBuilder withRoot(String configPath)
+ {
+ configURLs.addAll(urls(configPath));
+ return this;
+ }
+
+ public ContainerBuilder withRoot(URL configURL)
+ {
+ configURLs.add(configURL);
+ return this;
+ }
+
+ public ContainerBuilder withPortal(String configPath)
+ {
+ portalConfigURLs.addAll(urls(configPath));
+ return this;
+ }
+
+ public ContainerBuilder withPortal(URL configURL)
+ {
+ portalConfigURLs.add(configURL);
+ return this;
+ }
+
+ private List<URL> urls(String path)
+ {
+ try
+ {
+ return Collections.list(loader.getResources(path));
+ }
+ catch (IOException e)
+ {
+ AssertionFailedError err = new AssertionFailedError();
+ err.initCause(e);
+ throw err;
+ }
+ }
+
+ public ContainerBuilder withLoader(ClassLoader loader)
+ {
+ this.loader = loader;
+ return this;
+ }
+
+ public ContainerBuilder profiledBy(String ... profiles)
+ {
+ this.profiles = Tools.set(profiles);
+ return this;
+ }
+
+ public RootContainer build()
+ {
+ try
+ {
+ return _build();
+ }
+ catch (Exception e)
+ {
+ AssertionFailedError err = new AssertionFailedError();
+ err.initCause(e);
+ throw err;
+ }
+ }
+
+ private RootContainer _build() throws Exception
+ {
+ //
+ if (configURLs.size() == 0)
+ {
+ throw new IllegalStateException("Must provide at least one URL for building the root container");
+ }
+
+ // Must clear the top container first otherwise it's not going to work well
+ // it's a big ugly but I don't want to change anything in the ExoContainerContext class for now
+ // and this is for unit testing
+ Field topContainerField = ExoContainerContext.class.getDeclaredField("topContainer");
+ topContainerField.setAccessible(true);
+ topContainerField.set(null, null);
+
+ // Same remark than above
+ Field singletonField = RootContainer.class.getDeclaredField("singleton_");
+ singletonField.setAccessible(true);
+ singletonField.set(null, null);
+
+ // Setup profiles
+ if (profiles == null)
+ {
+ PropertyManager.setProperty(PropertyManager.RUNTIME_PROFILES, "");
+ }
+ else
+ {
+ StringBuilder builder = new StringBuilder();
+ for (Iterator<String> i = profiles.iterator();i.hasNext();)
+ {
+ builder.append(i.next());
+ if (i.hasNext())
+ {
+ builder.append(',');
+ }
+ }
+ PropertyManager.setProperty(PropertyManager.RUNTIME_PROFILES, builder.toString());
+ }
+
+ //
+ ClassLoader rootCL = new ClassLoader(loader)
+ {
+ @Override
+ public Enumeration<URL> getResources(String name) throws IOException
+ {
+ if ("conf/configuration.xml".equals(name))
+ {
+ return Collections.enumeration(configURLs);
+ }
+ else if ("conf/portal/configuration.xml".equals(name))
+ {
+ return Collections.enumeration(portalConfigURLs);
+ }
+ else if ("conf/portal/test-configuration.xml".equals(name))
+ {
+ return Collections.enumeration(Collections.<URL>emptyList());
+ }
+ else
+ {
+ return super.getResources(name);
+ }
+ }
+ };
+
+ //
+ ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
+
+ // Boot root container
+ RootContainer root;
+ try
+ {
+ Thread.currentThread().setContextClassLoader(rootCL);
+
+ //
+ root = RootContainer.getInstance();
+
+ //
+ if (portalConfigURLs.size() > 0)
+ {
+ root.getPortalContainer("portal");
+ }
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(oldCL);
+ }
+
+ //
+ return root;
+ }
+
+ public static RootContainer bootstrap(URL configurationURL, String... profiles)
+ {
+ ContainerBuilder builder = new ContainerBuilder();
+ builder.withRoot(configurationURL);
+ builder.profiledBy(profiles);
+ return builder.build();
+ }
+}
Modified: kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/xml/test/TestDataXML.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/xml/test/TestDataXML.java 2009-12-15 17:38:27 UTC (rev 1074)
+++ kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/xml/test/TestDataXML.java 2009-12-15 20:27:24 UTC (rev 1075)
@@ -50,7 +50,7 @@
String projectdir = System.getProperty("basedir");
IBindingFactory bfact = BindingDirectory.getFactory(XMLObject.class);
IUnmarshallingContext uctx = bfact.createUnmarshallingContext();
- Object obj = uctx.unmarshalDocument(new FileInputStream(projectdir + "/src/main/resources/object.xml"), null);
+ Object obj = uctx.unmarshalDocument(new FileInputStream(projectdir + "/src/test/resources/object.xml"), null);
System.out.print(obj);
IMarshallingContext mctx = bfact.createMarshallingContext();
Modified: kernel/trunk/exo.kernel.container/src/test/resources/conf/portal/test-configuration.xml
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/conf/portal/test-configuration.xml 2009-12-15 17:38:27 UTC (rev 1074)
+++ kernel/trunk/exo.kernel.container/src/test/resources/conf/portal/test-configuration.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -33,7 +33,7 @@
<object-param>
<name>new.user.configuration</name>
<description>Configure role , group for the new user</description>
- <object type="org.exoplatform.container.configuration.test.ConfigParam">
+ <object type="org.exoplatform.container.configuration.ConfigParam">
<field name="role">
<collection type="java.util.ArrayList">
<value>
@@ -48,7 +48,7 @@
<field name="group">
<collection type="java.util.ArrayList">
<value>
- <object type="org.exoplatform.container.configuration.test.ConfigParam$Group">
+ <object type="org.exoplatform.container.configuration.ConfigParam$Group">
<field name="name">
<string>portal</string>
</field>
Copied: kernel/trunk/exo.kernel.container/src/test/resources/configuration-bad-schema.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/configuration-bad-schema.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/configuration-bad-schema.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/configuration-bad-schema.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ 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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+
+ <foo/>
+
+ <container-lifecycle-plugin>
+ <type>component.type</type>
+ <init-params>
+ <value-param>
+ <name>name</name>
+ <description>description</description>
+ <value>a value</value>
+ </value-param>
+ </init-params>
+ </container-lifecycle-plugin>
+
+</configuration>
Copied: kernel/trunk/exo.kernel.container/src/test/resources/configuration-no-schema.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/configuration-no-schema.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/configuration-no-schema.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/configuration-no-schema.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ 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>
+
+ <container-lifecycle-plugin>
+ <type>component.type</type>
+ <init-params>
+ <value-param>
+ <name>name</name>
+ <description>description</description>
+ <value>a value</value>
+ </value-param>
+ </init-params>
+ </container-lifecycle-plugin>
+
+</configuration>
Copied: kernel/trunk/exo.kernel.container/src/test/resources/configuration.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/configuration.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/configuration.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/configuration.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ 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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+
+ <container-lifecycle-plugin>
+ <type>component.type</type>
+ <init-params>
+ <value-param>
+ <name>name</name>
+ <description>description</description>
+ <value>a value</value>
+ </value-param>
+ </init-params>
+ </container-lifecycle-plugin>
+
+ <component-lifecycle-plugin>
+ <type>component.type</type>
+ <manageable-components>
+ <component-type>component.type</component-type>
+ <component-type>component.type</component-type>
+ <component-type>component.type</component-type>
+ </manageable-components>
+ <init-params>
+ <value-param>
+ <name>name</name>
+ <description>description</description>
+ <value>a value</value>
+ </value-param>
+ </init-params>
+ </component-lifecycle-plugin>
+
+ <component>
+ <key>org.exoplatform.services.templates.velocity.VelocityService</key>
+ <type>org.exoplatform.services.templates.velocity.impl.VelocityServiceImpl</type>
+ <component-plugins>
+ <component-plugin>
+ <name>name plugin 1</name>
+ <set-method>class.type</set-method>
+ <type>class.type</type>
+ <description>description</description>
+ <init-params>
+ <value-param>
+ <name>name</name>
+ <description>description</description>
+ <value>a value</value>
+ </value-param>
+ </init-params>
+ </component-plugin>
+ </component-plugins>
+
+ <init-params>
+ <value-param>
+ <name>name</name>
+ <description>description</description>
+ <value>a value</value>
+ </value-param>
+ </init-params>
+ </component>
+
+ <import>1</import>
+ <import>2</import>
+ <remove-configuration>1</remove-configuration>
+ <remove-configuration>2</remove-configuration>
+</configuration>
Copied: kernel/trunk/exo.kernel.container/src/test/resources/object.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/object.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/object.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/object.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,50 @@
+<!--
+
+ 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.
+
+-->
+<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 version="1.0" 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>
Copied: kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration)
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/collection-configuration.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/collection-configuration.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/collection-configuration.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-
- 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.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.container.configuration.InitParamsHolder</key>
- <type>org.exoplatform.container.configuration.InitParamsHolder</type>
- <init-params>
- <object-param>
- <name>test.configuration</name>
- <object type="org.exoplatform.container.configuration.ConfigParam">
- <field name="role">
- <collection type="java.util.ArrayList">
- <value><string>manager</string></value>
- <value profiles="foo"><string>foo_manager</string></value>
- <value profiles="foo,bar"><string>foo_bar_manager</string></value>
- </collection>
- </field>
- </object>
- </object-param>
- </init-params>
- </component>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/collection-configuration.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/collection-configuration.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/collection-configuration.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/collection-configuration.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ 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.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.container.configuration.InitParamsHolder</key>
+ <type>org.exoplatform.container.configuration.InitParamsHolder</type>
+ <init-params>
+ <object-param>
+ <name>test.configuration</name>
+ <object type="org.exoplatform.container.configuration.ConfigParam">
+ <field name="role">
+ <collection type="java.util.ArrayList">
+ <value><string>manager</string></value>
+ <value profiles="foo"><string>foo_manager</string></value>
+ <value profiles="foo,bar"><string>foo_bar_manager</string></value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component>
+
+</configuration>
\ No newline at end of file
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/component-configuration.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/component-configuration.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/component-configuration.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-
- 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.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 profiles="bar">
- <key>Component</key>
- <type>ComponentImpl</type>
- </component>
-
- <component profiles="foo">
- <key>Component</key>
- <type>FooComponent</type>
- </component>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/component-configuration.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/component-configuration.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/component-configuration.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/component-configuration.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ 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.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 profiles="bar">
+ <key>Component</key>
+ <type>ComponentImpl</type>
+ </component>
+
+ <component profiles="foo">
+ <key>Component</key>
+ <type>FooComponent</type>
+ </component>
+
+</configuration>
\ No newline at end of file
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/component-plugin-configuration.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/component-plugin-configuration.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/component-plugin-configuration.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-
- 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.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>Component</key>
- <type>ComponentImpl</type>
- <component-plugins>
- <component-plugin>
- <name>Plugin</name>
- <set-method>set_method</set-method>
- <type>PluginA</type>
- </component-plugin>
- <component-plugin profiles="foo">
- <name>Plugin</name>
- <set-method>set_method</set-method>
- <type>PluginA</type>
- </component-plugin>
- </component-plugins>
- </component>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/component-plugin-configuration.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/component-plugin-configuration.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/component-plugin-configuration.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/component-plugin-configuration.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ 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.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>Component</key>
+ <type>ComponentImpl</type>
+ <component-plugins>
+ <component-plugin>
+ <name>Plugin</name>
+ <set-method>set_method</set-method>
+ <type>PluginA</type>
+ </component-plugin>
+ <component-plugin profiles="foo">
+ <name>Plugin</name>
+ <set-method>set_method</set-method>
+ <type>PluginA</type>
+ </component-plugin>
+ </component-plugins>
+ </component>
+
+</configuration>
\ No newline at end of file
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/field-configuration.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/field-configuration.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/field-configuration.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-
- 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.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.container.configuration.InitParamsHolder</key>
- <type>org.exoplatform.container.configuration.InitParamsHolder</type>
- <init-params>
- <object-param>
- <name>test.configuration</name>
- <object type="org.exoplatform.container.configuration.ConfigParam">
- <field name="role">
- <collection type="java.util.ArrayList">
- <value><string>manager</string></value>
- </collection>
- </field>
- <field name="role" profiles="foo,bar">
- <collection type="java.util.ArrayList">
- <value><string>foo_bar_manager</string></value>
- </collection>
- </field>
- <field name="role" profiles="foo">
- <collection type="java.util.ArrayList">
- <value><string>foo_manager</string></value>
- </collection>
- </field>
- </object>
- </object-param>
- </init-params>
- </component>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/field-configuration.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/field-configuration.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/field-configuration.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/field-configuration.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ 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.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.container.configuration.InitParamsHolder</key>
+ <type>org.exoplatform.container.configuration.InitParamsHolder</type>
+ <init-params>
+ <object-param>
+ <name>test.configuration</name>
+ <object type="org.exoplatform.container.configuration.ConfigParam">
+ <field name="role">
+ <collection type="java.util.ArrayList">
+ <value><string>manager</string></value>
+ </collection>
+ </field>
+ <field name="role" profiles="foo,bar">
+ <collection type="java.util.ArrayList">
+ <value><string>foo_bar_manager</string></value>
+ </collection>
+ </field>
+ <field name="role" profiles="foo">
+ <collection type="java.util.ArrayList">
+ <value><string>foo_manager</string></value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component>
+
+</configuration>
\ No newline at end of file
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/import-configuration.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/import-configuration.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/import-configuration.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-
- 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.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">
-
- <import>empty</import>
- <import profiles="foo">foo</import>
- <import profiles="bar">bar</import>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/import-configuration.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/import-configuration.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/import-configuration.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/import-configuration.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ 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.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">
+
+ <import>empty</import>
+ <import profiles="foo">foo</import>
+ <import profiles="bar">bar</import>
+
+</configuration>
\ No newline at end of file
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/init-param-configuration.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/init-param-configuration.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/init-param-configuration.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-
- 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.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>Component</key>
- <type>ComponentImpl</type>
- <init-params>
- <value-param>
- <name>param</name>
- <value>empty</value>
- </value-param>
- <value-param profiles="foo">
- <name>param</name>
- <value>foo</value>
- </value-param>
- <value-param profiles="bar">
- <name>param</name>
- <value>bar</value>
- </value-param>
- </init-params>
- </component>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/init-param-configuration.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/init-param-configuration.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/init-param-configuration.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/init-param-configuration.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ 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.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>Component</key>
+ <type>ComponentImpl</type>
+ <init-params>
+ <value-param>
+ <name>param</name>
+ <value>empty</value>
+ </value-param>
+ <value-param profiles="foo">
+ <name>param</name>
+ <value>foo</value>
+ </value-param>
+ <value-param profiles="bar">
+ <name>param</name>
+ <value>bar</value>
+ </value-param>
+ </init-params>
+ </component>
+
+</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/jmx/configuration5.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/jmx/configuration5.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/jmx/configuration5.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/jmx/configuration5.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ 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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+
+ <component>
+ <key>org.exoplatform.container.jmx.support.ManagedComponentRequestLifeCycle</key>
+ <type>org.exoplatform.container.jmx.support.ManagedComponentRequestLifeCycle</type>
+ </component>
+
+</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/jmx/portal-configuration.xml (from rev 1074, kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/jmx/portal-configuration.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/jmx/portal-configuration.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/jmx/portal-configuration.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ 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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+
+ <component>
+ <key>PortalManagementAware</key>
+ <type>org.exoplatform.container.jmx.support.SimpleManagementAware</type>
+ </component>
+
+</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/jmx/root-configuration.xml (from rev 1074, kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/jmx/root-configuration.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/jmx/root-configuration.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/jmx/root-configuration.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ 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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+
+ <component>
+ <type>org.exoplatform.container.definition.PortalContainerConfig</type>
+ </component>
+
+ <component>
+ <key>RootManagementAware</key>
+ <type>org.exoplatform.container.jmx.support.SimpleManagementAware</type>
+ </component>
+
+</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/property-configurator-configuration.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/property-configurator-configuration.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/property-configurator-configuration.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/property-configurator-configuration.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ 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.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>PropertyManagerConfigurator</key>
+ <type>org.exoplatform.container.PropertyConfigurator</type>
+ <init-params>
+ <properties-param>
+ <name>properties</name>
+ <property name="property_1" value="property_value_1"/>
+ <property name="property_2" value="${property_2}"/>
+ <property name="property_3" value="${property_3}"/>
+ </properties-param>
+ </init-params>
+ </component>
+
+</configuration>
Copied: kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/property-configurator-with-path-configuration.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/property-configurator-with-path-configuration.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/property-configurator-with-path-configuration.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/property-configurator-with-path-configuration.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ 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.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>PropertyManagerConfigurator</key>
+ <type>org.exoplatform.container.PropertyConfigurator</type>
+ <init-params>
+ <value-param>
+ <name>properties.url</name>
+ <value>${properties.url}</value>
+ </value-param>
+ </init-params>
+ </component>
+
+</configuration>
Copied: kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/property-configurator-with-profile-configuration.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/property-configurator-with-profile-configuration.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/property-configurator-with-profile-configuration.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/property-configurator-with-profile-configuration.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ 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.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>PropertyManagerConfigurator</key>
+ <type>org.exoplatform.container.PropertyConfigurator</type>
+ <init-params>
+ <properties-param>
+ <name>properties</name>
+ <property name="property_1" value="property_value_1"/>
+ </properties-param>
+ <properties-param profiles="foo">
+ <name>properties</name>
+ <property name="property_1" value="property_value_1_foo"/>
+ </properties-param>
+ </init-params>
+ </component>
+
+</configuration>
Copied: kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/property-configurator.properties (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/property-configurator.properties)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/property-configurator.properties (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/property-configurator.properties 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,3 @@
+property_1=property_value_1
+property_2=${property_2}
+property_3=${property_3}
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/property-configurator.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/property-configurator.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/property-configurator.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/property-configurator.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
+<properties>
+<entry key="property_1">property_value_1</entry>
+<entry key="property_2">${property_2}</entry>
+<entry key="property_3">${property_3}</entry>
+</properties>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/request-lifecycle-configuration.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/request-lifecycle-configuration.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/request-lifecycle-configuration.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/request-lifecycle-configuration.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ 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.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>A</key>
+ <type>org.exoplatform.container.ComponentWithRequestLifeCycle</type>
+ </component>
+
+</configuration>
Copied: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0 (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0)
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-01.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-01.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-01.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,224 +0,0 @@
-<?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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
-
- <component>
- <key>org.exoplatform.portal.config.DataStorage</key>
- <type>org.exoplatform.portal.config.jcr.DataStorageImpl</type>
- </component>
-
- <component>
- <key>org.exoplatform.portal.application.UserGadgetStorage</key>
- <type>org.exoplatform.portal.application.jcr.UserGadgetStorageImpl</type>
- </component>
-
- <component>
- <key>org.exoplatform.portal.layout.PortalLayoutService</key>
- <type>org.exoplatform.portal.layout.jcr.PortalLayoutServiceImpl</type>
- <init-params>
- <value-param>
- <name>template.location</name>
- <description>Location of container templates</description>
- <value>war:/conf/portal/template/containers</value>
- </value-param>
- </init-params>
- </component>
-
- <component>
- <key>org.exoplatform.portal.config.UserACL</key>
- <type>org.exoplatform.portal.config.UserACL</type>
- <init-params>
- <value-param>
- <name>super.user</name>
- <description>administrator</description>
- <value>root</value>
- </value-param>
-
- <value-param>
- <name>portal.creator.groups</name>
- <description>groups with membership type have permission to manage portal</description>
- <value>*:/platform/administrators,*:/organization/management/executive-board</value>
- </value-param>
-
- <value-param>
- <name>navigation.creator.membership.type</name>
- <description>specific membership type have full permission with group navigation</description>
- <value>manager</value>
- </value-param>
- <value-param>
- <name>guests.group</name>
- <description>guests group</description>
- <value>/platform/guests</value>
- </value-param>
- <value-param>
- <name>access.control.workspace</name>
- <description>groups with memberships that have the right to access the User Control Workspace</description>
- <value>*:/platform/administrators,*:/organization/management/executive-board</value>
- </value-param>
- </init-params>
- </component>
-
- <component>
- <key>org.exoplatform.portal.config.UserPortalConfigService</key>
- <type>org.exoplatform.portal.config.UserPortalConfigService</type>
- <component-plugins>
- <component-plugin>
- <name>new.portal.config.user.listener</name>
- <set-method>initListener</set-method>
- <type>org.exoplatform.portal.config.NewPortalConfigListener</type>
- <description>this listener init the portal configuration</description>
- <init-params>
- <value-param>
- <name>default.portal</name>
- <description>The default portal for checking db is empty or not</description>
- <value>classic</value>
- </value-param>
- <object-param>
- <name>portal.configuration</name>
- <description>description</description>
- <object type="org.exoplatform.portal.config.NewPortalConfig">
- <field name="predefinedOwner">
- <collection type="java.util.HashSet">
- <value><string>classic</string></value>
- </collection>
- </field>
- <field name="ownerType"><string>portal</string></field>
- <field name="templateLocation"><string>war:/conf/portal</string></field>
- </object>
- </object-param>
- <object-param>
- <name>group.configuration</name>
- <description>description</description>
- <object type="org.exoplatform.portal.config.NewPortalConfig">
- <field name="predefinedOwner">
- <collection type="java.util.HashSet">
- <value><string>platform/administrators</string></value>
- <value><string>platform/users</string></value>
- <value><string>platform/guests</string></value>
- <value><string>organization/management/executive-board</string></value>
- </collection>
- </field>
- <field name="ownerType"><string>group</string></field>
- <field name="templateLocation"><string>war:/conf/portal</string></field>
- </object>
- </object-param>
- <object-param>
- <name>user.configuration</name>
- <description>description</description>
- <object type="org.exoplatform.portal.config.NewPortalConfig">
- <field name="predefinedOwner">
- <collection type="java.util.HashSet">
- <value><string>root</string></value>
- <value><string>john</string></value>
- <value><string>marry</string></value>
- <value><string>demo</string></value>
- </collection>
- </field>
- <field name="ownerType"><string>user</string></field>
- <field name="templateLocation"><string>war:/conf/portal</string></field>
- </object>
- </object-param>
- <object-param>
- <name>page.templates</name>
- <description>List of page templates</description>
- <object type="org.exoplatform.portal.config.PageTemplateConfig">
- <field name="templates">
- <collection type="java.util.ArrayList"></collection>
- </field>
- <field name="location"><string>war:/conf/portal/template/pages</string></field>
- </object>
- </object-param>
- </init-params>
- </component-plugin>
- </component-plugins>
-
- </component>
-
- <external-component-plugins>
- <target-component>org.exoplatform.services.organization.OrganizationService</target-component>
-
- <component-plugin>
- <name>user.portal.config.listener</name>
- <set-method>addListenerPlugin</set-method>
- <type>org.exoplatform.portal.config.UserPortalConfigListener</type>
- </component-plugin>
-
- <component-plugin>
- <name>group.portal.config.listener</name>
- <set-method>addListenerPlugin</set-method>
- <type>org.exoplatform.portal.config.GroupPortalConfigListener</type>
- </component-plugin>
-
- <component-plugin>
- <name>ecm.new.user.event.listener</name>
- <set-method>addListenerPlugin</set-method>
- <type>org.exoplatform.services.jcr.ext.hierarchy.impl.NewUserListener</type>
- <description>description</description>
- <init-params>
- <object-param>
- <name>configuration</name>
- <description>description</description>
- <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig">
- <field name="repository"><string>repository</string></field>
- <field name="workspaces">
- <collection type="java.util.ArrayList">
- <value><string>collaboration</string></value>
- </collection>
- </field>
- <field name="jcrPaths">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$JcrPath">
- <field name="alias"><string>userApplicationData</string></field>
- <field name="path"><string>ApplicationData</string></field>
- <field name="nodeType"><string>nt:unstructured</string></field>
- <field name="permissions">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
- <field name="identity"><string>*:/platform/administrators</string></field>
- <field name="read"><string>true</string></field>
- <field name="addNode"><string>true</string></field>
- <field name="setProperty"><string>true</string></field>
- <field name="remove"><string>true</string></field>
- </object>
- </value>
- </collection>
- </field>
- <field name="mixinTypes">
- <collection type="java.util.ArrayList">
- </collection>
- </field>
- </object>
- </value>
- </collection>
- </field>
- </object>
- </object-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-01.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-01.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-01.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-01.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,224 @@
+<?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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+
+ <component>
+ <key>org.exoplatform.portal.config.DataStorage</key>
+ <type>org.exoplatform.portal.config.jcr.DataStorageImpl</type>
+ </component>
+
+ <component>
+ <key>org.exoplatform.portal.application.UserGadgetStorage</key>
+ <type>org.exoplatform.portal.application.jcr.UserGadgetStorageImpl</type>
+ </component>
+
+ <component>
+ <key>org.exoplatform.portal.layout.PortalLayoutService</key>
+ <type>org.exoplatform.portal.layout.jcr.PortalLayoutServiceImpl</type>
+ <init-params>
+ <value-param>
+ <name>template.location</name>
+ <description>Location of container templates</description>
+ <value>war:/conf/portal/template/containers</value>
+ </value-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.portal.config.UserACL</key>
+ <type>org.exoplatform.portal.config.UserACL</type>
+ <init-params>
+ <value-param>
+ <name>super.user</name>
+ <description>administrator</description>
+ <value>root</value>
+ </value-param>
+
+ <value-param>
+ <name>portal.creator.groups</name>
+ <description>groups with membership type have permission to manage portal</description>
+ <value>*:/platform/administrators,*:/organization/management/executive-board</value>
+ </value-param>
+
+ <value-param>
+ <name>navigation.creator.membership.type</name>
+ <description>specific membership type have full permission with group navigation</description>
+ <value>manager</value>
+ </value-param>
+ <value-param>
+ <name>guests.group</name>
+ <description>guests group</description>
+ <value>/platform/guests</value>
+ </value-param>
+ <value-param>
+ <name>access.control.workspace</name>
+ <description>groups with memberships that have the right to access the User Control Workspace</description>
+ <value>*:/platform/administrators,*:/organization/management/executive-board</value>
+ </value-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.portal.config.UserPortalConfigService</key>
+ <type>org.exoplatform.portal.config.UserPortalConfigService</type>
+ <component-plugins>
+ <component-plugin>
+ <name>new.portal.config.user.listener</name>
+ <set-method>initListener</set-method>
+ <type>org.exoplatform.portal.config.NewPortalConfigListener</type>
+ <description>this listener init the portal configuration</description>
+ <init-params>
+ <value-param>
+ <name>default.portal</name>
+ <description>The default portal for checking db is empty or not</description>
+ <value>classic</value>
+ </value-param>
+ <object-param>
+ <name>portal.configuration</name>
+ <description>description</description>
+ <object type="org.exoplatform.portal.config.NewPortalConfig">
+ <field name="predefinedOwner">
+ <collection type="java.util.HashSet">
+ <value><string>classic</string></value>
+ </collection>
+ </field>
+ <field name="ownerType"><string>portal</string></field>
+ <field name="templateLocation"><string>war:/conf/portal</string></field>
+ </object>
+ </object-param>
+ <object-param>
+ <name>group.configuration</name>
+ <description>description</description>
+ <object type="org.exoplatform.portal.config.NewPortalConfig">
+ <field name="predefinedOwner">
+ <collection type="java.util.HashSet">
+ <value><string>platform/administrators</string></value>
+ <value><string>platform/users</string></value>
+ <value><string>platform/guests</string></value>
+ <value><string>organization/management/executive-board</string></value>
+ </collection>
+ </field>
+ <field name="ownerType"><string>group</string></field>
+ <field name="templateLocation"><string>war:/conf/portal</string></field>
+ </object>
+ </object-param>
+ <object-param>
+ <name>user.configuration</name>
+ <description>description</description>
+ <object type="org.exoplatform.portal.config.NewPortalConfig">
+ <field name="predefinedOwner">
+ <collection type="java.util.HashSet">
+ <value><string>root</string></value>
+ <value><string>john</string></value>
+ <value><string>marry</string></value>
+ <value><string>demo</string></value>
+ </collection>
+ </field>
+ <field name="ownerType"><string>user</string></field>
+ <field name="templateLocation"><string>war:/conf/portal</string></field>
+ </object>
+ </object-param>
+ <object-param>
+ <name>page.templates</name>
+ <description>List of page templates</description>
+ <object type="org.exoplatform.portal.config.PageTemplateConfig">
+ <field name="templates">
+ <collection type="java.util.ArrayList"></collection>
+ </field>
+ <field name="location"><string>war:/conf/portal/template/pages</string></field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+ </component-plugins>
+
+ </component>
+
+ <external-component-plugins>
+ <target-component>org.exoplatform.services.organization.OrganizationService</target-component>
+
+ <component-plugin>
+ <name>user.portal.config.listener</name>
+ <set-method>addListenerPlugin</set-method>
+ <type>org.exoplatform.portal.config.UserPortalConfigListener</type>
+ </component-plugin>
+
+ <component-plugin>
+ <name>group.portal.config.listener</name>
+ <set-method>addListenerPlugin</set-method>
+ <type>org.exoplatform.portal.config.GroupPortalConfigListener</type>
+ </component-plugin>
+
+ <component-plugin>
+ <name>ecm.new.user.event.listener</name>
+ <set-method>addListenerPlugin</set-method>
+ <type>org.exoplatform.services.jcr.ext.hierarchy.impl.NewUserListener</type>
+ <description>description</description>
+ <init-params>
+ <object-param>
+ <name>configuration</name>
+ <description>description</description>
+ <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig">
+ <field name="repository"><string>repository</string></field>
+ <field name="workspaces">
+ <collection type="java.util.ArrayList">
+ <value><string>collaboration</string></value>
+ </collection>
+ </field>
+ <field name="jcrPaths">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$JcrPath">
+ <field name="alias"><string>userApplicationData</string></field>
+ <field name="path"><string>ApplicationData</string></field>
+ <field name="nodeType"><string>nt:unstructured</string></field>
+ <field name="permissions">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
+ <field name="identity"><string>*:/platform/administrators</string></field>
+ <field name="read"><string>true</string></field>
+ <field name="addNode"><string>true</string></field>
+ <field name="setProperty"><string>true</string></field>
+ <field name="remove"><string>true</string></field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ <field name="mixinTypes">
+ <collection type="java.util.ArrayList">
+ </collection>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+
+</configuration>
\ No newline at end of file
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-02.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-02.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-02.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,241 +0,0 @@
-<?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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
-
- <component>
- <key>org.exoplatform.application.gadget.GadgetRegistryService</key>
- <type>org.exoplatform.application.gadget.jcr.GadgetRegistryServiceImpl</type>
- </component>
-
- <component>
- <key>org.exoplatform.application.gadget.SourceStorage</key>
- <type>org.exoplatform.application.gadget.jcr.SourceStorageImpl</type>
- <init-params>
- <properties-param>
- <name>location</name>
- <description>The location store source of gadgets</description>
- <property name="repository" value="repository"></property>
- <property name="workspace" value="gadgets"></property>
- <property name="store.path" value="/"></property>
- </properties-param>
- </init-params>
- </component>
-
- <component>
- <key>org.exoplatform.application.registry.ApplicationRegistryService</key>
- <type>org.exoplatform.application.registry.jcr.ApplicationRegistryServiceImpl</type>
- <component-plugins>
- <component-plugin>
- <name>new.portal.portlets.registry</name>
- <set-method>initListener</set-method>
- <type>org.exoplatform.application.registry.ApplicationCategoriesPlugins</type>
- <description>this listener init the portlets are registered in PortletRegister</description>
- <init-params>
- <object-param>
- <name>administration</name>
- <description>description</description>
- <object type="org.exoplatform.application.registry.ApplicationCategory">
- <field name="name"><string>administration</string></field>
- <field name="displayName"><string>Administration</string></field>
- <field name="description"><string>application for administration</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/administrators</string></value>
- <value><string>*:/organization/management/executive-board</string></value>
- </collection>
- </field>
- <field name="applications">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.application.registry.Application">
- <field name="applicationName"><string>ApplicationRegistryPortlet</string></field>
- <field name="categoryName"><string>administration</string></field>
- <field name="displayName"><string>Application Registry</string></field>
- <field name="description"><string>Application Registry</string></field>
- <field name="applicationType"><string>portlet</string></field>
- <field name="applicationGroup"><string>exoadmin</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/administrators</string></value>
- <value><string>*:/organization/management/executive-board</string></value>
- </collection>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.application.registry.Application">
- <field name="applicationName"><string>OrganizationPortlet</string></field>
- <field name="categoryName"><string>administration</string></field>
- <field name="displayName"><string>Organization Management</string></field>
- <field name="description"><string>Organization Management</string></field>
- <field name="applicationType"><string>portlet</string></field>
- <field name="applicationGroup"><string>exoadmin</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/administrators</string></value>
- <value><string>*:/organization/management/executive-board</string></value>
- </collection>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.application.registry.Application">
- <field name="applicationName"><string>AccountPortlet</string></field>
- <field name="categoryName"><string>administration</string></field>
- <field name="displayName"><string>New Account</string></field>
- <field name="description"><string>New Account</string></field>
- <field name="applicationType"><string>portlet</string></field>
- <field name="applicationGroup"><string>exoadmin</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/administrators</string></value>
- <value><string>*:/organization/management/executive-board</string></value>
- </collection>
- </field>
- </object>
- </value>
- </collection>
- </field>
- </object>
- </object-param>
-
- <object-param>
- <name>web</name>
- <description>description</description>
- <object type="org.exoplatform.application.registry.ApplicationCategory">
- <field name="name"><string>web</string></field>
- <field name="displayName"><string>web</string></field>
- <field name="description"><string>BasicPortlets</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/users</string></value>
- </collection>
- </field>
- <field name="applications">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.application.registry.Application">
- <field name="categoryName"><string>web</string></field>
- <field name="applicationName"><string>IFramePortlet</string></field>
- <field name="displayName"><string>IFrame</string></field>
- <field name="description"><string>IFrame</string></field>
- <field name="applicationType"><string>portlet</string></field>
- <field name="applicationGroup"><string>web</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/users</string></value>
- </collection>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.application.registry.Application">
- <field name="categoryName"><string>web</string></field>
- <field name="applicationName"><string>SiteMapPortlet</string></field>
- <field name="displayName"><string>SiteMap</string></field>
- <field name="description"><string>SiteMap</string></field>
- <field name="applicationType"><string>portlet</string></field>
- <field name="applicationGroup"><string>web</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/users</string></value>
- </collection>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.application.registry.Application">
- <field name="categoryName"><string>web</string></field>
- <field name="applicationName"><string>BrowserPortlet</string></field>
- <field name="displayName"><string>Web Explorer</string></field>
- <field name="description"><string>Web Explorer</string></field>
- <field name="applicationType"><string>portlet</string></field>
- <field name="applicationGroup"><string>web</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/users</string></value>
- </collection>
- </field>
- </object>
- </value>
- </collection>
- </field>
- </object>
- </object-param>
-
- <object-param>
- <name>dashboard</name>
- <description>description</description>
- <object type="org.exoplatform.application.registry.ApplicationCategory">
- <field name="name"><string>dashboard</string></field>
- <field name="displayName"><string>Dashboard</string></field>
- <field name="description"><string>Dashboard</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/users</string></value>
- </collection>
- </field>
- <field name="applications">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.application.registry.Application">
- <field name="categoryName"><string>dashboard</string></field>
- <field name="applicationName"><string>DashboardPortlet</string></field>
- <field name="displayName"><string>Dashboard Portlet</string></field>
- <field name="description"><string>Dashboard Portlet</string></field>
- <field name="applicationType"><string>portlet</string></field>
- <field name="applicationGroup"><string>dashboard</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/users</string></value>
- </collection>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.application.registry.Application">
- <field name="categoryName"><string>dashboard</string></field>
- <field name="applicationName"><string>GadgetPortlet</string></field>
- <field name="displayName"><string>Gadget Wrapper Portlet</string></field>
- <field name="description"><string>Gadget Wrapper Portlet</string></field>
- <field name="applicationType"><string>portlet</string></field>
- <field name="applicationGroup"><string>dashboard</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/users</string></value>
- </collection>
- </field>
- </object>
- </value>
- </collection>
- </field>
- </object>
- </object-param>
- </init-params>
- </component-plugin>
- </component-plugins>
- </component>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-02.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-02.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-02.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-02.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,241 @@
+<?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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+
+ <component>
+ <key>org.exoplatform.application.gadget.GadgetRegistryService</key>
+ <type>org.exoplatform.application.gadget.jcr.GadgetRegistryServiceImpl</type>
+ </component>
+
+ <component>
+ <key>org.exoplatform.application.gadget.SourceStorage</key>
+ <type>org.exoplatform.application.gadget.jcr.SourceStorageImpl</type>
+ <init-params>
+ <properties-param>
+ <name>location</name>
+ <description>The location store source of gadgets</description>
+ <property name="repository" value="repository"></property>
+ <property name="workspace" value="gadgets"></property>
+ <property name="store.path" value="/"></property>
+ </properties-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.application.registry.ApplicationRegistryService</key>
+ <type>org.exoplatform.application.registry.jcr.ApplicationRegistryServiceImpl</type>
+ <component-plugins>
+ <component-plugin>
+ <name>new.portal.portlets.registry</name>
+ <set-method>initListener</set-method>
+ <type>org.exoplatform.application.registry.ApplicationCategoriesPlugins</type>
+ <description>this listener init the portlets are registered in PortletRegister</description>
+ <init-params>
+ <object-param>
+ <name>administration</name>
+ <description>description</description>
+ <object type="org.exoplatform.application.registry.ApplicationCategory">
+ <field name="name"><string>administration</string></field>
+ <field name="displayName"><string>Administration</string></field>
+ <field name="description"><string>application for administration</string></field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value><string>*:/platform/administrators</string></value>
+ <value><string>*:/organization/management/executive-board</string></value>
+ </collection>
+ </field>
+ <field name="applications">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.application.registry.Application">
+ <field name="applicationName"><string>ApplicationRegistryPortlet</string></field>
+ <field name="categoryName"><string>administration</string></field>
+ <field name="displayName"><string>Application Registry</string></field>
+ <field name="description"><string>Application Registry</string></field>
+ <field name="applicationType"><string>portlet</string></field>
+ <field name="applicationGroup"><string>exoadmin</string></field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value><string>*:/platform/administrators</string></value>
+ <value><string>*:/organization/management/executive-board</string></value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.application.registry.Application">
+ <field name="applicationName"><string>OrganizationPortlet</string></field>
+ <field name="categoryName"><string>administration</string></field>
+ <field name="displayName"><string>Organization Management</string></field>
+ <field name="description"><string>Organization Management</string></field>
+ <field name="applicationType"><string>portlet</string></field>
+ <field name="applicationGroup"><string>exoadmin</string></field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value><string>*:/platform/administrators</string></value>
+ <value><string>*:/organization/management/executive-board</string></value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.application.registry.Application">
+ <field name="applicationName"><string>AccountPortlet</string></field>
+ <field name="categoryName"><string>administration</string></field>
+ <field name="displayName"><string>New Account</string></field>
+ <field name="description"><string>New Account</string></field>
+ <field name="applicationType"><string>portlet</string></field>
+ <field name="applicationGroup"><string>exoadmin</string></field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value><string>*:/platform/administrators</string></value>
+ <value><string>*:/organization/management/executive-board</string></value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+
+ <object-param>
+ <name>web</name>
+ <description>description</description>
+ <object type="org.exoplatform.application.registry.ApplicationCategory">
+ <field name="name"><string>web</string></field>
+ <field name="displayName"><string>web</string></field>
+ <field name="description"><string>BasicPortlets</string></field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value><string>*:/platform/users</string></value>
+ </collection>
+ </field>
+ <field name="applications">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.application.registry.Application">
+ <field name="categoryName"><string>web</string></field>
+ <field name="applicationName"><string>IFramePortlet</string></field>
+ <field name="displayName"><string>IFrame</string></field>
+ <field name="description"><string>IFrame</string></field>
+ <field name="applicationType"><string>portlet</string></field>
+ <field name="applicationGroup"><string>web</string></field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value><string>*:/platform/users</string></value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.application.registry.Application">
+ <field name="categoryName"><string>web</string></field>
+ <field name="applicationName"><string>SiteMapPortlet</string></field>
+ <field name="displayName"><string>SiteMap</string></field>
+ <field name="description"><string>SiteMap</string></field>
+ <field name="applicationType"><string>portlet</string></field>
+ <field name="applicationGroup"><string>web</string></field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value><string>*:/platform/users</string></value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.application.registry.Application">
+ <field name="categoryName"><string>web</string></field>
+ <field name="applicationName"><string>BrowserPortlet</string></field>
+ <field name="displayName"><string>Web Explorer</string></field>
+ <field name="description"><string>Web Explorer</string></field>
+ <field name="applicationType"><string>portlet</string></field>
+ <field name="applicationGroup"><string>web</string></field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value><string>*:/platform/users</string></value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+
+ <object-param>
+ <name>dashboard</name>
+ <description>description</description>
+ <object type="org.exoplatform.application.registry.ApplicationCategory">
+ <field name="name"><string>dashboard</string></field>
+ <field name="displayName"><string>Dashboard</string></field>
+ <field name="description"><string>Dashboard</string></field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value><string>*:/platform/users</string></value>
+ </collection>
+ </field>
+ <field name="applications">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.application.registry.Application">
+ <field name="categoryName"><string>dashboard</string></field>
+ <field name="applicationName"><string>DashboardPortlet</string></field>
+ <field name="displayName"><string>Dashboard Portlet</string></field>
+ <field name="description"><string>Dashboard Portlet</string></field>
+ <field name="applicationType"><string>portlet</string></field>
+ <field name="applicationGroup"><string>dashboard</string></field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value><string>*:/platform/users</string></value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.application.registry.Application">
+ <field name="categoryName"><string>dashboard</string></field>
+ <field name="applicationName"><string>GadgetPortlet</string></field>
+ <field name="displayName"><string>Gadget Wrapper Portlet</string></field>
+ <field name="description"><string>Gadget Wrapper Portlet</string></field>
+ <field name="applicationType"><string>portlet</string></field>
+ <field name="applicationGroup"><string>dashboard</string></field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value><string>*:/platform/users</string></value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+ </component-plugins>
+ </component>
+
+</configuration>
\ No newline at end of file
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-03.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-03.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-03.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,304 +0,0 @@
-<?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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
-
- <external-component-plugins>
- <target-component>org.exoplatform.services.organization.OrganizationService</target-component>
- <component-plugin>
- <name>init.service.listener</name>
- <set-method>addListenerPlugin</set-method>
- <type>org.exoplatform.services.organization.OrganizationDatabaseInitializer</type>
- <description>this listener populate organization data for the first launch</description>
- <init-params>
- <value-param>
- <name>checkDatabaseAlgorithm</name>
- <description>check database</description>
- <value>entry</value>
- </value-param>
- <value-param>
- <name>printInformation</name>
- <description>Print information init database</description>
- <value>false</value>
- </value-param>
- <object-param>
- <name>configuration</name>
- <description>description</description>
- <object type="org.exoplatform.services.organization.OrganizationConfig">
- <field name="membershipType">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$MembershipType">
- <field name="type"><string>manager</string></field>
- <field name="description"><string>manager membership type</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$MembershipType">
- <field name="type"><string>member</string></field>
- <field name="description"><string>member membership type</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$MembershipType">
- <field name="type"><string>validator</string></field>
- <field name="description"><string>validator membership type</string></field>
- </object>
- </value>
- </collection>
- </field>
-
- <field name="group">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name"><string>platform</string></field>
- <field name="parentId"><string></string></field>
- <field name="description"><string>the /platform group</string></field>
- <field name="label"><string>Platform</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name"><string>administrators</string></field>
- <field name="parentId"><string>/platform</string></field>
- <field name="description"><string>the /platform/administrators group</string></field>
- <field name="label"><string>Administrators</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name"><string>users</string></field>
- <field name="parentId"><string>/platform</string></field>
- <field name="description"><string>the /platform/users group</string></field>
- <field name="label"><string>Users</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name"><string>guests</string></field>
- <field name="parentId"><string>/platform</string></field>
- <field name="description"><string>the /platform/guests group</string></field>
- <field name="label"><string>Guests</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name"><string>organization</string></field>
- <field name="parentId"><string></string></field>
- <field name="description"><string>the organization group</string></field>
- <field name="label"><string>Organization</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name"><string>management</string></field>
- <field name="parentId"><string>/organization</string></field>
- <field name="description"><string>the /organization/management group</string></field>
- <field name="label"><string>Management</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name"><string>executive-board</string></field>
- <field name="parentId"><string>/organization/management</string></field>
- <field name="description"><string>the /organization/management/executive-board group</string></field>
- <field name="label"><string>Executive Board</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name"><string>human-resources</string></field>
- <field name="parentId"><string>/organization/management</string></field>
- <field name="description"><string>the /organization/management/human-resource group</string></field>
- <field name="label"><string>Human Resources</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name"><string>communication</string></field>
- <field name="parentId"><string>/organization</string></field>
- <field name="description"><string>the /organization/communication group</string></field>
- <field name="label"><string>Communication</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name"><string>marketing</string></field>
- <field name="parentId"><string>/organization/communication</string></field>
- <field name="description"><string>the /organization/communication/marketing group</string></field>
- <field name="label"><string>Marketing</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name"><string>press-and-media</string></field>
- <field name="parentId"><string>/organization/communication</string></field>
- <field name="description"><string>the /organization/communication/press-and-media group</string></field>
- <field name="label"><string>Press and Media</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name"><string>operations</string></field>
- <field name="parentId"><string>/organization</string></field>
- <field name="description"><string>the /organization/operations and media group</string></field>
- <field name="label"><string>Operations</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name"><string>sales</string></field>
- <field name="parentId"><string>/organization/operations</string></field>
- <field name="description"><string>the /organization/operations/sales group</string></field>
- <field name="label"><string>Sales</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name"><string>finances</string></field>
- <field name="parentId"><string>/organization/operations</string></field>
- <field name="description"><string>the /organization/operations/finances group</string></field>
- <field name="label"><string>Finances</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name"><string>customers</string></field>
- <field name="parentId"><string></string></field>
- <field name="description"><string>the /customers group</string></field>
- <field name="label"><string>Customers</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name"><string>partners</string></field>
- <field name="parentId"><string></string></field>
- <field name="description"><string>the /partners group</string></field>
- <field name="label"><string>Partners</string></field>
- </object>
- </value>
- </collection>
- </field>
-
- <field name="user">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$User">
- <field name="userName"><string>root</string></field>
- <field name="password"><string>exo</string></field>
- <field name="firstName"><string>Root</string></field>
- <field name="lastName"><string>Root</string></field>
- <field name="email"><string>root@localhost</string></field>
- <field name="groups">
- <string>
- manager:/platform/administrators,member:/platform/users,
- member:/organization/management/executive-board
- </string>
- </field>
- </object>
- </value>
-
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$User">
- <field name="userName"><string>john</string></field>
- <field name="password"><string>exo</string></field>
- <field name="firstName"><string>John</string></field>
- <field name="lastName"><string>Anthony</string></field>
- <field name="email"><string>john@localhost</string></field>
- <field name="groups">
- <string>
- member:/platform/administrators,member:/platform/users,
- manager:/organization/management/executive-board
- </string>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$User">
- <field name="userName"><string>marry</string></field>
- <field name="password"><string>exo</string></field>
- <field name="firstName"><string>Marry</string></field>
- <field name="lastName"><string>Kelly</string></field>
- <field name="email"><string>marry@localhost</string></field>
- <field name="groups">
- <string>member:/platform/users</string>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$User">
- <field name="userName"><string>demo</string></field>
- <field name="password"><string>exo</string></field>
- <field name="firstName"><string>Demo</string></field>
- <field name="lastName"><string>exo</string></field>
- <field name="email"><string>demo@localhost</string></field>
- <field name="groups">
- <string>member:/platform/guests,member:/platform/users</string>
- </field>
- </object>
- </value>
- </collection>
- </field>
- </object>
- </object-param>
- </init-params>
- </component-plugin>
-
- <component-plugin>
- <name>new.user.event.listener</name>
- <set-method>addListenerPlugin</set-method>
- <type>org.exoplatform.services.organization.impl.NewUserEventListener</type>
- <description>this listener assign group and membership to a new created user</description>
- <init-params>
- <object-param>
- <name>configuration</name>
- <description>description</description>
- <object type="org.exoplatform.services.organization.impl.NewUserConfig">
- <field name="group">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.services.organization.impl.NewUserConfig$JoinGroup">
- <field name="groupId"><string>/platform/users</string></field>
- <field name="membership"><string>member</string></field>
- </object>
- </value>
- </collection>
- </field>
- <field name="ignoredUser">
- <collection type="java.util.HashSet">
- <value><string>root</string></value>
- <value><string>john</string></value>
- <value><string>marry</string></value>
- <value><string>demo</string></value>
- </collection>
- </field>
- </object>
- </object-param>
- </init-params>
- </component-plugin>
-
- </external-component-plugins>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-03.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-03.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-03.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-03.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,304 @@
+<?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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+
+ <external-component-plugins>
+ <target-component>org.exoplatform.services.organization.OrganizationService</target-component>
+ <component-plugin>
+ <name>init.service.listener</name>
+ <set-method>addListenerPlugin</set-method>
+ <type>org.exoplatform.services.organization.OrganizationDatabaseInitializer</type>
+ <description>this listener populate organization data for the first launch</description>
+ <init-params>
+ <value-param>
+ <name>checkDatabaseAlgorithm</name>
+ <description>check database</description>
+ <value>entry</value>
+ </value-param>
+ <value-param>
+ <name>printInformation</name>
+ <description>Print information init database</description>
+ <value>false</value>
+ </value-param>
+ <object-param>
+ <name>configuration</name>
+ <description>description</description>
+ <object type="org.exoplatform.services.organization.OrganizationConfig">
+ <field name="membershipType">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$MembershipType">
+ <field name="type"><string>manager</string></field>
+ <field name="description"><string>manager membership type</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$MembershipType">
+ <field name="type"><string>member</string></field>
+ <field name="description"><string>member membership type</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$MembershipType">
+ <field name="type"><string>validator</string></field>
+ <field name="description"><string>validator membership type</string></field>
+ </object>
+ </value>
+ </collection>
+ </field>
+
+ <field name="group">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name"><string>platform</string></field>
+ <field name="parentId"><string></string></field>
+ <field name="description"><string>the /platform group</string></field>
+ <field name="label"><string>Platform</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name"><string>administrators</string></field>
+ <field name="parentId"><string>/platform</string></field>
+ <field name="description"><string>the /platform/administrators group</string></field>
+ <field name="label"><string>Administrators</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name"><string>users</string></field>
+ <field name="parentId"><string>/platform</string></field>
+ <field name="description"><string>the /platform/users group</string></field>
+ <field name="label"><string>Users</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name"><string>guests</string></field>
+ <field name="parentId"><string>/platform</string></field>
+ <field name="description"><string>the /platform/guests group</string></field>
+ <field name="label"><string>Guests</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name"><string>organization</string></field>
+ <field name="parentId"><string></string></field>
+ <field name="description"><string>the organization group</string></field>
+ <field name="label"><string>Organization</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name"><string>management</string></field>
+ <field name="parentId"><string>/organization</string></field>
+ <field name="description"><string>the /organization/management group</string></field>
+ <field name="label"><string>Management</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name"><string>executive-board</string></field>
+ <field name="parentId"><string>/organization/management</string></field>
+ <field name="description"><string>the /organization/management/executive-board group</string></field>
+ <field name="label"><string>Executive Board</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name"><string>human-resources</string></field>
+ <field name="parentId"><string>/organization/management</string></field>
+ <field name="description"><string>the /organization/management/human-resource group</string></field>
+ <field name="label"><string>Human Resources</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name"><string>communication</string></field>
+ <field name="parentId"><string>/organization</string></field>
+ <field name="description"><string>the /organization/communication group</string></field>
+ <field name="label"><string>Communication</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name"><string>marketing</string></field>
+ <field name="parentId"><string>/organization/communication</string></field>
+ <field name="description"><string>the /organization/communication/marketing group</string></field>
+ <field name="label"><string>Marketing</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name"><string>press-and-media</string></field>
+ <field name="parentId"><string>/organization/communication</string></field>
+ <field name="description"><string>the /organization/communication/press-and-media group</string></field>
+ <field name="label"><string>Press and Media</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name"><string>operations</string></field>
+ <field name="parentId"><string>/organization</string></field>
+ <field name="description"><string>the /organization/operations and media group</string></field>
+ <field name="label"><string>Operations</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name"><string>sales</string></field>
+ <field name="parentId"><string>/organization/operations</string></field>
+ <field name="description"><string>the /organization/operations/sales group</string></field>
+ <field name="label"><string>Sales</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name"><string>finances</string></field>
+ <field name="parentId"><string>/organization/operations</string></field>
+ <field name="description"><string>the /organization/operations/finances group</string></field>
+ <field name="label"><string>Finances</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name"><string>customers</string></field>
+ <field name="parentId"><string></string></field>
+ <field name="description"><string>the /customers group</string></field>
+ <field name="label"><string>Customers</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name"><string>partners</string></field>
+ <field name="parentId"><string></string></field>
+ <field name="description"><string>the /partners group</string></field>
+ <field name="label"><string>Partners</string></field>
+ </object>
+ </value>
+ </collection>
+ </field>
+
+ <field name="user">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$User">
+ <field name="userName"><string>root</string></field>
+ <field name="password"><string>exo</string></field>
+ <field name="firstName"><string>Root</string></field>
+ <field name="lastName"><string>Root</string></field>
+ <field name="email"><string>root@localhost</string></field>
+ <field name="groups">
+ <string>
+ manager:/platform/administrators,member:/platform/users,
+ member:/organization/management/executive-board
+ </string>
+ </field>
+ </object>
+ </value>
+
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$User">
+ <field name="userName"><string>john</string></field>
+ <field name="password"><string>exo</string></field>
+ <field name="firstName"><string>John</string></field>
+ <field name="lastName"><string>Anthony</string></field>
+ <field name="email"><string>john@localhost</string></field>
+ <field name="groups">
+ <string>
+ member:/platform/administrators,member:/platform/users,
+ manager:/organization/management/executive-board
+ </string>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$User">
+ <field name="userName"><string>marry</string></field>
+ <field name="password"><string>exo</string></field>
+ <field name="firstName"><string>Marry</string></field>
+ <field name="lastName"><string>Kelly</string></field>
+ <field name="email"><string>marry@localhost</string></field>
+ <field name="groups">
+ <string>member:/platform/users</string>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$User">
+ <field name="userName"><string>demo</string></field>
+ <field name="password"><string>exo</string></field>
+ <field name="firstName"><string>Demo</string></field>
+ <field name="lastName"><string>exo</string></field>
+ <field name="email"><string>demo@localhost</string></field>
+ <field name="groups">
+ <string>member:/platform/guests,member:/platform/users</string>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+
+ <component-plugin>
+ <name>new.user.event.listener</name>
+ <set-method>addListenerPlugin</set-method>
+ <type>org.exoplatform.services.organization.impl.NewUserEventListener</type>
+ <description>this listener assign group and membership to a new created user</description>
+ <init-params>
+ <object-param>
+ <name>configuration</name>
+ <description>description</description>
+ <object type="org.exoplatform.services.organization.impl.NewUserConfig">
+ <field name="group">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.services.organization.impl.NewUserConfig$JoinGroup">
+ <field name="groupId"><string>/platform/users</string></field>
+ <field name="membership"><string>member</string></field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ <field name="ignoredUser">
+ <collection type="java.util.HashSet">
+ <value><string>root</string></value>
+ <value><string>john</string></value>
+ <value><string>marry</string></value>
+ <value><string>demo</string></value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+
+ </external-component-plugins>
+
+</configuration>
\ No newline at end of file
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-04.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-04.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-04.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,134 +0,0 @@
-<?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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
-
- <component>
- <key>org.exoplatform.services.ldap.LDAPService</key>
- <type>org.exoplatform.services.ldap.impl.LDAPServiceImpl</type>
- <init-params>
- <object-param>
- <name>ldap.config</name>
- <description>Default ldap config</description>
- <object type="org.exoplatform.services.ldap.impl.LDAPConnectionConfig">
- <!-- for multiple ldap servers, use comma seperated list of host:port (Ex. ldap://127.0.0.1:389,10.0.0.1:389) -->
- <!-- whether or not to enable ssl, if ssl is used ensure that the javax.net.ssl.keyStore & java.net.ssl.keyStorePassword properties are set -->
- <!-- exo portal default installed javax.net.ssl.trustStore with file is java.home/lib/security/cacerts-->
- <!-- ldap service will check protocol, if protocol is ldaps, ssl is enable (Ex. for enable ssl: ldaps://10.0.0.3:636 ;for disable ssl: ldap://10.0.0.3:389 ) -->
- <!-- when enable ssl, ensure server name is *.directory and port (Ex. active.directory) -->
- <field name="providerURL"><string>ldaps://10.0.0.3:636</string></field>
- <field name="rootdn"><string>CN=Administrator,CN=Users, DC=exoplatform,DC=org</string></field>
- <field name="password"><string>site</string></field>
-
- <field name="version"><string>3</string></field>
-
- <field name="minConnection"><int>5</int></field>
-
- <field name="maxConnection"><int>10</int></field>
-
- <field name="referralMode"><string>ignore</string></field>
-
- <field name="serverName"><string>active.directory</string></field>
-
- </object>
- </object-param>
- </init-params>
- </component>
-
- <component>
- <key>org.exoplatform.services.organization.OrganizationService</key>
- <type>org.exoplatform.services.organization.ldap.OrganizationServiceImpl</type>
- <component-plugins>
- <component-plugin>
- <name>init.service.listener</name>
- <set-method>addListenerPlugin</set-method>
- <type>org.exoplatform.services.organization.ldap.OrganizationLdapInitializer</type>
- <description>this listener populate organization ldap service create default dn</description>
- </component-plugin>
- </component-plugins>
- <init-params>
- <object-param>
- <name>ldap.attribute.mapping</name>
- <description>ldap attribute mapping</description>
- <object type="org.exoplatform.services.organization.ldap.LDAPAttributeMapping">
- <field name="userLDAPClasses"><string>top,person,organizationalPerson,user</string></field>
- <field name="profileLDAPClasses"><string>top,organizationalPerson</string></field>
- <field name="groupLDAPClasses"><string>top,organizationalUnit</string></field>
- <field name="membershipTypeLDAPClasses"><string>top,group</string></field>
- <field name="membershipLDAPClasses"><string>top,group</string></field>
-
- <field name="baseURL"><string>dc=exoplatform,dc=org</string></field>
- <field name="groupsURL"><string>ou=groups,ou=portal,dc=exoplatform,dc=org</string></field>
- <field name="membershipTypeURL"><string>ou=memberships,ou=portal,dc=exoplatform,dc=org</string></field>
- <field name="userURL"><string>ou=users,ou=portal,dc=exoplatform,dc=org</string></field>
- <field name="profileURL"><string>ou=profiles,ou=portal,dc=exoplatform,dc=org</string></field>
-
- <field name="userAuthenticationAttr"><string>mail</string></field>
- <field name="userUsernameAttr"><string>sAMAccountName</string></field>
- <field name="userPassword"><string>unicodePwd</string></field>
- <!--unicodePwd-->
- <field name="userFirstNameAttr"><string>givenName</string></field>
- <field name="userLastNameAttr"><string>sn</string></field>
- <field name="userDisplayNameAttr"><string>displayName</string></field>
- <field name="userMailAttr"><string>mail</string></field>
- <field name="userObjectClassFilter"><string>objectClass=user</string></field>
-
- <field name="membershipTypeMemberValue"><string>member</string></field>
- <field name="membershipTypeRoleNameAttr"><string>cn</string></field>
- <field name="membershipTypeNameAttr"><string>cn</string></field>
- <field name="membershipTypeObjectClassFilter"><string>objectClass=group</string></field>
- <field name="membershiptypeObjectClass"><string>group</string></field>
-
- <field name="groupObjectClass"><string>organizationalUnit</string></field>
- <field name="groupObjectClassFilter"><string>objectClass=organizationalUnit</string></field>
-
- <field name="membershipObjectClass"><string>group</string></field>
- <field name="membershipObjectClassFilter"><string>objectClass=group</string></field>
-
- <field name="ldapCreatedTimeStampAttr"><string>createdTimeStamp</string></field>
- <field name="ldapModifiedTimeStampAttr"><string>modifiedTimeStamp</string></field>
- <field name="ldapDescriptionAttr"><string>description</string></field>
- </object>
- </object-param>
- </init-params>
- </component>
-
- <!--external-component-plugins>
- <target-component>org.exoplatform.services.database.HibernateService</target-component>
- <component-plugin>
- <name>add.hibernate.mapping</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.database.impl.AddHibernateMappingPlugin</type>
- <init-params>
- <values-param>
- <name>hibernate.mapping</name>
- <value>org/exoplatform/services/organization/impl/UserProfileData.hbm.xml</value>
- </values-param>
- </init-params>
- </component-plugin>
- </external-component-plugins-->
-
- <import>classpath:/conf/portal/organization-configuration.xml</import>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-04.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-04.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-04.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-04.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,134 @@
+<?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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+
+ <component>
+ <key>org.exoplatform.services.ldap.LDAPService</key>
+ <type>org.exoplatform.services.ldap.impl.LDAPServiceImpl</type>
+ <init-params>
+ <object-param>
+ <name>ldap.config</name>
+ <description>Default ldap config</description>
+ <object type="org.exoplatform.services.ldap.impl.LDAPConnectionConfig">
+ <!-- for multiple ldap servers, use comma seperated list of host:port (Ex. ldap://127.0.0.1:389,10.0.0.1:389) -->
+ <!-- whether or not to enable ssl, if ssl is used ensure that the javax.net.ssl.keyStore & java.net.ssl.keyStorePassword properties are set -->
+ <!-- exo portal default installed javax.net.ssl.trustStore with file is java.home/lib/security/cacerts-->
+ <!-- ldap service will check protocol, if protocol is ldaps, ssl is enable (Ex. for enable ssl: ldaps://10.0.0.3:636 ;for disable ssl: ldap://10.0.0.3:389 ) -->
+ <!-- when enable ssl, ensure server name is *.directory and port (Ex. active.directory) -->
+ <field name="providerURL"><string>ldaps://10.0.0.3:636</string></field>
+ <field name="rootdn"><string>CN=Administrator,CN=Users, DC=exoplatform,DC=org</string></field>
+ <field name="password"><string>site</string></field>
+
+ <field name="version"><string>3</string></field>
+
+ <field name="minConnection"><int>5</int></field>
+
+ <field name="maxConnection"><int>10</int></field>
+
+ <field name="referralMode"><string>ignore</string></field>
+
+ <field name="serverName"><string>active.directory</string></field>
+
+ </object>
+ </object-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.organization.OrganizationService</key>
+ <type>org.exoplatform.services.organization.ldap.OrganizationServiceImpl</type>
+ <component-plugins>
+ <component-plugin>
+ <name>init.service.listener</name>
+ <set-method>addListenerPlugin</set-method>
+ <type>org.exoplatform.services.organization.ldap.OrganizationLdapInitializer</type>
+ <description>this listener populate organization ldap service create default dn</description>
+ </component-plugin>
+ </component-plugins>
+ <init-params>
+ <object-param>
+ <name>ldap.attribute.mapping</name>
+ <description>ldap attribute mapping</description>
+ <object type="org.exoplatform.services.organization.ldap.LDAPAttributeMapping">
+ <field name="userLDAPClasses"><string>top,person,organizationalPerson,user</string></field>
+ <field name="profileLDAPClasses"><string>top,organizationalPerson</string></field>
+ <field name="groupLDAPClasses"><string>top,organizationalUnit</string></field>
+ <field name="membershipTypeLDAPClasses"><string>top,group</string></field>
+ <field name="membershipLDAPClasses"><string>top,group</string></field>
+
+ <field name="baseURL"><string>dc=exoplatform,dc=org</string></field>
+ <field name="groupsURL"><string>ou=groups,ou=portal,dc=exoplatform,dc=org</string></field>
+ <field name="membershipTypeURL"><string>ou=memberships,ou=portal,dc=exoplatform,dc=org</string></field>
+ <field name="userURL"><string>ou=users,ou=portal,dc=exoplatform,dc=org</string></field>
+ <field name="profileURL"><string>ou=profiles,ou=portal,dc=exoplatform,dc=org</string></field>
+
+ <field name="userAuthenticationAttr"><string>mail</string></field>
+ <field name="userUsernameAttr"><string>sAMAccountName</string></field>
+ <field name="userPassword"><string>unicodePwd</string></field>
+ <!--unicodePwd-->
+ <field name="userFirstNameAttr"><string>givenName</string></field>
+ <field name="userLastNameAttr"><string>sn</string></field>
+ <field name="userDisplayNameAttr"><string>displayName</string></field>
+ <field name="userMailAttr"><string>mail</string></field>
+ <field name="userObjectClassFilter"><string>objectClass=user</string></field>
+
+ <field name="membershipTypeMemberValue"><string>member</string></field>
+ <field name="membershipTypeRoleNameAttr"><string>cn</string></field>
+ <field name="membershipTypeNameAttr"><string>cn</string></field>
+ <field name="membershipTypeObjectClassFilter"><string>objectClass=group</string></field>
+ <field name="membershiptypeObjectClass"><string>group</string></field>
+
+ <field name="groupObjectClass"><string>organizationalUnit</string></field>
+ <field name="groupObjectClassFilter"><string>objectClass=organizationalUnit</string></field>
+
+ <field name="membershipObjectClass"><string>group</string></field>
+ <field name="membershipObjectClassFilter"><string>objectClass=group</string></field>
+
+ <field name="ldapCreatedTimeStampAttr"><string>createdTimeStamp</string></field>
+ <field name="ldapModifiedTimeStampAttr"><string>modifiedTimeStamp</string></field>
+ <field name="ldapDescriptionAttr"><string>description</string></field>
+ </object>
+ </object-param>
+ </init-params>
+ </component>
+
+ <!--external-component-plugins>
+ <target-component>org.exoplatform.services.database.HibernateService</target-component>
+ <component-plugin>
+ <name>add.hibernate.mapping</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.database.impl.AddHibernateMappingPlugin</type>
+ <init-params>
+ <values-param>
+ <name>hibernate.mapping</name>
+ <value>org/exoplatform/services/organization/impl/UserProfileData.hbm.xml</value>
+ </values-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins-->
+
+ <import>classpath:/conf/portal/organization-configuration.xml</import>
+
+</configuration>
\ No newline at end of file
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-05.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-05.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-05.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,168 +0,0 @@
-<?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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
-
- <component>
- <key>org.exoplatform.services.ldap.LDAPService</key>
- <type>org.exoplatform.services.ldap.impl.LDAPServiceImpl</type>
- <init-params>
- <object-param>
- <name>ldap.config</name>
- <description>Default ldap config</description>
- <object type="org.exoplatform.services.ldap.impl.LDAPConnectionConfig">
-
- <!-- for multiple ldap servers, use comma seperated list of host:port (Ex. ldap://127.0.0.1:389,10.0.0.1:389) -->
- <field name="providerURL"><string>ldap://127.0.0.1:389,10.0.0.1:389</string></field>
-
- <field name="rootdn"><string>CN=Manager,DC=exoplatform,DC=org</string></field>
-
- <field name="password"><string>secret</string></field>
-
- <field name="version"><string>3</string></field>
-
- <field name="minConnection"><int>5</int></field>
-
- <field name="maxConnection"><int>10</int></field>
-
- <field name="referralMode"><string>follow</string></field>
-
-<!--
- <field name="referralMode"><string>ignore</string></field>
--->
-
- <field name="serverName"><string>default</string></field>
-
-<!--
- LDAP server names : default,
- active.directory,
- open.ldap,
- netscape.directory,
- redhat.directory;
--->
-
-
- </object>
- </object-param>
- </init-params>
- </component>
-
- <component>
- <key>org.exoplatform.services.organization.OrganizationService</key>
- <type>org.exoplatform.services.organization.ldap.OrganizationServiceImpl</type>
- <component-plugins>
- <component-plugin>
- <name>init.service.listener</name>
- <set-method>addListenerPlugin</set-method>
- <type>org.exoplatform.services.organization.ldap.OrganizationLdapInitializer</type>
- <description>this listener populate organization ldap service create default dn</description>
- </component-plugin>
- </component-plugins>
- <init-params>
- <value-param>
- <name>ldap.userDN.key</name>
- <description>The key used to compose user DN</description>
- <value>cn</value>
- </value-param>
-
- <object-param>
- <name>ldap.attribute.mapping</name>
- <description>ldap attribute mapping</description>
- <object type="org.exoplatform.services.organization.ldap.LDAPAttributeMapping">
- <field name="userLDAPClasses"><string>top,person,organizationalPerson,inetOrgPerson</string></field>
- <field name="profileLDAPClasses"><string>top,organizationalPerson</string></field>
- <field name="groupLDAPClasses"><string>top,organizationalUnit</string></field>
- <field name="membershipTypeLDAPClasses"><string>top,organizationalRole</string></field>
- <field name="membershipLDAPClasses"><string>top,groupOfNames</string></field>
-
- <field name="baseURL"><string>dc=exoplatform,dc=org</string></field>
- <field name="groupsURL"><string>ou=groups,ou=portal,dc=exoplatform,dc=org</string></field>
- <field name="membershipTypeURL"><string>ou=memberships,ou=portal,dc=exoplatform,dc=org</string></field>
- <field name="userURL"><string>ou=users,ou=portal,dc=exoplatform,dc=org</string></field>
- <field name="profileURL"><string>ou=profiles,ou=portal,dc=exoplatform,dc=org</string></field>
-
- <field name="userUsernameAttr"><string>uid</string></field>
- <field name="userPassword"><string>userPassword</string></field>
- <field name="userFirstNameAttr"><string>givenName</string></field>
- <field name="userLastNameAttr"><string>sn</string></field>
- <field name="userDisplayNameAttr"><string>displayName</string></field>
- <field name="userMailAttr"><string>mail</string></field>
- <field name="userObjectClassFilter"><string>objectClass=person</string></field>
-
- <field name="membershipTypeMemberValue"><string>member</string></field>
- <field name="membershipTypeRoleNameAttr"><string>cn</string></field>
- <field name="membershipTypeNameAttr"><string>cn</string></field>
- <field name="membershipTypeObjectClassFilter"><string>objectClass=organizationalRole</string></field>
- <field name="membershiptypeObjectClass"><string>organizationalRole</string></field>
-
- <field name="groupObjectClass"><string>organizationalUnit</string></field>
- <field name="groupObjectClassFilter"><string>objectClass=organizationalUnit</string></field>
-
- <field name="membershipObjectClass"><string>groupOfNames</string></field>
- <field name="membershipObjectClassFilter"><string>objectClass=groupOfNames</string></field>
-
- <field name="ldapCreatedTimeStampAttr"><string>createdTimeStamp</string></field>
- <field name="ldapModifiedTimeStampAttr"><string>modifiedTimeStamp</string></field>
- <field name="ldapDescriptionAttr"><string>description</string></field>
- </object>
- </object-param>
- </init-params>
- </component>
-
- <external-component-plugins>
- <target-component>org.exoplatform.services.database.HibernateService</target-component>
- <component-plugin>
- <name>add.hibernate.mapping</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.database.impl.AddHibernateMappingPlugin</type>
- <init-params>
- <values-param>
- <name>hibernate.mapping</name>
- <value>org/exoplatform/services/organization/impl/UserProfileData.hbm.xml</value>
- </values-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
-
- <!-- for ldap clean database
- <external-component-plugins>
- <target-component>org.exoplatform.services.ldap.LDAPService</target-component>
- <component-plugin>
- <name>delete.object</name>
- <set-method>addDeleteObject</set-method>
- <type>org.exoplatform.services.ldap.DeleteObjectCommand</type>
- <init-params>
- <values-param>
- <name>objects.to.delete</name>
- <value>cn=demo,ou=users,ou=portal,dc=exoplatform,dc=org</value>
- <value>cn=test,ou=users,ou=portal,dc=exoplatform,dc=org</value>
- <value>cn=Benj,ou=users,ou=portal,dc=exoplatform,dc=org</value>
- <value>cn=tuan,ou=users,ou=portal,dc=exoplatform,dc=org</value>
- </values-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
- -->
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-05.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-05.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-05.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-05.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,168 @@
+<?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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+
+ <component>
+ <key>org.exoplatform.services.ldap.LDAPService</key>
+ <type>org.exoplatform.services.ldap.impl.LDAPServiceImpl</type>
+ <init-params>
+ <object-param>
+ <name>ldap.config</name>
+ <description>Default ldap config</description>
+ <object type="org.exoplatform.services.ldap.impl.LDAPConnectionConfig">
+
+ <!-- for multiple ldap servers, use comma seperated list of host:port (Ex. ldap://127.0.0.1:389,10.0.0.1:389) -->
+ <field name="providerURL"><string>ldap://127.0.0.1:389,10.0.0.1:389</string></field>
+
+ <field name="rootdn"><string>CN=Manager,DC=exoplatform,DC=org</string></field>
+
+ <field name="password"><string>secret</string></field>
+
+ <field name="version"><string>3</string></field>
+
+ <field name="minConnection"><int>5</int></field>
+
+ <field name="maxConnection"><int>10</int></field>
+
+ <field name="referralMode"><string>follow</string></field>
+
+<!--
+ <field name="referralMode"><string>ignore</string></field>
+-->
+
+ <field name="serverName"><string>default</string></field>
+
+<!--
+ LDAP server names : default,
+ active.directory,
+ open.ldap,
+ netscape.directory,
+ redhat.directory;
+-->
+
+
+ </object>
+ </object-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.organization.OrganizationService</key>
+ <type>org.exoplatform.services.organization.ldap.OrganizationServiceImpl</type>
+ <component-plugins>
+ <component-plugin>
+ <name>init.service.listener</name>
+ <set-method>addListenerPlugin</set-method>
+ <type>org.exoplatform.services.organization.ldap.OrganizationLdapInitializer</type>
+ <description>this listener populate organization ldap service create default dn</description>
+ </component-plugin>
+ </component-plugins>
+ <init-params>
+ <value-param>
+ <name>ldap.userDN.key</name>
+ <description>The key used to compose user DN</description>
+ <value>cn</value>
+ </value-param>
+
+ <object-param>
+ <name>ldap.attribute.mapping</name>
+ <description>ldap attribute mapping</description>
+ <object type="org.exoplatform.services.organization.ldap.LDAPAttributeMapping">
+ <field name="userLDAPClasses"><string>top,person,organizationalPerson,inetOrgPerson</string></field>
+ <field name="profileLDAPClasses"><string>top,organizationalPerson</string></field>
+ <field name="groupLDAPClasses"><string>top,organizationalUnit</string></field>
+ <field name="membershipTypeLDAPClasses"><string>top,organizationalRole</string></field>
+ <field name="membershipLDAPClasses"><string>top,groupOfNames</string></field>
+
+ <field name="baseURL"><string>dc=exoplatform,dc=org</string></field>
+ <field name="groupsURL"><string>ou=groups,ou=portal,dc=exoplatform,dc=org</string></field>
+ <field name="membershipTypeURL"><string>ou=memberships,ou=portal,dc=exoplatform,dc=org</string></field>
+ <field name="userURL"><string>ou=users,ou=portal,dc=exoplatform,dc=org</string></field>
+ <field name="profileURL"><string>ou=profiles,ou=portal,dc=exoplatform,dc=org</string></field>
+
+ <field name="userUsernameAttr"><string>uid</string></field>
+ <field name="userPassword"><string>userPassword</string></field>
+ <field name="userFirstNameAttr"><string>givenName</string></field>
+ <field name="userLastNameAttr"><string>sn</string></field>
+ <field name="userDisplayNameAttr"><string>displayName</string></field>
+ <field name="userMailAttr"><string>mail</string></field>
+ <field name="userObjectClassFilter"><string>objectClass=person</string></field>
+
+ <field name="membershipTypeMemberValue"><string>member</string></field>
+ <field name="membershipTypeRoleNameAttr"><string>cn</string></field>
+ <field name="membershipTypeNameAttr"><string>cn</string></field>
+ <field name="membershipTypeObjectClassFilter"><string>objectClass=organizationalRole</string></field>
+ <field name="membershiptypeObjectClass"><string>organizationalRole</string></field>
+
+ <field name="groupObjectClass"><string>organizationalUnit</string></field>
+ <field name="groupObjectClassFilter"><string>objectClass=organizationalUnit</string></field>
+
+ <field name="membershipObjectClass"><string>groupOfNames</string></field>
+ <field name="membershipObjectClassFilter"><string>objectClass=groupOfNames</string></field>
+
+ <field name="ldapCreatedTimeStampAttr"><string>createdTimeStamp</string></field>
+ <field name="ldapModifiedTimeStampAttr"><string>modifiedTimeStamp</string></field>
+ <field name="ldapDescriptionAttr"><string>description</string></field>
+ </object>
+ </object-param>
+ </init-params>
+ </component>
+
+ <external-component-plugins>
+ <target-component>org.exoplatform.services.database.HibernateService</target-component>
+ <component-plugin>
+ <name>add.hibernate.mapping</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.database.impl.AddHibernateMappingPlugin</type>
+ <init-params>
+ <values-param>
+ <name>hibernate.mapping</name>
+ <value>org/exoplatform/services/organization/impl/UserProfileData.hbm.xml</value>
+ </values-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+
+ <!-- for ldap clean database
+ <external-component-plugins>
+ <target-component>org.exoplatform.services.ldap.LDAPService</target-component>
+ <component-plugin>
+ <name>delete.object</name>
+ <set-method>addDeleteObject</set-method>
+ <type>org.exoplatform.services.ldap.DeleteObjectCommand</type>
+ <init-params>
+ <values-param>
+ <name>objects.to.delete</name>
+ <value>cn=demo,ou=users,ou=portal,dc=exoplatform,dc=org</value>
+ <value>cn=test,ou=users,ou=portal,dc=exoplatform,dc=org</value>
+ <value>cn=Benj,ou=users,ou=portal,dc=exoplatform,dc=org</value>
+ <value>cn=tuan,ou=users,ou=portal,dc=exoplatform,dc=org</value>
+ </values-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+ -->
+
+</configuration>
\ No newline at end of file
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-06.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-06.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-06.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,85 +0,0 @@
-<?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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
-
- <component>
- <key>org.exoplatform.services.organization.OrganizationService</key>
- <type>org.exoplatform.services.organization.jdbc.OrganizationServiceImpl</type>
- </component>
-
- <external-component-plugins>
- <target-component>org.exoplatform.services.listener.ListenerService</target-component>
-
- <component-plugin>
- <name>organization.user.preDelete</name>
- <set-method>addListener</set-method>
- <type>org.exoplatform.services.organization.jdbc.listeners.RemoveUserProfileListener</type>
- </component-plugin>
-
- <component-plugin>
- <name>organization.user.postCreate</name>
- <set-method>addListener</set-method>
- <type>org.exoplatform.services.organization.jdbc.listeners.CreateUserListener</type>
- </component-plugin>
-
- <component-plugin>
- <name>organization.user.preDelete</name>
- <set-method>addListener</set-method>
- <type>org.exoplatform.services.organization.jdbc.listeners.RemoveMembershipListener</type>
- </component-plugin>
-
- <component-plugin>
- <name>organization.user.preDelete</name>
- <set-method>addListener</set-method>
- <type>org.exoplatform.portal.config.RemoveUserPortalConfigListener</type>
- </component-plugin>
-
- <component-plugin>
- <name>organization.membershipType.preDelete</name>
- <set-method>addListener</set-method>
- <type>org.exoplatform.services.organization.jdbc.listeners.RemoveMembershipListener</type>
- </component-plugin>
-
- <component-plugin>
- <name>organization.group.preDelete</name>
- <set-method>addListener</set-method>
- <type>org.exoplatform.services.organization.jdbc.listeners.RemoveMembershipListener</type>
- </component-plugin>
-
- <component-plugin>
- <name>organization.group.preDelete</name>
- <set-method>addListener</set-method>
- <type>org.exoplatform.portal.config.RemoveGroupPortalConfigListener</type>
- </component-plugin>
-
- <component-plugin>
- <name>organization.group.preDelete</name>
- <set-method>addListener</set-method>
- <type>org.exoplatform.services.organization.jdbc.listeners.RemoveGroupListener</type>
- </component-plugin>
-
- </external-component-plugins>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-06.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-06.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-06.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-06.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,85 @@
+<?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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+
+ <component>
+ <key>org.exoplatform.services.organization.OrganizationService</key>
+ <type>org.exoplatform.services.organization.jdbc.OrganizationServiceImpl</type>
+ </component>
+
+ <external-component-plugins>
+ <target-component>org.exoplatform.services.listener.ListenerService</target-component>
+
+ <component-plugin>
+ <name>organization.user.preDelete</name>
+ <set-method>addListener</set-method>
+ <type>org.exoplatform.services.organization.jdbc.listeners.RemoveUserProfileListener</type>
+ </component-plugin>
+
+ <component-plugin>
+ <name>organization.user.postCreate</name>
+ <set-method>addListener</set-method>
+ <type>org.exoplatform.services.organization.jdbc.listeners.CreateUserListener</type>
+ </component-plugin>
+
+ <component-plugin>
+ <name>organization.user.preDelete</name>
+ <set-method>addListener</set-method>
+ <type>org.exoplatform.services.organization.jdbc.listeners.RemoveMembershipListener</type>
+ </component-plugin>
+
+ <component-plugin>
+ <name>organization.user.preDelete</name>
+ <set-method>addListener</set-method>
+ <type>org.exoplatform.portal.config.RemoveUserPortalConfigListener</type>
+ </component-plugin>
+
+ <component-plugin>
+ <name>organization.membershipType.preDelete</name>
+ <set-method>addListener</set-method>
+ <type>org.exoplatform.services.organization.jdbc.listeners.RemoveMembershipListener</type>
+ </component-plugin>
+
+ <component-plugin>
+ <name>organization.group.preDelete</name>
+ <set-method>addListener</set-method>
+ <type>org.exoplatform.services.organization.jdbc.listeners.RemoveMembershipListener</type>
+ </component-plugin>
+
+ <component-plugin>
+ <name>organization.group.preDelete</name>
+ <set-method>addListener</set-method>
+ <type>org.exoplatform.portal.config.RemoveGroupPortalConfigListener</type>
+ </component-plugin>
+
+ <component-plugin>
+ <name>organization.group.preDelete</name>
+ <set-method>addListener</set-method>
+ <type>org.exoplatform.services.organization.jdbc.listeners.RemoveGroupListener</type>
+ </component-plugin>
+
+ </external-component-plugins>
+
+</configuration>
\ No newline at end of file
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-07.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-07.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-07.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,56 +0,0 @@
-<?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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
-
- <component>
- <key>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</key>
- <type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
- <init-params>
- <value-param>
- <name>conf-path</name>
- <description>JCR configuration file</description>
- <value>war:/conf/jcr/repository-configuration.xml</value>
- </value-param>
- <properties-param>
- <name>working-conf</name>
- <description>working-conf</description>
- <property name="persister-class-name" value="org.exoplatform.services.jcr.impl.config.JDBCConfigurationPersister"/>
- <property name="source-name" value="jdbcexo"/>
- <property name="dialect" value="hsqldb"/>
- </properties-param>
- </init-params>
- </component>
-
- <component>
- <type>org.exoplatform.services.jcr.ext.registry.RegistryService</type>
- <init-params>
- <properties-param>
- <name>locations</name>
- <property name="repository" value="system"/>
- </properties-param>
- </init-params>
- </component>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-07.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-07.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-07.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-07.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,56 @@
+<?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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+
+ <component>
+ <key>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</key>
+ <type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
+ <init-params>
+ <value-param>
+ <name>conf-path</name>
+ <description>JCR configuration file</description>
+ <value>war:/conf/jcr/repository-configuration.xml</value>
+ </value-param>
+ <properties-param>
+ <name>working-conf</name>
+ <description>working-conf</description>
+ <property name="persister-class-name" value="org.exoplatform.services.jcr.impl.config.JDBCConfigurationPersister"/>
+ <property name="source-name" value="jdbcexo"/>
+ <property name="dialect" value="hsqldb"/>
+ </properties-param>
+ </init-params>
+ </component>
+
+ <component>
+ <type>org.exoplatform.services.jcr.ext.registry.RegistryService</type>
+ <init-params>
+ <properties-param>
+ <name>locations</name>
+ <property name="repository" value="system"/>
+ </properties-param>
+ </init-params>
+ </component>
+
+</configuration>
\ No newline at end of file
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-08.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-08.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-08.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,47 +0,0 @@
-<?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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
-
- <component>
- <key>org.exoplatform.services.mail.MailService</key>
- <type>org.exoplatform.services.mail.impl.MailServiceImpl</type>
- <init-params>
- <properties-param>
- <name>config</name>
- <property name="mail.smtp.auth.username" value="exoservice(a)gmail.com" />
- <property name="mail.smtp.auth.password" value="exoadmin" />
- <property name="mail.smtp.host" value="smtp.gmail.com" />
- <property name="mail.smtp.port" value="465" />
- <property name="mail.smtp.starttls.enable" value="true" />
- <property name="mail.smtp.auth" value="true" />
- <property name="mail.smtp.debug" value="false" />
- <property name="mail.smtp.socketFactory.port" value="465" />
- <property name="mail.smtp.socketFactory.class" value="javax.net.ssl.SSLSocketFactory" />
- <property name="mail.smtp.socketFactory.fallback" value="false" />
- </properties-param>
- </init-params>
- </component>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-08.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-08.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-08.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-08.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,47 @@
+<?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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+
+ <component>
+ <key>org.exoplatform.services.mail.MailService</key>
+ <type>org.exoplatform.services.mail.impl.MailServiceImpl</type>
+ <init-params>
+ <properties-param>
+ <name>config</name>
+ <property name="mail.smtp.auth.username" value="exoservice(a)gmail.com" />
+ <property name="mail.smtp.auth.password" value="exoadmin" />
+ <property name="mail.smtp.host" value="smtp.gmail.com" />
+ <property name="mail.smtp.port" value="465" />
+ <property name="mail.smtp.starttls.enable" value="true" />
+ <property name="mail.smtp.auth" value="true" />
+ <property name="mail.smtp.debug" value="false" />
+ <property name="mail.smtp.socketFactory.port" value="465" />
+ <property name="mail.smtp.socketFactory.class" value="javax.net.ssl.SSLSocketFactory" />
+ <property name="mail.smtp.socketFactory.fallback" value="false" />
+ </properties-param>
+ </init-params>
+ </component>
+
+</configuration>
\ No newline at end of file
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-09.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-09.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-09.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,82 +0,0 @@
-<?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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
-
- <external-component-plugins>
- <target-component>org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator</target-component>
- <component-plugin>
- <name>addPaths</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.jcr.ext.hierarchy.impl.AddPathPlugin</type>
- <init-params>
- <object-param>
- <name>cms.configuration</name>
- <description>configuration for the cms path</description>
- <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig">
- <field name="repository"><string>repository</string></field>
- <field name="workspaces">
- <collection type="java.util.ArrayList">
- <value><string>collaboration</string></value>
- </collection>
- </field>
- <field name="jcrPaths">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$JcrPath">
- <field name="alias"><string>usersPath</string></field>
- <field name="path"><string>/Users</string></field>
- <field name="permissions">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
- <field name="identity"><string>*:/platform/administrators</string></field>
- <field name="read"><string>true</string></field>
- <field name="addNode"><string>true</string></field>
- <field name="setProperty"><string>true</string></field>
- <field name="remove"><string>true</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
- <field name="identity"><string>*:/platform/users</string></field>
- <field name="read"><string>true</string></field>
- <field name="addNode"><string>false</string></field>
- <field name="setProperty"><string>true</string></field>
- <field name="remove"><string>false</string></field>
- </object>
- </value>
- </collection>
- </field>
- </object>
- </value>
- </collection>
- </field>
- </object>
- </object-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-09.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-09.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-09.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-09.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,82 @@
+<?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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+
+ <external-component-plugins>
+ <target-component>org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator</target-component>
+ <component-plugin>
+ <name>addPaths</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.jcr.ext.hierarchy.impl.AddPathPlugin</type>
+ <init-params>
+ <object-param>
+ <name>cms.configuration</name>
+ <description>configuration for the cms path</description>
+ <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig">
+ <field name="repository"><string>repository</string></field>
+ <field name="workspaces">
+ <collection type="java.util.ArrayList">
+ <value><string>collaboration</string></value>
+ </collection>
+ </field>
+ <field name="jcrPaths">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$JcrPath">
+ <field name="alias"><string>usersPath</string></field>
+ <field name="path"><string>/Users</string></field>
+ <field name="permissions">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
+ <field name="identity"><string>*:/platform/administrators</string></field>
+ <field name="read"><string>true</string></field>
+ <field name="addNode"><string>true</string></field>
+ <field name="setProperty"><string>true</string></field>
+ <field name="remove"><string>true</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
+ <field name="identity"><string>*:/platform/users</string></field>
+ <field name="read"><string>true</string></field>
+ <field name="addNode"><string>false</string></field>
+ <field name="setProperty"><string>true</string></field>
+ <field name="remove"><string>false</string></field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+
+</configuration>
\ No newline at end of file
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-10.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-10.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-10.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,56 +0,0 @@
-<?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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
-
- <component>
- <key>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</key>
- <type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
- <init-params>
- <value-param>
- <name>conf-path</name>
- <description>JCR configuration file</description>
- <value>war:/conf/jcr/repository-configuration.xml</value>
- </value-param>
- <properties-param>
- <name>working-conf</name>
- <description>working-conf</description>
- <property name="persister-class-name" value="org.exoplatform.services.jcr.impl.config.JDBCConfigurationPersister"/>
- <property name="source-name" value="jdbcexo"/>
- <property name="dialect" value="hsqldb"/>
- </properties-param>
- </init-params>
- </component>
-
- <component>
- <type>org.exoplatform.services.jcr.ext.registry.RegistryService</type>
- <init-params>
- <properties-param>
- <name>locations</name>
- <property name="repository" value="system"/>
- </properties-param>
- </init-params>
- </component>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-10.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-10.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-10.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-10.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,56 @@
+<?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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+
+ <component>
+ <key>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</key>
+ <type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
+ <init-params>
+ <value-param>
+ <name>conf-path</name>
+ <description>JCR configuration file</description>
+ <value>war:/conf/jcr/repository-configuration.xml</value>
+ </value-param>
+ <properties-param>
+ <name>working-conf</name>
+ <description>working-conf</description>
+ <property name="persister-class-name" value="org.exoplatform.services.jcr.impl.config.JDBCConfigurationPersister"/>
+ <property name="source-name" value="jdbcexo"/>
+ <property name="dialect" value="hsqldb"/>
+ </properties-param>
+ </init-params>
+ </component>
+
+ <component>
+ <type>org.exoplatform.services.jcr.ext.registry.RegistryService</type>
+ <init-params>
+ <properties-param>
+ <name>locations</name>
+ <property name="repository" value="system"/>
+ </properties-param>
+ </init-params>
+ </component>
+
+</configuration>
\ No newline at end of file
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-11.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-11.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-11.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,101 +0,0 @@
-<?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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
-
- <component>
- <key>org.exoplatform.services.database.HibernateService</key>
- <jmx-name>database:type=HibernateService</jmx-name>
- <type>org.exoplatform.services.database.impl.HibernateServiceImpl</type>
- <init-params>
- <properties-param>
- <name>hibernate.properties</name>
- <description>Default Hibernate Service</description>
- <property name="hibernate.show_sql" value="false"/>
- <property name="hibernate.cglib.use_reflection_optimizer" value="true"/>
- <property name="hibernate.connection.url" value="jdbc:hsqldb:file:../temp/data/exodb"/>
- <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver"/>
- <property name="hibernate.connection.autocommit" value="true"/>
- <property name="hibernate.connection.username" value="sa"/>
- <property name="hibernate.connection.password" value=""/>
- <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
- <property name="hibernate.c3p0.min_size" value="5"/>
- <property name="hibernate.c3p0.max_size" value="20"/>
- <property name="hibernate.c3p0.timeout" value="1800"/>
- <property name="hibernate.c3p0.max_statements" value="50"/>
- </properties-param>
- </init-params>
- </component>
-
- <!--
- <component>
- <key>org.exoplatform.services.database.DatabaseService</key>
- <type>org.exoplatform.services.database.impl.XAPoolTxSupportDatabaseService</type>
- <init-params>
- <properties-param>
- <name>default</name>
- <description>Connection configuration</description>
- <property name='connection.driver' value='org.hsqldb.jdbcDriver'/>
- <property name='connection.url' value='jdbc:hsqldb:file:../temp/data/exodb'/>
- <property name='connection.login' value='sa'/>
- <property name='connection.password' value=''/>
- <property name='connection.min-size' value='3'/>
- <property name='connection.max-size' value='5'/>
- </properties-param>
- </init-params>
- </component>
- -->
-
- <external-component-plugins>
- <target-component>org.exoplatform.services.naming.InitialContextInitializer</target-component>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcexo</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
- <property name="url" value="jdbc:hsqldb:file:../temp/data/exodb"/>
- <property name="username" value="sa"/>
- <property name="password" value=""/>
- </properties-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-11.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-11.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-11.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-11.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,101 @@
+<?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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+
+ <component>
+ <key>org.exoplatform.services.database.HibernateService</key>
+ <jmx-name>database:type=HibernateService</jmx-name>
+ <type>org.exoplatform.services.database.impl.HibernateServiceImpl</type>
+ <init-params>
+ <properties-param>
+ <name>hibernate.properties</name>
+ <description>Default Hibernate Service</description>
+ <property name="hibernate.show_sql" value="false"/>
+ <property name="hibernate.cglib.use_reflection_optimizer" value="true"/>
+ <property name="hibernate.connection.url" value="jdbc:hsqldb:file:../temp/data/exodb"/>
+ <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver"/>
+ <property name="hibernate.connection.autocommit" value="true"/>
+ <property name="hibernate.connection.username" value="sa"/>
+ <property name="hibernate.connection.password" value=""/>
+ <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
+ <property name="hibernate.c3p0.min_size" value="5"/>
+ <property name="hibernate.c3p0.max_size" value="20"/>
+ <property name="hibernate.c3p0.timeout" value="1800"/>
+ <property name="hibernate.c3p0.max_statements" value="50"/>
+ </properties-param>
+ </init-params>
+ </component>
+
+ <!--
+ <component>
+ <key>org.exoplatform.services.database.DatabaseService</key>
+ <type>org.exoplatform.services.database.impl.XAPoolTxSupportDatabaseService</type>
+ <init-params>
+ <properties-param>
+ <name>default</name>
+ <description>Connection configuration</description>
+ <property name='connection.driver' value='org.hsqldb.jdbcDriver'/>
+ <property name='connection.url' value='jdbc:hsqldb:file:../temp/data/exodb'/>
+ <property name='connection.login' value='sa'/>
+ <property name='connection.password' value=''/>
+ <property name='connection.min-size' value='3'/>
+ <property name='connection.max-size' value='5'/>
+ </properties-param>
+ </init-params>
+ </component>
+ -->
+
+ <external-component-plugins>
+ <target-component>org.exoplatform.services.naming.InitialContextInitializer</target-component>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcexo</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
+ <property name="url" value="jdbc:hsqldb:file:../temp/data/exodb"/>
+ <property name="username" value="sa"/>
+ <property name="password" value=""/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+
+</configuration>
\ No newline at end of file
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-12.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-12.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-12.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,154 +0,0 @@
-<?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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
-
- <component>
- <type>org.exoplatform.services.portletcontainer.PortletContainerConf</type>
- <init-params>
- <object-param>
- <name>conf</name>
- <object type="org.exoplatform.services.portletcontainer.PortletContainer">
- <field name="global">
- <object type="org.exoplatform.services.portletcontainer.config.Global">
- <field name="name"><string>ExoPortletContainer</string></field>
- <field name="description">
- <string>A JSR 286 compliant portlet container </string>
- </field>
- <field name="majorVersion"><int>2</int></field>
- <field name="minorVersion"><int>0</int></field>
- </object>
- </field>
- <field name="bundle">
- <object type="org.exoplatform.services.portletcontainer.config.DelegatedBundle">
- <field name="enable"><string>true</string></field>
- </object>
- </field>
- <field name="cache">
- <object type="org.exoplatform.services.portletcontainer.config.Cache">
- <field name="enable"><string>true</string></field>
- </object>
- </field>
- <field name="supportedContent">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.services.portletcontainer.config.SupportedContent">
- <field name="name"><string>text/html</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.portletcontainer.config.SupportedContent">
- <field name="name"> <string>text/wml</string> </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.portletcontainer.config.SupportedContent">
- <field name="name"> <string>audio/x-mpeg</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.portletcontainer.config.SupportedContent">
- <field name="name"> <string>image/bmp</string> </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.portletcontainer.config.SupportedContent">
- <field name="name"> <string>image/jpg</string> </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.portletcontainer.config.SupportedContent">
- <field name="name"> <string>image/jpeg</string> </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.portletcontainer.config.SupportedContent">
- <field name="name"> <string>image/gif</string> </field>
- </object>
- </value>
- </collection>
- </field>
- <field name="customMode">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.services.portletcontainer.config.CustomMode">
- <field name="name"> <string>config</string> </field>
- <field name="description">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.services.portletcontainer.config.Description">
- <field name="lang"> <string>en</string></field>
- <field name="description"><string>to let admin config portlets </string> </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.portletcontainer.config.Description">
- <field
- name="lang">
- <string>
- fr
- </string>
- </field>
- <field
- name="description">
- <string>
- permet de
- configurer
- les portlets
- </string>
- </field>
- </object>
- </value>
- </collection>
- </field>
- </object>
- </value>
- </collection>
- </field>
- <field name="properties">
- <collection type="java.util.ArrayList">
- <value>
- <object
- type="org.exoplatform.services.portletcontainer.config.Properties">
- <field name="description">
- <string>
- a testing property
- </string>
- </field>
- <field name="name">
- <string>test</string>
- </field>
- <field name="value">
- <string>test_value</string>
- </field>
- </object>
- </value>
- </collection>
- </field>
- </object>
- </object-param>
- </init-params>
- </component>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-12.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-12.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-12.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-12.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,154 @@
+<?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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+
+ <component>
+ <type>org.exoplatform.services.portletcontainer.PortletContainerConf</type>
+ <init-params>
+ <object-param>
+ <name>conf</name>
+ <object type="org.exoplatform.services.portletcontainer.PortletContainer">
+ <field name="global">
+ <object type="org.exoplatform.services.portletcontainer.config.Global">
+ <field name="name"><string>ExoPortletContainer</string></field>
+ <field name="description">
+ <string>A JSR 286 compliant portlet container </string>
+ </field>
+ <field name="majorVersion"><int>2</int></field>
+ <field name="minorVersion"><int>0</int></field>
+ </object>
+ </field>
+ <field name="bundle">
+ <object type="org.exoplatform.services.portletcontainer.config.DelegatedBundle">
+ <field name="enable"><string>true</string></field>
+ </object>
+ </field>
+ <field name="cache">
+ <object type="org.exoplatform.services.portletcontainer.config.Cache">
+ <field name="enable"><string>true</string></field>
+ </object>
+ </field>
+ <field name="supportedContent">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.services.portletcontainer.config.SupportedContent">
+ <field name="name"><string>text/html</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.portletcontainer.config.SupportedContent">
+ <field name="name"> <string>text/wml</string> </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.portletcontainer.config.SupportedContent">
+ <field name="name"> <string>audio/x-mpeg</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.portletcontainer.config.SupportedContent">
+ <field name="name"> <string>image/bmp</string> </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.portletcontainer.config.SupportedContent">
+ <field name="name"> <string>image/jpg</string> </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.portletcontainer.config.SupportedContent">
+ <field name="name"> <string>image/jpeg</string> </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.portletcontainer.config.SupportedContent">
+ <field name="name"> <string>image/gif</string> </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ <field name="customMode">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.services.portletcontainer.config.CustomMode">
+ <field name="name"> <string>config</string> </field>
+ <field name="description">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.services.portletcontainer.config.Description">
+ <field name="lang"> <string>en</string></field>
+ <field name="description"><string>to let admin config portlets </string> </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.portletcontainer.config.Description">
+ <field
+ name="lang">
+ <string>
+ fr
+ </string>
+ </field>
+ <field
+ name="description">
+ <string>
+ permet de
+ configurer
+ les portlets
+ </string>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ <field name="properties">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object
+ type="org.exoplatform.services.portletcontainer.config.Properties">
+ <field name="description">
+ <string>
+ a testing property
+ </string>
+ </field>
+ <field name="name">
+ <string>test</string>
+ </field>
+ <field name="value">
+ <string>test_value</string>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component>
+
+</configuration>
\ No newline at end of file
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-13.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-13.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-13.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,53 +0,0 @@
-<?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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
-
- <import>war:/conf/common/common-configuration.xml</import>
- <import>war:/conf/common/logs-configuration.xml</import>
- <import>war:/conf/database/database-configuration.xml</import>
- <import>war:/conf/jcr/jcr-configuration.xml</import>
- <import>war:/conf/common/portlet-container-configuration.xml</import>
-
- <!--if organization service is database, import hibernate-organization-configuration.xml-->
- <import>war:/conf/organization/hibernate-configuration.xml</import>
-
- <!-- <import>war:/conf/jdbc-configuration.xml</import> -->
- <!--for organization service used active directory which is user lookup server -->
- <!--
- <import>war:/conf/activedirectory-configuration.xml</import>
- -->
-
- <!--for organization service used ldap server which is user lookup server -->
- <!--
- <import>war:/conf/ldap-configuration.xml</import>
- -->
- <!-- <import>war:/conf/security-configuration.xml</import> -->
- <import>war:/conf/organization/organization-configuration.xml</import>
- <import>war:/conf/jcr/component-plugins-configuration.xml</import>
- <import>war:/conf/mail/portal-mail-configuration.xml</import>
- <import>war:/conf/portal/portal-configuration.xml</import>
- <import>war:/conf/portal/application-registry-configuration.xml</import>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-13.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-13.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-13.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-13.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,53 @@
+<?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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+
+ <import>war:/conf/common/common-configuration.xml</import>
+ <import>war:/conf/common/logs-configuration.xml</import>
+ <import>war:/conf/database/database-configuration.xml</import>
+ <import>war:/conf/jcr/jcr-configuration.xml</import>
+ <import>war:/conf/common/portlet-container-configuration.xml</import>
+
+ <!--if organization service is database, import hibernate-organization-configuration.xml-->
+ <import>war:/conf/organization/hibernate-configuration.xml</import>
+
+ <!-- <import>war:/conf/jdbc-configuration.xml</import> -->
+ <!--for organization service used active directory which is user lookup server -->
+ <!--
+ <import>war:/conf/activedirectory-configuration.xml</import>
+ -->
+
+ <!--for organization service used ldap server which is user lookup server -->
+ <!--
+ <import>war:/conf/ldap-configuration.xml</import>
+ -->
+ <!-- <import>war:/conf/security-configuration.xml</import> -->
+ <import>war:/conf/organization/organization-configuration.xml</import>
+ <import>war:/conf/jcr/component-plugins-configuration.xml</import>
+ <import>war:/conf/mail/portal-mail-configuration.xml</import>
+ <import>war:/conf/portal/portal-configuration.xml</import>
+ <import>war:/conf/portal/application-registry-configuration.xml</import>
+
+</configuration>
\ No newline at end of file
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-14.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-14.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-14.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,42 +0,0 @@
-<?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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
-
- <component>
- <key>org.exoplatform.services.security.SecurityService</key>
- <type>org.exoplatform.services.security.impl.SecurityServiceImpl</type>
- <init-params>
- <value-param>
- <name>security.authentication</name>
- <value>sso</value>
- </value-param>
- <value-param>
- <name>security.sso-authentication</name>
- <value>cas</value>
- </value-param>
- </init-params>
- </component>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-14.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-14.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-14.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-14.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,42 @@
+<?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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+
+ <component>
+ <key>org.exoplatform.services.security.SecurityService</key>
+ <type>org.exoplatform.services.security.impl.SecurityServiceImpl</type>
+ <init-params>
+ <value-param>
+ <name>security.authentication</name>
+ <value>sso</value>
+ </value-param>
+ <value-param>
+ <name>security.sso-authentication</name>
+ <value>cas</value>
+ </value-param>
+ </init-params>
+ </component>
+
+</configuration>
\ No newline at end of file
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-15.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-15.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-15.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,68 +0,0 @@
-<?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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
-
- <component>
- <key>org.exoplatform.services.log.LogConfigurationInitializer</key>
- <type>org.exoplatform.services.log.LogConfigurationInitializer</type>
- <init-params>
-
- <!-- JDK -->
- <value-param>
- <name>configurator</name>
- <value>org.exoplatform.services.log.impl.Jdk14Configurator</value>
- </value-param>
- <properties-param>
- <name>properties</name>
- <description>jdk1.4 Logger properties</description>
- <property name="handlers" value="java.util.logging.ConsoleHandler"/>
- <property name=".level" value="FINE"/>
- <property name="java.util.logging.ConsoleHandler.level" value="FINE"/>
- </properties-param>
- <!-- end JDK -->
- <!-- Log4J -->
- <!--
- <value-param>
- <name>configurator</name>
- <value>org.exoplatform.services.log.impl.Log4JConfigurator</value>
- </value-param>
- <properties-param>
- <name>properties</name>
- <description>Log4J properties</description>
- <property name="log4j.rootLogger" value="DEBUG, stdout, file"/>
- <property name="log4j.appender.stdout" value="org.apache.log4j.ConsoleAppender"/>
- <property name="log4j.appender.stdout.layout" value="org.apache.log4j.PatternLayout"/>
- <property name="log4j.appender.stdout.layout.ConversionPattern" value="%d {dd.MM.yyyy HH:mm:ss} %c {1}: %m (%F, line %L) %n"/>
- <property name="log4j.appender.file" value="org.apache.log4j.FileAppender"/>
- <property name="log4j.appender.file.File" value="jcr.log"/>
- <property name="log4j.appender.file.layout" value="org.apache.log4j.PatternLayout"/>
- <property name="log4j.appender.file.layout.ConversionPattern" value="%d{dd.MM.yyyy HH:mm:ss} %m (%F, line %L) %n"/>
- </properties-param>
- -->
- <!-- end Log4J-->
- </init-params>
- </component>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-15.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-15.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-15.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-15.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,68 @@
+<?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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+
+ <component>
+ <key>org.exoplatform.services.log.LogConfigurationInitializer</key>
+ <type>org.exoplatform.services.log.LogConfigurationInitializer</type>
+ <init-params>
+
+ <!-- JDK -->
+ <value-param>
+ <name>configurator</name>
+ <value>org.exoplatform.services.log.impl.Jdk14Configurator</value>
+ </value-param>
+ <properties-param>
+ <name>properties</name>
+ <description>jdk1.4 Logger properties</description>
+ <property name="handlers" value="java.util.logging.ConsoleHandler"/>
+ <property name=".level" value="FINE"/>
+ <property name="java.util.logging.ConsoleHandler.level" value="FINE"/>
+ </properties-param>
+ <!-- end JDK -->
+ <!-- Log4J -->
+ <!--
+ <value-param>
+ <name>configurator</name>
+ <value>org.exoplatform.services.log.impl.Log4JConfigurator</value>
+ </value-param>
+ <properties-param>
+ <name>properties</name>
+ <description>Log4J properties</description>
+ <property name="log4j.rootLogger" value="DEBUG, stdout, file"/>
+ <property name="log4j.appender.stdout" value="org.apache.log4j.ConsoleAppender"/>
+ <property name="log4j.appender.stdout.layout" value="org.apache.log4j.PatternLayout"/>
+ <property name="log4j.appender.stdout.layout.ConversionPattern" value="%d {dd.MM.yyyy HH:mm:ss} %c {1}: %m (%F, line %L) %n"/>
+ <property name="log4j.appender.file" value="org.apache.log4j.FileAppender"/>
+ <property name="log4j.appender.file.File" value="jcr.log"/>
+ <property name="log4j.appender.file.layout" value="org.apache.log4j.PatternLayout"/>
+ <property name="log4j.appender.file.layout.ConversionPattern" value="%d{dd.MM.yyyy HH:mm:ss} %m (%F, line %L) %n"/>
+ </properties-param>
+ -->
+ <!-- end Log4J-->
+ </init-params>
+ </component>
+
+</configuration>
\ No newline at end of file
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-16.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-16.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-16.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,105 +0,0 @@
-<?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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
-
- <component>
- <key>org.exoplatform.services.naming.InitialContextInitializer</key>
- <type>org.exoplatform.services.naming.InitialContextInitializer</type>
- <init-params>
- <properties-param>
- <name>default-properties</name>
- <description>Default initial context properties</description>
- <!--
- <property name="java.naming.factory.initial" value="org.exoplatform.services.naming.SimpleContextFactory"/>
- -->
- </properties-param>
- </init-params>
- </component>
-
- <component>
- <key>org.exoplatform.services.resources.LocaleConfigService</key>
- <type>org.exoplatform.services.resources.impl.LocaleConfigServiceImpl</type>
- <init-params>
- <value-param>
- <name>locale.config.file</name>
- <value>war:/conf/common/locales-config.xml</value>
- </value-param>
- </init-params>
- </component>
-
- <component>
- <key>org.exoplatform.services.resources.ResourceBundleService</key>
- <type>org.exoplatform.services.resources.jcr.ResourceBundleServiceImpl</type>
- <init-params>
- <values-param>
- <name>classpath.resources</name>
- <description>The resources that start with the following package name should be load from file system</description>
- <value>locale.portlet</value>
- </values-param>
- <values-param>
- <name>init.resources</name>
- <description>Store the following resources into the db for the first launch </description>
- <value>locale.portal.expression</value>
- <value>locale.portal.services</value>
- <value>locale.portal.webui</value>
- <value>locale.portal.custom</value>
- <value>locale.navigation.portal.classic</value>
- <value>locale.navigation.group.platform.administrators</value>
- <value>locale.navigation.group.platform.users</value>
- <value>locale.navigation.group.platform.guests</value>
- <value>locale.navigation.group.organization.management.executive-board</value>
- </values-param>
- <values-param>
- <name>portal.resource.names</name>
- <description>The properties files of the portal , those file will be merged
- into one ResoruceBundle properties </description>
- <value>locale.portal.expression</value>
- <value>locale.portal.services</value>
- <value>locale.portal.webui</value>
- <value>locale.portal.custom</value>
- </values-param>
- </init-params>
- </component>
-
- <component>
- <key>org.exoplatform.services.cache.CacheService</key>
- <jmx-name>cache:type=CacheService</jmx-name>
- <type>org.exoplatform.services.cache.impl.CacheServiceImpl</type>
- <init-params>
- <object-param>
- <name>cache.config.default</name>
- <description>The default cache configuration</description>
- <object type="org.exoplatform.services.cache.ExoCacheConfig">
- <field name="name"><string>default</string></field>
- <field name="maxSize"><int>300</int></field>
- <field name="liveTime"><long>-1</long></field>
- <field name="distributed"><boolean>false</boolean></field>
- <field name="implementation"><string>org.exoplatform.services.cache.concurrent.ConcurrentFIFOExoCache</string></field>
- </object>
- </object-param>
- </init-params>
- </component>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-16.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-16.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-16.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-16.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,105 @@
+<?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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+
+ <component>
+ <key>org.exoplatform.services.naming.InitialContextInitializer</key>
+ <type>org.exoplatform.services.naming.InitialContextInitializer</type>
+ <init-params>
+ <properties-param>
+ <name>default-properties</name>
+ <description>Default initial context properties</description>
+ <!--
+ <property name="java.naming.factory.initial" value="org.exoplatform.services.naming.SimpleContextFactory"/>
+ -->
+ </properties-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.resources.LocaleConfigService</key>
+ <type>org.exoplatform.services.resources.impl.LocaleConfigServiceImpl</type>
+ <init-params>
+ <value-param>
+ <name>locale.config.file</name>
+ <value>war:/conf/common/locales-config.xml</value>
+ </value-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.resources.ResourceBundleService</key>
+ <type>org.exoplatform.services.resources.jcr.ResourceBundleServiceImpl</type>
+ <init-params>
+ <values-param>
+ <name>classpath.resources</name>
+ <description>The resources that start with the following package name should be load from file system</description>
+ <value>locale.portlet</value>
+ </values-param>
+ <values-param>
+ <name>init.resources</name>
+ <description>Store the following resources into the db for the first launch </description>
+ <value>locale.portal.expression</value>
+ <value>locale.portal.services</value>
+ <value>locale.portal.webui</value>
+ <value>locale.portal.custom</value>
+ <value>locale.navigation.portal.classic</value>
+ <value>locale.navigation.group.platform.administrators</value>
+ <value>locale.navigation.group.platform.users</value>
+ <value>locale.navigation.group.platform.guests</value>
+ <value>locale.navigation.group.organization.management.executive-board</value>
+ </values-param>
+ <values-param>
+ <name>portal.resource.names</name>
+ <description>The properties files of the portal , those file will be merged
+ into one ResoruceBundle properties </description>
+ <value>locale.portal.expression</value>
+ <value>locale.portal.services</value>
+ <value>locale.portal.webui</value>
+ <value>locale.portal.custom</value>
+ </values-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.cache.CacheService</key>
+ <jmx-name>cache:type=CacheService</jmx-name>
+ <type>org.exoplatform.services.cache.impl.CacheServiceImpl</type>
+ <init-params>
+ <object-param>
+ <name>cache.config.default</name>
+ <description>The default cache configuration</description>
+ <object type="org.exoplatform.services.cache.ExoCacheConfig">
+ <field name="name"><string>default</string></field>
+ <field name="maxSize"><int>300</int></field>
+ <field name="liveTime"><long>-1</long></field>
+ <field name="distributed"><boolean>false</boolean></field>
+ <field name="implementation"><string>org.exoplatform.services.cache.concurrent.ConcurrentFIFOExoCache</string></field>
+ </object>
+ </object-param>
+ </init-params>
+ </component>
+
+</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1 (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1)
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-01.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-01.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-01.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,224 +0,0 @@
-<?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.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.portal.config.DataStorage</key>
- <type>org.exoplatform.portal.config.jcr.DataStorageImpl</type>
- </component>
-
- <component>
- <key>org.exoplatform.portal.application.UserGadgetStorage</key>
- <type>org.exoplatform.portal.application.jcr.UserGadgetStorageImpl</type>
- </component>
-
- <component>
- <key>org.exoplatform.portal.layout.PortalLayoutService</key>
- <type>org.exoplatform.portal.layout.jcr.PortalLayoutServiceImpl</type>
- <init-params>
- <value-param>
- <name>template.location</name>
- <description>Location of container templates</description>
- <value>war:/conf/portal/template/containers</value>
- </value-param>
- </init-params>
- </component>
-
- <component>
- <key>org.exoplatform.portal.config.UserACL</key>
- <type>org.exoplatform.portal.config.UserACL</type>
- <init-params>
- <value-param>
- <name>super.user</name>
- <description>administrator</description>
- <value>root</value>
- </value-param>
-
- <value-param>
- <name>portal.creator.groups</name>
- <description>groups with membership type have permission to manage portal</description>
- <value>*:/platform/administrators,*:/organization/management/executive-board</value>
- </value-param>
-
- <value-param>
- <name>navigation.creator.membership.type</name>
- <description>specific membership type have full permission with group navigation</description>
- <value>manager</value>
- </value-param>
- <value-param>
- <name>guests.group</name>
- <description>guests group</description>
- <value>/platform/guests</value>
- </value-param>
- <value-param>
- <name>access.control.workspace</name>
- <description>groups with memberships that have the right to access the User Control Workspace</description>
- <value>*:/platform/administrators,*:/organization/management/executive-board</value>
- </value-param>
- </init-params>
- </component>
-
- <component>
- <key>org.exoplatform.portal.config.UserPortalConfigService</key>
- <type>org.exoplatform.portal.config.UserPortalConfigService</type>
- <component-plugins>
- <component-plugin>
- <name>new.portal.config.user.listener</name>
- <set-method>initListener</set-method>
- <type>org.exoplatform.portal.config.NewPortalConfigListener</type>
- <description>this listener init the portal configuration</description>
- <init-params>
- <value-param>
- <name>default.portal</name>
- <description>The default portal for checking db is empty or not</description>
- <value>classic</value>
- </value-param>
- <object-param>
- <name>portal.configuration</name>
- <description>description</description>
- <object type="org.exoplatform.portal.config.NewPortalConfig">
- <field name="predefinedOwner">
- <collection type="java.util.HashSet">
- <value><string>classic</string></value>
- </collection>
- </field>
- <field name="ownerType"><string>portal</string></field>
- <field name="templateLocation"><string>war:/conf/portal</string></field>
- </object>
- </object-param>
- <object-param>
- <name>group.configuration</name>
- <description>description</description>
- <object type="org.exoplatform.portal.config.NewPortalConfig">
- <field name="predefinedOwner">
- <collection type="java.util.HashSet">
- <value><string>platform/administrators</string></value>
- <value><string>platform/users</string></value>
- <value><string>platform/guests</string></value>
- <value><string>organization/management/executive-board</string></value>
- </collection>
- </field>
- <field name="ownerType"><string>group</string></field>
- <field name="templateLocation"><string>war:/conf/portal</string></field>
- </object>
- </object-param>
- <object-param>
- <name>user.configuration</name>
- <description>description</description>
- <object type="org.exoplatform.portal.config.NewPortalConfig">
- <field name="predefinedOwner">
- <collection type="java.util.HashSet">
- <value><string>root</string></value>
- <value><string>john</string></value>
- <value><string>marry</string></value>
- <value><string>demo</string></value>
- </collection>
- </field>
- <field name="ownerType"><string>user</string></field>
- <field name="templateLocation"><string>war:/conf/portal</string></field>
- </object>
- </object-param>
- <object-param>
- <name>page.templates</name>
- <description>List of page templates</description>
- <object type="org.exoplatform.portal.config.PageTemplateConfig">
- <field name="templates">
- <collection type="java.util.ArrayList"></collection>
- </field>
- <field name="location"><string>war:/conf/portal/template/pages</string></field>
- </object>
- </object-param>
- </init-params>
- </component-plugin>
- </component-plugins>
-
- </component>
-
- <external-component-plugins>
- <target-component>org.exoplatform.services.organization.OrganizationService</target-component>
-
- <component-plugin>
- <name>user.portal.config.listener</name>
- <set-method>addListenerPlugin</set-method>
- <type>org.exoplatform.portal.config.UserPortalConfigListener</type>
- </component-plugin>
-
- <component-plugin>
- <name>group.portal.config.listener</name>
- <set-method>addListenerPlugin</set-method>
- <type>org.exoplatform.portal.config.GroupPortalConfigListener</type>
- </component-plugin>
-
- <component-plugin>
- <name>ecm.new.user.event.listener</name>
- <set-method>addListenerPlugin</set-method>
- <type>org.exoplatform.services.jcr.ext.hierarchy.impl.NewUserListener</type>
- <description>description</description>
- <init-params>
- <object-param>
- <name>configuration</name>
- <description>description</description>
- <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig">
- <field name="repository"><string>repository</string></field>
- <field name="workspaces">
- <collection type="java.util.ArrayList">
- <value><string>collaboration</string></value>
- </collection>
- </field>
- <field name="jcrPaths">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$JcrPath">
- <field name="alias"><string>userApplicationData</string></field>
- <field name="path"><string>ApplicationData</string></field>
- <field name="nodeType"><string>nt:unstructured</string></field>
- <field name="permissions">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
- <field name="identity"><string>*:/platform/administrators</string></field>
- <field name="read"><string>true</string></field>
- <field name="addNode"><string>true</string></field>
- <field name="setProperty"><string>true</string></field>
- <field name="remove"><string>true</string></field>
- </object>
- </value>
- </collection>
- </field>
- <field name="mixinTypes">
- <collection type="java.util.ArrayList">
- </collection>
- </field>
- </object>
- </value>
- </collection>
- </field>
- </object>
- </object-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-01.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-01.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-01.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-01.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,224 @@
+<?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.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.portal.config.DataStorage</key>
+ <type>org.exoplatform.portal.config.jcr.DataStorageImpl</type>
+ </component>
+
+ <component>
+ <key>org.exoplatform.portal.application.UserGadgetStorage</key>
+ <type>org.exoplatform.portal.application.jcr.UserGadgetStorageImpl</type>
+ </component>
+
+ <component>
+ <key>org.exoplatform.portal.layout.PortalLayoutService</key>
+ <type>org.exoplatform.portal.layout.jcr.PortalLayoutServiceImpl</type>
+ <init-params>
+ <value-param>
+ <name>template.location</name>
+ <description>Location of container templates</description>
+ <value>war:/conf/portal/template/containers</value>
+ </value-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.portal.config.UserACL</key>
+ <type>org.exoplatform.portal.config.UserACL</type>
+ <init-params>
+ <value-param>
+ <name>super.user</name>
+ <description>administrator</description>
+ <value>root</value>
+ </value-param>
+
+ <value-param>
+ <name>portal.creator.groups</name>
+ <description>groups with membership type have permission to manage portal</description>
+ <value>*:/platform/administrators,*:/organization/management/executive-board</value>
+ </value-param>
+
+ <value-param>
+ <name>navigation.creator.membership.type</name>
+ <description>specific membership type have full permission with group navigation</description>
+ <value>manager</value>
+ </value-param>
+ <value-param>
+ <name>guests.group</name>
+ <description>guests group</description>
+ <value>/platform/guests</value>
+ </value-param>
+ <value-param>
+ <name>access.control.workspace</name>
+ <description>groups with memberships that have the right to access the User Control Workspace</description>
+ <value>*:/platform/administrators,*:/organization/management/executive-board</value>
+ </value-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.portal.config.UserPortalConfigService</key>
+ <type>org.exoplatform.portal.config.UserPortalConfigService</type>
+ <component-plugins>
+ <component-plugin>
+ <name>new.portal.config.user.listener</name>
+ <set-method>initListener</set-method>
+ <type>org.exoplatform.portal.config.NewPortalConfigListener</type>
+ <description>this listener init the portal configuration</description>
+ <init-params>
+ <value-param>
+ <name>default.portal</name>
+ <description>The default portal for checking db is empty or not</description>
+ <value>classic</value>
+ </value-param>
+ <object-param>
+ <name>portal.configuration</name>
+ <description>description</description>
+ <object type="org.exoplatform.portal.config.NewPortalConfig">
+ <field name="predefinedOwner">
+ <collection type="java.util.HashSet">
+ <value><string>classic</string></value>
+ </collection>
+ </field>
+ <field name="ownerType"><string>portal</string></field>
+ <field name="templateLocation"><string>war:/conf/portal</string></field>
+ </object>
+ </object-param>
+ <object-param>
+ <name>group.configuration</name>
+ <description>description</description>
+ <object type="org.exoplatform.portal.config.NewPortalConfig">
+ <field name="predefinedOwner">
+ <collection type="java.util.HashSet">
+ <value><string>platform/administrators</string></value>
+ <value><string>platform/users</string></value>
+ <value><string>platform/guests</string></value>
+ <value><string>organization/management/executive-board</string></value>
+ </collection>
+ </field>
+ <field name="ownerType"><string>group</string></field>
+ <field name="templateLocation"><string>war:/conf/portal</string></field>
+ </object>
+ </object-param>
+ <object-param>
+ <name>user.configuration</name>
+ <description>description</description>
+ <object type="org.exoplatform.portal.config.NewPortalConfig">
+ <field name="predefinedOwner">
+ <collection type="java.util.HashSet">
+ <value><string>root</string></value>
+ <value><string>john</string></value>
+ <value><string>marry</string></value>
+ <value><string>demo</string></value>
+ </collection>
+ </field>
+ <field name="ownerType"><string>user</string></field>
+ <field name="templateLocation"><string>war:/conf/portal</string></field>
+ </object>
+ </object-param>
+ <object-param>
+ <name>page.templates</name>
+ <description>List of page templates</description>
+ <object type="org.exoplatform.portal.config.PageTemplateConfig">
+ <field name="templates">
+ <collection type="java.util.ArrayList"></collection>
+ </field>
+ <field name="location"><string>war:/conf/portal/template/pages</string></field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+ </component-plugins>
+
+ </component>
+
+ <external-component-plugins>
+ <target-component>org.exoplatform.services.organization.OrganizationService</target-component>
+
+ <component-plugin>
+ <name>user.portal.config.listener</name>
+ <set-method>addListenerPlugin</set-method>
+ <type>org.exoplatform.portal.config.UserPortalConfigListener</type>
+ </component-plugin>
+
+ <component-plugin>
+ <name>group.portal.config.listener</name>
+ <set-method>addListenerPlugin</set-method>
+ <type>org.exoplatform.portal.config.GroupPortalConfigListener</type>
+ </component-plugin>
+
+ <component-plugin>
+ <name>ecm.new.user.event.listener</name>
+ <set-method>addListenerPlugin</set-method>
+ <type>org.exoplatform.services.jcr.ext.hierarchy.impl.NewUserListener</type>
+ <description>description</description>
+ <init-params>
+ <object-param>
+ <name>configuration</name>
+ <description>description</description>
+ <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig">
+ <field name="repository"><string>repository</string></field>
+ <field name="workspaces">
+ <collection type="java.util.ArrayList">
+ <value><string>collaboration</string></value>
+ </collection>
+ </field>
+ <field name="jcrPaths">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$JcrPath">
+ <field name="alias"><string>userApplicationData</string></field>
+ <field name="path"><string>ApplicationData</string></field>
+ <field name="nodeType"><string>nt:unstructured</string></field>
+ <field name="permissions">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
+ <field name="identity"><string>*:/platform/administrators</string></field>
+ <field name="read"><string>true</string></field>
+ <field name="addNode"><string>true</string></field>
+ <field name="setProperty"><string>true</string></field>
+ <field name="remove"><string>true</string></field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ <field name="mixinTypes">
+ <collection type="java.util.ArrayList">
+ </collection>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+
+</configuration>
\ No newline at end of file
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-02.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-02.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-02.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,241 +0,0 @@
-<?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.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.application.gadget.GadgetRegistryService</key>
- <type>org.exoplatform.application.gadget.jcr.GadgetRegistryServiceImpl</type>
- </component>
-
- <component>
- <key>org.exoplatform.application.gadget.SourceStorage</key>
- <type>org.exoplatform.application.gadget.jcr.SourceStorageImpl</type>
- <init-params>
- <properties-param>
- <name>location</name>
- <description>The location store source of gadgets</description>
- <property name="repository" value="repository"></property>
- <property name="workspace" value="gadgets"></property>
- <property name="store.path" value="/"></property>
- </properties-param>
- </init-params>
- </component>
-
- <component>
- <key>org.exoplatform.application.registry.ApplicationRegistryService</key>
- <type>org.exoplatform.application.registry.jcr.ApplicationRegistryServiceImpl</type>
- <component-plugins>
- <component-plugin>
- <name>new.portal.portlets.registry</name>
- <set-method>initListener</set-method>
- <type>org.exoplatform.application.registry.ApplicationCategoriesPlugins</type>
- <description>this listener init the portlets are registered in PortletRegister</description>
- <init-params>
- <object-param>
- <name>administration</name>
- <description>description</description>
- <object type="org.exoplatform.application.registry.ApplicationCategory">
- <field name="name"><string>administration</string></field>
- <field name="displayName"><string>Administration</string></field>
- <field name="description"><string>application for administration</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/administrators</string></value>
- <value><string>*:/organization/management/executive-board</string></value>
- </collection>
- </field>
- <field name="applications">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.application.registry.Application">
- <field name="applicationName"><string>ApplicationRegistryPortlet</string></field>
- <field name="categoryName"><string>administration</string></field>
- <field name="displayName"><string>Application Registry</string></field>
- <field name="description"><string>Application Registry</string></field>
- <field name="applicationType"><string>portlet</string></field>
- <field name="applicationGroup"><string>exoadmin</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/administrators</string></value>
- <value><string>*:/organization/management/executive-board</string></value>
- </collection>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.application.registry.Application">
- <field name="applicationName"><string>OrganizationPortlet</string></field>
- <field name="categoryName"><string>administration</string></field>
- <field name="displayName"><string>Organization Management</string></field>
- <field name="description"><string>Organization Management</string></field>
- <field name="applicationType"><string>portlet</string></field>
- <field name="applicationGroup"><string>exoadmin</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/administrators</string></value>
- <value><string>*:/organization/management/executive-board</string></value>
- </collection>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.application.registry.Application">
- <field name="applicationName"><string>AccountPortlet</string></field>
- <field name="categoryName"><string>administration</string></field>
- <field name="displayName"><string>New Account</string></field>
- <field name="description"><string>New Account</string></field>
- <field name="applicationType"><string>portlet</string></field>
- <field name="applicationGroup"><string>exoadmin</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/administrators</string></value>
- <value><string>*:/organization/management/executive-board</string></value>
- </collection>
- </field>
- </object>
- </value>
- </collection>
- </field>
- </object>
- </object-param>
-
- <object-param>
- <name>web</name>
- <description>description</description>
- <object type="org.exoplatform.application.registry.ApplicationCategory">
- <field name="name"><string>web</string></field>
- <field name="displayName"><string>web</string></field>
- <field name="description"><string>BasicPortlets</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/users</string></value>
- </collection>
- </field>
- <field name="applications">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.application.registry.Application">
- <field name="categoryName"><string>web</string></field>
- <field name="applicationName"><string>IFramePortlet</string></field>
- <field name="displayName"><string>IFrame</string></field>
- <field name="description"><string>IFrame</string></field>
- <field name="applicationType"><string>portlet</string></field>
- <field name="applicationGroup"><string>web</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/users</string></value>
- </collection>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.application.registry.Application">
- <field name="categoryName"><string>web</string></field>
- <field name="applicationName"><string>SiteMapPortlet</string></field>
- <field name="displayName"><string>SiteMap</string></field>
- <field name="description"><string>SiteMap</string></field>
- <field name="applicationType"><string>portlet</string></field>
- <field name="applicationGroup"><string>web</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/users</string></value>
- </collection>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.application.registry.Application">
- <field name="categoryName"><string>web</string></field>
- <field name="applicationName"><string>BrowserPortlet</string></field>
- <field name="displayName"><string>Web Explorer</string></field>
- <field name="description"><string>Web Explorer</string></field>
- <field name="applicationType"><string>portlet</string></field>
- <field name="applicationGroup"><string>web</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/users</string></value>
- </collection>
- </field>
- </object>
- </value>
- </collection>
- </field>
- </object>
- </object-param>
-
- <object-param>
- <name>dashboard</name>
- <description>description</description>
- <object type="org.exoplatform.application.registry.ApplicationCategory">
- <field name="name"><string>dashboard</string></field>
- <field name="displayName"><string>Dashboard</string></field>
- <field name="description"><string>Dashboard</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/users</string></value>
- </collection>
- </field>
- <field name="applications">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.application.registry.Application">
- <field name="categoryName"><string>dashboard</string></field>
- <field name="applicationName"><string>DashboardPortlet</string></field>
- <field name="displayName"><string>Dashboard Portlet</string></field>
- <field name="description"><string>Dashboard Portlet</string></field>
- <field name="applicationType"><string>portlet</string></field>
- <field name="applicationGroup"><string>dashboard</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/users</string></value>
- </collection>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.application.registry.Application">
- <field name="categoryName"><string>dashboard</string></field>
- <field name="applicationName"><string>GadgetPortlet</string></field>
- <field name="displayName"><string>Gadget Wrapper Portlet</string></field>
- <field name="description"><string>Gadget Wrapper Portlet</string></field>
- <field name="applicationType"><string>portlet</string></field>
- <field name="applicationGroup"><string>dashboard</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/users</string></value>
- </collection>
- </field>
- </object>
- </value>
- </collection>
- </field>
- </object>
- </object-param>
- </init-params>
- </component-plugin>
- </component-plugins>
- </component>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-02.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-02.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-02.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-02.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,241 @@
+<?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.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.application.gadget.GadgetRegistryService</key>
+ <type>org.exoplatform.application.gadget.jcr.GadgetRegistryServiceImpl</type>
+ </component>
+
+ <component>
+ <key>org.exoplatform.application.gadget.SourceStorage</key>
+ <type>org.exoplatform.application.gadget.jcr.SourceStorageImpl</type>
+ <init-params>
+ <properties-param>
+ <name>location</name>
+ <description>The location store source of gadgets</description>
+ <property name="repository" value="repository"></property>
+ <property name="workspace" value="gadgets"></property>
+ <property name="store.path" value="/"></property>
+ </properties-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.application.registry.ApplicationRegistryService</key>
+ <type>org.exoplatform.application.registry.jcr.ApplicationRegistryServiceImpl</type>
+ <component-plugins>
+ <component-plugin>
+ <name>new.portal.portlets.registry</name>
+ <set-method>initListener</set-method>
+ <type>org.exoplatform.application.registry.ApplicationCategoriesPlugins</type>
+ <description>this listener init the portlets are registered in PortletRegister</description>
+ <init-params>
+ <object-param>
+ <name>administration</name>
+ <description>description</description>
+ <object type="org.exoplatform.application.registry.ApplicationCategory">
+ <field name="name"><string>administration</string></field>
+ <field name="displayName"><string>Administration</string></field>
+ <field name="description"><string>application for administration</string></field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value><string>*:/platform/administrators</string></value>
+ <value><string>*:/organization/management/executive-board</string></value>
+ </collection>
+ </field>
+ <field name="applications">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.application.registry.Application">
+ <field name="applicationName"><string>ApplicationRegistryPortlet</string></field>
+ <field name="categoryName"><string>administration</string></field>
+ <field name="displayName"><string>Application Registry</string></field>
+ <field name="description"><string>Application Registry</string></field>
+ <field name="applicationType"><string>portlet</string></field>
+ <field name="applicationGroup"><string>exoadmin</string></field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value><string>*:/platform/administrators</string></value>
+ <value><string>*:/organization/management/executive-board</string></value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.application.registry.Application">
+ <field name="applicationName"><string>OrganizationPortlet</string></field>
+ <field name="categoryName"><string>administration</string></field>
+ <field name="displayName"><string>Organization Management</string></field>
+ <field name="description"><string>Organization Management</string></field>
+ <field name="applicationType"><string>portlet</string></field>
+ <field name="applicationGroup"><string>exoadmin</string></field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value><string>*:/platform/administrators</string></value>
+ <value><string>*:/organization/management/executive-board</string></value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.application.registry.Application">
+ <field name="applicationName"><string>AccountPortlet</string></field>
+ <field name="categoryName"><string>administration</string></field>
+ <field name="displayName"><string>New Account</string></field>
+ <field name="description"><string>New Account</string></field>
+ <field name="applicationType"><string>portlet</string></field>
+ <field name="applicationGroup"><string>exoadmin</string></field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value><string>*:/platform/administrators</string></value>
+ <value><string>*:/organization/management/executive-board</string></value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+
+ <object-param>
+ <name>web</name>
+ <description>description</description>
+ <object type="org.exoplatform.application.registry.ApplicationCategory">
+ <field name="name"><string>web</string></field>
+ <field name="displayName"><string>web</string></field>
+ <field name="description"><string>BasicPortlets</string></field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value><string>*:/platform/users</string></value>
+ </collection>
+ </field>
+ <field name="applications">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.application.registry.Application">
+ <field name="categoryName"><string>web</string></field>
+ <field name="applicationName"><string>IFramePortlet</string></field>
+ <field name="displayName"><string>IFrame</string></field>
+ <field name="description"><string>IFrame</string></field>
+ <field name="applicationType"><string>portlet</string></field>
+ <field name="applicationGroup"><string>web</string></field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value><string>*:/platform/users</string></value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.application.registry.Application">
+ <field name="categoryName"><string>web</string></field>
+ <field name="applicationName"><string>SiteMapPortlet</string></field>
+ <field name="displayName"><string>SiteMap</string></field>
+ <field name="description"><string>SiteMap</string></field>
+ <field name="applicationType"><string>portlet</string></field>
+ <field name="applicationGroup"><string>web</string></field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value><string>*:/platform/users</string></value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.application.registry.Application">
+ <field name="categoryName"><string>web</string></field>
+ <field name="applicationName"><string>BrowserPortlet</string></field>
+ <field name="displayName"><string>Web Explorer</string></field>
+ <field name="description"><string>Web Explorer</string></field>
+ <field name="applicationType"><string>portlet</string></field>
+ <field name="applicationGroup"><string>web</string></field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value><string>*:/platform/users</string></value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+
+ <object-param>
+ <name>dashboard</name>
+ <description>description</description>
+ <object type="org.exoplatform.application.registry.ApplicationCategory">
+ <field name="name"><string>dashboard</string></field>
+ <field name="displayName"><string>Dashboard</string></field>
+ <field name="description"><string>Dashboard</string></field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value><string>*:/platform/users</string></value>
+ </collection>
+ </field>
+ <field name="applications">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.application.registry.Application">
+ <field name="categoryName"><string>dashboard</string></field>
+ <field name="applicationName"><string>DashboardPortlet</string></field>
+ <field name="displayName"><string>Dashboard Portlet</string></field>
+ <field name="description"><string>Dashboard Portlet</string></field>
+ <field name="applicationType"><string>portlet</string></field>
+ <field name="applicationGroup"><string>dashboard</string></field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value><string>*:/platform/users</string></value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.application.registry.Application">
+ <field name="categoryName"><string>dashboard</string></field>
+ <field name="applicationName"><string>GadgetPortlet</string></field>
+ <field name="displayName"><string>Gadget Wrapper Portlet</string></field>
+ <field name="description"><string>Gadget Wrapper Portlet</string></field>
+ <field name="applicationType"><string>portlet</string></field>
+ <field name="applicationGroup"><string>dashboard</string></field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value><string>*:/platform/users</string></value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+ </component-plugins>
+ </component>
+
+</configuration>
\ No newline at end of file
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-03.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-03.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-03.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,304 +0,0 @@
-<?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.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">
-
- <external-component-plugins>
- <target-component>org.exoplatform.services.organization.OrganizationService</target-component>
- <component-plugin>
- <name>init.service.listener</name>
- <set-method>addListenerPlugin</set-method>
- <type>org.exoplatform.services.organization.OrganizationDatabaseInitializer</type>
- <description>this listener populate organization data for the first launch</description>
- <init-params>
- <value-param>
- <name>checkDatabaseAlgorithm</name>
- <description>check database</description>
- <value>entry</value>
- </value-param>
- <value-param>
- <name>printInformation</name>
- <description>Print information init database</description>
- <value>false</value>
- </value-param>
- <object-param>
- <name>configuration</name>
- <description>description</description>
- <object type="org.exoplatform.services.organization.OrganizationConfig">
- <field name="membershipType">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$MembershipType">
- <field name="type"><string>manager</string></field>
- <field name="description"><string>manager membership type</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$MembershipType">
- <field name="type"><string>member</string></field>
- <field name="description"><string>member membership type</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$MembershipType">
- <field name="type"><string>validator</string></field>
- <field name="description"><string>validator membership type</string></field>
- </object>
- </value>
- </collection>
- </field>
-
- <field name="group">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name"><string>platform</string></field>
- <field name="parentId"><string></string></field>
- <field name="description"><string>the /platform group</string></field>
- <field name="label"><string>Platform</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name"><string>administrators</string></field>
- <field name="parentId"><string>/platform</string></field>
- <field name="description"><string>the /platform/administrators group</string></field>
- <field name="label"><string>Administrators</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name"><string>users</string></field>
- <field name="parentId"><string>/platform</string></field>
- <field name="description"><string>the /platform/users group</string></field>
- <field name="label"><string>Users</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name"><string>guests</string></field>
- <field name="parentId"><string>/platform</string></field>
- <field name="description"><string>the /platform/guests group</string></field>
- <field name="label"><string>Guests</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name"><string>organization</string></field>
- <field name="parentId"><string></string></field>
- <field name="description"><string>the organization group</string></field>
- <field name="label"><string>Organization</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name"><string>management</string></field>
- <field name="parentId"><string>/organization</string></field>
- <field name="description"><string>the /organization/management group</string></field>
- <field name="label"><string>Management</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name"><string>executive-board</string></field>
- <field name="parentId"><string>/organization/management</string></field>
- <field name="description"><string>the /organization/management/executive-board group</string></field>
- <field name="label"><string>Executive Board</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name"><string>human-resources</string></field>
- <field name="parentId"><string>/organization/management</string></field>
- <field name="description"><string>the /organization/management/human-resource group</string></field>
- <field name="label"><string>Human Resources</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name"><string>communication</string></field>
- <field name="parentId"><string>/organization</string></field>
- <field name="description"><string>the /organization/communication group</string></field>
- <field name="label"><string>Communication</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name"><string>marketing</string></field>
- <field name="parentId"><string>/organization/communication</string></field>
- <field name="description"><string>the /organization/communication/marketing group</string></field>
- <field name="label"><string>Marketing</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name"><string>press-and-media</string></field>
- <field name="parentId"><string>/organization/communication</string></field>
- <field name="description"><string>the /organization/communication/press-and-media group</string></field>
- <field name="label"><string>Press and Media</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name"><string>operations</string></field>
- <field name="parentId"><string>/organization</string></field>
- <field name="description"><string>the /organization/operations and media group</string></field>
- <field name="label"><string>Operations</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name"><string>sales</string></field>
- <field name="parentId"><string>/organization/operations</string></field>
- <field name="description"><string>the /organization/operations/sales group</string></field>
- <field name="label"><string>Sales</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name"><string>finances</string></field>
- <field name="parentId"><string>/organization/operations</string></field>
- <field name="description"><string>the /organization/operations/finances group</string></field>
- <field name="label"><string>Finances</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name"><string>customers</string></field>
- <field name="parentId"><string></string></field>
- <field name="description"><string>the /customers group</string></field>
- <field name="label"><string>Customers</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name"><string>partners</string></field>
- <field name="parentId"><string></string></field>
- <field name="description"><string>the /partners group</string></field>
- <field name="label"><string>Partners</string></field>
- </object>
- </value>
- </collection>
- </field>
-
- <field name="user">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$User">
- <field name="userName"><string>root</string></field>
- <field name="password"><string>exo</string></field>
- <field name="firstName"><string>Root</string></field>
- <field name="lastName"><string>Root</string></field>
- <field name="email"><string>root@localhost</string></field>
- <field name="groups">
- <string>
- manager:/platform/administrators,member:/platform/users,
- member:/organization/management/executive-board
- </string>
- </field>
- </object>
- </value>
-
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$User">
- <field name="userName"><string>john</string></field>
- <field name="password"><string>exo</string></field>
- <field name="firstName"><string>John</string></field>
- <field name="lastName"><string>Anthony</string></field>
- <field name="email"><string>john@localhost</string></field>
- <field name="groups">
- <string>
- member:/platform/administrators,member:/platform/users,
- manager:/organization/management/executive-board
- </string>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$User">
- <field name="userName"><string>marry</string></field>
- <field name="password"><string>exo</string></field>
- <field name="firstName"><string>Marry</string></field>
- <field name="lastName"><string>Kelly</string></field>
- <field name="email"><string>marry@localhost</string></field>
- <field name="groups">
- <string>member:/platform/users</string>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$User">
- <field name="userName"><string>demo</string></field>
- <field name="password"><string>exo</string></field>
- <field name="firstName"><string>Demo</string></field>
- <field name="lastName"><string>exo</string></field>
- <field name="email"><string>demo@localhost</string></field>
- <field name="groups">
- <string>member:/platform/guests,member:/platform/users</string>
- </field>
- </object>
- </value>
- </collection>
- </field>
- </object>
- </object-param>
- </init-params>
- </component-plugin>
-
- <component-plugin>
- <name>new.user.event.listener</name>
- <set-method>addListenerPlugin</set-method>
- <type>org.exoplatform.services.organization.impl.NewUserEventListener</type>
- <description>this listener assign group and membership to a new created user</description>
- <init-params>
- <object-param>
- <name>configuration</name>
- <description>description</description>
- <object type="org.exoplatform.services.organization.impl.NewUserConfig">
- <field name="group">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.services.organization.impl.NewUserConfig$JoinGroup">
- <field name="groupId"><string>/platform/users</string></field>
- <field name="membership"><string>member</string></field>
- </object>
- </value>
- </collection>
- </field>
- <field name="ignoredUser">
- <collection type="java.util.HashSet">
- <value><string>root</string></value>
- <value><string>john</string></value>
- <value><string>marry</string></value>
- <value><string>demo</string></value>
- </collection>
- </field>
- </object>
- </object-param>
- </init-params>
- </component-plugin>
-
- </external-component-plugins>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-03.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-03.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-03.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-03.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,304 @@
+<?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.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">
+
+ <external-component-plugins>
+ <target-component>org.exoplatform.services.organization.OrganizationService</target-component>
+ <component-plugin>
+ <name>init.service.listener</name>
+ <set-method>addListenerPlugin</set-method>
+ <type>org.exoplatform.services.organization.OrganizationDatabaseInitializer</type>
+ <description>this listener populate organization data for the first launch</description>
+ <init-params>
+ <value-param>
+ <name>checkDatabaseAlgorithm</name>
+ <description>check database</description>
+ <value>entry</value>
+ </value-param>
+ <value-param>
+ <name>printInformation</name>
+ <description>Print information init database</description>
+ <value>false</value>
+ </value-param>
+ <object-param>
+ <name>configuration</name>
+ <description>description</description>
+ <object type="org.exoplatform.services.organization.OrganizationConfig">
+ <field name="membershipType">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$MembershipType">
+ <field name="type"><string>manager</string></field>
+ <field name="description"><string>manager membership type</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$MembershipType">
+ <field name="type"><string>member</string></field>
+ <field name="description"><string>member membership type</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$MembershipType">
+ <field name="type"><string>validator</string></field>
+ <field name="description"><string>validator membership type</string></field>
+ </object>
+ </value>
+ </collection>
+ </field>
+
+ <field name="group">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name"><string>platform</string></field>
+ <field name="parentId"><string></string></field>
+ <field name="description"><string>the /platform group</string></field>
+ <field name="label"><string>Platform</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name"><string>administrators</string></field>
+ <field name="parentId"><string>/platform</string></field>
+ <field name="description"><string>the /platform/administrators group</string></field>
+ <field name="label"><string>Administrators</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name"><string>users</string></field>
+ <field name="parentId"><string>/platform</string></field>
+ <field name="description"><string>the /platform/users group</string></field>
+ <field name="label"><string>Users</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name"><string>guests</string></field>
+ <field name="parentId"><string>/platform</string></field>
+ <field name="description"><string>the /platform/guests group</string></field>
+ <field name="label"><string>Guests</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name"><string>organization</string></field>
+ <field name="parentId"><string></string></field>
+ <field name="description"><string>the organization group</string></field>
+ <field name="label"><string>Organization</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name"><string>management</string></field>
+ <field name="parentId"><string>/organization</string></field>
+ <field name="description"><string>the /organization/management group</string></field>
+ <field name="label"><string>Management</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name"><string>executive-board</string></field>
+ <field name="parentId"><string>/organization/management</string></field>
+ <field name="description"><string>the /organization/management/executive-board group</string></field>
+ <field name="label"><string>Executive Board</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name"><string>human-resources</string></field>
+ <field name="parentId"><string>/organization/management</string></field>
+ <field name="description"><string>the /organization/management/human-resource group</string></field>
+ <field name="label"><string>Human Resources</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name"><string>communication</string></field>
+ <field name="parentId"><string>/organization</string></field>
+ <field name="description"><string>the /organization/communication group</string></field>
+ <field name="label"><string>Communication</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name"><string>marketing</string></field>
+ <field name="parentId"><string>/organization/communication</string></field>
+ <field name="description"><string>the /organization/communication/marketing group</string></field>
+ <field name="label"><string>Marketing</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name"><string>press-and-media</string></field>
+ <field name="parentId"><string>/organization/communication</string></field>
+ <field name="description"><string>the /organization/communication/press-and-media group</string></field>
+ <field name="label"><string>Press and Media</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name"><string>operations</string></field>
+ <field name="parentId"><string>/organization</string></field>
+ <field name="description"><string>the /organization/operations and media group</string></field>
+ <field name="label"><string>Operations</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name"><string>sales</string></field>
+ <field name="parentId"><string>/organization/operations</string></field>
+ <field name="description"><string>the /organization/operations/sales group</string></field>
+ <field name="label"><string>Sales</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name"><string>finances</string></field>
+ <field name="parentId"><string>/organization/operations</string></field>
+ <field name="description"><string>the /organization/operations/finances group</string></field>
+ <field name="label"><string>Finances</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name"><string>customers</string></field>
+ <field name="parentId"><string></string></field>
+ <field name="description"><string>the /customers group</string></field>
+ <field name="label"><string>Customers</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name"><string>partners</string></field>
+ <field name="parentId"><string></string></field>
+ <field name="description"><string>the /partners group</string></field>
+ <field name="label"><string>Partners</string></field>
+ </object>
+ </value>
+ </collection>
+ </field>
+
+ <field name="user">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$User">
+ <field name="userName"><string>root</string></field>
+ <field name="password"><string>exo</string></field>
+ <field name="firstName"><string>Root</string></field>
+ <field name="lastName"><string>Root</string></field>
+ <field name="email"><string>root@localhost</string></field>
+ <field name="groups">
+ <string>
+ manager:/platform/administrators,member:/platform/users,
+ member:/organization/management/executive-board
+ </string>
+ </field>
+ </object>
+ </value>
+
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$User">
+ <field name="userName"><string>john</string></field>
+ <field name="password"><string>exo</string></field>
+ <field name="firstName"><string>John</string></field>
+ <field name="lastName"><string>Anthony</string></field>
+ <field name="email"><string>john@localhost</string></field>
+ <field name="groups">
+ <string>
+ member:/platform/administrators,member:/platform/users,
+ manager:/organization/management/executive-board
+ </string>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$User">
+ <field name="userName"><string>marry</string></field>
+ <field name="password"><string>exo</string></field>
+ <field name="firstName"><string>Marry</string></field>
+ <field name="lastName"><string>Kelly</string></field>
+ <field name="email"><string>marry@localhost</string></field>
+ <field name="groups">
+ <string>member:/platform/users</string>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$User">
+ <field name="userName"><string>demo</string></field>
+ <field name="password"><string>exo</string></field>
+ <field name="firstName"><string>Demo</string></field>
+ <field name="lastName"><string>exo</string></field>
+ <field name="email"><string>demo@localhost</string></field>
+ <field name="groups">
+ <string>member:/platform/guests,member:/platform/users</string>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+
+ <component-plugin>
+ <name>new.user.event.listener</name>
+ <set-method>addListenerPlugin</set-method>
+ <type>org.exoplatform.services.organization.impl.NewUserEventListener</type>
+ <description>this listener assign group and membership to a new created user</description>
+ <init-params>
+ <object-param>
+ <name>configuration</name>
+ <description>description</description>
+ <object type="org.exoplatform.services.organization.impl.NewUserConfig">
+ <field name="group">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.services.organization.impl.NewUserConfig$JoinGroup">
+ <field name="groupId"><string>/platform/users</string></field>
+ <field name="membership"><string>member</string></field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ <field name="ignoredUser">
+ <collection type="java.util.HashSet">
+ <value><string>root</string></value>
+ <value><string>john</string></value>
+ <value><string>marry</string></value>
+ <value><string>demo</string></value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+
+ </external-component-plugins>
+
+</configuration>
\ No newline at end of file
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-04.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-04.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-04.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,134 +0,0 @@
-<?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.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.ldap.LDAPService</key>
- <type>org.exoplatform.services.ldap.impl.LDAPServiceImpl</type>
- <init-params>
- <object-param>
- <name>ldap.config</name>
- <description>Default ldap config</description>
- <object type="org.exoplatform.services.ldap.impl.LDAPConnectionConfig">
- <!-- for multiple ldap servers, use comma seperated list of host:port (Ex. ldap://127.0.0.1:389,10.0.0.1:389) -->
- <!-- whether or not to enable ssl, if ssl is used ensure that the javax.net.ssl.keyStore & java.net.ssl.keyStorePassword properties are set -->
- <!-- exo portal default installed javax.net.ssl.trustStore with file is java.home/lib/security/cacerts-->
- <!-- ldap service will check protocol, if protocol is ldaps, ssl is enable (Ex. for enable ssl: ldaps://10.0.0.3:636 ;for disable ssl: ldap://10.0.0.3:389 ) -->
- <!-- when enable ssl, ensure server name is *.directory and port (Ex. active.directory) -->
- <field name="providerURL"><string>ldaps://10.0.0.3:636</string></field>
- <field name="rootdn"><string>CN=Administrator,CN=Users, DC=exoplatform,DC=org</string></field>
- <field name="password"><string>site</string></field>
-
- <field name="version"><string>3</string></field>
-
- <field name="minConnection"><int>5</int></field>
-
- <field name="maxConnection"><int>10</int></field>
-
- <field name="referralMode"><string>ignore</string></field>
-
- <field name="serverName"><string>active.directory</string></field>
-
- </object>
- </object-param>
- </init-params>
- </component>
-
- <component>
- <key>org.exoplatform.services.organization.OrganizationService</key>
- <type>org.exoplatform.services.organization.ldap.OrganizationServiceImpl</type>
- <component-plugins>
- <component-plugin>
- <name>init.service.listener</name>
- <set-method>addListenerPlugin</set-method>
- <type>org.exoplatform.services.organization.ldap.OrganizationLdapInitializer</type>
- <description>this listener populate organization ldap service create default dn</description>
- </component-plugin>
- </component-plugins>
- <init-params>
- <object-param>
- <name>ldap.attribute.mapping</name>
- <description>ldap attribute mapping</description>
- <object type="org.exoplatform.services.organization.ldap.LDAPAttributeMapping">
- <field name="userLDAPClasses"><string>top,person,organizationalPerson,user</string></field>
- <field name="profileLDAPClasses"><string>top,organizationalPerson</string></field>
- <field name="groupLDAPClasses"><string>top,organizationalUnit</string></field>
- <field name="membershipTypeLDAPClasses"><string>top,group</string></field>
- <field name="membershipLDAPClasses"><string>top,group</string></field>
-
- <field name="baseURL"><string>dc=exoplatform,dc=org</string></field>
- <field name="groupsURL"><string>ou=groups,ou=portal,dc=exoplatform,dc=org</string></field>
- <field name="membershipTypeURL"><string>ou=memberships,ou=portal,dc=exoplatform,dc=org</string></field>
- <field name="userURL"><string>ou=users,ou=portal,dc=exoplatform,dc=org</string></field>
- <field name="profileURL"><string>ou=profiles,ou=portal,dc=exoplatform,dc=org</string></field>
-
- <field name="userAuthenticationAttr"><string>mail</string></field>
- <field name="userUsernameAttr"><string>sAMAccountName</string></field>
- <field name="userPassword"><string>unicodePwd</string></field>
- <!--unicodePwd-->
- <field name="userFirstNameAttr"><string>givenName</string></field>
- <field name="userLastNameAttr"><string>sn</string></field>
- <field name="userDisplayNameAttr"><string>displayName</string></field>
- <field name="userMailAttr"><string>mail</string></field>
- <field name="userObjectClassFilter"><string>objectClass=user</string></field>
-
- <field name="membershipTypeMemberValue"><string>member</string></field>
- <field name="membershipTypeRoleNameAttr"><string>cn</string></field>
- <field name="membershipTypeNameAttr"><string>cn</string></field>
- <field name="membershipTypeObjectClassFilter"><string>objectClass=group</string></field>
- <field name="membershiptypeObjectClass"><string>group</string></field>
-
- <field name="groupObjectClass"><string>organizationalUnit</string></field>
- <field name="groupObjectClassFilter"><string>objectClass=organizationalUnit</string></field>
-
- <field name="membershipObjectClass"><string>group</string></field>
- <field name="membershipObjectClassFilter"><string>objectClass=group</string></field>
-
- <field name="ldapCreatedTimeStampAttr"><string>createdTimeStamp</string></field>
- <field name="ldapModifiedTimeStampAttr"><string>modifiedTimeStamp</string></field>
- <field name="ldapDescriptionAttr"><string>description</string></field>
- </object>
- </object-param>
- </init-params>
- </component>
-
- <!--external-component-plugins>
- <target-component>org.exoplatform.services.database.HibernateService</target-component>
- <component-plugin>
- <name>add.hibernate.mapping</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.database.impl.AddHibernateMappingPlugin</type>
- <init-params>
- <values-param>
- <name>hibernate.mapping</name>
- <value>org/exoplatform/services/organization/impl/UserProfileData.hbm.xml</value>
- </values-param>
- </init-params>
- </component-plugin>
- </external-component-plugins-->
-
- <import>classpath:/conf/portal/organization-configuration.xml</import>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-04.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-04.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-04.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-04.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,134 @@
+<?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.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.ldap.LDAPService</key>
+ <type>org.exoplatform.services.ldap.impl.LDAPServiceImpl</type>
+ <init-params>
+ <object-param>
+ <name>ldap.config</name>
+ <description>Default ldap config</description>
+ <object type="org.exoplatform.services.ldap.impl.LDAPConnectionConfig">
+ <!-- for multiple ldap servers, use comma seperated list of host:port (Ex. ldap://127.0.0.1:389,10.0.0.1:389) -->
+ <!-- whether or not to enable ssl, if ssl is used ensure that the javax.net.ssl.keyStore & java.net.ssl.keyStorePassword properties are set -->
+ <!-- exo portal default installed javax.net.ssl.trustStore with file is java.home/lib/security/cacerts-->
+ <!-- ldap service will check protocol, if protocol is ldaps, ssl is enable (Ex. for enable ssl: ldaps://10.0.0.3:636 ;for disable ssl: ldap://10.0.0.3:389 ) -->
+ <!-- when enable ssl, ensure server name is *.directory and port (Ex. active.directory) -->
+ <field name="providerURL"><string>ldaps://10.0.0.3:636</string></field>
+ <field name="rootdn"><string>CN=Administrator,CN=Users, DC=exoplatform,DC=org</string></field>
+ <field name="password"><string>site</string></field>
+
+ <field name="version"><string>3</string></field>
+
+ <field name="minConnection"><int>5</int></field>
+
+ <field name="maxConnection"><int>10</int></field>
+
+ <field name="referralMode"><string>ignore</string></field>
+
+ <field name="serverName"><string>active.directory</string></field>
+
+ </object>
+ </object-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.organization.OrganizationService</key>
+ <type>org.exoplatform.services.organization.ldap.OrganizationServiceImpl</type>
+ <component-plugins>
+ <component-plugin>
+ <name>init.service.listener</name>
+ <set-method>addListenerPlugin</set-method>
+ <type>org.exoplatform.services.organization.ldap.OrganizationLdapInitializer</type>
+ <description>this listener populate organization ldap service create default dn</description>
+ </component-plugin>
+ </component-plugins>
+ <init-params>
+ <object-param>
+ <name>ldap.attribute.mapping</name>
+ <description>ldap attribute mapping</description>
+ <object type="org.exoplatform.services.organization.ldap.LDAPAttributeMapping">
+ <field name="userLDAPClasses"><string>top,person,organizationalPerson,user</string></field>
+ <field name="profileLDAPClasses"><string>top,organizationalPerson</string></field>
+ <field name="groupLDAPClasses"><string>top,organizationalUnit</string></field>
+ <field name="membershipTypeLDAPClasses"><string>top,group</string></field>
+ <field name="membershipLDAPClasses"><string>top,group</string></field>
+
+ <field name="baseURL"><string>dc=exoplatform,dc=org</string></field>
+ <field name="groupsURL"><string>ou=groups,ou=portal,dc=exoplatform,dc=org</string></field>
+ <field name="membershipTypeURL"><string>ou=memberships,ou=portal,dc=exoplatform,dc=org</string></field>
+ <field name="userURL"><string>ou=users,ou=portal,dc=exoplatform,dc=org</string></field>
+ <field name="profileURL"><string>ou=profiles,ou=portal,dc=exoplatform,dc=org</string></field>
+
+ <field name="userAuthenticationAttr"><string>mail</string></field>
+ <field name="userUsernameAttr"><string>sAMAccountName</string></field>
+ <field name="userPassword"><string>unicodePwd</string></field>
+ <!--unicodePwd-->
+ <field name="userFirstNameAttr"><string>givenName</string></field>
+ <field name="userLastNameAttr"><string>sn</string></field>
+ <field name="userDisplayNameAttr"><string>displayName</string></field>
+ <field name="userMailAttr"><string>mail</string></field>
+ <field name="userObjectClassFilter"><string>objectClass=user</string></field>
+
+ <field name="membershipTypeMemberValue"><string>member</string></field>
+ <field name="membershipTypeRoleNameAttr"><string>cn</string></field>
+ <field name="membershipTypeNameAttr"><string>cn</string></field>
+ <field name="membershipTypeObjectClassFilter"><string>objectClass=group</string></field>
+ <field name="membershiptypeObjectClass"><string>group</string></field>
+
+ <field name="groupObjectClass"><string>organizationalUnit</string></field>
+ <field name="groupObjectClassFilter"><string>objectClass=organizationalUnit</string></field>
+
+ <field name="membershipObjectClass"><string>group</string></field>
+ <field name="membershipObjectClassFilter"><string>objectClass=group</string></field>
+
+ <field name="ldapCreatedTimeStampAttr"><string>createdTimeStamp</string></field>
+ <field name="ldapModifiedTimeStampAttr"><string>modifiedTimeStamp</string></field>
+ <field name="ldapDescriptionAttr"><string>description</string></field>
+ </object>
+ </object-param>
+ </init-params>
+ </component>
+
+ <!--external-component-plugins>
+ <target-component>org.exoplatform.services.database.HibernateService</target-component>
+ <component-plugin>
+ <name>add.hibernate.mapping</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.database.impl.AddHibernateMappingPlugin</type>
+ <init-params>
+ <values-param>
+ <name>hibernate.mapping</name>
+ <value>org/exoplatform/services/organization/impl/UserProfileData.hbm.xml</value>
+ </values-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins-->
+
+ <import>classpath:/conf/portal/organization-configuration.xml</import>
+
+</configuration>
\ No newline at end of file
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-05.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-05.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-05.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,168 +0,0 @@
-<?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.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.ldap.LDAPService</key>
- <type>org.exoplatform.services.ldap.impl.LDAPServiceImpl</type>
- <init-params>
- <object-param>
- <name>ldap.config</name>
- <description>Default ldap config</description>
- <object type="org.exoplatform.services.ldap.impl.LDAPConnectionConfig">
-
- <!-- for multiple ldap servers, use comma seperated list of host:port (Ex. ldap://127.0.0.1:389,10.0.0.1:389) -->
- <field name="providerURL"><string>ldap://127.0.0.1:389,10.0.0.1:389</string></field>
-
- <field name="rootdn"><string>CN=Manager,DC=exoplatform,DC=org</string></field>
-
- <field name="password"><string>secret</string></field>
-
- <field name="version"><string>3</string></field>
-
- <field name="minConnection"><int>5</int></field>
-
- <field name="maxConnection"><int>10</int></field>
-
- <field name="referralMode"><string>follow</string></field>
-
-<!--
- <field name="referralMode"><string>ignore</string></field>
--->
-
- <field name="serverName"><string>default</string></field>
-
-<!--
- LDAP server names : default,
- active.directory,
- open.ldap,
- netscape.directory,
- redhat.directory;
--->
-
-
- </object>
- </object-param>
- </init-params>
- </component>
-
- <component>
- <key>org.exoplatform.services.organization.OrganizationService</key>
- <type>org.exoplatform.services.organization.ldap.OrganizationServiceImpl</type>
- <component-plugins>
- <component-plugin>
- <name>init.service.listener</name>
- <set-method>addListenerPlugin</set-method>
- <type>org.exoplatform.services.organization.ldap.OrganizationLdapInitializer</type>
- <description>this listener populate organization ldap service create default dn</description>
- </component-plugin>
- </component-plugins>
- <init-params>
- <value-param>
- <name>ldap.userDN.key</name>
- <description>The key used to compose user DN</description>
- <value>cn</value>
- </value-param>
-
- <object-param>
- <name>ldap.attribute.mapping</name>
- <description>ldap attribute mapping</description>
- <object type="org.exoplatform.services.organization.ldap.LDAPAttributeMapping">
- <field name="userLDAPClasses"><string>top,person,organizationalPerson,inetOrgPerson</string></field>
- <field name="profileLDAPClasses"><string>top,organizationalPerson</string></field>
- <field name="groupLDAPClasses"><string>top,organizationalUnit</string></field>
- <field name="membershipTypeLDAPClasses"><string>top,organizationalRole</string></field>
- <field name="membershipLDAPClasses"><string>top,groupOfNames</string></field>
-
- <field name="baseURL"><string>dc=exoplatform,dc=org</string></field>
- <field name="groupsURL"><string>ou=groups,ou=portal,dc=exoplatform,dc=org</string></field>
- <field name="membershipTypeURL"><string>ou=memberships,ou=portal,dc=exoplatform,dc=org</string></field>
- <field name="userURL"><string>ou=users,ou=portal,dc=exoplatform,dc=org</string></field>
- <field name="profileURL"><string>ou=profiles,ou=portal,dc=exoplatform,dc=org</string></field>
-
- <field name="userUsernameAttr"><string>uid</string></field>
- <field name="userPassword"><string>userPassword</string></field>
- <field name="userFirstNameAttr"><string>givenName</string></field>
- <field name="userLastNameAttr"><string>sn</string></field>
- <field name="userDisplayNameAttr"><string>displayName</string></field>
- <field name="userMailAttr"><string>mail</string></field>
- <field name="userObjectClassFilter"><string>objectClass=person</string></field>
-
- <field name="membershipTypeMemberValue"><string>member</string></field>
- <field name="membershipTypeRoleNameAttr"><string>cn</string></field>
- <field name="membershipTypeNameAttr"><string>cn</string></field>
- <field name="membershipTypeObjectClassFilter"><string>objectClass=organizationalRole</string></field>
- <field name="membershiptypeObjectClass"><string>organizationalRole</string></field>
-
- <field name="groupObjectClass"><string>organizationalUnit</string></field>
- <field name="groupObjectClassFilter"><string>objectClass=organizationalUnit</string></field>
-
- <field name="membershipObjectClass"><string>groupOfNames</string></field>
- <field name="membershipObjectClassFilter"><string>objectClass=groupOfNames</string></field>
-
- <field name="ldapCreatedTimeStampAttr"><string>createdTimeStamp</string></field>
- <field name="ldapModifiedTimeStampAttr"><string>modifiedTimeStamp</string></field>
- <field name="ldapDescriptionAttr"><string>description</string></field>
- </object>
- </object-param>
- </init-params>
- </component>
-
- <external-component-plugins>
- <target-component>org.exoplatform.services.database.HibernateService</target-component>
- <component-plugin>
- <name>add.hibernate.mapping</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.database.impl.AddHibernateMappingPlugin</type>
- <init-params>
- <values-param>
- <name>hibernate.mapping</name>
- <value>org/exoplatform/services/organization/impl/UserProfileData.hbm.xml</value>
- </values-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
-
- <!-- for ldap clean database
- <external-component-plugins>
- <target-component>org.exoplatform.services.ldap.LDAPService</target-component>
- <component-plugin>
- <name>delete.object</name>
- <set-method>addDeleteObject</set-method>
- <type>org.exoplatform.services.ldap.DeleteObjectCommand</type>
- <init-params>
- <values-param>
- <name>objects.to.delete</name>
- <value>cn=demo,ou=users,ou=portal,dc=exoplatform,dc=org</value>
- <value>cn=test,ou=users,ou=portal,dc=exoplatform,dc=org</value>
- <value>cn=Benj,ou=users,ou=portal,dc=exoplatform,dc=org</value>
- <value>cn=tuan,ou=users,ou=portal,dc=exoplatform,dc=org</value>
- </values-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
- -->
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-05.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-05.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-05.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-05.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,168 @@
+<?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.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.ldap.LDAPService</key>
+ <type>org.exoplatform.services.ldap.impl.LDAPServiceImpl</type>
+ <init-params>
+ <object-param>
+ <name>ldap.config</name>
+ <description>Default ldap config</description>
+ <object type="org.exoplatform.services.ldap.impl.LDAPConnectionConfig">
+
+ <!-- for multiple ldap servers, use comma seperated list of host:port (Ex. ldap://127.0.0.1:389,10.0.0.1:389) -->
+ <field name="providerURL"><string>ldap://127.0.0.1:389,10.0.0.1:389</string></field>
+
+ <field name="rootdn"><string>CN=Manager,DC=exoplatform,DC=org</string></field>
+
+ <field name="password"><string>secret</string></field>
+
+ <field name="version"><string>3</string></field>
+
+ <field name="minConnection"><int>5</int></field>
+
+ <field name="maxConnection"><int>10</int></field>
+
+ <field name="referralMode"><string>follow</string></field>
+
+<!--
+ <field name="referralMode"><string>ignore</string></field>
+-->
+
+ <field name="serverName"><string>default</string></field>
+
+<!--
+ LDAP server names : default,
+ active.directory,
+ open.ldap,
+ netscape.directory,
+ redhat.directory;
+-->
+
+
+ </object>
+ </object-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.organization.OrganizationService</key>
+ <type>org.exoplatform.services.organization.ldap.OrganizationServiceImpl</type>
+ <component-plugins>
+ <component-plugin>
+ <name>init.service.listener</name>
+ <set-method>addListenerPlugin</set-method>
+ <type>org.exoplatform.services.organization.ldap.OrganizationLdapInitializer</type>
+ <description>this listener populate organization ldap service create default dn</description>
+ </component-plugin>
+ </component-plugins>
+ <init-params>
+ <value-param>
+ <name>ldap.userDN.key</name>
+ <description>The key used to compose user DN</description>
+ <value>cn</value>
+ </value-param>
+
+ <object-param>
+ <name>ldap.attribute.mapping</name>
+ <description>ldap attribute mapping</description>
+ <object type="org.exoplatform.services.organization.ldap.LDAPAttributeMapping">
+ <field name="userLDAPClasses"><string>top,person,organizationalPerson,inetOrgPerson</string></field>
+ <field name="profileLDAPClasses"><string>top,organizationalPerson</string></field>
+ <field name="groupLDAPClasses"><string>top,organizationalUnit</string></field>
+ <field name="membershipTypeLDAPClasses"><string>top,organizationalRole</string></field>
+ <field name="membershipLDAPClasses"><string>top,groupOfNames</string></field>
+
+ <field name="baseURL"><string>dc=exoplatform,dc=org</string></field>
+ <field name="groupsURL"><string>ou=groups,ou=portal,dc=exoplatform,dc=org</string></field>
+ <field name="membershipTypeURL"><string>ou=memberships,ou=portal,dc=exoplatform,dc=org</string></field>
+ <field name="userURL"><string>ou=users,ou=portal,dc=exoplatform,dc=org</string></field>
+ <field name="profileURL"><string>ou=profiles,ou=portal,dc=exoplatform,dc=org</string></field>
+
+ <field name="userUsernameAttr"><string>uid</string></field>
+ <field name="userPassword"><string>userPassword</string></field>
+ <field name="userFirstNameAttr"><string>givenName</string></field>
+ <field name="userLastNameAttr"><string>sn</string></field>
+ <field name="userDisplayNameAttr"><string>displayName</string></field>
+ <field name="userMailAttr"><string>mail</string></field>
+ <field name="userObjectClassFilter"><string>objectClass=person</string></field>
+
+ <field name="membershipTypeMemberValue"><string>member</string></field>
+ <field name="membershipTypeRoleNameAttr"><string>cn</string></field>
+ <field name="membershipTypeNameAttr"><string>cn</string></field>
+ <field name="membershipTypeObjectClassFilter"><string>objectClass=organizationalRole</string></field>
+ <field name="membershiptypeObjectClass"><string>organizationalRole</string></field>
+
+ <field name="groupObjectClass"><string>organizationalUnit</string></field>
+ <field name="groupObjectClassFilter"><string>objectClass=organizationalUnit</string></field>
+
+ <field name="membershipObjectClass"><string>groupOfNames</string></field>
+ <field name="membershipObjectClassFilter"><string>objectClass=groupOfNames</string></field>
+
+ <field name="ldapCreatedTimeStampAttr"><string>createdTimeStamp</string></field>
+ <field name="ldapModifiedTimeStampAttr"><string>modifiedTimeStamp</string></field>
+ <field name="ldapDescriptionAttr"><string>description</string></field>
+ </object>
+ </object-param>
+ </init-params>
+ </component>
+
+ <external-component-plugins>
+ <target-component>org.exoplatform.services.database.HibernateService</target-component>
+ <component-plugin>
+ <name>add.hibernate.mapping</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.database.impl.AddHibernateMappingPlugin</type>
+ <init-params>
+ <values-param>
+ <name>hibernate.mapping</name>
+ <value>org/exoplatform/services/organization/impl/UserProfileData.hbm.xml</value>
+ </values-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+
+ <!-- for ldap clean database
+ <external-component-plugins>
+ <target-component>org.exoplatform.services.ldap.LDAPService</target-component>
+ <component-plugin>
+ <name>delete.object</name>
+ <set-method>addDeleteObject</set-method>
+ <type>org.exoplatform.services.ldap.DeleteObjectCommand</type>
+ <init-params>
+ <values-param>
+ <name>objects.to.delete</name>
+ <value>cn=demo,ou=users,ou=portal,dc=exoplatform,dc=org</value>
+ <value>cn=test,ou=users,ou=portal,dc=exoplatform,dc=org</value>
+ <value>cn=Benj,ou=users,ou=portal,dc=exoplatform,dc=org</value>
+ <value>cn=tuan,ou=users,ou=portal,dc=exoplatform,dc=org</value>
+ </values-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+ -->
+
+</configuration>
\ No newline at end of file
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-06.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-06.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-06.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,85 +0,0 @@
-<?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.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.organization.OrganizationService</key>
- <type>org.exoplatform.services.organization.jdbc.OrganizationServiceImpl</type>
- </component>
-
- <external-component-plugins>
- <target-component>org.exoplatform.services.listener.ListenerService</target-component>
-
- <component-plugin>
- <name>organization.user.preDelete</name>
- <set-method>addListener</set-method>
- <type>org.exoplatform.services.organization.jdbc.listeners.RemoveUserProfileListener</type>
- </component-plugin>
-
- <component-plugin>
- <name>organization.user.postCreate</name>
- <set-method>addListener</set-method>
- <type>org.exoplatform.services.organization.jdbc.listeners.CreateUserListener</type>
- </component-plugin>
-
- <component-plugin>
- <name>organization.user.preDelete</name>
- <set-method>addListener</set-method>
- <type>org.exoplatform.services.organization.jdbc.listeners.RemoveMembershipListener</type>
- </component-plugin>
-
- <component-plugin>
- <name>organization.user.preDelete</name>
- <set-method>addListener</set-method>
- <type>org.exoplatform.portal.config.RemoveUserPortalConfigListener</type>
- </component-plugin>
-
- <component-plugin>
- <name>organization.membershipType.preDelete</name>
- <set-method>addListener</set-method>
- <type>org.exoplatform.services.organization.jdbc.listeners.RemoveMembershipListener</type>
- </component-plugin>
-
- <component-plugin>
- <name>organization.group.preDelete</name>
- <set-method>addListener</set-method>
- <type>org.exoplatform.services.organization.jdbc.listeners.RemoveMembershipListener</type>
- </component-plugin>
-
- <component-plugin>
- <name>organization.group.preDelete</name>
- <set-method>addListener</set-method>
- <type>org.exoplatform.portal.config.RemoveGroupPortalConfigListener</type>
- </component-plugin>
-
- <component-plugin>
- <name>organization.group.preDelete</name>
- <set-method>addListener</set-method>
- <type>org.exoplatform.services.organization.jdbc.listeners.RemoveGroupListener</type>
- </component-plugin>
-
- </external-component-plugins>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-06.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-06.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-06.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-06.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,85 @@
+<?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.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.organization.OrganizationService</key>
+ <type>org.exoplatform.services.organization.jdbc.OrganizationServiceImpl</type>
+ </component>
+
+ <external-component-plugins>
+ <target-component>org.exoplatform.services.listener.ListenerService</target-component>
+
+ <component-plugin>
+ <name>organization.user.preDelete</name>
+ <set-method>addListener</set-method>
+ <type>org.exoplatform.services.organization.jdbc.listeners.RemoveUserProfileListener</type>
+ </component-plugin>
+
+ <component-plugin>
+ <name>organization.user.postCreate</name>
+ <set-method>addListener</set-method>
+ <type>org.exoplatform.services.organization.jdbc.listeners.CreateUserListener</type>
+ </component-plugin>
+
+ <component-plugin>
+ <name>organization.user.preDelete</name>
+ <set-method>addListener</set-method>
+ <type>org.exoplatform.services.organization.jdbc.listeners.RemoveMembershipListener</type>
+ </component-plugin>
+
+ <component-plugin>
+ <name>organization.user.preDelete</name>
+ <set-method>addListener</set-method>
+ <type>org.exoplatform.portal.config.RemoveUserPortalConfigListener</type>
+ </component-plugin>
+
+ <component-plugin>
+ <name>organization.membershipType.preDelete</name>
+ <set-method>addListener</set-method>
+ <type>org.exoplatform.services.organization.jdbc.listeners.RemoveMembershipListener</type>
+ </component-plugin>
+
+ <component-plugin>
+ <name>organization.group.preDelete</name>
+ <set-method>addListener</set-method>
+ <type>org.exoplatform.services.organization.jdbc.listeners.RemoveMembershipListener</type>
+ </component-plugin>
+
+ <component-plugin>
+ <name>organization.group.preDelete</name>
+ <set-method>addListener</set-method>
+ <type>org.exoplatform.portal.config.RemoveGroupPortalConfigListener</type>
+ </component-plugin>
+
+ <component-plugin>
+ <name>organization.group.preDelete</name>
+ <set-method>addListener</set-method>
+ <type>org.exoplatform.services.organization.jdbc.listeners.RemoveGroupListener</type>
+ </component-plugin>
+
+ </external-component-plugins>
+
+</configuration>
\ No newline at end of file
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-07.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-07.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-07.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,56 +0,0 @@
-<?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.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.jcr.config.RepositoryServiceConfiguration</key>
- <type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
- <init-params>
- <value-param>
- <name>conf-path</name>
- <description>JCR configuration file</description>
- <value>war:/conf/jcr/repository-configuration.xml</value>
- </value-param>
- <properties-param>
- <name>working-conf</name>
- <description>working-conf</description>
- <property name="persister-class-name" value="org.exoplatform.services.jcr.impl.config.JDBCConfigurationPersister"/>
- <property name="source-name" value="jdbcexo"/>
- <property name="dialect" value="hsqldb"/>
- </properties-param>
- </init-params>
- </component>
-
- <component>
- <type>org.exoplatform.services.jcr.ext.registry.RegistryService</type>
- <init-params>
- <properties-param>
- <name>locations</name>
- <property name="repository" value="system"/>
- </properties-param>
- </init-params>
- </component>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-07.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-07.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-07.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-07.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,56 @@
+<?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.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.jcr.config.RepositoryServiceConfiguration</key>
+ <type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
+ <init-params>
+ <value-param>
+ <name>conf-path</name>
+ <description>JCR configuration file</description>
+ <value>war:/conf/jcr/repository-configuration.xml</value>
+ </value-param>
+ <properties-param>
+ <name>working-conf</name>
+ <description>working-conf</description>
+ <property name="persister-class-name" value="org.exoplatform.services.jcr.impl.config.JDBCConfigurationPersister"/>
+ <property name="source-name" value="jdbcexo"/>
+ <property name="dialect" value="hsqldb"/>
+ </properties-param>
+ </init-params>
+ </component>
+
+ <component>
+ <type>org.exoplatform.services.jcr.ext.registry.RegistryService</type>
+ <init-params>
+ <properties-param>
+ <name>locations</name>
+ <property name="repository" value="system"/>
+ </properties-param>
+ </init-params>
+ </component>
+
+</configuration>
\ No newline at end of file
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-08.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-08.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-08.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,47 +0,0 @@
-<?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.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.mail.MailService</key>
- <type>org.exoplatform.services.mail.impl.MailServiceImpl</type>
- <init-params>
- <properties-param>
- <name>config</name>
- <property name="mail.smtp.auth.username" value="exoservice(a)gmail.com" />
- <property name="mail.smtp.auth.password" value="exoadmin" />
- <property name="mail.smtp.host" value="smtp.gmail.com" />
- <property name="mail.smtp.port" value="465" />
- <property name="mail.smtp.starttls.enable" value="true" />
- <property name="mail.smtp.auth" value="true" />
- <property name="mail.smtp.debug" value="false" />
- <property name="mail.smtp.socketFactory.port" value="465" />
- <property name="mail.smtp.socketFactory.class" value="javax.net.ssl.SSLSocketFactory" />
- <property name="mail.smtp.socketFactory.fallback" value="false" />
- </properties-param>
- </init-params>
- </component>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-08.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-08.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-08.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-08.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,47 @@
+<?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.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.mail.MailService</key>
+ <type>org.exoplatform.services.mail.impl.MailServiceImpl</type>
+ <init-params>
+ <properties-param>
+ <name>config</name>
+ <property name="mail.smtp.auth.username" value="exoservice(a)gmail.com" />
+ <property name="mail.smtp.auth.password" value="exoadmin" />
+ <property name="mail.smtp.host" value="smtp.gmail.com" />
+ <property name="mail.smtp.port" value="465" />
+ <property name="mail.smtp.starttls.enable" value="true" />
+ <property name="mail.smtp.auth" value="true" />
+ <property name="mail.smtp.debug" value="false" />
+ <property name="mail.smtp.socketFactory.port" value="465" />
+ <property name="mail.smtp.socketFactory.class" value="javax.net.ssl.SSLSocketFactory" />
+ <property name="mail.smtp.socketFactory.fallback" value="false" />
+ </properties-param>
+ </init-params>
+ </component>
+
+</configuration>
\ No newline at end of file
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-09.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-09.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-09.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,82 +0,0 @@
-<?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.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">
-
- <external-component-plugins>
- <target-component>org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator</target-component>
- <component-plugin>
- <name>addPaths</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.jcr.ext.hierarchy.impl.AddPathPlugin</type>
- <init-params>
- <object-param>
- <name>cms.configuration</name>
- <description>configuration for the cms path</description>
- <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig">
- <field name="repository"><string>repository</string></field>
- <field name="workspaces">
- <collection type="java.util.ArrayList">
- <value><string>collaboration</string></value>
- </collection>
- </field>
- <field name="jcrPaths">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$JcrPath">
- <field name="alias"><string>usersPath</string></field>
- <field name="path"><string>/Users</string></field>
- <field name="permissions">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
- <field name="identity"><string>*:/platform/administrators</string></field>
- <field name="read"><string>true</string></field>
- <field name="addNode"><string>true</string></field>
- <field name="setProperty"><string>true</string></field>
- <field name="remove"><string>true</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
- <field name="identity"><string>*:/platform/users</string></field>
- <field name="read"><string>true</string></field>
- <field name="addNode"><string>false</string></field>
- <field name="setProperty"><string>true</string></field>
- <field name="remove"><string>false</string></field>
- </object>
- </value>
- </collection>
- </field>
- </object>
- </value>
- </collection>
- </field>
- </object>
- </object-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-09.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-09.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-09.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-09.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,82 @@
+<?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.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">
+
+ <external-component-plugins>
+ <target-component>org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator</target-component>
+ <component-plugin>
+ <name>addPaths</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.jcr.ext.hierarchy.impl.AddPathPlugin</type>
+ <init-params>
+ <object-param>
+ <name>cms.configuration</name>
+ <description>configuration for the cms path</description>
+ <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig">
+ <field name="repository"><string>repository</string></field>
+ <field name="workspaces">
+ <collection type="java.util.ArrayList">
+ <value><string>collaboration</string></value>
+ </collection>
+ </field>
+ <field name="jcrPaths">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$JcrPath">
+ <field name="alias"><string>usersPath</string></field>
+ <field name="path"><string>/Users</string></field>
+ <field name="permissions">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
+ <field name="identity"><string>*:/platform/administrators</string></field>
+ <field name="read"><string>true</string></field>
+ <field name="addNode"><string>true</string></field>
+ <field name="setProperty"><string>true</string></field>
+ <field name="remove"><string>true</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
+ <field name="identity"><string>*:/platform/users</string></field>
+ <field name="read"><string>true</string></field>
+ <field name="addNode"><string>false</string></field>
+ <field name="setProperty"><string>true</string></field>
+ <field name="remove"><string>false</string></field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+
+</configuration>
\ No newline at end of file
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-10.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-10.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-10.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,56 +0,0 @@
-<?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.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.jcr.config.RepositoryServiceConfiguration</key>
- <type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
- <init-params>
- <value-param>
- <name>conf-path</name>
- <description>JCR configuration file</description>
- <value>war:/conf/jcr/repository-configuration.xml</value>
- </value-param>
- <properties-param>
- <name>working-conf</name>
- <description>working-conf</description>
- <property name="persister-class-name" value="org.exoplatform.services.jcr.impl.config.JDBCConfigurationPersister"/>
- <property name="source-name" value="jdbcexo"/>
- <property name="dialect" value="hsqldb"/>
- </properties-param>
- </init-params>
- </component>
-
- <component>
- <type>org.exoplatform.services.jcr.ext.registry.RegistryService</type>
- <init-params>
- <properties-param>
- <name>locations</name>
- <property name="repository" value="system"/>
- </properties-param>
- </init-params>
- </component>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-10.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-10.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-10.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-10.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,56 @@
+<?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.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.jcr.config.RepositoryServiceConfiguration</key>
+ <type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
+ <init-params>
+ <value-param>
+ <name>conf-path</name>
+ <description>JCR configuration file</description>
+ <value>war:/conf/jcr/repository-configuration.xml</value>
+ </value-param>
+ <properties-param>
+ <name>working-conf</name>
+ <description>working-conf</description>
+ <property name="persister-class-name" value="org.exoplatform.services.jcr.impl.config.JDBCConfigurationPersister"/>
+ <property name="source-name" value="jdbcexo"/>
+ <property name="dialect" value="hsqldb"/>
+ </properties-param>
+ </init-params>
+ </component>
+
+ <component>
+ <type>org.exoplatform.services.jcr.ext.registry.RegistryService</type>
+ <init-params>
+ <properties-param>
+ <name>locations</name>
+ <property name="repository" value="system"/>
+ </properties-param>
+ </init-params>
+ </component>
+
+</configuration>
\ No newline at end of file
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-11.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-11.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-11.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,101 +0,0 @@
-<?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.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.database.HibernateService</key>
- <jmx-name>database:type=HibernateService</jmx-name>
- <type>org.exoplatform.services.database.impl.HibernateServiceImpl</type>
- <init-params>
- <properties-param>
- <name>hibernate.properties</name>
- <description>Default Hibernate Service</description>
- <property name="hibernate.show_sql" value="false"/>
- <property name="hibernate.cglib.use_reflection_optimizer" value="true"/>
- <property name="hibernate.connection.url" value="jdbc:hsqldb:file:../temp/data/exodb"/>
- <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver"/>
- <property name="hibernate.connection.autocommit" value="true"/>
- <property name="hibernate.connection.username" value="sa"/>
- <property name="hibernate.connection.password" value=""/>
- <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
- <property name="hibernate.c3p0.min_size" value="5"/>
- <property name="hibernate.c3p0.max_size" value="20"/>
- <property name="hibernate.c3p0.timeout" value="1800"/>
- <property name="hibernate.c3p0.max_statements" value="50"/>
- </properties-param>
- </init-params>
- </component>
-
- <!--
- <component>
- <key>org.exoplatform.services.database.DatabaseService</key>
- <type>org.exoplatform.services.database.impl.XAPoolTxSupportDatabaseService</type>
- <init-params>
- <properties-param>
- <name>default</name>
- <description>Connection configuration</description>
- <property name='connection.driver' value='org.hsqldb.jdbcDriver'/>
- <property name='connection.url' value='jdbc:hsqldb:file:../temp/data/exodb'/>
- <property name='connection.login' value='sa'/>
- <property name='connection.password' value=''/>
- <property name='connection.min-size' value='3'/>
- <property name='connection.max-size' value='5'/>
- </properties-param>
- </init-params>
- </component>
- -->
-
- <external-component-plugins>
- <target-component>org.exoplatform.services.naming.InitialContextInitializer</target-component>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcexo</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
- <property name="url" value="jdbc:hsqldb:file:../temp/data/exodb"/>
- <property name="username" value="sa"/>
- <property name="password" value=""/>
- </properties-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-11.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-11.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-11.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-11.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,101 @@
+<?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.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.database.HibernateService</key>
+ <jmx-name>database:type=HibernateService</jmx-name>
+ <type>org.exoplatform.services.database.impl.HibernateServiceImpl</type>
+ <init-params>
+ <properties-param>
+ <name>hibernate.properties</name>
+ <description>Default Hibernate Service</description>
+ <property name="hibernate.show_sql" value="false"/>
+ <property name="hibernate.cglib.use_reflection_optimizer" value="true"/>
+ <property name="hibernate.connection.url" value="jdbc:hsqldb:file:../temp/data/exodb"/>
+ <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver"/>
+ <property name="hibernate.connection.autocommit" value="true"/>
+ <property name="hibernate.connection.username" value="sa"/>
+ <property name="hibernate.connection.password" value=""/>
+ <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
+ <property name="hibernate.c3p0.min_size" value="5"/>
+ <property name="hibernate.c3p0.max_size" value="20"/>
+ <property name="hibernate.c3p0.timeout" value="1800"/>
+ <property name="hibernate.c3p0.max_statements" value="50"/>
+ </properties-param>
+ </init-params>
+ </component>
+
+ <!--
+ <component>
+ <key>org.exoplatform.services.database.DatabaseService</key>
+ <type>org.exoplatform.services.database.impl.XAPoolTxSupportDatabaseService</type>
+ <init-params>
+ <properties-param>
+ <name>default</name>
+ <description>Connection configuration</description>
+ <property name='connection.driver' value='org.hsqldb.jdbcDriver'/>
+ <property name='connection.url' value='jdbc:hsqldb:file:../temp/data/exodb'/>
+ <property name='connection.login' value='sa'/>
+ <property name='connection.password' value=''/>
+ <property name='connection.min-size' value='3'/>
+ <property name='connection.max-size' value='5'/>
+ </properties-param>
+ </init-params>
+ </component>
+ -->
+
+ <external-component-plugins>
+ <target-component>org.exoplatform.services.naming.InitialContextInitializer</target-component>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcexo</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
+ <property name="url" value="jdbc:hsqldb:file:../temp/data/exodb"/>
+ <property name="username" value="sa"/>
+ <property name="password" value=""/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+
+</configuration>
\ No newline at end of file
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-12.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-12.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-12.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,154 +0,0 @@
-<?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.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>
- <type>org.exoplatform.services.portletcontainer.PortletContainerConf</type>
- <init-params>
- <object-param>
- <name>conf</name>
- <object type="org.exoplatform.services.portletcontainer.PortletContainer">
- <field name="global">
- <object type="org.exoplatform.services.portletcontainer.config.Global">
- <field name="name"><string>ExoPortletContainer</string></field>
- <field name="description">
- <string>A JSR 286 compliant portlet container </string>
- </field>
- <field name="majorVersion"><int>2</int></field>
- <field name="minorVersion"><int>0</int></field>
- </object>
- </field>
- <field name="bundle">
- <object type="org.exoplatform.services.portletcontainer.config.DelegatedBundle">
- <field name="enable"><string>true</string></field>
- </object>
- </field>
- <field name="cache">
- <object type="org.exoplatform.services.portletcontainer.config.Cache">
- <field name="enable"><string>true</string></field>
- </object>
- </field>
- <field name="supportedContent">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.services.portletcontainer.config.SupportedContent">
- <field name="name"><string>text/html</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.portletcontainer.config.SupportedContent">
- <field name="name"> <string>text/wml</string> </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.portletcontainer.config.SupportedContent">
- <field name="name"> <string>audio/x-mpeg</string></field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.portletcontainer.config.SupportedContent">
- <field name="name"> <string>image/bmp</string> </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.portletcontainer.config.SupportedContent">
- <field name="name"> <string>image/jpg</string> </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.portletcontainer.config.SupportedContent">
- <field name="name"> <string>image/jpeg</string> </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.portletcontainer.config.SupportedContent">
- <field name="name"> <string>image/gif</string> </field>
- </object>
- </value>
- </collection>
- </field>
- <field name="customMode">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.services.portletcontainer.config.CustomMode">
- <field name="name"> <string>config</string> </field>
- <field name="description">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.services.portletcontainer.config.Description">
- <field name="lang"> <string>en</string></field>
- <field name="description"><string>to let admin config portlets </string> </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.portletcontainer.config.Description">
- <field
- name="lang">
- <string>
- fr
- </string>
- </field>
- <field
- name="description">
- <string>
- permet de
- configurer
- les portlets
- </string>
- </field>
- </object>
- </value>
- </collection>
- </field>
- </object>
- </value>
- </collection>
- </field>
- <field name="properties">
- <collection type="java.util.ArrayList">
- <value>
- <object
- type="org.exoplatform.services.portletcontainer.config.Properties">
- <field name="description">
- <string>
- a testing property
- </string>
- </field>
- <field name="name">
- <string>test</string>
- </field>
- <field name="value">
- <string>test_value</string>
- </field>
- </object>
- </value>
- </collection>
- </field>
- </object>
- </object-param>
- </init-params>
- </component>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-12.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-12.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-12.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-12.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,154 @@
+<?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.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>
+ <type>org.exoplatform.services.portletcontainer.PortletContainerConf</type>
+ <init-params>
+ <object-param>
+ <name>conf</name>
+ <object type="org.exoplatform.services.portletcontainer.PortletContainer">
+ <field name="global">
+ <object type="org.exoplatform.services.portletcontainer.config.Global">
+ <field name="name"><string>ExoPortletContainer</string></field>
+ <field name="description">
+ <string>A JSR 286 compliant portlet container </string>
+ </field>
+ <field name="majorVersion"><int>2</int></field>
+ <field name="minorVersion"><int>0</int></field>
+ </object>
+ </field>
+ <field name="bundle">
+ <object type="org.exoplatform.services.portletcontainer.config.DelegatedBundle">
+ <field name="enable"><string>true</string></field>
+ </object>
+ </field>
+ <field name="cache">
+ <object type="org.exoplatform.services.portletcontainer.config.Cache">
+ <field name="enable"><string>true</string></field>
+ </object>
+ </field>
+ <field name="supportedContent">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.services.portletcontainer.config.SupportedContent">
+ <field name="name"><string>text/html</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.portletcontainer.config.SupportedContent">
+ <field name="name"> <string>text/wml</string> </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.portletcontainer.config.SupportedContent">
+ <field name="name"> <string>audio/x-mpeg</string></field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.portletcontainer.config.SupportedContent">
+ <field name="name"> <string>image/bmp</string> </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.portletcontainer.config.SupportedContent">
+ <field name="name"> <string>image/jpg</string> </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.portletcontainer.config.SupportedContent">
+ <field name="name"> <string>image/jpeg</string> </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.portletcontainer.config.SupportedContent">
+ <field name="name"> <string>image/gif</string> </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ <field name="customMode">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.services.portletcontainer.config.CustomMode">
+ <field name="name"> <string>config</string> </field>
+ <field name="description">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.services.portletcontainer.config.Description">
+ <field name="lang"> <string>en</string></field>
+ <field name="description"><string>to let admin config portlets </string> </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.portletcontainer.config.Description">
+ <field
+ name="lang">
+ <string>
+ fr
+ </string>
+ </field>
+ <field
+ name="description">
+ <string>
+ permet de
+ configurer
+ les portlets
+ </string>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ <field name="properties">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object
+ type="org.exoplatform.services.portletcontainer.config.Properties">
+ <field name="description">
+ <string>
+ a testing property
+ </string>
+ </field>
+ <field name="name">
+ <string>test</string>
+ </field>
+ <field name="value">
+ <string>test_value</string>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component>
+
+</configuration>
\ No newline at end of file
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-13.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-13.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-13.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,53 +0,0 @@
-<?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.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">
-
- <import>war:/conf/common/common-configuration.xml</import>
- <import>war:/conf/common/logs-configuration.xml</import>
- <import>war:/conf/database/database-configuration.xml</import>
- <import>war:/conf/jcr/jcr-configuration.xml</import>
- <import>war:/conf/common/portlet-container-configuration.xml</import>
-
- <!--if organization service is database, import hibernate-organization-configuration.xml-->
- <import>war:/conf/organization/hibernate-configuration.xml</import>
-
- <!-- <import>war:/conf/jdbc-configuration.xml</import> -->
- <!--for organization service used active directory which is user lookup server -->
- <!--
- <import>war:/conf/activedirectory-configuration.xml</import>
- -->
-
- <!--for organization service used ldap server which is user lookup server -->
- <!--
- <import>war:/conf/ldap-configuration.xml</import>
- -->
- <!-- <import>war:/conf/security-configuration.xml</import> -->
- <import>war:/conf/organization/organization-configuration.xml</import>
- <import>war:/conf/jcr/component-plugins-configuration.xml</import>
- <import>war:/conf/mail/portal-mail-configuration.xml</import>
- <import>war:/conf/portal/portal-configuration.xml</import>
- <import>war:/conf/portal/application-registry-configuration.xml</import>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-13.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-13.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-13.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-13.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,53 @@
+<?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.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">
+
+ <import>war:/conf/common/common-configuration.xml</import>
+ <import>war:/conf/common/logs-configuration.xml</import>
+ <import>war:/conf/database/database-configuration.xml</import>
+ <import>war:/conf/jcr/jcr-configuration.xml</import>
+ <import>war:/conf/common/portlet-container-configuration.xml</import>
+
+ <!--if organization service is database, import hibernate-organization-configuration.xml-->
+ <import>war:/conf/organization/hibernate-configuration.xml</import>
+
+ <!-- <import>war:/conf/jdbc-configuration.xml</import> -->
+ <!--for organization service used active directory which is user lookup server -->
+ <!--
+ <import>war:/conf/activedirectory-configuration.xml</import>
+ -->
+
+ <!--for organization service used ldap server which is user lookup server -->
+ <!--
+ <import>war:/conf/ldap-configuration.xml</import>
+ -->
+ <!-- <import>war:/conf/security-configuration.xml</import> -->
+ <import>war:/conf/organization/organization-configuration.xml</import>
+ <import>war:/conf/jcr/component-plugins-configuration.xml</import>
+ <import>war:/conf/mail/portal-mail-configuration.xml</import>
+ <import>war:/conf/portal/portal-configuration.xml</import>
+ <import>war:/conf/portal/application-registry-configuration.xml</import>
+
+</configuration>
\ No newline at end of file
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-14.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-14.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-14.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,42 +0,0 @@
-<?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.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.security.SecurityService</key>
- <type>org.exoplatform.services.security.impl.SecurityServiceImpl</type>
- <init-params>
- <value-param>
- <name>security.authentication</name>
- <value>sso</value>
- </value-param>
- <value-param>
- <name>security.sso-authentication</name>
- <value>cas</value>
- </value-param>
- </init-params>
- </component>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-14.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-14.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-14.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-14.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,42 @@
+<?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.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.security.SecurityService</key>
+ <type>org.exoplatform.services.security.impl.SecurityServiceImpl</type>
+ <init-params>
+ <value-param>
+ <name>security.authentication</name>
+ <value>sso</value>
+ </value-param>
+ <value-param>
+ <name>security.sso-authentication</name>
+ <value>cas</value>
+ </value-param>
+ </init-params>
+ </component>
+
+</configuration>
\ No newline at end of file
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-15.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-15.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-15.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,68 +0,0 @@
-<?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.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.log.LogConfigurationInitializer</key>
- <type>org.exoplatform.services.log.LogConfigurationInitializer</type>
- <init-params>
-
- <!-- JDK -->
- <value-param>
- <name>configurator</name>
- <value>org.exoplatform.services.log.impl.Jdk14Configurator</value>
- </value-param>
- <properties-param>
- <name>properties</name>
- <description>jdk1.4 Logger properties</description>
- <property name="handlers" value="java.util.logging.ConsoleHandler"/>
- <property name=".level" value="FINE"/>
- <property name="java.util.logging.ConsoleHandler.level" value="FINE"/>
- </properties-param>
- <!-- end JDK -->
- <!-- Log4J -->
- <!--
- <value-param>
- <name>configurator</name>
- <value>org.exoplatform.services.log.impl.Log4JConfigurator</value>
- </value-param>
- <properties-param>
- <name>properties</name>
- <description>Log4J properties</description>
- <property name="log4j.rootLogger" value="DEBUG, stdout, file"/>
- <property name="log4j.appender.stdout" value="org.apache.log4j.ConsoleAppender"/>
- <property name="log4j.appender.stdout.layout" value="org.apache.log4j.PatternLayout"/>
- <property name="log4j.appender.stdout.layout.ConversionPattern" value="%d {dd.MM.yyyy HH:mm:ss} %c {1}: %m (%F, line %L) %n"/>
- <property name="log4j.appender.file" value="org.apache.log4j.FileAppender"/>
- <property name="log4j.appender.file.File" value="jcr.log"/>
- <property name="log4j.appender.file.layout" value="org.apache.log4j.PatternLayout"/>
- <property name="log4j.appender.file.layout.ConversionPattern" value="%d{dd.MM.yyyy HH:mm:ss} %m (%F, line %L) %n"/>
- </properties-param>
- -->
- <!-- end Log4J-->
- </init-params>
- </component>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-15.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-15.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-15.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-15.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,68 @@
+<?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.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.log.LogConfigurationInitializer</key>
+ <type>org.exoplatform.services.log.LogConfigurationInitializer</type>
+ <init-params>
+
+ <!-- JDK -->
+ <value-param>
+ <name>configurator</name>
+ <value>org.exoplatform.services.log.impl.Jdk14Configurator</value>
+ </value-param>
+ <properties-param>
+ <name>properties</name>
+ <description>jdk1.4 Logger properties</description>
+ <property name="handlers" value="java.util.logging.ConsoleHandler"/>
+ <property name=".level" value="FINE"/>
+ <property name="java.util.logging.ConsoleHandler.level" value="FINE"/>
+ </properties-param>
+ <!-- end JDK -->
+ <!-- Log4J -->
+ <!--
+ <value-param>
+ <name>configurator</name>
+ <value>org.exoplatform.services.log.impl.Log4JConfigurator</value>
+ </value-param>
+ <properties-param>
+ <name>properties</name>
+ <description>Log4J properties</description>
+ <property name="log4j.rootLogger" value="DEBUG, stdout, file"/>
+ <property name="log4j.appender.stdout" value="org.apache.log4j.ConsoleAppender"/>
+ <property name="log4j.appender.stdout.layout" value="org.apache.log4j.PatternLayout"/>
+ <property name="log4j.appender.stdout.layout.ConversionPattern" value="%d {dd.MM.yyyy HH:mm:ss} %c {1}: %m (%F, line %L) %n"/>
+ <property name="log4j.appender.file" value="org.apache.log4j.FileAppender"/>
+ <property name="log4j.appender.file.File" value="jcr.log"/>
+ <property name="log4j.appender.file.layout" value="org.apache.log4j.PatternLayout"/>
+ <property name="log4j.appender.file.layout.ConversionPattern" value="%d{dd.MM.yyyy HH:mm:ss} %m (%F, line %L) %n"/>
+ </properties-param>
+ -->
+ <!-- end Log4J-->
+ </init-params>
+ </component>
+
+</configuration>
\ No newline at end of file
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-16.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-16.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-16.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,105 +0,0 @@
-<?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.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>
- <properties-param>
- <name>default-properties</name>
- <description>Default initial context properties</description>
- <!--
- <property name="java.naming.factory.initial" value="org.exoplatform.services.naming.SimpleContextFactory"/>
- -->
- </properties-param>
- </init-params>
- </component>
-
- <component>
- <key>org.exoplatform.services.resources.LocaleConfigService</key>
- <type>org.exoplatform.services.resources.impl.LocaleConfigServiceImpl</type>
- <init-params>
- <value-param>
- <name>locale.config.file</name>
- <value>war:/conf/common/locales-config.xml</value>
- </value-param>
- </init-params>
- </component>
-
- <component>
- <key>org.exoplatform.services.resources.ResourceBundleService</key>
- <type>org.exoplatform.services.resources.jcr.ResourceBundleServiceImpl</type>
- <init-params>
- <values-param>
- <name>classpath.resources</name>
- <description>The resources that start with the following package name should be load from file system</description>
- <value>locale.portlet</value>
- </values-param>
- <values-param>
- <name>init.resources</name>
- <description>Store the following resources into the db for the first launch </description>
- <value>locale.portal.expression</value>
- <value>locale.portal.services</value>
- <value>locale.portal.webui</value>
- <value>locale.portal.custom</value>
- <value>locale.navigation.portal.classic</value>
- <value>locale.navigation.group.platform.administrators</value>
- <value>locale.navigation.group.platform.users</value>
- <value>locale.navigation.group.platform.guests</value>
- <value>locale.navigation.group.organization.management.executive-board</value>
- </values-param>
- <values-param>
- <name>portal.resource.names</name>
- <description>The properties files of the portal , those file will be merged
- into one ResoruceBundle properties </description>
- <value>locale.portal.expression</value>
- <value>locale.portal.services</value>
- <value>locale.portal.webui</value>
- <value>locale.portal.custom</value>
- </values-param>
- </init-params>
- </component>
-
- <component>
- <key>org.exoplatform.services.cache.CacheService</key>
- <jmx-name>cache:type=CacheService</jmx-name>
- <type>org.exoplatform.services.cache.impl.CacheServiceImpl</type>
- <init-params>
- <object-param>
- <name>cache.config.default</name>
- <description>The default cache configuration</description>
- <object type="org.exoplatform.services.cache.ExoCacheConfig">
- <field name="name"><string>default</string></field>
- <field name="maxSize"><int>300</int></field>
- <field name="liveTime"><long>-1</long></field>
- <field name="distributed"><boolean>false</boolean></field>
- <field name="implementation"><string>org.exoplatform.services.cache.concurrent.ConcurrentFIFOExoCache</string></field>
- </object>
- </object-param>
- </init-params>
- </component>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-16.xml (from rev 1059, kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-16.xml)
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-16.xml (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-16.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,105 @@
+<?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.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>
+ <properties-param>
+ <name>default-properties</name>
+ <description>Default initial context properties</description>
+ <!--
+ <property name="java.naming.factory.initial" value="org.exoplatform.services.naming.SimpleContextFactory"/>
+ -->
+ </properties-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.resources.LocaleConfigService</key>
+ <type>org.exoplatform.services.resources.impl.LocaleConfigServiceImpl</type>
+ <init-params>
+ <value-param>
+ <name>locale.config.file</name>
+ <value>war:/conf/common/locales-config.xml</value>
+ </value-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.resources.ResourceBundleService</key>
+ <type>org.exoplatform.services.resources.jcr.ResourceBundleServiceImpl</type>
+ <init-params>
+ <values-param>
+ <name>classpath.resources</name>
+ <description>The resources that start with the following package name should be load from file system</description>
+ <value>locale.portlet</value>
+ </values-param>
+ <values-param>
+ <name>init.resources</name>
+ <description>Store the following resources into the db for the first launch </description>
+ <value>locale.portal.expression</value>
+ <value>locale.portal.services</value>
+ <value>locale.portal.webui</value>
+ <value>locale.portal.custom</value>
+ <value>locale.navigation.portal.classic</value>
+ <value>locale.navigation.group.platform.administrators</value>
+ <value>locale.navigation.group.platform.users</value>
+ <value>locale.navigation.group.platform.guests</value>
+ <value>locale.navigation.group.organization.management.executive-board</value>
+ </values-param>
+ <values-param>
+ <name>portal.resource.names</name>
+ <description>The properties files of the portal , those file will be merged
+ into one ResoruceBundle properties </description>
+ <value>locale.portal.expression</value>
+ <value>locale.portal.services</value>
+ <value>locale.portal.webui</value>
+ <value>locale.portal.custom</value>
+ </values-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.cache.CacheService</key>
+ <jmx-name>cache:type=CacheService</jmx-name>
+ <type>org.exoplatform.services.cache.impl.CacheServiceImpl</type>
+ <init-params>
+ <object-param>
+ <name>cache.config.default</name>
+ <description>The default cache configuration</description>
+ <object type="org.exoplatform.services.cache.ExoCacheConfig">
+ <field name="name"><string>default</string></field>
+ <field name="maxSize"><int>300</int></field>
+ <field name="liveTime"><long>-1</long></field>
+ <field name="distributed"><boolean>false</boolean></field>
+ <field name="implementation"><string>org.exoplatform.services.cache.concurrent.ConcurrentFIFOExoCache</string></field>
+ </object>
+ </object-param>
+ </init-params>
+ </component>
+
+</configuration>
\ No newline at end of file
Deleted: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-17.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-17.xml 2009-12-15 13:36:16 UTC (rev 1059)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-17.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -1,95 +0,0 @@
-<?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.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>
- </component>
-
- <component profiles="a">
- <key>org.exoplatform.services.naming.InitialContextInitializer</key>
- <type>org.exoplatform.services.naming.InitialContextInitializer</type>
- </component>
-
- <component profiles="a,b">
- <key>org.exoplatform.services.naming.InitialContextInitializer</key>
- <type>org.exoplatform.services.naming.InitialContextInitializer</type>
- </component>
-
- <component>
- <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>
- </value-param>
- <value-param profiles="a">
- <name>value</name>
- <value>value</value>
- </value-param>
- <value-param profiles="a,b">
- <name>value</name>
- <value>value</value>
- </value-param>
- <values-param>
- <name>values</name>
- </values-param>
- <values-param profiles="a">
- <name>values</name>
- </values-param>
- <values-param profiles="a,b">
- <name>values</name>
- </values-param>
- </init-params>
- </component>
-
- <import>import_1</import>
- <import profiles="a">import_1</import>
- <import profiles="a,b">import_1</import>
-
-</configuration>
\ No newline at end of file
Copied: kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-17.xml (from rev 1059, kernel/branches/config-branch/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 (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-17.xml 2009-12-15 20:27:24 UTC (rev 1075)
@@ -0,0 +1,95 @@
+<?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.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>
+ </component>
+
+ <component profiles="a">
+ <key>org.exoplatform.services.naming.InitialContextInitializer</key>
+ <type>org.exoplatform.services.naming.InitialContextInitializer</type>
+ </component>
+
+ <component profiles="a,b">
+ <key>org.exoplatform.services.naming.InitialContextInitializer</key>
+ <type>org.exoplatform.services.naming.InitialContextInitializer</type>
+ </component>
+
+ <component>
+ <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>
+ </value-param>
+ <value-param profiles="a">
+ <name>value</name>
+ <value>value</value>
+ </value-param>
+ <value-param profiles="a,b">
+ <name>value</name>
+ <value>value</value>
+ </value-param>
+ <values-param>
+ <name>values</name>
+ </values-param>
+ <values-param profiles="a">
+ <name>values</name>
+ </values-param>
+ <values-param profiles="a,b">
+ <name>values</name>
+ </values-param>
+ </init-params>
+ </component>
+
+ <import>import_1</import>
+ <import profiles="a">import_1</import>
+ <import profiles="a,b">import_1</import>
+
+</configuration>
\ No newline at end of file
16 years, 7 months
exo-jcr SVN: r1074 - in kernel/trunk: exo.kernel.container/src/main/java/org/exoplatform/container and 51 other directories.
by do-not-reply@jboss.org
Author: mstruk
Date: 2009-12-15 12:38:27 -0500 (Tue, 15 Dec 2009)
New Revision: 1074
Added:
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/mc/
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegration.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegrationContainer.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegrationInvoker.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/util/EnvSpecific.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/util/JBossEnv.java
kernel/trunk/exo.kernel.mc-integration/
kernel/trunk/exo.kernel.mc-integration/README.txt
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/pom.xml
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/ExternallyControlledInjectingBean.java
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/InjectedBean.java
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/InjectingBean.java
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/resources/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/resources/META-INF/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/resources/META-INF/jboss-beans.xml
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/resources/conf/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/resources/conf/configuration.xml
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/resources/conf/mc-int-config.xml
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/pom.xml
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/ExternalMCInjectionTest.java
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/MCInjectionTest.java
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/MCInjectionTest2.java
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/MCInjectionTest3.java
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/MCInjectionTest4.java
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/tests/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/tests/JUnitInvokerServlet.java
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/tests/LogOutputStream.java
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/tests/TeeOutputStream.java
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/webapp/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/webapp/WEB-INF/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/webapp/WEB-INF/web.xml
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/CopiedException.java
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/FailuresParser.java
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/LineReader.java
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestExternalMCInjectionIntegration.java
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestMCInjectionIntegration.java
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestMCInjectionIntegration2.java
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestMCInjectionIntegration3.java
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestMCInjectionIntegration4.java
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/pom.xml
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/src/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/InterceptMC.java
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCComponentAdapter.java
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCInjectionMode.java
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCIntConfig.java
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCIntegrationImpl.java
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-kernel-extras/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-kernel-extras/pom.xml
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-kernel-extras/src/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-kernel-extras/src/main/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-kernel-extras/src/main/java/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-kernel-extras/src/main/java/org/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-kernel-extras/src/main/java/org/jboss/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-kernel-extras/src/main/java/org/jboss/dependency/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-kernel-extras/src/main/java/org/jboss/dependency/plugins/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-kernel-extras/src/main/java/org/jboss/dependency/plugins/helpers/
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-kernel-extras/src/main/java/org/jboss/dependency/plugins/helpers/StatelessController.java
kernel/trunk/exo.kernel.mc-integration/pom.xml
Modified:
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/CachingContainer.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/web/PortalContainerConfigOwner.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/web/PortalContainerCreator.java
kernel/trunk/pom.xml
Log:
Merged mc-int-branch up to r1073
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/CachingContainer.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/CachingContainer.java 2009-12-15 17:28:17 UTC (rev 1073)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/CachingContainer.java 2009-12-15 17:38:27 UTC (rev 1074)
@@ -18,6 +18,7 @@
*/
package org.exoplatform.container;
+import org.exoplatform.container.mc.MCIntegrationContainer;
import org.picocontainer.ComponentAdapter;
import org.picocontainer.Parameter;
import org.picocontainer.PicoContainer;
@@ -26,7 +27,6 @@
import org.picocontainer.PicoVisitor;
import org.picocontainer.defaults.AbstractPicoVisitor;
import org.picocontainer.defaults.ComponentAdapterFactory;
-import org.picocontainer.defaults.DefaultPicoContainer;
import org.picocontainer.defaults.DuplicateComponentKeyRegistrationException;
import java.util.List;
@@ -37,7 +37,7 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
* @version $Revision$
*/
-public class CachingContainer extends DefaultPicoContainer
+public class CachingContainer extends MCIntegrationContainer
{
private final ConcurrentMap<Class, ComponentAdapter> adapterByType =
Added: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegration.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegration.java (rev 0)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegration.java 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,65 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.mc;
+
+import org.picocontainer.ComponentAdapter;
+
+import javax.servlet.ServletContext;
+
+/**
+ * The interface used to loosely couple mc-integration to exo-container
+ *
+ * @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
+ */
+public interface MCIntegration
+{
+ /**
+ * Apply mc-integration interception.
+ *
+ * @param componentAdapter the original component adapter
+ * @return appropriate compomnent adapter - either the original,
+ * or one wrapping the original with mc-integration wrapper
+ */
+ ComponentAdapter getMCAdapter(ComponentAdapter componentAdapter);
+
+ /**
+ * Check if JBoss MC Kernel is available.
+ *
+ * @param adapter
+ * @return true if mc kernel is available
+ */
+ boolean hasMCKernel(ComponentAdapter adapter);
+
+ /**
+ * Initialize thread context with mc kernel retrieved through ServletContext.
+ *
+ * @param ctx Servlet context
+ */
+ void initThreadCtx(ServletContext ctx);
+
+ /**
+ * Clean up any thread context data stored during initThreadCtx().
+ *
+ * @param ctx Servlet context
+ */
+ void resetThreadCtx(ServletContext ctx);
+}
Added: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegrationContainer.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegrationContainer.java (rev 0)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegrationContainer.java 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,130 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.mc;
+
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.picocontainer.ComponentAdapter;
+import org.picocontainer.PicoContainer;
+import org.picocontainer.defaults.ComponentAdapterFactory;
+import org.picocontainer.defaults.DefaultPicoContainer;
+
+/**
+ * Container class that serves as an interception point for MC integration.
+ *
+ * @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
+ */
+public class MCIntegrationContainer extends DefaultPicoContainer
+{
+ /**
+ * Logger
+ */
+ private static Log log = ExoLogger.getLogger(MCIntegrationContainer.class);
+
+ /**
+ * Constructor that exposes super constructor.
+ *
+ * @param componentAdapterFactory
+ * @param parent
+ */
+ public MCIntegrationContainer(ComponentAdapterFactory componentAdapterFactory, PicoContainer parent)
+ {
+ super(componentAdapterFactory, parent);
+ }
+
+ /**
+ * Constructor that exposes super constructor.
+ *
+ * @param parent
+ */
+ public MCIntegrationContainer(PicoContainer parent)
+ {
+ super(parent);
+ }
+
+ /**
+ * Constructor that exposes super constructor.
+ *
+ * @param componentAdapterFactory
+ */
+ public MCIntegrationContainer(ComponentAdapterFactory componentAdapterFactory)
+ {
+ super(componentAdapterFactory);
+ }
+
+ /**
+ * Constructor that exposes super constructor.
+ */
+ public MCIntegrationContainer()
+ {
+ }
+
+ /**
+ * Method interception that swaps the original component adapter for intercepting one
+ * for components that require mc integration.
+ * If mc integration isn't available in the current runtime environment, then interception
+ * simply delegates to parent without interfering.
+ *
+ * @param componentAdapter original component adapter
+ * @return the original component adapter, or the intercepting component adapter
+ * that takes care of mc integration
+ */
+ public ComponentAdapter registerComponent(ComponentAdapter componentAdapter)
+ {
+ ComponentAdapter adapter = componentAdapter;
+ if (hasMCKernel(componentAdapter))
+ {
+ try
+ {
+ adapter = MCIntegrationInvoker.getMCAdapter(componentAdapter);
+ }
+ catch(Exception ignored)
+ {
+ log.warn("MC integration failed - maybe not supported in this environment (component: "
+ + componentAdapter.getComponentKey() + ")", ignored);
+ }
+ }
+
+ super.registerComponent(adapter);
+ return adapter;
+ }
+
+ /**
+ * Check if runtime environment supports mc integration.
+ *
+ * @param componentAdapter original component adapter
+ * @return true if mc integration is supported
+ */
+ public static boolean hasMCKernel(ComponentAdapter componentAdapter)
+ {
+ try
+ {
+ return MCIntegrationInvoker.hasMCKernel(componentAdapter);
+ }
+ catch (Exception ignored)
+ {
+ log.warn("MC integration failed - maybe not supported in this environment (component: "
+ + componentAdapter.getComponentKey() + ")", ignored);
+ }
+ return false;
+ }
+}
Added: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegrationInvoker.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegrationInvoker.java (rev 0)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegrationInvoker.java 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,164 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.mc;
+
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.picocontainer.ComponentAdapter;
+
+import javax.servlet.ServletContext;
+import java.lang.reflect.Method;
+
+/**
+ * This class performs a loosely coupled integration to mc-integration logic.
+ * MC integration provides the ability to inject JBoss MC configured beans into
+ * exo-kernel configured services.
+ *
+ * MC integration is only available when GateIn is running inside JBossAS or on top of JBoss MC.
+ * When integration is not available the default behavior is used - as if this class was never called.
+ *
+ * @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
+ */
+public class MCIntegrationInvoker
+{
+ /**
+ * Logger
+ */
+ private static Log log = ExoLogger.getLogger(MCIntegrationInvoker.class);
+
+ /**
+ * Reference to actual implementation of mc-integration - the one with hard dependencies on JBoss MC Kernel.
+ */
+ private static MCIntegration mcInt;
+
+ /**
+ * Error flag. When set it signals that MC integration is not available in current runtime environment.
+ */
+ private static boolean permFailure;
+
+ /**
+ * @see MCIntegration#getMCAdapter(org.picocontainer.ComponentAdapter)
+ */
+ public static synchronized ComponentAdapter getMCAdapter(ComponentAdapter componentAdapter)
+ {
+ MCIntegration mcInt = getMCIntegration();
+ if (mcInt == null)
+ {
+ return componentAdapter;
+ }
+
+ return mcInt.getMCAdapter(componentAdapter);
+ }
+
+ /**
+ * @see MCIntegration#hasMCKernel(org.picocontainer.ComponentAdapter)
+ */
+ public static synchronized boolean hasMCKernel(ComponentAdapter adapter)
+ {
+ MCIntegration mcInt = getMCIntegration();
+ if (mcInt == null)
+ {
+ return false;
+ }
+ return mcInt.hasMCKernel(adapter);
+ }
+
+ /**
+ * @see MCIntegration#initThreadCtx(javax.servlet.ServletContext)
+ */
+ public static synchronized void initThreadCtx(ServletContext ctx)
+ {
+ MCIntegration mcInt = getMCIntegration();
+ if (mcInt == null)
+ {
+ return;
+ }
+ mcInt.initThreadCtx(ctx);
+ }
+
+ /**
+ * @see MCIntegration#resetThreadCtx(javax.servlet.ServletContext)
+ */
+ public static synchronized void resetThreadCtx(ServletContext ctx)
+ {
+ MCIntegration mcInt = getMCIntegration();
+ if (mcInt == null)
+ {
+ return;
+ }
+ mcInt.resetThreadCtx(ctx);
+ }
+
+ /**
+ * Get a reference to actual implementation of MCIntegration if one is available.
+ * Log a warning if mc integration is not available.
+ * @return MCIntegration implementation
+ */
+ private static MCIntegration getMCIntegration()
+ {
+ if (mcInt == null && permFailure == false)
+ {
+ Class clazz = null;
+ try
+ {
+ clazz = loadClass("org.exoplatform.container.mc.impl.MCIntegrationImpl");
+ Method m = clazz.getMethod("getInstance");
+ mcInt = (MCIntegration) m.invoke(null);
+ }
+ catch (ClassNotFoundException ignored)
+ {
+ permFailure = true;
+ log.warn("MC integration not available in this environment (missing class: "
+ + ignored.getMessage() + ")");
+
+ return null;
+ }
+ catch (Exception e)
+ {
+ permFailure = true;
+ throw new RuntimeException("MC Integration initialization error", e);
+ }
+ }
+ return mcInt;
+ }
+
+ /**
+ * Helper method for proper classloading fallback.
+ */
+ static Class loadClass(String name) throws ClassNotFoundException
+ {
+ Class clazz = null;
+ try
+ {
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ if (cl != null)
+ {
+ clazz = cl.loadClass(name);
+ }
+ }
+ catch (ClassNotFoundException ignored)
+ {
+ clazz = Class.forName(name);
+ }
+ return clazz;
+ }
+}
Added: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/util/EnvSpecific.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/util/EnvSpecific.java (rev 0)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/util/EnvSpecific.java 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.util;
+
+import javax.servlet.ServletContext;
+
+/**
+ * This class makes environment specific thread context initializations.
+ *
+ * @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
+ */
+public class EnvSpecific {
+
+ /**
+ * Perform environment specific thread context initialization.
+ *
+ * @param ctx ServletContext
+ */
+ public static void initThreadEnv(ServletContext ctx) {
+ if (JBossEnv.isAvailable(ctx))
+ JBossEnv.initThreadEnv(ctx);
+ }
+
+ /**
+ * Perform environment specific thread context cleanup.
+ *
+ * @param ctx ServletContext
+ */
+ public static void cleanupThreadEnv(ServletContext ctx) {
+ if (JBossEnv.isAvailable(ctx))
+ JBossEnv.cleanupThreadEnv(ctx);
+ }
+}
\ No newline at end of file
Added: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/util/JBossEnv.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/util/JBossEnv.java (rev 0)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/util/JBossEnv.java 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,70 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.util;
+
+import javax.servlet.ServletContext;
+import org.exoplatform.container.mc.MCIntegrationInvoker;
+
+/**
+ * This class makes thread context initialization when GateIn runs inside JBossAS or MC.
+ *
+ * @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
+ */
+public class JBossEnv
+{
+ /**
+ * A servlet context attribute to check for mc kernel.
+ * The value is equal to org.jboss.kernel.plugins.bootstrap.basic.KernelConstants.KERNEL_NAME.
+ */
+ private static final String MC_KERNEL_NAME = "jboss.kernel:service=Kernel";
+
+ /**
+ * Check if MC Kernel is available.
+ *
+ * @param ctx ServletContext
+ * @return true if we're running within JBoss MC environment
+ */
+ public static boolean isAvailable(ServletContext ctx)
+ {
+ return ctx.getAttribute(MC_KERNEL_NAME) != null;
+ }
+
+ /**
+ * Perform JBoss MC environment specific thread context initialization.
+ *
+ * @param ctx ServletContext
+ */
+ public static void initThreadEnv(ServletContext ctx)
+ {
+ MCIntegrationInvoker.initThreadCtx(ctx);
+ }
+
+ /**
+ * Perform thread context cleanup.
+ *
+ * @param ctx ServletContext
+ */
+ public static void cleanupThreadEnv(ServletContext ctx)
+ {
+ MCIntegrationInvoker.resetThreadCtx(ctx);
+ }
+}
\ No newline at end of file
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/web/PortalContainerConfigOwner.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/web/PortalContainerConfigOwner.java 2009-12-15 17:28:17 UTC (rev 1073)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/web/PortalContainerConfigOwner.java 2009-12-15 17:38:27 UTC (rev 1074)
@@ -19,6 +19,7 @@
import org.exoplatform.container.PortalContainer;
import org.exoplatform.container.RootContainer.PortalContainerPostInitTask;
import org.exoplatform.container.RootContainer.PortalContainerPreInitTask;
+import org.exoplatform.container.util.EnvSpecific;
import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
@@ -46,7 +47,17 @@
portalContainer.registerContext(context);
}
};
- PortalContainer.addInitTask(event.getServletContext(), task);
+
+ ServletContext ctx = event.getServletContext();
+ try
+ {
+ EnvSpecific.initThreadEnv(ctx);
+ PortalContainer.addInitTask(ctx, task);
+ }
+ finally
+ {
+ EnvSpecific.cleanupThreadEnv(ctx);
+ }
}
public void contextDestroyed(ServletContextEvent event)
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/web/PortalContainerCreator.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/web/PortalContainerCreator.java 2009-12-15 17:28:17 UTC (rev 1073)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/web/PortalContainerCreator.java 2009-12-15 17:38:27 UTC (rev 1074)
@@ -17,7 +17,9 @@
package org.exoplatform.container.web;
import org.exoplatform.container.RootContainer;
+import org.exoplatform.container.util.EnvSpecific;
+import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
@@ -45,7 +47,16 @@
*/
public void contextInitialized(ServletContextEvent event)
{
- RootContainer rootContainer = RootContainer.getInstance();
- rootContainer.createPortalContainers();
+ ServletContext ctx = event.getServletContext();
+ try
+ {
+ EnvSpecific.initThreadEnv(ctx);
+ RootContainer rootContainer = RootContainer.getInstance();
+ rootContainer.createPortalContainers();
+ }
+ finally
+ {
+ EnvSpecific.cleanupThreadEnv(ctx);
+ }
}
}
Added: kernel/trunk/exo.kernel.mc-integration/README.txt
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/README.txt (rev 0)
+++ kernel/trunk/exo.kernel.mc-integration/README.txt 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,144 @@
+
+JBoss Microcontainer Integration
+
+
+== What's it all about ==
+
+JBoss Microcontainer integration (MC integration for short) makes it possible to inject components deployed as MC beans into components deployed as exo-kernel service components. Exo-kernel is the bottom layer on top of which GateIn si built as a set of services. Exo-kernel uses picocontainer as extremely lightweight dependency-injection (DI) container. All eXo Platform and GateIn components are configured and deployed as exo-kernel services. When deployed to JBossAS, there is another DI container available - JBoss Microcontainer which is the bottom layer through which all JBossAS service components are configured and deploy. MC Integration makes it possible apply JBoss Microcontainer dependency-injection to GateIn components deployed through exo-kernel.
+
+There is no support for MC integration in Tomcat deployment. If a component annotated with @InterceptMC is deployed, a warning is logged, but the component will be deployed anyway - without injections being applied.
+
+
+== How to use ==
+
+
+There is an annotation @InterceptMC, that you annotate your service component with, to turn on MC integration for that component. MC integration only works in JBossAS, so any components that rely on it have to provide alternative injection mechanisms when deployed in Tomcat or somewhere else (i.e. using exo-kernel configuration for injections), or wire up components manually - hardcoded in a component that does just that.
+
+Sometimes you may want to inject JBossAS components per service instance. If you annotate a class, then all instances of this class will share the same configuration, you can't have one instance of the class having one configuration, and another instance of the same class having a different configuration.
+
+There is an xml file based configuration mechanism that allows you to enable MC integration for a service (per class, as well as per instance), and configure injection points and injected values.
+
+For an example of MC integration by using annotations see: http://anonsvn.jboss.org/repos/exo-jcr/kernel/branches/mc-int-branch/exo....
+
+For an example of MC integration by using external configuration see: http://anonsvn.jboss.org/repos/exo-jcr/kernel/branches/mc-int-branch/exo....
+
+Both these examples use exo-kernel configuration file for creation of service instances: http://anonsvn.jboss.org/repos/exo-jcr/kernel/branches/mc-int-branch/exo....
+
+That's eXo kernel configuration file, with eXo configurator specific syntax, used to configure DI performed by eXo kernel when configuring and instantiating service components. All GateIn services are configured through this.
+
+
+The external configuration example also uses injection configuration file: http://anonsvn.jboss.org/repos/exo-jcr/kernel/branches/mc-int-branch/exo....
+
+The configuration format is the same as for jboss-beans.xml files. With a few exception:
+ - 'bean' element's 'name' attribute refers to configuration.xml 'component' element's 'key' attribute
+ - elements for aop configuration, constructor injections, and many others have no effect
+
+Annotation configuration in mc-int-config.xml overrides any compiled annotations on classes. That means, every instance of the same service class can be specifically targeted for MC injections, and any existing hardwired class annotation can be nullified through configuration.
+
+Only when a component is marked with @InterceptMC annotation, will it have its mc-kernel injection annotations process by mc-kernel, as part of MC integration.
+
+
+== MC integration demo ==
+
+
+The demo demonstrates POJO creation via exo-kernel and use of MC injection annotations (or xml configuration) to have some services injected into our exo-kernel-deployed POJO by MC.
+
+We have three service objects - InjectedBean, InjectingBean, and ExternallyControlledInjectingBean, packaged in a single jar.
+
+InjectedBeans gets instantiated by JBossAS deployer via META-INF/jboss-beans.xml. InjectingBean and ExternallyControlledInjectingBean on the other hand gets instantiated by exo-kernel via conf/configuration.xml.
+
+Exo-kernel knows nothing about InjectedBean, but because InjectingBean is annotated with @InterceptMC it is processed by MC integration logic when instantiated by exo-kernel. The processing pipes it through MC-kernel logic which processes MC-kernel injection annotations, and performs injection of components. The same goes for ExternallyControlledInjectingBean.
+
+Of course, MC-kernel knows nothing about exo-kernel service objects - it can only inject components deployed through one of JBossAS deployers that use MC-kernel to instantiate - or at least register - components.
+
+InjectingBean demonstrates several different ways in which you can perform injection of JBoss services into a component. If instead of using exo-kernel to deploy InjectingBean, you deploy it through JBossAS, these annotations will work just the same - JBossAS uses MC-kernel, and MC-kernel will process the annotations.
+
+There are many annotations used in InjectingBean.java. Apart from @InterceptMC they are all mc-kernel annotations used to configure injections.
+
+ExternallyControlledInjectingBean.java on the other hand contains no annotations at all. All injections are configured externally in conf/mc-int-config.xml.
+
+@InterceptMC is introduced by MC integration to mark classes that should be integrated with MC. Through it you can also control what kind of injections you want MC to perform. By default, field injections are disabled by MC-kernel, as they are deemed an anti-pattern for service objects - they may make your code more difficult to maintain in the long run, as you are giving up the ability to intercept the setting of the field.
+
+Service objects instantiated through exo-kernel don't become part of MC-kernel object repository. That means that dependency management can't be performed by MC-kernel, which means that all the dependencies InjectingBean needs have to be fulfilled before MC-kernel first learns about it. Usually MC-kernel makes several passes over the whole deployment (all the deployment archives), first learning about services and their dependencies, then starting up services that have no dependencies first, and services with dependencies later - when their dependencies are fulfilled.
+
+When using MC integration, we need to make sure, that all the dependencies have already been installed before exo-kernel bootstrap happens. This can be done by deploying all jboss beans as .jars containing META-INF/jboss-beans.xml in deploy dir. JBossAS deploys .jars before .wars and .ears.
+
+
+== Things to look out for ==
+
+There are several exo-kernel bootstrap points that may be used when creating your GateIn portals:
+
+Always use either:
+
+exo-kernel/exo.kernel.container: org.exoplatform.container.web.PortalContainerConfigOwner
+
+or
+
+gatein/portal/trunk/component/web: org.exoplatform.web.GenericHttpListener
+
+
+Never use PortalContainer or RootContainer before first making sure one of the above two proper GateIn initialization points are invoked.
+
+
+
+== Building and deploying ==
+
+
+ === exo-kernel ===
+
+cd $REPO/exo-jcr/kernel/branches
+svn co https://svn.jboss.org/repos/exo-jcr/kernel/branches/mc-int-branch
+cd mc-int-branch
+mvn install
+
+
+ === packager ===
+
+cd $REPO/gatein/tools/packager/branches
+svn co https://svn.jboss.org/repos/gatein/tools/packager/branches/mc-integration
+cd mc-integration
+mvn install
+
+
+ === portal ===
+
+cd $REPO/gatein/portal/branches
+svn co https://svn.jboss.org/repos/gatein/portal/branches/mc-integration
+cd mc-integration
+mvn install -Dmaven.test.skip=true -Dgatein.checkout.dir=$REPO/gatein/portal/branches/mc-integration
+
+
+
+ === Packaging and running GateIn with demo and integration tests deployed ===
+
+cd $REPO/gatein/portal/branches/mc-integration/packaging/pkg
+
+FOR JBOSSAS:
+
+ mvn install -Ppkg-jbossas-tests -Dexo.projects.directory.dependencies=REPLACE_WITH_YOUR_OWN_DIRECTORY -Dgatein.checkout.dir=$REPO/gatein/portal/branches/mc-integration
+ cd $REPO/gatein/portal/branches/mc-integration/packaging/pkg/target/jboss/bin
+ run
+
+FOR TOMCAT (MC integration won't work, but integration tests should pass):
+
+ mvn install -Ppkg-tomcat-tests -Dexo.projects.directory.dependencies=REPLACE_WITH_YOUR_OWN_DIRECTORY -Dgatein.checkout.dir=$REPO/gatein/portal/branches/mc-integration
+ cd $REPO/gatein/portal/branches/mc-integration/packaging/pkg/target/tomcat/bin
+ gatein run
+
+
+
+ === Running the integration tests ===
+
+cd $REPO/exo-jcr/kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/
+mvn -Ptests
+
+
+
+If you run your server on non-default IP:port use something like:
+mvn -Ptests -DforkMode=none -Dserver.host=127.0.0.1 -Dserver.port=8000
+
+(Don't forget -DforkMode=none otherwise system properties won't get propagated to the test class)
+
+
+
+(eof)
Added: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/pom.xml
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/pom.xml (rev 0)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/pom.xml 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,59 @@
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>mc-integration-parent</artifactId>
+ <version>2.2.0-Beta05-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>exo.kernel.mc-int</artifactId>
+
+ <name>eXo Kernel :: MC Kernel Integration :: Implementation</name>
+ <description>MC Kernel Integration Implementation</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.commons</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.container</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>picocontainer</groupId>
+ <artifactId>picocontainer</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-kernel</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-aop-mc-int</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.mc-int</groupId>
+ <artifactId>jboss-mc-int-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.mc-int</groupId>
+ <artifactId>jboss-mc-int-servlet</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.cl</groupId>
+ <artifactId>jboss-classloader</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.mc-kernel-extras</artifactId>
+ </dependency>
+ </dependencies>
+</project>
Added: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/InterceptMC.java
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/InterceptMC.java (rev 0)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/InterceptMC.java 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.mc.impl;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Marks GateIn MC enabled component.
+ *
+ * @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
+ * @author <a href="mailto:ales.justin@redhat.com">Ales Justin</a>
+ */
+(a)Retention(RetentionPolicy.RUNTIME)
+(a)Target({ElementType.TYPE})
+public @interface InterceptMC
+{
+ /**
+ * Injection mode
+ *
+ * @return MCInjectionMode enumeration constant representing injection mode
+ */
+ MCInjectionMode injectionMode() default MCInjectionMode.STANDARD;
+}
Added: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCComponentAdapter.java
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCComponentAdapter.java (rev 0)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCComponentAdapter.java 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,220 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.mc.impl;
+
+import org.jboss.beans.info.spi.BeanAccessMode;
+import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
+import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
+import org.jboss.dependency.plugins.helpers.StatelessController;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.kernel.plugins.dependency.AbstractKernelControllerContext;
+import org.jboss.kernel.spi.dependency.KernelController;
+import org.jboss.kernel.spi.dependency.KernelControllerContext;
+import org.picocontainer.ComponentAdapter;
+import org.picocontainer.PicoContainer;
+import org.picocontainer.PicoInitializationException;
+import org.picocontainer.PicoIntrospectionException;
+import org.picocontainer.PicoVisitor;
+
+/**
+ * A wrapping adapter, that takes care of mc integration at component instantiation time.
+ *
+ * @author <a href="mailto:ajustin@redhat.com">Ales Justin</a>
+ * @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
+ */
+public class MCComponentAdapter implements ComponentAdapter
+{
+ /**
+ * Kernel controller retrieved from associated mc kernel.
+ */
+ private KernelController controller;
+
+ /**
+ * Original component adapter.
+ */
+ private ComponentAdapter delegate;
+
+ /**
+ * Interception marking annotation, configured for the component.
+ */
+ private InterceptMC interceptMC;
+
+ /**
+ * A component instance handled by this component adapter.
+ */
+ private Object lastComponentInstance;
+
+ /**
+ * BeanMetaData parsed from mc-int-config.xml
+ */
+ private AbstractBeanMetaData metaData;
+
+ /**
+ * The only constructor.
+ *
+ * @param controller Kernel controller to use
+ * @param delegate original component adapter
+ * @param interceptMC mc-integration configuration in the form of annotation
+ */
+ public MCComponentAdapter(KernelController controller, ComponentAdapter delegate,
+ InterceptMC interceptMC, AbstractBeanMetaData data)
+ {
+ if (controller == null)
+ {
+ throw new IllegalArgumentException("Null controller");
+ }
+ if (delegate == null)
+ {
+ throw new IllegalArgumentException("Null delegate");
+ }
+
+ if (controller instanceof StatelessController)
+ {
+ throw new IllegalArgumentException("controller is instanceof StatelessController");
+ }
+
+ this.controller = controller;
+ this.delegate = delegate;
+ this.interceptMC = interceptMC;
+ this.metaData = data;
+ }
+
+ /**
+ * Getter method for component key.
+ *
+ * @return String or Class representing a key
+ */
+ public Object getComponentKey()
+ {
+ return delegate.getComponentKey();
+ }
+
+ /**
+ * Getter for component implementation class.
+ *
+ * @return component implementation class
+ */
+ public Class getComponentImplementation()
+ {
+ return delegate.getComponentImplementation();
+ }
+
+ /**
+ * This is where mc integration happens.
+ * Instantiation is first delegated to original component adapter, the resulting
+ * instance is then sent through kernel controller to be injected by mc kernel.
+ *
+ * @param container pico container that holds this component adapter
+ * @return object with injections already performed on it
+ * @throws PicoInitializationException
+ * @throws PicoIntrospectionException
+ */
+ public Object getComponentInstance(PicoContainer container) throws PicoInitializationException, PicoIntrospectionException
+ {
+ Object target = lastComponentInstance;
+ if (target != null)
+ {
+ return target;
+ }
+
+ String key = delegate.getComponentKey().toString();
+ Object instance = delegate.getComponentInstance(container);
+ try
+ {
+ if (metaData == null)
+ {
+ metaData = new AbstractBeanMetaData();
+ }
+ metaData.setName(key);
+ metaData.setBean(instance.getClass().getName());
+ BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(metaData);
+ builder.setConstructorValue(instance);
+ builder.ignoreCreate();
+ builder.ignoreStart();
+ builder.ignoreStop();
+ builder.ignoreDestroy();
+ builder.setAccessMode(getInjectionMode(interceptMC));
+ KernelControllerContext ctx = new AbstractKernelControllerContext(null, builder.getBeanMetaData(), null);
+
+ StatelessController ctrl = new StatelessController(controller);
+ ctrl.install(ctx);
+ if (ctx.getError() != null)
+ {
+ throw ctx.getError();
+ }
+ if (ctrl.getStates().isBeforeState(ctx.getState(), ControllerState.INSTALLED))
+ {
+ throw new IllegalArgumentException("Missing some dependency: " + ctx.getDependencyInfo().getUnresolvedDependencies(null));
+ }
+
+ target = ctx.getTarget();
+ lastComponentInstance = target;
+ return target;
+ }
+ catch (Throwable ex)
+ {
+ throw new RuntimeException("Failed to perform MC interception on component: " + delegate.getComponentImplementation(), ex);
+ }
+ }
+
+ /**
+ * Method to determine injection mode to be used by mc kernel.
+ *
+ * @param interceptMC configuration in form of InterceptMC annotation
+ * @return jboss-beans-info BeanAccessMode
+ */
+ private BeanAccessMode getInjectionMode(InterceptMC interceptMC)
+ {
+ MCInjectionMode mode = interceptMC.injectionMode();
+
+ switch (mode)
+ {
+ case ALL:
+ return BeanAccessMode.ALL;
+ case FIELDS:
+ return BeanAccessMode.FIELDS;
+ default:
+ return BeanAccessMode.STANDARD;
+ }
+ }
+
+ /**
+ * Delegation-only method.
+ *
+ * @param container
+ * @throws PicoIntrospectionException
+ */
+ public void verify(PicoContainer container) throws PicoIntrospectionException
+ {
+ delegate.verify(container);
+ }
+
+ /**
+ * Delegation-only method.
+ *
+ * @param visitor
+ */
+ public void accept(PicoVisitor visitor)
+ {
+ delegate.accept(visitor);
+ }
+}
\ No newline at end of file
Added: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCInjectionMode.java
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCInjectionMode.java (rev 0)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCInjectionMode.java 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.mc.impl;
+
+/**
+ * Annotation that represents injection mode.
+ * One-to-one mapped to org.jboss.beans.info.spi.BeanAccessMode
+ *
+ * @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
+ */
+public enum MCInjectionMode
+{
+ /**
+ * Field and method injections
+ */
+ ALL,
+
+ /**
+ * Disable field injections (default)
+ */
+ FIELDS,
+
+ /**
+ * Try setter injection first, if no setter found, fallback to field
+ */
+ STANDARD
+}
Added: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCIntConfig.java
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCIntConfig.java (rev 0)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCIntConfig.java 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,269 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.mc.impl;
+
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
+import org.jboss.beans.metadata.spi.BeanMetaData;
+import org.jboss.kernel.spi.deployment.KernelDeployment;
+import org.jboss.xb.binding.Unmarshaller;
+import org.jboss.xb.binding.UnmarshallerFactory;
+import org.jboss.xb.binding.resolver.MutableSchemaResolver;
+import org.jboss.xb.binding.sunday.unmarshalling.SingletonSchemaResolverFactory;
+import org.picocontainer.ComponentAdapter;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Configuration reader and holder for conf/mc-int-config.xml
+ *
+ * mc-int-config.xml uses jboss bean deployer syntax (the one used in jboss-beans.xml).
+ * It is only interested in annotation and injection configuration though, and doesn't treat <bean> element attributes
+ * as referring to mc bean declarations - it treats them as references to exo-kernel components.
+ * <p>
+ * Example:
+ * <pre>
+ * <deployment xmlns="urn:jboss:bean-deployer:2.0">
+ * <bean class="org.exoplatform.container.definition.PortalContainerConfig">
+ * <annotation>@org.exoplatform.container.mc.impl.InterceptMC</annotation>
+ * </bean>
+ * <bean name="InjectingBean2">
+ * <annotation>@org.exoplatform.container.mc.impl.InterceptMC(injectionMode=org.exoplatform.container.mc.impl.MCInjectionMode.STANDARD)</annotation>
+ * </bean>
+ * </pre>
+ * <p>
+ * In the above example the first <em>bean</em> declaration refers to exo-kernel configured service that
+ * is returned by exo container when calling getComponentInstanceOfType(clazz).
+ *
+ * The second <em>bean</em> declaration refers to exo-kernel configured service that is returned by exo
+ * container when calling getComponentInstance(name).
+ *
+ * This configuration makes it possible to activate injection outside of you classes. When annotations are declared both
+ * inside the class, and in mc-int-config.xml, the latter completely overrides the former.
+ * It is also possible to use mc-int-config.xml to nullify an existing annotation in your service class.
+ *
+ * <em>Warning:</em> Make sure there are no leading or trailing white spaces in the body of <em>annotation</em> element.
+ *
+ * @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
+ */
+public class MCIntConfig
+{
+ /**
+ * Logger.
+ */
+ private static final Log log = ExoLogger.getLogger(MCIntConfig.class);
+
+ /**
+ * Configuration for <em>beans</em> specified with <em>name</em>.
+ */
+ private Map<String, DeploymentData> confByKey = new HashMap<String, DeploymentData>();
+
+ /**
+ * Configuration for <em>beans</em> specified with <em>class</em>.
+ */
+ private Map<String, DeploymentData> confByBean = new HashMap<String, DeploymentData>();
+
+ /**
+ * The only constructor.
+ */
+ MCIntConfig()
+ {
+ Enumeration<URL> urls = null;
+ try
+ {
+ urls = Thread.currentThread().getContextClassLoader().getResources("conf/mc-int-config.xml");
+ }
+ catch (IOException e)
+ {
+ throw new RuntimeException("Failed to get resources: conf/mc-int-config.xml", e);
+ }
+
+ UnmarshallerFactory factory = UnmarshallerFactory.newInstance();
+ MutableSchemaResolver resolver = SingletonSchemaResolverFactory.getInstance().getSchemaBindingResolver();
+
+ while (urls.hasMoreElements())
+ {
+ URL url = urls.nextElement();
+
+ KernelDeployment deployment = parseConfigURL(factory, resolver, url);
+
+ List<BeanMetaData> beans = deployment.getBeans();
+ for (BeanMetaData mdata : beans)
+ {
+ String name = mdata.getName();
+ DeploymentData data = confByKey.get(name);
+ if (data == null)
+ {
+ String bean = mdata.getBean();
+ data = confByBean.get(bean);
+ }
+ if (data != null)
+ {
+ log.warn("Overriding existing mc-int-beans configuration for bean: " + data.data
+ + " from " + data.deployment.getName() + " with one from " + deployment.getName());
+ }
+ addConf(new DeploymentData(deployment, mdata));
+ }
+ }
+ }
+
+ /**
+ * Retrieve configuration by component key.
+ *
+ * @param key component key
+ * @return configuration for specific component
+ */
+ public AbstractBeanMetaData getByKey(String key)
+ {
+ DeploymentData dd = confByKey.get(key);
+ if (dd == null)
+ {
+ return null;
+ }
+ return (AbstractBeanMetaData) dd.data;
+ }
+
+ /**
+ * Retrieve configuration by component type.
+ *
+ * @param bean component type
+ * @return configuration for specific component
+ */
+ public AbstractBeanMetaData getByBean(String bean)
+ {
+ DeploymentData dd = confByBean.get(bean);
+ if (dd == null)
+ {
+ return null;
+ }
+ return (AbstractBeanMetaData) dd.data;
+ }
+
+ /**
+ * Retrieve configuration for specific component adapter.
+ * First lookup by key, then by type.
+ *
+ * @param adapter component adapter
+ * @return configuration for specific component
+ */
+ public AbstractBeanMetaData getByAdapter(ComponentAdapter adapter)
+ {
+ Object key = adapter.getComponentKey();
+ String strKey = key instanceof Class ? ((Class) key).getName() : String.valueOf(key);
+ BeanMetaData ret = getByKey(strKey);
+ if (ret != null)
+ {
+ return (AbstractBeanMetaData) ret;
+ }
+
+ ret = getByBean(strKey);
+ return (AbstractBeanMetaData) ret;
+ }
+
+ /**
+ * Add parsed configuration for one component.
+ *
+ * @param deploymentData confiuration for specific component
+ */
+ private void addConf(DeploymentData deploymentData)
+ {
+ String name = deploymentData.data.getName();
+ if (name != null)
+ {
+ confByKey.put(name, deploymentData);
+ }
+ String bean = deploymentData.data.getBean();
+ if (bean != null)
+ {
+ confByBean.put(bean, deploymentData);
+ }
+ if (name == null && bean == null)
+ {
+ throw new RuntimeException("Configuration error: bean found with no name and no class in "
+ + deploymentData.deployment.getName());
+ }
+ }
+
+ /**
+ * Parse the configuration.
+ *
+ * @param factory JBoss XB unmarshaller factory
+ * @param resolver JBoss XB schema resolver
+ * @param url Url pointing to mc-int-config.xml file
+ * @return JBoss XB bean representing a parsed configuration
+ */
+ private KernelDeployment parseConfigURL(UnmarshallerFactory factory, MutableSchemaResolver resolver, URL url)
+ {
+ final boolean trace = log.isTraceEnabled();
+ if (trace)
+ {
+ log.trace("Parsing " + url);
+ }
+ long start = System.currentTimeMillis();
+
+ Unmarshaller unmarshaller = factory.newUnmarshaller();
+ KernelDeployment deployment = null;
+ try
+ {
+ deployment = (KernelDeployment) unmarshaller.unmarshal(url.toString(), resolver);
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Failed to parse xml " + url, e);
+ }
+
+ if (deployment == null)
+ {
+ throw new RuntimeException("The xml " + url + " is not well formed!");
+ }
+ deployment.setName(url.toString());
+
+ if (trace)
+ {
+ long now = System.currentTimeMillis();
+ log.trace("Parsing " + url + " took " + (now - start) + " milliseconds");
+ }
+
+ return deployment;
+ }
+
+ /**
+ * Data structure that holds component configuration - deployment configuration association.
+ */
+ static class DeploymentData
+ {
+ KernelDeployment deployment;
+ BeanMetaData data;
+
+ public DeploymentData(KernelDeployment deployment, BeanMetaData data)
+ {
+ this.deployment = deployment;
+ this.data = data;
+ }
+ }
+}
Added: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCIntegrationImpl.java
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCIntegrationImpl.java (rev 0)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCIntegrationImpl.java 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,182 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.mc.impl;
+
+import org.exoplatform.container.mc.MCIntegration;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
+import org.jboss.beans.metadata.spi.AnnotationMetaData;
+import org.jboss.kernel.Kernel;
+import org.jboss.kernel.plugins.dependency.AbstractKernelController;
+import org.jboss.mc.common.ThreadLocalUtils;
+import org.jboss.mc.servlet.vdf.api.VDFThreadLocalUtils;
+import org.picocontainer.ComponentAdapter;
+
+import javax.servlet.ServletContext;
+import java.lang.annotation.Annotation;
+import java.util.Set;
+
+/**
+ * Implementation of MCIntegration that contains hard dependencies on JBoss Microcontainer.
+ *
+ * There is a reflection style dependency on this class in
+ * {@link org.exoplatform.container.mc.MCIntegrationInvoker}.
+ *
+ * @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
+ */
+public class MCIntegrationImpl implements MCIntegration
+{
+ /**
+ * Logger
+ */
+ private static Log log = ExoLogger.getLogger(MCIntegrationImpl.class);
+
+ /**
+ * A singleton MCIntegration implementation
+ */
+ private static MCIntegration mcint;
+
+ /**
+ * JBoss MC kernel controller that we use
+ */
+ private AbstractKernelController rootController;
+
+ /**
+ * Configuration parser and holder
+ */
+ private MCIntConfig conf;
+
+ /**
+ * A factory method. In principle can return different implementations based on the running environment.
+ * Currently only one implementation exists.
+ */
+ public synchronized static MCIntegration getInstance()
+ {
+ if (mcint == null)
+ {
+ mcint = new MCIntegrationImpl();
+ }
+ return mcint;
+ }
+
+ /**
+ * Single constructor - private to force usage of factory method {@link MCIntegrationImpl#getInstance()}.
+ */
+ private MCIntegrationImpl()
+ {
+ // load conf/mc-int-config.xml
+ conf = new MCIntConfig();
+ }
+
+ /**
+ * Get kernel controller associated with appropriate mc kernel
+ * @return kernel controller
+ */
+ public synchronized AbstractKernelController getRootController()
+ {
+ if (rootController == null)
+ {
+ Kernel kernel = ThreadLocalUtils.getKernel();
+ if (kernel != null)
+ {
+ rootController = (AbstractKernelController) kernel.getController();
+ }
+ else
+ {
+ log.warn("GateIn - MC integration not available");
+ return null;
+ }
+ }
+ return rootController;
+ }
+
+ /**
+ * Check if component should pass through mc kernel injection based on class annotations,
+ * and mc-int-config.xml configuration.
+ * Wrap with intercepting component adapter (@link MCComponentAdapter} or return original adapter.
+ *
+ * @see MCIntegration#getMCAdapter(org.picocontainer.ComponentAdapter)
+ */
+ public ComponentAdapter getMCAdapter(ComponentAdapter adapter)
+ {
+ InterceptMC interceptAnnotation = null;
+
+ AbstractBeanMetaData data = conf.getByAdapter(adapter);
+ if (data != null)
+ {
+ Set<AnnotationMetaData> annotationMetaData = data.getAnnotations();
+ if (annotationMetaData != null)
+ {
+ for (AnnotationMetaData annMeta : annotationMetaData)
+ {
+ Annotation ann = annMeta.getAnnotationInstance();
+ if (ann.annotationType() == InterceptMC.class)
+ {
+ interceptAnnotation = (InterceptMC) ann;
+ }
+ }
+ }
+ }
+ else
+ {
+ Class<?> clazz = adapter.getComponentImplementation();
+ interceptAnnotation = clazz.getAnnotation(InterceptMC.class);
+ }
+
+ if (interceptAnnotation == null)
+ {
+ return adapter;
+ }
+
+ AbstractKernelController controller = getRootController();
+ if (controller != null)
+ {
+ adapter = new MCComponentAdapter(controller, adapter, interceptAnnotation, data);
+ }
+ return adapter;
+ }
+
+ /**
+ * @see MCIntegration#hasMCKernel(org.picocontainer.ComponentAdapter)
+ */
+ public boolean hasMCKernel(ComponentAdapter adapter)
+ {
+ return ThreadLocalUtils.getKernel() != null;
+ }
+
+ /**
+ * @see MCIntegration#initThreadCtx(javax.servlet.ServletContext)
+ */
+ public void initThreadCtx(ServletContext ctx)
+ {
+ VDFThreadLocalUtils.init(ctx);
+ }
+
+ /**
+ * @see MCIntegration#resetThreadCtx(javax.servlet.ServletContext)
+ */
+ public void resetThreadCtx(ServletContext ctx)
+ {
+ VDFThreadLocalUtils.reset();
+ }
+}
Added: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/pom.xml
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/pom.xml (rev 0)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/pom.xml 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,36 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>mc-integration-parent</artifactId>
+ <version>2.2.0-Beta05-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>exo.kernel.mc-int-demo</artifactId>
+
+ <name>eXo Kernel :: MC Kernel Integration :: Demo</name>
+ <description>MC Kernel Integration Demo</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>picocontainer</groupId>
+ <artifactId>picocontainer</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.mc-int</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-kernel</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ <version>1.0.1B</version>
+ </dependency>
+ </dependencies>
+
+</project>
Added: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/ExternallyControlledInjectingBean.java
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/ExternallyControlledInjectingBean.java (rev 0)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/ExternallyControlledInjectingBean.java 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,253 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.kernel.demos.mc;
+
+import org.jboss.dependency.spi.Controller;
+import org.picocontainer.Startable;
+
+import javax.transaction.TransactionManager;
+import java.util.Map;
+
+/**
+ * This POJO demonstrates how to use external configuration (mc-int-config.xml)
+ * to perform injections of JBoss Microcontainer components
+ * into a service object configured and managed through exo-kernel.
+ *
+ * @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
+ */
+public class ExternallyControlledInjectingBean implements Startable
+{
+ /**
+ * An example of getting the JBoss MC configured transaction manager
+ * into an exo-kernel installed service.
+ * This field is to be injected through setter method by mc kernel.
+ */
+ private TransactionManager tm;
+
+ /**
+ * Field to be injected through setter method by mc kernel.
+ */
+ private InjectedBean bean;
+
+ /**
+ * A map field to be injected through setter method by mc kernel.
+ */
+ private Map bindingsMap;
+
+ /**
+ * A field to be injected with a property value of existing mc bean.
+ * Demonstrates another kind of injection.
+ */
+ private String stringValue;
+
+ /**
+ * Field that counts how many times start() method is called.
+ * This is to demonstrate that start() method is called exactly once.
+ */
+ private int startCount;
+
+ /**
+ * Field that tells if @Install method was successfully called
+ */
+ private boolean installOk;
+
+ /**
+ * Internal datastructure to demonstrate nested property injection
+ */
+ private ConfigurationHolder config;
+
+ /**
+ * In this demo this bean is to be instantiated by exo-kernel.
+ * We can not use constructor based injection that mc kernel supports,
+ * since it's not mc kernel that does the instantiation.
+ */
+ public ExternallyControlledInjectingBean()
+ {
+ config = new ConfigurationHolder();
+ }
+
+ /**
+ * Getter method.
+ * @return
+ */
+ public TransactionManager getTransactionManager()
+ {
+ return tm;
+ }
+
+ /**
+ * Setter method, externally configured as injection point for type matching injection
+ * @param tm
+ */
+ public void setTransactionManager(TransactionManager tm)
+ {
+ this.tm = tm;
+ }
+
+ /**
+ * Getter method.
+ * @return injected bean
+ */
+ public InjectedBean getBean()
+ {
+ return bean;
+ }
+
+ /**
+ * Setter method, externally configured as injection point for type matching injection.
+ * @param bean
+ */
+ public void setBean(InjectedBean bean)
+ {
+ this.bean = bean;
+ }
+
+ /**
+ * Getter method.
+ * @return
+ */
+ public Map getBindingsMap()
+ {
+ return bindingsMap;
+ }
+
+ /**
+ * Setter method, externally configured as injection point.
+ * @param bindingsMap
+ */
+ public void setBindingsMap(Map bindingsMap)
+ {
+ this.bindingsMap = bindingsMap;
+ }
+
+ /**
+ * Getter method.
+ * @return
+ */
+ public String getStringValue()
+ {
+ return stringValue;
+ }
+
+ /**
+ * Setter method externally configured as injection point for property getter injection.
+ * @param stringValue
+ */
+ public void setStringValue(String stringValue)
+ {
+ this.stringValue = stringValue;
+ }
+
+ /**
+ * Getter method.
+ * @return start count
+ */
+ public int getStartCount()
+ {
+ return startCount;
+ }
+
+ /**
+ * org.picocontainer.Startable lifecycle method. Supposed to be called exactly once.
+ */
+ public void start()
+ {
+ startCount++;
+ }
+
+ /**
+ * org.picocontainer.Startable lifecycle method.
+ */
+ public void stop()
+ {
+ }
+
+ /**
+ * Getter method.
+ * @return
+ */
+ public ConfigurationHolder getConfig()
+ {
+ return config;
+ }
+
+ /**
+ * Non-setter method externally configured as injection method called with injected parameters
+ * @param param1
+ * @param param2
+ * @param param3
+ */
+ public void initialize(String param1, String param2, Controller param3)
+ {
+ if (param1 == null)
+ {
+ throw new IllegalArgumentException("param1 == null");
+ }
+ if (param2 == null)
+ {
+ throw new IllegalArgumentException("param2 == null");
+ }
+ if (param3 == null)
+ {
+ throw new IllegalArgumentException("param3 == null");
+ }
+ installOk = true;
+ }
+
+ /**
+ * Getter method.
+ * @return true if install method was called successfully
+ */
+ public boolean isInstallOk()
+ {
+ return installOk;
+ }
+
+ /**
+ * Inner data structure for testing nested property injection
+ */
+ public static class ConfigurationHolder
+ {
+ /**
+ * Property to be injected
+ */
+ private String someProperty;
+
+ /**
+ * Getter method.
+ * @return someProperty
+ */
+ public String getSomeProperty()
+ {
+ return someProperty;
+ }
+
+ /**
+ * Setter method.
+ * @param someProperty
+ */
+ public void setSomeProperty(String someProperty)
+ {
+ this.someProperty = someProperty;
+ }
+ }
+}
Added: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/InjectedBean.java
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/InjectedBean.java (rev 0)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/InjectedBean.java 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,64 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.kernel.demos.mc;
+
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+
+/**
+ * A simple POJO that we use for injection.
+ *
+ * @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
+ */
+public class InjectedBean
+{
+ private static final Log log = ExoLogger.getLogger(InjectedBean.class);
+
+ public static final String SOME_PROPERTY_VALUE = "[This is some property value]";
+
+ private String anotherProperty;
+
+ public InjectedBean()
+ {
+ log.info("InjectedBean instantiated :: " + this);
+ }
+
+ public String getSomeString()
+ {
+ return SOME_PROPERTY_VALUE;
+ }
+
+ public void start()
+ {
+ log.info("Method start() called on InjectedBean");
+ }
+
+ public String getAnotherProperty()
+ {
+ return anotherProperty;
+ }
+
+ public void setAnotherProperty(String anotherProperty)
+ {
+ this.anotherProperty = anotherProperty;
+ }
+}
Added: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/InjectingBean.java
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/InjectingBean.java (rev 0)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/InjectingBean.java 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,313 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.kernel.demos.mc;
+
+import org.exoplatform.container.mc.impl.InterceptMC;
+import org.exoplatform.container.mc.impl.MCInjectionMode;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.jboss.beans.metadata.api.annotations.EntryValue;
+import org.jboss.beans.metadata.api.annotations.Inject;
+import org.jboss.beans.metadata.api.annotations.InstallMethod;
+import org.jboss.beans.metadata.api.annotations.MapValue;
+import org.jboss.beans.metadata.api.annotations.StringValue;
+import org.jboss.beans.metadata.api.annotations.Value;
+import org.jboss.dependency.spi.Controller;
+import org.jboss.kernel.plugins.bootstrap.basic.KernelConstants;
+import org.jboss.kernel.spi.config.KernelConfigurator;
+
+import javax.transaction.TransactionManager;
+import java.util.Map;
+
+/**
+ * This POJO demonstrates how to use annotations to perform injections of JBoss Microcontainer components
+ * into a service object configured and managed through exo-kernel.
+ *
+ * If we want our class to be instantiated at deploy time,
+ * it has to implement org.picocontainer.Startable, otherwise it will only
+ * be registered, but not instantiated. MC integration takes place
+ * at instantiation time, not at component registration time.
+ *
+ * @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
+ */
+// Enable field injection by setting injectionMode
+@InterceptMC(injectionMode = MCInjectionMode.ALL)
+public class InjectingBean implements org.picocontainer.Startable
+{
+ /**
+ * Logger
+ */
+ private static final Log log = ExoLogger.getLogger(InjectingBean.class);
+
+ /**
+ * Field to be injected through setter method by mc kernel.
+ */
+ private InjectedBean bean;
+
+ /**
+ * Field to be injected through setter method by mc kernel.
+ */
+ private KernelConfigurator configurator;
+
+ /**
+ * Field to be injected directly through field injection by mc kernel.
+ * This is an anti-pattern as you're exposing implementation details,
+ * and giving up interception capability.
+ */
+ @Inject(bean = "InjectedBean")
+ private InjectedBean injectedBean;
+
+ /**
+ * An example of getting the JBoss MC configured transaction manager
+ * into an exo-kernel installed service.
+ * This field is to be injected through setter method by mc kernel.
+ */
+ private TransactionManager tm;
+
+ /**
+ * A map field to be injected through setter method by mc kernel.
+ */
+ private Map bindingsMap;
+
+ /**
+ * A field to be injected with a property value of existing mc bean.
+ * Demonstrates another kind of injection.
+ */
+ private String stringValue;
+
+ /**
+ * Field that counts how many times start() method is called.
+ * This is to demonstrate that start() method is called exactly once.
+ */
+ private int startCount;
+
+ /**
+ * Field that tells if @Install method was successfully called
+ */
+ private boolean installOk;
+
+ /**
+ * In this demo this bean is to be instantiated by exo-kernel.
+ * We can not use constructor based injection that mc kernel supports,
+ * since it's not mc kernel that does the instantiation.
+ */
+ public InjectingBean()
+ {
+ log.info("Injecting bean instantiated");
+ }
+
+ /**
+ * Getter method.
+ * @return injected bean
+ */
+ public InjectedBean getBean()
+ {
+ return bean;
+ }
+
+ /**
+ * Setter method, annotated as injection point for type matching injection.
+ * @param bean
+ */
+ @Inject
+ public void setBean(InjectedBean bean)
+ {
+ this.bean = bean;
+ log.info("Received InjectedBean: " + bean);
+ }
+
+ /**
+ * Getter method.
+ * @return injected component
+ */
+ public KernelConfigurator getConfigurator()
+ {
+ return configurator;
+ }
+
+ /**
+ * Setter method, annotated as injection point for name matching injection.
+ * @param configurator
+ */
+ @Inject(bean = KernelConstants.KERNEL_CONFIGURATOR_NAME)
+ public void setConfigurator(KernelConfigurator configurator)
+ {
+ this.configurator = configurator;
+ log.info("InjectingBean Received KernelConfigurator: " + configurator);
+ }
+
+ /**
+ * Getter method.
+ * @return
+ */
+ public Map getBindings()
+ {
+ return bindingsMap;
+ }
+
+ /**
+ * Setter method, annotated as injection point with map injecting annotation.
+ * @param bindings
+ */
+ @MapValue(
+ value = {
+ @EntryValue(
+ key = @Value(type = Class.class, string = @StringValue(value = "org.jboss.dependency.spi.Controller", type = Class.class)),
+ value = @Value(inject = @Inject(bean = KernelConstants.KERNEL_CONTROLLER_NAME))
+ ),
+ @EntryValue(
+ key = @Value(type = Class.class, string = @StringValue(value = "org.jboss.kernel.Kernel", type = Class.class)),
+ value = @Value(inject = @Inject(bean = KernelConstants.KERNEL_NAME))
+ ),
+ @EntryValue(
+ key = @Value(type = Class.class, string = @StringValue(value = "org.jboss.kernel.spi.dependency.KernelController", type = Class.class)),
+ value = @Value(inject = @Inject(bean = KernelConstants.KERNEL_CONTROLLER_NAME))
+ ),
+ @EntryValue(
+ key = @Value(type = Class.class, string = @StringValue(value = "org.jboss.kernel.spi.registry.KernelBus", type = Class.class)),
+ value = @Value(inject = @Inject(bean = KernelConstants.KERNEL_BUS_NAME))
+ ),
+ @EntryValue(
+ key = @Value(type = Class.class, string = @StringValue(value = "org.jboss.kernel.spi.registry.KernelRegistry", type = Class.class)),
+ value = @Value(inject = @Inject(bean = KernelConstants.KERNEL_REGISTRY_NAME))
+ ),
+ @EntryValue(
+ key = @Value(type = Class.class, string = @StringValue(value = "org.jboss.kernel.spi.config.KernelConfigurator", type = Class.class)),
+ value = @Value(inject = @Inject(bean = KernelConstants.KERNEL_CONFIGURATOR_NAME))
+ )
+ }
+ )
+ public void setBindings(Map<Class<?>, Object> bindings)
+ {
+ log.info("Received a map with bindings: " + bindings);
+ this.bindingsMap = bindings;
+ }
+
+ /**
+ * Getter method.
+ * @return
+ */
+ public String getSomeStringProperty()
+ {
+ return stringValue;
+ }
+
+ /**
+ * Setter method annotated as injection point for property getter injection.
+ * @param value
+ */
+ @Inject(bean = "InjectedBean", property = "someString")
+ public void setSomeStringProperty(String value)
+ {
+ log.info("Received SomeStringProperty value: " + value);
+ this.stringValue = value;
+ }
+
+ /**
+ * org.picocontainer.Startable lifecycle method. Supposed to be called exactly once.
+ */
+ public void start()
+ {
+ log.warn("start() called (injectedBean is set to: " + injectedBean + ", transactionManager is setTo: " + tm + ")");
+ this.startCount++;
+ }
+
+ /**
+ * org.picocontainer.Startable lifecycle method.
+ */
+ public void stop()
+ {
+ log.info("stop() called");
+ }
+
+ /**
+ * Getter method for field-injected bean.
+ * @return field-injected bean
+ */
+ public InjectedBean getInjectedBean()
+ {
+ return injectedBean;
+ }
+
+ /**
+ * Getter method.
+ * @return start count
+ */
+ public int getStartCount()
+ {
+ return startCount;
+ }
+
+ /**
+ * Setter method annotated as injection point for type matching injection
+ * @param tm
+ */
+ @Inject
+ public void setTransactionManager(TransactionManager tm)
+ {
+ this.tm = tm;
+ }
+
+ /**
+ * Getter method.
+ * @return
+ */
+ public TransactionManager getTransactionManager()
+ {
+ return tm;
+ }
+
+ /**
+ * Non-setter method annotated as injection method called with injected parameters
+ * @param param1
+ * @param param2
+ * @param param3
+ */
+ @InstallMethod
+ public void initialize(@Inject @StringValue("parameter1") String param1,
+ @Inject(bean = "InjectedBean", property = "someString") String param2,
+ @Inject(bean = KernelConstants.KERNEL_CONTROLLER_NAME) Controller param3)
+ {
+ if (param1 == null)
+ {
+ throw new IllegalArgumentException("param1 == null");
+ }
+ if (param2 == null)
+ {
+ throw new IllegalArgumentException("param2 == null");
+ }
+ if (param3 == null)
+ {
+ throw new IllegalArgumentException("param3 == null");
+ }
+ installOk = true;
+ }
+
+ /**
+ * Getter method.
+ * @return true if install method was called successfully
+ */
+ public boolean isInstallOk()
+ {
+ return installOk;
+ }
+}
Added: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/resources/META-INF/jboss-beans.xml
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/resources/META-INF/jboss-beans.xml (rev 0)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/resources/META-INF/jboss-beans.xml 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,3 @@
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+ <bean name="InjectedBean" class="org.exoplatform.kernel.demos.mc.InjectedBean"/>
+</deployment>
\ No newline at end of file
Added: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/resources/conf/configuration.xml
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/resources/conf/configuration.xml (rev 0)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/resources/conf/configuration.xml 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<configuration
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+
+ <component>
+ <key>InjectingBean</key>
+ <type>org.exoplatform.kernel.demos.mc.InjectingBean</type>
+ </component>
+ <component>
+ <key>InjectingBean2</key>
+ <type>org.exoplatform.kernel.demos.mc.InjectingBean</type>
+ </component>
+ <component>
+ <key>InjectingBean3</key>
+ <type>org.exoplatform.kernel.demos.mc.InjectingBean</type>
+ </component>
+ <component>
+ <key>InjectingBean4</key>
+ <type>org.exoplatform.kernel.demos.mc.InjectingBean</type>
+ </component>
+ <component>
+ <key>ExternallyControlledInjectingBean</key>
+ <type>org.exoplatform.kernel.demos.mc.ExternallyControlledInjectingBean</type>
+ </component>
+</configuration>
Added: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/resources/conf/mc-int-config.xml
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/resources/conf/mc-int-config.xml (rev 0)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/resources/conf/mc-int-config.xml 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="InjectingBean2">
+ <!-- No leading or trailing white space allowed in annotation element -->
+ <annotation>@org.exoplatform.container.mc.impl.InterceptMC(injectionMode=org.exoplatform.container.mc.impl.MCInjectionMode.STANDARD)</annotation>
+ </bean>
+ <bean name="InjectingBean3">
+ <annotation>@org.exoplatform.container.mc.impl.InterceptMC(injectionMode=org.exoplatform.container.mc.impl.MCInjectionMode.ALL)</annotation>
+ </bean>
+ <bean name="InjectingBean4" class="org.exoplatform.kernel.demos.mc.InjectingBean">
+ <!-- NO ANNOTATION -->
+ </bean>
+ <bean name="ExternallyControlledInjectingBean">
+ <annotation>@org.exoplatform.container.mc.impl.InterceptMC</annotation>
+ <property name="transactionManager"><inject/></property>
+ <property name="bean"><inject bean="InjectedBean"/></property>
+ <property name="bindingsMap">
+ <map keyClass="java.lang.Class" valueClass="java.lang.Object">
+ <entry>
+ <key>org.jboss.dependency.spi.Controller</key>
+ <value><inject bean="jboss.kernel:service=KernelController"/></value>
+ </entry>
+ </map>
+ </property>
+ <property name="stringValue"><inject bean="InjectedBean" property="someString"/></property>
+ <!-- You can't use nested properties for injected properties (i.e. bean), as property injection order is random -->
+ <!--property name="bean.anotherProperty">Test value</property-->
+ <property name="config.someProperty">Test value</property>
+ <install method="initialize">
+ <parameter class="java.lang.String">parameter1</parameter>
+ <parameter class="java.lang.String">parameter2</parameter>
+ <parameter class="org.jboss.dependency.spi.Controller">
+ <inject bean="jboss.kernel:service=KernelController"/>
+ </parameter>
+ </install>
+ </bean>
+</deployment>
\ No newline at end of file
Added: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/pom.xml
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/pom.xml (rev 0)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/pom.xml 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,98 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>mc-integration-parent</artifactId>
+ <version>2.2.0-Beta05-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>exo.kernel.mc-int-tests</artifactId>
+ <packaging>war</packaging>
+
+ <name>eXo Kernel :: MC Kernel Integration :: Tests</name>
+ <description>MC Kernel Integration Tests</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.7</version>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.container</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.mc-int-demo</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <!-- In version 2.1-alpha-1, this was incorrectly named warSourceExcludes -->
+ <!--packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes-->
+ <packagingIncludes>WEB-INF/lib/junit-*.jar,WEB-INF/classes/**</packagingIncludes>
+ <archive>
+ <manifest>
+ <addClasspath>false</addClasspath>
+ <!-- Doesn't seem to be working: -->
+ <!--classpathPrefix>gatein.ear/lib/</classpathPrefix-->
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>tests</id>
+ <build>
+ <finalName>eXo-kernel-integration-tests-${project.version}</finalName>
+ <defaultGoal>integration-test</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>**/it/Test*.java</exclude>
+ </excludes>
+ </configuration>
+ <executions>
+ <execution>
+ <id>integration-tests</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <skip>false</skip>
+ <excludes>
+ <exclude>none</exclude>
+ </excludes>
+ <includes>
+ <include>**/it/Test*.java</include>
+ </includes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>
Added: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/ExternalMCInjectionTest.java
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/ExternalMCInjectionTest.java (rev 0)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/ExternalMCInjectionTest.java 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,194 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.kernel.it;
+
+import org.exoplatform.commons.Environment;
+import org.exoplatform.container.RootContainer;
+import org.exoplatform.kernel.demos.mc.ExternallyControlledInjectingBean;
+import org.exoplatform.kernel.demos.mc.InjectedBean;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.jboss.dependency.spi.Controller;
+import org.junit.Assert;
+import org.junit.Test;
+
+import javax.transaction.TransactionManager;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
+ */
+public class ExternalMCInjectionTest
+{
+ protected Log log = ExoLogger.getLogger(getClass());
+
+ protected String beanName;
+ protected ExternallyControlledInjectingBean bean;
+ protected boolean inJboss;
+ protected boolean mcIntActive = true;
+
+ public ExternalMCInjectionTest()
+ {
+ beanName = "ExternallyControlledInjectingBean";
+ }
+
+ protected void init()
+ {
+ log.info("init() method called");
+ RootContainer rootContainer = RootContainer.getInstance();
+ bean = (ExternallyControlledInjectingBean) rootContainer.getComponentInstance(beanName);
+ log.info("Retrieved " + beanName + ": " + bean);
+ Assert.assertNotNull(beanName + " not installed", bean);
+ inJboss = Environment.getInstance().getPlatform() == Environment.JBOSS_PLATFORM;
+ log.info("Running inside JBoss? " + inJboss);
+ }
+
+ @Test
+ public void test()
+ {
+ init();
+ tests();
+ }
+
+ protected void tests()
+ {
+ testTransactionManager();
+ testNameLookupMethodInjection();
+ testMapInjection();
+ testPropertyValueMethodInjection();
+ testNestedPropertyInjection();
+ testInstallMethod();
+ testStarted();
+ }
+
+ protected void testTransactionManager()
+ {
+ TransactionManager tm = bean.getTransactionManager();
+
+ if (inJboss && mcIntActive)
+ {
+ try
+ {
+ int status = tm.getStatus();
+ log.info("Status before tx: " + tm.getStatus());
+ tm.begin();
+ Assert.assertFalse("TX status didn't change: ", status == tm.getStatus());
+ log.info("Status in tx: " + tm.getStatus());
+ tm.commit();
+ Assert.assertTrue("TX status didn't return to original: ", status == tm.getStatus());
+ log.info("Status after tx: " + tm.getStatus());
+ }
+ catch (Exception ex)
+ {
+ throw new RuntimeException("Failed to use TransactionManager: ", ex);
+ }
+ }
+ else
+ {
+ Assert.assertNull("Injection should not have worked", tm);
+ }
+ log.info("testTransactionManager passed");
+ }
+
+ protected void testNameLookupMethodInjection()
+ {
+ boolean found = bean.getBean() != null;
+ if (inJboss && mcIntActive)
+ {
+ Assert.assertTrue("Method injection by name lookup not executed", found);
+ }
+ else
+ {
+ Assert.assertFalse("Method injection by name lookup should not have worked", found);
+ }
+ log.info("testNameLookupMethodInjection passed");
+ }
+
+ protected void testMapInjection()
+ {
+ Map bindings = bean.getBindingsMap();
+ boolean found = bindings != null;
+ if (inJboss && mcIntActive)
+ {
+ Assert.assertTrue("Map injection not executed", found);
+ Assert.assertEquals("Bindings size", bindings.size(), 1);
+ Assert.assertTrue("Controller not bound", bindings.get(Controller.class) instanceof Controller);
+ }
+ else
+ {
+ Assert.assertFalse("Map injection should not have worked", found);
+ }
+ log.info("testMapInjection passed");
+ }
+
+ protected void testPropertyValueMethodInjection()
+ {
+ String propertyValue = bean.getStringValue();
+ boolean found = propertyValue != null;
+ if (inJboss && mcIntActive)
+ {
+ Assert.assertTrue("Property value method injection not executed", found);
+ Assert.assertEquals("Invalid injected value", propertyValue, InjectedBean.SOME_PROPERTY_VALUE);
+ }
+ else
+ {
+ Assert.assertFalse("Property value method injection should not have worked", found);
+ }
+ log.info("testPropertyValueMethodInjection passed");
+ }
+
+ protected void testNestedPropertyInjection()
+ {
+ String propertyValue = bean.getConfig().getSomeProperty();
+ boolean found = propertyValue != null;
+ if (inJboss && mcIntActive)
+ {
+ Assert.assertTrue("Nested property value method injection not executed", found);
+ Assert.assertEquals("Invalid injected value", propertyValue, "Test value");
+ }
+ else
+ {
+ Assert.assertFalse("Nested property value method injection should not have worked", found);
+ }
+ log.info("testNestedPropertyInjection passed");
+ }
+
+ protected void testInstallMethod()
+ {
+ boolean installOk = bean.isInstallOk();
+ if (inJboss && mcIntActive)
+ {
+ Assert.assertTrue("Install method not executed as expected", installOk);
+ }
+ else
+ {
+ Assert.assertFalse("Install method should not have worked", installOk);
+ }
+ log.info("testInstallMethod passed");
+ }
+
+ protected void testStarted()
+ {
+ Assert.assertEquals("start() method not called exactly once", 1, bean.getStartCount());
+ log.info("testStarted passed");
+ }
+}
Added: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/MCInjectionTest.java
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/MCInjectionTest.java (rev 0)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/MCInjectionTest.java 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,220 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.kernel.it;
+
+import org.exoplatform.commons.Environment;
+import org.exoplatform.container.RootContainer;
+import org.exoplatform.kernel.demos.mc.InjectedBean;
+import org.exoplatform.kernel.demos.mc.InjectingBean;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.jboss.dependency.spi.Controller;
+import org.jboss.kernel.Kernel;
+import org.jboss.kernel.spi.config.KernelConfigurator;
+import org.jboss.kernel.spi.dependency.KernelController;
+import org.jboss.kernel.spi.registry.KernelBus;
+import org.jboss.kernel.spi.registry.KernelRegistry;
+import org.junit.Assert;
+import org.junit.Test;
+
+import javax.transaction.TransactionManager;
+import java.util.Map;
+
+/**
+ * Presumption when running this test from within servlet container is that
+ * org.exoplatform.kernel.demos:exo.kernel.mc-int-demo jar has been deployed
+ *
+ * @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
+ */
+public class MCInjectionTest
+{
+ protected Log log = ExoLogger.getLogger(getClass());
+
+ protected String beanName;
+ protected InjectingBean bean;
+ protected boolean inJboss;
+ protected boolean mcIntActive = true;
+
+ public MCInjectionTest()
+ {
+ beanName = "InjectingBean";
+ }
+
+ protected void init()
+ {
+ log.info("init() method called");
+ RootContainer rootContainer = RootContainer.getInstance();
+ bean = (InjectingBean) rootContainer.getComponentInstance(beanName);
+ log.info("Retrieved " + beanName + ": " + bean);
+ Assert.assertNotNull(beanName + " not installed", bean);
+ inJboss = Environment.getInstance().getPlatform() == Environment.JBOSS_PLATFORM;
+ log.info("Running inside JBoss? " + inJboss);
+ }
+
+ @Test
+ public void test()
+ {
+ init();
+ tests();
+ }
+
+ protected void tests()
+ {
+ testFieldInjection();
+ testTypeMatchingMethodInjection();
+ testNameLookupMethodInjection();
+ testNameLookupMapInjection();
+ testPropertyValueMethodInjection();
+ testTransactionManager();
+ testInstallMethod();
+ testStarted();
+ }
+
+ protected void testTransactionManager()
+ {
+ TransactionManager tm = bean.getTransactionManager();
+
+ if (inJboss && mcIntActive)
+ {
+ try
+ {
+ int status = tm.getStatus();
+ log.info("Status before tx: " + tm.getStatus());
+ tm.begin();
+ Assert.assertFalse("TX status didn't change: ", status == tm.getStatus());
+ log.info("Status in tx: " + tm.getStatus());
+ tm.commit();
+ Assert.assertTrue("TX status didn't return to original: ", status == tm.getStatus());
+ log.info("Status after tx: " + tm.getStatus());
+ }
+ catch (Exception ex)
+ {
+ throw new RuntimeException("Failed to use TransactionManager: ", ex);
+ }
+ }
+ else
+ {
+ Assert.assertNull("Injection should not have worked", tm);
+ }
+ log.info("testTransactionManager passed");
+ }
+
+ protected void testFieldInjection()
+ {
+ boolean found = bean.getInjectedBean() != null;
+ if (inJboss && mcIntActive)
+ {
+ Assert.assertTrue("Field injection not executed", found);
+ }
+ else
+ {
+ Assert.assertFalse("Field injection should not have worked", found);
+ }
+ log.info("testFieldInjection passed");
+ }
+
+ protected void testTypeMatchingMethodInjection()
+ {
+ boolean found = bean.getBean() != null;
+ if (inJboss && mcIntActive)
+ {
+ Assert.assertTrue("Method injection by type matching not executed", found);
+ }
+ else
+ {
+ Assert.assertFalse("Method injection by type matching should not have worked", found);
+ }
+ log.info("testTypeMatchingMethodInjection passed");
+ }
+
+ protected void testNameLookupMethodInjection()
+ {
+ boolean found = bean.getConfigurator() != null;
+ if (inJboss && mcIntActive)
+ {
+ Assert.assertTrue("Method injection by name lookup not executed", found);
+ }
+ else
+ {
+ Assert.assertFalse("Method injection by name lookup should not have worked", found);
+ }
+ log.info("testNameLookupMethodInjection passed");
+ }
+
+ protected void testNameLookupMapInjection()
+ {
+ Map bindings = bean.getBindings();
+ boolean found = bindings != null;
+ if (inJboss && mcIntActive)
+ {
+ Assert.assertTrue("Name lookup Map injection not executed", found);
+ Assert.assertEquals("Bindings size", bindings.size(), 6);
+ Assert.assertTrue("Controller not bound", bindings.get(Controller.class) instanceof Controller);
+ Assert.assertTrue("Kernel not bound", bindings.get(Kernel.class) instanceof Kernel);
+ Assert.assertTrue("KernelController not bound", bindings.get(KernelController.class) instanceof KernelController);
+ Assert.assertTrue("KernelBus not bound", bindings.get(KernelBus.class) instanceof KernelBus);
+ Assert.assertTrue("KernelRegistry not bound", bindings.get(KernelRegistry.class) instanceof KernelRegistry);
+ Assert.assertTrue("KernelConfigurator not bound", bindings.get(KernelConfigurator.class) instanceof KernelConfigurator);
+ }
+ else
+ {
+ Assert.assertFalse("Name lookup Map injection should not have worked", found);
+ }
+ log.info("testNameLookupMapInjection passed");
+ }
+
+ protected void testPropertyValueMethodInjection()
+ {
+ String propertyValue = bean.getSomeStringProperty();
+ boolean found = propertyValue != null;
+ if (inJboss && mcIntActive)
+ {
+ Assert.assertTrue("Property value method injection not executed", found);
+ Assert.assertEquals("Invalid injected value", propertyValue, InjectedBean.SOME_PROPERTY_VALUE);
+ }
+ else
+ {
+ Assert.assertFalse("Property value method injection should not have worked", found);
+ }
+ log.info("testPropertyValueMethodInjection passed");
+ }
+
+ protected void testInstallMethod()
+ {
+ boolean installOk = bean.isInstallOk();
+ if (inJboss && mcIntActive)
+ {
+ Assert.assertTrue("Install method not executed as expected", installOk);
+ }
+ else
+ {
+ Assert.assertFalse("Install method should not have worked", installOk);
+ }
+ log.info("testInstallMethod passed");
+ }
+
+ protected void testStarted()
+ {
+ Assert.assertEquals("start() method not called exactly once", 1, bean.getStartCount());
+ log.info("testStarted passed");
+ }
+}
Added: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/MCInjectionTest2.java
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/MCInjectionTest2.java (rev 0)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/MCInjectionTest2.java 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.kernel.it;
+
+import org.junit.Assert;
+
+/**
+ * @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
+ */
+public class MCInjectionTest2 extends MCInjectionTest
+{
+ public MCInjectionTest2()
+ {
+ super();
+ beanName = "InjectingBean2";
+ }
+
+ @Override
+ protected void testFieldInjection()
+ {
+ boolean found = bean.getInjectedBean() != null;
+ Assert.assertFalse("Field injection should not have worked", found);
+ log.info("testFieldInjection passed");
+ }
+}
Added: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/MCInjectionTest3.java
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/MCInjectionTest3.java (rev 0)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/MCInjectionTest3.java 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.kernel.it;
+
+/**
+ * @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
+ */
+public class MCInjectionTest3 extends MCInjectionTest
+{
+ public MCInjectionTest3()
+ {
+ super();
+ beanName = "InjectingBean3";
+ }
+}
\ No newline at end of file
Added: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/MCInjectionTest4.java
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/MCInjectionTest4.java (rev 0)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/MCInjectionTest4.java 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.kernel.it;
+
+/**
+ * @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
+ */
+public class MCInjectionTest4 extends MCInjectionTest3
+{
+ public MCInjectionTest4()
+ {
+ super();
+ beanName = "InjectingBean4";
+ mcIntActive = false;
+ }
+}
\ No newline at end of file
Added: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/tests/JUnitInvokerServlet.java
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/tests/JUnitInvokerServlet.java (rev 0)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/tests/JUnitInvokerServlet.java 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,64 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.tests;
+
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.junit.internal.JUnitSystem;
+import org.junit.runner.JUnitCore;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.PrintStream;
+
+public class JUnitInvokerServlet extends HttpServlet
+{
+ private static final Log log = ExoLogger.getLogger(JUnitInvokerServlet.class);
+
+ protected void doGet(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, IOException
+ {
+ String className = request.getParameter("class");
+ response.setContentType("text/plain");
+ OutputStream out = response.getOutputStream();
+ final PrintStream fOut = new PrintStream(new TeeOutputStream(out, new LogOutputStream(log)));
+ //final PrintStream fOut = new PrintStream(out);
+ JUnitSystem sys = new JUnitSystem()
+ {
+ public PrintStream out()
+ {
+ return fOut;
+ }
+
+ public void exit(int arg)
+ {
+ }
+ };
+
+ new JUnitCore().runMain(sys, className);
+ out.close();
+ }
+}
\ No newline at end of file
Added: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/tests/LogOutputStream.java
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/tests/LogOutputStream.java (rev 0)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/tests/LogOutputStream.java 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,75 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.tests;
+
+import org.exoplatform.services.log.Log;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+
+/**
+ * @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
+ */
+class LogOutputStream extends OutputStream
+{
+ private Log log;
+
+ private ByteArrayOutputStream buf = new ByteArrayOutputStream();
+
+ private boolean eol;
+
+ LogOutputStream(Log log)
+ {
+ this.log = log;
+ }
+
+ @Override
+ public void write(int b) throws IOException
+ {
+ if (b == '\n' || b == '\r')
+ {
+ eol = true;
+ return;
+ }
+ flush();
+ if (b != -1)
+ {
+ buf.write(b);
+ }
+ }
+
+ public void flush()
+ {
+ if (eol)
+ {
+ eol = false;
+ log.info(new String(buf.toByteArray()));
+ buf.reset();
+ }
+ }
+
+ public void close()
+ {
+ flush();
+ }
+}
Added: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/tests/TeeOutputStream.java
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/tests/TeeOutputStream.java (rev 0)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/tests/TeeOutputStream.java 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.tests;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+/**
+ * @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
+ */
+class TeeOutputStream extends OutputStream
+{
+ private OutputStream out;
+ private OutputStream out2;
+
+ TeeOutputStream(OutputStream out, OutputStream out2)
+ {
+ this.out = out;
+ this.out2 = out2;
+ }
+
+ @Override
+ public void write(byte[] buf, int off, int len) throws IOException
+ {
+ out.write(buf, off, len);
+ out2.write(buf, off, len);
+ }
+
+ @Override
+ public void write(byte[] buf) throws IOException
+ {
+ write(buf, 0, buf.length);
+ }
+
+ @Override
+ public void write(int b) throws IOException
+ {
+ out.write(b);
+ out2.write(b);
+ }
+
+ @Override
+ public void flush() throws IOException
+ {
+ out.flush();
+ out2.flush();
+ }
+
+ @Override
+ public void close() throws IOException
+ {
+ out.close();
+ out2.close();
+ }
+}
Added: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/webapp/WEB-INF/web.xml
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/webapp/WEB-INF/web.xml (rev 0)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/webapp/WEB-INF/web.xml 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app version="2.5"
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <servlet>
+ <servlet-name>JUnit Invoker Servlet</servlet-name>
+ <servlet-class>org.exoplatform.tests.JUnitInvokerServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>JUnit Invoker Servlet</servlet-name>
+ <url-pattern>/integration-tests</url-pattern>
+ </servlet-mapping>
+
+</web-app>
\ No newline at end of file
Added: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/CopiedException.java
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/CopiedException.java (rev 0)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/CopiedException.java 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,91 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.kernel.it;
+
+import java.io.BufferedReader;
+import java.io.PrintStream;
+import java.io.PrintWriter;
+import java.io.StringReader;
+
+/**
+ * @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
+ */
+public class CopiedException extends RuntimeException
+{
+ private String msg;
+ private String trace;
+
+ public CopiedException(String trace)
+ {
+ this.trace = trace;
+ try
+ {
+ final String EOL = System.getProperty("line.separator");
+ StringBuilder sb = new StringBuilder();
+ BufferedReader lineReader = new BufferedReader(new StringReader(trace));
+ String line = null;
+ while ((line = lineReader.readLine()) != null)
+ {
+ if (line.trim().startsWith("at "))
+ {
+ break;
+ }
+ sb.append(line).append(EOL);
+ }
+ msg = sb.toString();
+ }
+ catch (Exception ex)
+ {
+ throw new RuntimeException("Failed to initialize from stacktrace: ", ex);
+ }
+ }
+
+ @Override
+ public String getMessage()
+ {
+ return msg;
+ }
+
+ @Override
+ public String toString()
+ {
+ return msg;
+ }
+
+ @Override
+ public void printStackTrace()
+ {
+ System.out.println(trace);
+ }
+
+ @Override
+ public void printStackTrace(PrintStream s)
+ {
+ s.println(trace);
+ }
+
+ @Override
+ public void printStackTrace(PrintWriter s)
+ {
+ s.println(trace);
+ }
+}
Added: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/FailuresParser.java
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/FailuresParser.java (rev 0)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/FailuresParser.java 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,132 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.kernel.it;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
+ */
+public class FailuresParser
+{
+ private static final String END_OF_REPORT = "FAILURES!!!";
+ private Map<String, CopiedException> failures = new HashMap<String, CopiedException>();
+
+ FailuresParser(LineReader lineReader)
+ {
+ try
+ {
+ String line = null;
+ while ((line = lineReader.readLine()) != null)
+ {
+ String testMethodName = getNameIfStartOfFailure(line);
+
+ if (testMethodName == END_OF_REPORT)
+ {
+ break;
+ }
+
+ if (testMethodName != null)
+ {
+ failures.put(testMethodName, new CopiedException(readStackTrace(lineReader)));
+ lineReader.unreadLastLine();
+ }
+ }
+ }
+ catch (RuntimeException ex)
+ {
+ throw ex;
+ }
+ catch (Exception ex)
+ {
+ throw new RuntimeException("Failed to read response from server: ", ex);
+ }
+ }
+
+ public Map<String, CopiedException> getFailures()
+ {
+ return failures;
+ }
+
+ private String getNameIfStartOfFailure(String line)
+ {
+ // Number + ") " + methodName + "(" + className + ")"
+ // Number + ") " + className
+ if (END_OF_REPORT.equals(line))
+ {
+ return END_OF_REPORT;
+ }
+
+ int max = line.length() > 4 ? 4 : line.length();
+ int pos = line.substring(0, max).indexOf(")");
+ if (pos == -1)
+ {
+ return null;
+ }
+
+ try
+ {
+ Integer.valueOf(line.substring(0, pos));
+ }
+ catch (NumberFormatException ignored)
+ {
+ return null;
+ }
+
+ int endOfMethodPos = line.lastIndexOf("(", line.length() - 1);
+ if (endOfMethodPos == -1)
+ {
+ endOfMethodPos = line.length();
+ }
+
+ String ret = line.substring(pos + 2, endOfMethodPos);
+ // it should not contain any spaces, tabs, newlines, colons ...
+ String[] split = ret.split("(\\s|:)");
+ if (split.length > 1)
+ {
+ return null;
+ }
+ return ret;
+ }
+
+ private String readStackTrace(BufferedReader lineReader) throws IOException
+ {
+ final String EOL = System.getProperty("line.separator");
+ StringBuilder sb = new StringBuilder();
+
+ // Read for as long as lines don't look like beginning of another failure
+ String line = null;
+ while ((line = lineReader.readLine()) != null)
+ {
+ String testMethodName = getNameIfStartOfFailure(line);
+ if (testMethodName != null)
+ {
+ break;
+ }
+ sb.append(line).append(EOL);
+ }
+ return sb.toString();
+ }
+}
Added: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/LineReader.java
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/LineReader.java (rev 0)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/LineReader.java 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,68 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.kernel.it;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.Reader;
+
+/**
+ * @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
+ */
+public class LineReader extends BufferedReader
+{
+ private String lastLine;
+ private String unreadLine;
+
+ public LineReader(Reader reader)
+ {
+ super(reader);
+ }
+
+ public LineReader(Reader reader, int size)
+ {
+ super(reader, size);
+ }
+
+ public String readLine() throws IOException
+ {
+ if (unreadLine != null)
+ {
+ lastLine = unreadLine;
+ unreadLine = null;
+ }
+ else
+ {
+ lastLine = super.readLine();
+ }
+ return lastLine;
+ }
+
+ public void unreadLastLine()
+ {
+ if (unreadLine != null)
+ {
+ throw new RuntimeException("Can't unread multiple lines!");
+ }
+ unreadLine = lastLine;
+ }
+}
Added: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestExternalMCInjectionIntegration.java
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestExternalMCInjectionIntegration.java (rev 0)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestExternalMCInjectionIntegration.java 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.kernel.it;
+
+/**
+ * @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
+ */
+public class TestExternalMCInjectionIntegration extends TestMCInjectionIntegration
+{
+ public TestExternalMCInjectionIntegration()
+ {
+ testClass = org.exoplatform.kernel.it.ExternalMCInjectionTest.class.getName();
+ }
+}
Added: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestMCInjectionIntegration.java
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestMCInjectionIntegration.java (rev 0)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestMCInjectionIntegration.java 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,100 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.kernel.it;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * This test needs to be executed in integration-test phase
+ *
+ * @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
+ */
+public class TestMCInjectionIntegration
+{
+ protected String testClass;
+
+ protected Map<String, CopiedException> failures = new HashMap<String, CopiedException>();
+
+
+ public TestMCInjectionIntegration()
+ {
+ testClass = MCInjectionTest.class.getName();
+ }
+
+ @Before
+ public void init()
+ {
+ URL url = null;
+ try
+ {
+ String host = System.getProperty("server.host");
+ if (host == null)
+ {
+ host = "localhost";
+ }
+ String port = System.getProperty("server.port");
+ if (port == null)
+ {
+ port = "8080";
+ }
+ // invoke servlet
+ url = new URL("http://" + host + ":" + port + "/mc-int-tests/integration-tests?class=" + testClass);
+ System.out.println("Executing remote tests: " + url);
+ InputStream is = (InputStream) url.getContent();
+ LineReader lineReader = new LineReader(new InputStreamReader(is));
+ failures = new FailuresParser(lineReader).getFailures();
+ checkFailed(testClass);
+ }
+ catch (MalformedURLException ex)
+ {
+ throw new RuntimeException("Buggy test case", ex);
+ }
+ catch (IOException e)
+ {
+ throw new RuntimeException("Failed to retrieve response for url: " + url, e);
+ }
+ }
+
+ private void checkFailed(String method)
+ {
+ RuntimeException ex = failures.get(method);
+ if (ex != null)
+ {
+ throw ex;
+ }
+ }
+
+ @Test
+ public void test()
+ {
+ checkFailed("test");
+ }
+}
Added: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestMCInjectionIntegration2.java
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestMCInjectionIntegration2.java (rev 0)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestMCInjectionIntegration2.java 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.kernel.it;
+
+/**
+ * @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
+ */
+public class TestMCInjectionIntegration2 extends TestMCInjectionIntegration
+{
+ public TestMCInjectionIntegration2()
+ {
+ testClass = MCInjectionTest2.class.getName();
+ }
+}
Added: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestMCInjectionIntegration3.java
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestMCInjectionIntegration3.java (rev 0)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestMCInjectionIntegration3.java 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.kernel.it;
+
+/**
+ * @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
+ */
+public class TestMCInjectionIntegration3 extends TestMCInjectionIntegration
+{
+ public TestMCInjectionIntegration3()
+ {
+ testClass = MCInjectionTest3.class.getName();
+ }
+}
\ No newline at end of file
Added: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestMCInjectionIntegration4.java
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestMCInjectionIntegration4.java (rev 0)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestMCInjectionIntegration4.java 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.kernel.it;
+
+/**
+ * @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
+ */
+public class TestMCInjectionIntegration4 extends TestMCInjectionIntegration
+{
+ public TestMCInjectionIntegration4()
+ {
+ testClass = MCInjectionTest4.class.getName();
+ }
+}
\ No newline at end of file
Added: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-kernel-extras/pom.xml
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-kernel-extras/pom.xml (rev 0)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-kernel-extras/pom.xml 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,23 @@
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>mc-integration-parent</artifactId>
+ <version>2.2.0-Beta05-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>exo.kernel.mc-kernel-extras</artifactId>
+
+ <name>eXo Kernel :: MC Kernel Extras</name>
+ <description>MC Kernel 2.2.0 classes that aren't available in mc-kernel 2.0.6.GA</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-kernel</artifactId>
+ </dependency>
+ </dependencies>
+</project>
Added: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-kernel-extras/src/main/java/org/jboss/dependency/plugins/helpers/StatelessController.java
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-kernel-extras/src/main/java/org/jboss/dependency/plugins/helpers/StatelessController.java (rev 0)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-kernel-extras/src/main/java/org/jboss/dependency/plugins/helpers/StatelessController.java 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,166 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.jboss.dependency.plugins.helpers;
+
+import org.jboss.beans.metadata.spi.BeanMetaData;
+import org.jboss.dependency.plugins.AbstractController;
+import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.kernel.Kernel;
+import org.jboss.kernel.spi.dependency.KernelController;
+import org.jboss.kernel.spi.dependency.KernelControllerContext;
+import org.jboss.kernel.spi.event.KernelEvent;
+import org.jboss.kernel.spi.event.KernelEventFilter;
+import org.jboss.kernel.spi.event.KernelEventListener;
+
+import java.util.Set;
+
+/**
+ * Stateless controller.
+ *
+ * @author <a href="ales.justin(a)jboss.com">Ales Justin</a>
+ */
+public class StatelessController extends AbstractController implements KernelController
+{
+ private KernelController controller;
+
+ public StatelessController(KernelController controller)
+ {
+ if (controller == null)
+ throw new IllegalArgumentException("Null controller");
+
+ this.controller = controller;
+ for (ControllerState state : controller.getStates())
+ addState(state, null);
+ }
+
+ public void enableOnDemand(ControllerContext context) throws Throwable
+ {
+ // ignore
+ }
+
+ @Override
+ protected void registerControllerContext(ControllerContext context)
+ {
+ // do nothing
+ }
+
+ @Override
+ public void install(ControllerContext context) throws Throwable
+ {
+ super.install(context);
+ }
+
+ public ControllerContext uninstall(Object name)
+ {
+ return null;
+ }
+
+ public ControllerContext getContext(Object name, ControllerState state)
+ {
+ return controller.getContext(name, state);
+ }
+
+ public ControllerContext getInstalledContext(Object name)
+ {
+ return controller.getInstalledContext(name);
+ }
+
+ public boolean isShutdown()
+ {
+ return controller.isShutdown();
+ }
+
+ public void shutdown()
+ {
+ }
+
+ public Kernel getKernel()
+ {
+ return controller.getKernel();
+ }
+
+ public void setKernel(Kernel kernel) throws Throwable
+ {
+ controller.setKernel(kernel);
+ }
+
+ public KernelControllerContext install(BeanMetaData metaData) throws Throwable
+ {
+ return controller.install(metaData);
+ }
+
+ public KernelControllerContext install(BeanMetaData metaData, Object target) throws Throwable
+ {
+ return controller.install(metaData, target);
+ }
+
+ public void addSupplies(KernelControllerContext context)
+ {
+ controller.addSupplies(context);
+ }
+
+ public void removeSupplies(KernelControllerContext context)
+ {
+ controller.removeSupplies(context);
+ }
+
+ public Set<KernelControllerContext> getInstantiatedContexts(Class<?> clazz)
+ {
+ return controller.getInstantiatedContexts(clazz);
+ }
+
+ public Set<KernelControllerContext> getContexts(Class<?> clazz, ControllerState state)
+ {
+ return controller.getContexts(clazz, state);
+ }
+
+ public KernelControllerContext getContextByClass(Class<?> clazz)
+ {
+ return controller.getContextByClass(clazz);
+ }
+
+ public void addInstantiatedContext(KernelControllerContext context)
+ {
+ controller.addInstantiatedContext(context);
+ }
+
+ public void removeInstantiatedContext(KernelControllerContext context)
+ {
+ controller.removeInstantiatedContext(context);
+ }
+
+ public void registerListener(KernelEventListener listener, KernelEventFilter filter, Object handback) throws Throwable
+ {
+ controller.registerListener(listener, filter, handback);
+ }
+
+ public void unregisterListener(KernelEventListener listener, KernelEventFilter filter, Object handback) throws Throwable
+ {
+ controller.unregisterListener(listener, filter, handback);
+ }
+
+ public void fireKernelEvent(KernelEvent event)
+ {
+ controller.fireKernelEvent(event);
+ }
+}
\ No newline at end of file
Added: kernel/trunk/exo.kernel.mc-integration/pom.xml
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/pom.xml (rev 0)
+++ kernel/trunk/exo.kernel.mc-integration/pom.xml 2009-12-15 17:38:27 UTC (rev 1074)
@@ -0,0 +1,92 @@
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>kernel-parent</artifactId>
+ <version>2.2.0-Beta05-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>mc-integration-parent</artifactId>
+ <packaging>pom</packaging>
+
+ <name>eXo Kernel :: MC Kernel Integration</name>
+ <description>MC Kernel Integration</description>
+
+ <properties>
+ <!--version.parent>2.2.0-Beta05-SNAPSHOT</version.parent-->
+ <version.jboss.mc>2.0.6.GA</version.jboss.mc>
+ <version.jboss.mc-int>2.2.0.Alpha2</version.jboss.mc-int>
+ <version.jboss.classloader>2.0.7.GA</version.jboss.classloader>
+
+ </properties>
+ <modules>
+ <module>exo.kernel.mc-int</module>
+ <module>exo.kernel.mc-kernel-extras</module>
+ <module>exo.kernel.mc-int-demo</module>
+ <module>exo.kernel.mc-int-tests</module>
+ </modules>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.commons</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.container</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.mc-int</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.mc-int-demo</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.mc-kernel-extras</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-dependency</artifactId>
+ <version>${version.jboss.mc}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-kernel</artifactId>
+ <version>${version.jboss.mc}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-aop-mc-int</artifactId>
+ <version>${version.jboss.mc}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.mc-int</groupId>
+ <artifactId>jboss-mc-int-common</artifactId>
+ <version>${version.jboss.mc-int}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.mc-int</groupId>
+ <artifactId>jboss-mc-int-servlet</artifactId>
+ <version>${version.jboss.mc-int}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.cl</groupId>
+ <artifactId>jboss-classloader</artifactId>
+ <version>${version.jboss.classloader}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+</project>
Modified: kernel/trunk/pom.xml
===================================================================
--- kernel/trunk/pom.xml 2009-12-15 17:28:17 UTC (rev 1073)
+++ kernel/trunk/pom.xml 2009-12-15 17:38:27 UTC (rev 1074)
@@ -55,6 +55,7 @@
<module>exo.kernel.component.cache</module>
<module>exo.kernel.component.ext.cache.impl.jboss.v3</module>
<module>exo.kernel.component.command</module>
+ <module>exo.kernel.mc-integration</module>
<module>packaging/module</module>
</modules>
@@ -79,7 +80,7 @@
<groupId>org.exoplatform.kernel</groupId>
<artifactId>exo.kernel.component.remote</artifactId>
<version>${project.version}</version>
- </dependency>
+ </dependency>
<dependency>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>exo.kernel.component.cache</artifactId>
16 years, 7 months
exo-jcr SVN: r1073 - in kernel/branches/config-branch/exo.kernel.container/src: test/java/org/exoplatform/container and 3 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2009-12-15 12:28:17 -0500 (Tue, 15 Dec 2009)
New Revision: 1073
Removed:
kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/RootContainerBootstrap.java
Modified:
kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/RootContainer.java
kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/TestPropertyManagerConfigurator.java
kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/AbstractProfileTest.java
kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/AbstractTestContainer.java
kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/support/ContainerBuilder.java
Log:
simplify and use the new container builder
Modified: kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/RootContainer.java
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/RootContainer.java 2009-12-15 17:10:28 UTC (rev 1072)
+++ kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/RootContainer.java 2009-12-15 17:28:17 UTC (rev 1073)
@@ -449,20 +449,27 @@
else
{
booting = true;
- log.info("Building root container");
- long time = -System.currentTimeMillis();
- result = buildRootContainer();
- if (result != null)
+ try
{
- time += System.currentTimeMillis();
- log.info("Root container is built (build time " + time + "ms)");
- ExoContainerContext.setTopContainer(result);
- singleton_ = result;
- log.info("Root container booted");
+ log.info("Building root container");
+ long time = -System.currentTimeMillis();
+ result = buildRootContainer();
+ if (result != null)
+ {
+ time += System.currentTimeMillis();
+ log.info("Root container is built (build time " + time + "ms)");
+ ExoContainerContext.setTopContainer(result);
+ singleton_ = result;
+ log.info("Root container booted");
+ }
+ else
+ {
+ log.error("Failed to boot root container");
+ }
}
- else
+ finally
{
- log.error("Failed to boot root container");
+ booting = false;
}
}
}
Deleted: kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/RootContainerBootstrap.java
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/RootContainerBootstrap.java 2009-12-15 17:10:28 UTC (rev 1072)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/RootContainerBootstrap.java 2009-12-15 17:28:17 UTC (rev 1073)
@@ -1,71 +0,0 @@
-/*
- * Copyright (C) 2003-2007 eXo Platform SAS.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Affero General Public License
- * as published by the Free Software Foundation; either version 3
- * of the License, or (at your option) any later version.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see<http://www.gnu.org/licenses/>.
- */
-package org.exoplatform.container;
-
-import junit.framework.AssertionFailedError;
-import org.exoplatform.container.configuration.ConfigurationManager;
-import org.exoplatform.container.configuration.ConfigurationManagerImpl;
-
-import java.lang.reflect.Field;
-import java.net.URL;
-import java.util.Arrays;
-import java.util.HashSet;
-
-/**
- * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
- * @version $Revision$
- */
-public class RootContainerBootstrap
-{
-
- public static RootContainer bootstrap(URL configurationURL, String... profiles)
- {
- // Must clear the top container first otherwise it's not going to work well
- // it's a big ugly but I don't want to change anything in the ExoContainerContext class for now
- // and this is for unit testing
- try
- {
- Field topContainerField = ExoContainerContext.class.getDeclaredField("topContainer");
- topContainerField.setAccessible(true);
- topContainerField.set(null, null);
- }
- catch (Exception e)
- {
- AssertionFailedError err = new AssertionFailedError();
- err.initCause(e);
- throw err;
- }
-
- // Create a root container manually
- try
- {
- RootContainer container = new RootContainer();
- ConfigurationManager manager = new ConfigurationManagerImpl(new HashSet<String>(Arrays.asList(profiles)));
- manager.addConfiguration(configurationURL);
- container.registerComponentInstance(ConfigurationManager.class, manager);
- container.initContainer();
- container.start();
- return container;
- }
- catch (Exception e)
- {
- AssertionError err = new AssertionError("Could not start root container");
- err.initCause(e);
- throw err;
- }
- }
-}
Modified: kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/TestPropertyManagerConfigurator.java
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/TestPropertyManagerConfigurator.java 2009-12-15 17:10:28 UTC (rev 1072)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/TestPropertyManagerConfigurator.java 2009-12-15 17:28:17 UTC (rev 1073)
@@ -20,6 +20,7 @@
import org.exoplatform.commons.utils.PropertyManager;
import org.exoplatform.commons.utils.Tools;
import org.exoplatform.container.configuration.ConfigurationManagerImpl;
+import org.exoplatform.container.support.ContainerBuilder;
import org.exoplatform.container.xml.InitParams;
import org.exoplatform.container.xml.PropertiesParam;
import org.exoplatform.container.xml.ValueParam;
@@ -78,7 +79,7 @@
System.setProperty("property_2", "property_value_2");
URL url = TestPropertyManagerConfigurator.class.getResource("property-configurator-configuration.xml");
assertNotNull(url);
- RootContainerBootstrap.bootstrap(url);
+ ContainerBuilder.bootstrap(url);
Map<String, String> additions = reset();
assertEquals("property_value_1", additions.get("property_1"));
assertEquals("property_value_2", additions.get("property_2"));
@@ -90,7 +91,7 @@
reset();
URL url = TestPropertyManagerConfigurator.class.getResource("property-configurator-with-profile-configuration.xml");
assertNotNull(url);
- RootContainerBootstrap.bootstrap(url, "foo");
+ ContainerBuilder.bootstrap(url, "foo");
Map<String, String> additions = reset();
assertEquals("property_value_1_foo", additions.get("property_1"));
}
@@ -103,7 +104,7 @@
System.setProperty("properties.url", propertiesURL.toString());
System.setProperty("property_2", "property_value_2");
URL url = TestPropertyManagerConfigurator.class.getResource("property-configurator-with-path-configuration.xml");
- RootContainerBootstrap.bootstrap(url);
+ ContainerBuilder.bootstrap(url);
Map<String, String> additions = reset();
assertEquals("property_value_1", additions.get("property_1"));
assertEquals("property_value_2", additions.get("property_2"));
Modified: kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/AbstractProfileTest.java
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/AbstractProfileTest.java 2009-12-15 17:10:28 UTC (rev 1072)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/AbstractProfileTest.java 2009-12-15 17:28:17 UTC (rev 1073)
@@ -19,7 +19,7 @@
import junit.framework.TestCase;
import org.exoplatform.commons.utils.Tools;
import org.exoplatform.container.RootContainer;
-import org.exoplatform.container.RootContainerBootstrap;
+import org.exoplatform.container.support.ContainerBuilder;
import org.exoplatform.container.xml.Configuration;
import java.io.File;
@@ -44,6 +44,6 @@
{
String basedir = System.getProperty("basedir");
File f = new File(basedir + "/src/test/resources/org/exoplatform/container/configuration/" + configName);
- return RootContainerBootstrap.bootstrap(f.toURI().toURL(), profiles);
+ return ContainerBuilder.bootstrap(f.toURI().toURL(), profiles);
}
}
Modified: kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/AbstractTestContainer.java
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/AbstractTestContainer.java 2009-12-15 17:10:28 UTC (rev 1072)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/AbstractTestContainer.java 2009-12-15 17:28:17 UTC (rev 1073)
@@ -20,15 +20,10 @@
import junit.framework.TestCase;
-import org.exoplatform.container.PortalContainer;
import org.exoplatform.container.RootContainer;
-import org.exoplatform.container.RootContainerBootstrap;
+import org.exoplatform.container.support.ContainerBuilder;
-import java.io.IOException;
import java.net.URL;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Enumeration;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
@@ -36,49 +31,10 @@
*/
public class AbstractTestContainer extends TestCase
{
-
public RootContainer createRootContainer(String relativeConfigurationFile)
{
URL url = getClass().getResource(relativeConfigurationFile);
assertNotNull(url);
- return RootContainerBootstrap.bootstrap(url);
+ return new ContainerBuilder().withRoot(url).build();
}
-
- public PortalContainer createPortalContainer(RootContainer container, String name, String relativeConfigurationFile)
- {
- final URL url = getClass().getResource(relativeConfigurationFile);
- ClassLoader cl = new ClassLoader(Thread.currentThread().getContextClassLoader())
- {
- @Override
- public Enumeration<URL> getResources(String name) throws IOException
- {
- if ("conf/portal/configuration.xml".equals(name))
- {
- return Collections.enumeration(Arrays.asList(url));
- }
- else if ("conf/portal/test-configuration.xml".equals(name))
- {
- return Collections.enumeration(Collections.<URL>emptyList());
- }
- else
- {
- return super.getResources(name);
- }
- }
- };
-
- //
- Thread.currentThread().setContextClassLoader(cl);
-
- //
- try
- {
- return container.getPortalContainer(name);
- }
- finally
- {
- Thread.currentThread().setContextClassLoader(null);
- }
- }
-
}
Modified: kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/support/ContainerBuilder.java
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/support/ContainerBuilder.java 2009-12-15 17:10:28 UTC (rev 1072)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/support/ContainerBuilder.java 2009-12-15 17:28:17 UTC (rev 1073)
@@ -17,6 +17,7 @@
package org.exoplatform.container.support;
import junit.framework.AssertionFailedError;
+import org.exoplatform.commons.utils.PropertyManager;
import org.exoplatform.commons.utils.Tools;
import org.exoplatform.container.ExoContainerContext;
import org.exoplatform.container.RootContainer;
@@ -27,11 +28,13 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.Enumeration;
+import java.util.Iterator;
import java.util.List;
import java.util.Set;
/**
- * An helper for building a root container and a portal container.
+ * An helper for building a root container and a portal container. I have done several attempt to make easily
+ * and safe root/portal container boot for unit test. This one is my best attempt so far.
*
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
* @version $Revision$
@@ -39,12 +42,16 @@
public class ContainerBuilder
{
+ /** . */
private ClassLoader loader;
+ /** . */
private List<URL> configURLs;
+ /** . */
private List<URL> portalConfigURLs;
+ /** . */
private Set<String> profiles;
public ContainerBuilder()
@@ -120,6 +127,12 @@
private RootContainer _build() throws Exception
{
+ //
+ if (configURLs.size() == 0)
+ {
+ throw new IllegalStateException("Must provide at least one URL for building the root container");
+ }
+
// Must clear the top container first otherwise it's not going to work well
// it's a big ugly but I don't want to change anything in the ExoContainerContext class for now
// and this is for unit testing
@@ -127,6 +140,30 @@
topContainerField.setAccessible(true);
topContainerField.set(null, null);
+ // Same remark than above
+ Field singletonField = RootContainer.class.getDeclaredField("singleton_");
+ singletonField.setAccessible(true);
+ singletonField.set(null, null);
+
+ // Setup profiles
+ if (profiles == null)
+ {
+ PropertyManager.setProperty(PropertyManager.RUNTIME_PROFILES, "");
+ }
+ else
+ {
+ StringBuilder builder = new StringBuilder();
+ for (Iterator<String> i = profiles.iterator();i.hasNext();)
+ {
+ builder.append(i.next());
+ if (i.hasNext())
+ {
+ builder.append(',');
+ }
+ }
+ PropertyManager.setProperty(PropertyManager.RUNTIME_PROFILES, builder.toString());
+ }
+
//
ClassLoader rootCL = new ClassLoader(loader)
{
@@ -160,8 +197,15 @@
try
{
Thread.currentThread().setContextClassLoader(rootCL);
+
+ //
root = RootContainer.getInstance();
- root.getPortalContainer("portal");
+
+ //
+ if (portalConfigURLs.size() > 0)
+ {
+ root.getPortalContainer("portal");
+ }
}
finally
{
@@ -171,4 +215,12 @@
//
return root;
}
+
+ public static RootContainer bootstrap(URL configurationURL, String... profiles)
+ {
+ ContainerBuilder builder = new ContainerBuilder();
+ builder.withRoot(configurationURL);
+ builder.profiledBy(profiles);
+ return builder.build();
+ }
}
16 years, 7 months