gatein SVN: r343 - tools/maven/dep/trunk.
by do-not-reply@jboss.org
Author: aheritier
Date: 2009-10-14 16:39:51 -0400 (Wed, 14 Oct 2009)
New Revision: 343
Modified:
tools/maven/dep/trunk/pom.xml
Log:
Upgrade to the new version of chromattic
Modified: tools/maven/dep/trunk/pom.xml
===================================================================
--- tools/maven/dep/trunk/pom.xml 2009-10-14 03:49:44 UTC (rev 342)
+++ tools/maven/dep/trunk/pom.xml 2009-10-14 20:39:51 UTC (rev 343)
@@ -26,7 +26,7 @@
<properties>
<!-- Dependencies versions -->
<version.activation>1.1</version.activation>
- <version.chromattic>1.0.0-beta4</version.chromattic>
+ <version.chromattic>1.0.0-beta5</version.chromattic>
<version.log4j>1.2.14</version.log4j>
<version.junit>3.8.2</version.junit>
<version.javax.servlet>2.5</version.javax.servlet>
15 years, 2 months
gatein SVN: r342 - components/wci/trunk.
by do-not-reply@jboss.org
Author: mwringe
Date: 2009-10-13 23:49:44 -0400 (Tue, 13 Oct 2009)
New Revision: 342
Modified:
components/wci/trunk/pom.xml
Log:
Update wci parent pom for new tests.
Modified: components/wci/trunk/pom.xml
===================================================================
--- components/wci/trunk/pom.xml 2009-10-14 03:49:15 UTC (rev 341)
+++ components/wci/trunk/pom.xml 2009-10-14 03:49:44 UTC (rev 342)
@@ -71,6 +71,11 @@
<artifactId>wci-tomcat</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.gatein.wci</groupId>
+ <artifactId>wci-exo</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<!-- External dependencies -->
<dependency>
15 years, 2 months
gatein SVN: r341 - in components/wci/trunk/test: src/test and 25 other directories.
by do-not-reply@jboss.org
Author: mwringe
Date: 2009-10-13 23:49:15 -0400 (Tue, 13 Oct 2009)
New Revision: 341
Added:
components/wci/trunk/test/src/test/java/org/gatein/wci/spi/SPICompatibilityTestCase.java
components/wci/trunk/test/src/test/resources/portal-test-spi-cs-jar/
components/wci/trunk/test/src/test/resources/portal-test-spi-cs-jar/org/
components/wci/trunk/test/src/test/resources/portal-test-spi-cs-jar/org/jboss/
components/wci/trunk/test/src/test/resources/portal-test-spi-cs-jar/org/jboss/portal/
components/wci/trunk/test/src/test/resources/portal-test-spi-cs-jar/org/jboss/portal/test/
components/wci/trunk/test/src/test/resources/portal-test-spi-cs-jar/org/jboss/portal/test/web/
components/wci/trunk/test/src/test/resources/portal-test-spi-cs-jar/org/jboss/portal/test/web/server-beans.xml
components/wci/trunk/test/src/test/resources/spi/exo/
components/wci/trunk/test/src/test/resources/spi/exo/app-war/
components/wci/trunk/test/src/test/resources/spi/exo/app-war/WEB-INF/
components/wci/trunk/test/src/test/resources/spi/exo/app-war/WEB-INF/web.xml
components/wci/trunk/test/src/test/resources/support/jboss-4.2-exo/
components/wci/trunk/test/src/test/resources/support/jboss-4.2-exo/server-war/
components/wci/trunk/test/src/test/resources/support/jboss-4.2-exo/server-war/WEB-INF/
components/wci/trunk/test/src/test/resources/support/jboss-4.2-exo/server-war/WEB-INF/jboss-web.xml
components/wci/trunk/test/src/test/resources/support/jboss-4.2-exo/server-war/WEB-INF/web.xml
components/wci/trunk/test/src/test/resources/support/jboss-5.1-exo/
components/wci/trunk/test/src/test/resources/support/jboss-5.1-exo/server-war/
components/wci/trunk/test/src/test/resources/support/jboss-5.1-exo/server-war/META-INF/
components/wci/trunk/test/src/test/resources/support/jboss-5.1-exo/server-war/META-INF/context.xml
components/wci/trunk/test/src/test/resources/support/jboss-5.1-exo/server-war/WEB-INF/
components/wci/trunk/test/src/test/resources/support/jboss-5.1-exo/server-war/WEB-INF/jboss-web.xml
components/wci/trunk/test/src/test/resources/support/jboss-5.1-exo/server-war/WEB-INF/web.xml
components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/
components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/
components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/META-INF/
components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/META-INF/context.xml
components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/WEB-INF/
components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/WEB-INF/classes/
components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/WEB-INF/classes/log4j.properties
components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/WEB-INF/classes/logging.properties
components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/WEB-INF/web.xml
Modified:
components/wci/trunk/test/pom.xml
components/wci/trunk/test/src/test/build.xml
Log:
Update wci tests to test for exo backwards compatibility.
Update wci tests to tests that generic and exo portlets will deploy in a container specific setup.
Modified: components/wci/trunk/test/pom.xml
===================================================================
--- components/wci/trunk/test/pom.xml 2009-10-13 16:39:16 UTC (rev 340)
+++ components/wci/trunk/test/pom.xml 2009-10-14 03:49:15 UTC (rev 341)
@@ -18,6 +18,10 @@
<groupId>org.gatein.wci</groupId>
<artifactId>wci-tomcat</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.gatein.wci</groupId>
+ <artifactId>wci-exo</artifactId>
+ </dependency>
<dependency>
<artifactId>junit</artifactId>
@@ -243,6 +247,7 @@
<property name="dependency.gatein-common-mc.jar" value="${maven.dependency.org.gatein.common.common-mc.jar.path}" />
<property name="dependency.gatein-wci-core.jar" value="${maven.dependency.org.gatein.wci.wci-wci.jar.path}" />
<property name="dependency.gatein-wci-tomcat.jar" value="${maven.dependency.org.gatein.wci.wci-tomcat.jar.path}" />
+ <property name="dependency.gatein-wci-exo.jar" value="${maven.dependency.org.gatein.wci.wci-exo.jar.path}" />
<!-- JBoss Unit -->
<property name="dependency.jboss-unit.jar" value="${maven.dependency.org.jboss.unit.jboss-unit.jar.path}" />
Modified: components/wci/trunk/test/src/test/build.xml
===================================================================
--- components/wci/trunk/test/src/test/build.xml 2009-10-13 16:39:16 UTC (rev 340)
+++ components/wci/trunk/test/src/test/build.xml 2009-10-14 03:49:15 UTC (rev 341)
@@ -238,6 +238,7 @@
<path refid="gatein-common-shared"/>
<path path="${dependency.gatein-wci-tomcat.jar}"/>
<path path="${dependency.gatein-wci-core.jar}"/>
+ <path path="${dependency.gatein-wci-exo.jar}"/>
</path>
<path id="jboss-5.1">
@@ -250,6 +251,7 @@
<path refid="gatein-common-shared"/>
<path path="${dependency.gatein-wci-core.jar}"/>
<path path="${dependency.gatein-wci-tomcat.jar}"/>
+ <path path="${dependency.gatein-wci-exo.jar}"/>
</path>
<path id="tomcat-6.0">
@@ -271,6 +273,7 @@
<path location="${dependency.junit.jar}"/>
<path path="${dependency.gatein-wci-core.jar}"/>
<path path="${dependency.gatein-wci-tomcat.jar}"/>
+ <path path="${dependency.gatein-wci-exo.jar}"/>
<path location="${dependency.jboss-serialization.jar}"/>
</path>
@@ -293,6 +296,18 @@
<fileset dir="${target}/test-classes//portal-test-spi-jar"/>
</jar>
+ <!-- SPI Test case for Container Specific Implementation -->
+ <jar jarfile="${test.temp.lib}/portal-test-spi-cs-lib.jar">
+ <fileset dir="${target}/test-classes/">
+ <include name="org/gatein/wci/spi/**"/>
+ <include name="org/gatein/wci/ServletTestCase.class"/>
+ <include name="org/gatein/wci/TestServlet.class"/>
+ <include name="org/gatein/wci/WebAppRegistry.class"/>
+ </fileset>
+ <fileset dir="${target}/test-classes//portal-test-spi-cs-jar"/>
+ </jar>
+
+
<!-- **************************** -->
<!-- Tomcat 6.0 container servlet -->
<!-- **************************** -->
@@ -303,11 +318,17 @@
<mkdir dir="${test.temp.lib}/tomcat-6.0-container-servlet"/>
<war jarfile="${test.temp.lib}/tomcat-6.0-container-servlet/test-spi-server.war">
<fileset dir="${test.support}/tomcat-6.0-container-servlet/server-war"/>
- <lib dir="${test.temp.lib}" includes="portal-test-spi-lib.jar"/>
+ <lib dir="${test.temp.lib}" includes="portal-test-spi-cs-lib.jar"/>
</war>
<jar jarfile="${test.temp.lib}/tomcat-6.0-container-servlet/test-spi-app.war">
<fileset dir="${target}/test-classes/spi/app-war"/>
</jar>
+ <jar jarfile="${test.temp.lib}/tomcat-6.0-container-servlet/test-generic-app.war">
+ <fileset dir="${target}/test-classes/spi/generic/app-war"/>
+ </jar>
+ <jar jarfile="${test.temp.lib}/tomcat-6.0-container-servlet/test-exo-app.war">
+ <fileset dir="${target}/test-classes/spi/exo/app-war"/>
+ </jar>
<!-- **************************** -->
<!-- Tomcat 6.0 lifecyle listener -->
@@ -343,6 +364,25 @@
<fileset dir="${target}/test-classes/spi/generic/app-war"/>
</jar>
+ <!-- ****************** -->
+ <!-- Tomcat 6.0 eXo -->
+ <!-- ****************** -->
+
+ <!-- -->
+ <mkdir dir="${test.support}/tomcat-6.0-exo/server-war/WEB-INF/lib"/>
+ <copy todir="${test.support}/tomcat-6.0-exo/server-war/WEB-INF/lib" flatten="true">
+ <path refid="tomcat-6.0"/>
+ </copy>
+ <mkdir dir="${test.temp.lib}/tomcat-6.0-exo"/>
+ <war jarfile="${test.temp.lib}/tomcat-6.0-exo/test-spi-server.war">
+ <fileset dir="${test.support}/tomcat-6.0-exo/server-war"/>
+ <lib dir="${test.temp.lib}" includes="portal-test-spi-lib.jar"/>
+ </war>
+ <jar jarfile="${test.temp.lib}/tomcat-6.0-exo/test-spi-app.war">
+ <fileset dir="${target}/test-classes/spi/exo/app-war"/>
+ </jar>
+
+
<!-- **************************** -->
<!-- Jetty 6.1 handler -->
<!-- **************************** -->
@@ -388,12 +428,19 @@
<mkdir dir="${test.temp.lib}/jboss-4.2-container-servlet"/>
<war jarfile="${test.temp.lib}/jboss-4.2-container-servlet/test-spi-server.war">
<fileset dir="${test.support}/jboss-4.2-container-servlet/server-war"/>
- <lib dir="${test.temp.lib}" includes="portal-test-spi-lib.jar"/>
+ <lib dir="${test.temp.lib}" includes="portal-test-spi-cs-lib.jar"/>
</war>
<jar jarfile="${test.temp.lib}/jboss-4.2-container-servlet/test-spi-app.war">
<fileset dir="${target}/test-classes/spi/app-war"/>
</jar>
+ <jar jarfile="${test.temp.lib}/jboss-4.2-container-servlet/test-generic-app.war">
+ <fileset dir="${target}/test-classes/spi/generic/app-war"/>
+ </jar>
+ <jar jarfile="${test.temp.lib}/jboss-4.2-container-servlet/test-exo-app.war">
+ <fileset dir="${target}/test-classes/spi/exo/app-war"/>
+ </jar>
+
<!-- ***************** -->
<!-- JBoss 4.2 generic -->
<!-- ***************** -->
@@ -423,6 +470,24 @@
<fileset dir="${target}/test-classes/portal-test-endpoint-jar"/>
</jar>
+ <!-- ***************** -->
+ <!-- JBoss 4.2 eXo -->
+ <!-- ***************** -->
+
+ <!-- -->
+ <copy todir="${test.support}/jboss-4.2-exo/server-war/WEB-INF/lib" flatten="true">
+ <path refid="jboss-4.2"/>
+ </copy>
+ <mkdir dir="${test.temp.lib}/jboss-4.2-exo"/>
+ <war jarfile="${test.temp.lib}/jboss-4.2-exo/test-spi-server.war">
+ <fileset dir="${test.support}/jboss-4.2-exo/server-war"/>
+ <lib dir="${test.temp.lib}" includes="portal-test-spi-lib.jar"/>
+ </war>
+ <jar jarfile="${test.temp.lib}/jboss-4.2-exo/test-spi-app.war">
+ <fileset dir="${target}/test-classes/spi/exo/app-war"/>
+ </jar>
+
+
<!-- *************************** -->
<!-- JBoss 5.1 container servlet -->
<!-- *************************** -->
@@ -436,12 +501,19 @@
<fileset dir="${test.support}/jboss-5.1-container-servlet/server-war">
<exclude name="**/jboss-kernel*.jar"/>
</fileset>
- <lib dir="${test.temp.lib}" includes="portal-test-spi-lib.jar"/>
+ <lib dir="${test.temp.lib}" includes="portal-test-spi-cs-lib.jar"/>
</war>
<jar jarfile="${test.temp.lib}/jboss-5.1-container-servlet/test-spi-app.war">
<fileset dir="${target}/test-classes/spi/app-war"/>
</jar>
+ <jar jarfile="${test.temp.lib}/jboss-5.1-container-servlet/test-generic-app.war">
+ <fileset dir="${target}/test-classes/spi/generic/app-war"/>
+ </jar>
+ <jar jarfile="${test.temp.lib}/jboss-5.1-container-servlet/test-exo-app.war">
+ <fileset dir="${target}/test-classes/spi/exo/app-war"/>
+ </jar>
+
<!-- ***************** -->
<!-- JBoss 5.1 generic -->
<!-- ***************** -->
@@ -462,6 +534,27 @@
</fileset>
</jar>
+ <!-- ***************** -->
+ <!-- JBoss 5.1 eXo -->
+ <!-- ***************** -->
+
+ <copy todir="${test.support}/jboss-5.1-exo/server-war/WEB-INF/lib" flatten="true">
+ <path refid="jboss-5.1"/>
+ </copy>
+ <mkdir dir="${test.temp.lib}/jboss-5.1-exo"/>
+ <war jarfile="${test.temp.lib}/jboss-5.1-exo/test-spi-server.war">
+ <fileset dir="${test.support}/jboss-5.1-exo/server-war">
+ <exclude name="**/jboss-kernel*.jar"/>
+ </fileset>
+ <lib dir="${test.temp.lib}" includes="portal-test-spi-lib.jar"/>
+ </war>
+ <jar jarfile="${test.temp.lib}/jboss-5.1-exo/test-spi-app.war">
+ <fileset dir="${target}/test-classes/spi/exo/app-war">
+ <exclude name="**/jboss-kernel*.jar"/>
+ </fileset>
+ </jar>
+
+
<!--endpoint test case-->
<jar jarfile="${test.temp.lib}/portal-test-endpoint-lib.jar">
@@ -689,6 +782,11 @@
<param name="test.war" value="${test.temp.lib}/jboss-4.2-generic/test-spi-server.war"/>
<param name="test.archive.path" value="jboss-4.2-generic"/>
</antcall>
+ <antcall target="tests.jboss-4.2.execute">
+ <param name="test.id" value="${test.jboss-4.2.name}-spi-exo"/>
+ <param name="test.war" value="${test.temp.lib}/jboss-4.2-exo/test-spi-server.war"/>
+ <param name="test.archive.path" value="jboss-4.2-exo"/>
+ </antcall>
</target>
<target name="tests.jboss-4.2.endpoint">
@@ -828,6 +926,11 @@
<param name="test.war" value="${test.temp.lib}/jboss-5.1-generic/test-spi-server.war"/>
<param name="test.archive.path" value="jboss-5.1-generic"/>
</antcall>
+ <antcall target="tests.jboss-5.1.execute">
+ <param name="test.id" value="${test.jboss-5.1.name}-spi-exo"/>
+ <param name="test.war" value="${test.temp.lib}/jboss-5.1-exo/test-spi-server.war"/>
+ <param name="test.archive.path" value="jboss-5.1-exo"/>
+ </antcall>
</target>
<target name="tests.jboss-5.1.endpoint">
@@ -935,6 +1038,11 @@
<param name="test.war" value="${test.temp.lib}/tomcat-6.0-generic/test-spi-server.war"/>
<param name="test.archive.path" value="tomcat-6.0-generic"/>
</antcall>
+ <antcall target="tests.tomcat-6.0.execute">
+ <param name="test.id" value="${test.tomcat-6.0.name}-spi-exo"/>
+ <param name="test.war" value="${test.temp.lib}/tomcat-6.0-exo/test-spi-server.war"/>
+ <param name="test.archive.path" value="tomcat-6.0-exo"/>
+ </antcall>
</target>
<target name="tests.tomcat-6.0.endpoint">
Added: components/wci/trunk/test/src/test/java/org/gatein/wci/spi/SPICompatibilityTestCase.java
===================================================================
--- components/wci/trunk/test/src/test/java/org/gatein/wci/spi/SPICompatibilityTestCase.java (rev 0)
+++ components/wci/trunk/test/src/test/java/org/gatein/wci/spi/SPICompatibilityTestCase.java 2009-10-14 03:49:15 UTC (rev 341)
@@ -0,0 +1,135 @@
+package org.gatein.wci.spi;
+
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.servlet.ServletException;
+
+import org.gatein.wci.ServletContainer;
+import org.gatein.wci.ServletTestCase;
+import org.gatein.wci.TestServlet;
+import org.gatein.wci.WebApp;
+import org.gatein.wci.WebAppRegistry;
+import org.gatein.wci.WebRequest;
+import org.gatein.wci.WebResponse;
+import org.gatein.wci.impl.DefaultServletContainerFactory;
+import org.jboss.unit.Failure;
+import org.jboss.unit.driver.DriverCommand;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import org.jboss.unit.driver.response.FailureResponse;
+import org.jboss.unit.remote.driver.handler.deployer.response.DeployResponse;
+
+public class SPICompatibilityTestCase extends ServletTestCase
+{
+
+ /** . */
+ private WebAppRegistry registry;
+
+ /** . */
+ private Set<String> keys;
+
+ /** . */
+ private ServletContainer container;
+
+ public DriverResponse service(TestServlet testServlet, WebRequest req, WebResponse resp) throws ServletException, IOException
+ {
+ // we shouldn't be calling service for these tests
+ return new FailureResponse(Failure.createAssertionFailure("Service call should not be called"));
+ }
+
+
+ public DriverResponse invoke(TestServlet testServlet, DriverCommand driverCommand)
+ {
+ if (getRequestCount() == -1)
+ {
+ container = DefaultServletContainerFactory.getInstance().getServletContainer();
+ if (container == null)
+ {
+ return new FailureResponse(Failure.createAssertionFailure("No servlet container present"));
+ }
+
+ // Register and save the deployed web apps
+ registry = new WebAppRegistry();
+ container.addWebAppListener(registry);
+ keys = new HashSet<String>(registry.getKeys());
+
+ // Deploy the application web app
+ return new DeployResponse("test-spi-app.war");
+ }
+ else if (getRequestCount() == 0)
+ {
+ FailureResponse failureResponse = checkDeployments("/test-spi-app", 1);
+ if (failureResponse != null)
+ {
+ return failureResponse;
+ }
+ else
+ {
+ // deploy test-generic-app.war
+ return new DeployResponse("test-generic-app.war");
+ }
+ }
+ else if (getRequestCount() == 1)
+ {
+ FailureResponse failureResponse = checkDeployments("/test-generic-app", 2);
+ if (failureResponse != null)
+ {
+ return failureResponse;
+ }
+ else
+ {
+ return new DeployResponse("test-exo-app.war");
+ }
+ }
+ else if (getRequestCount() == 2)
+ {
+ FailureResponse failureResponse = checkDeployments("/test-exo-app", 3);
+ if (failureResponse != null)
+ {
+ return failureResponse;
+ }
+ else
+ {
+ return new EndTestResponse();
+ }
+ }
+ else
+ {
+ return new FailureResponse(Failure.createAssertionFailure(""));
+ }
+ }
+
+ protected FailureResponse checkDeployments(String appContext, int count)
+ {
+ // Compute the difference with the previous deployed web apps
+ Set diff = new HashSet<String>(registry.getKeys());
+ diff.removeAll(keys);
+
+ // It should be 1
+ if (diff.size() != count)
+ {
+ return new FailureResponse(Failure.createAssertionFailure("The size of the new web application deployed should be " + count + ", it is " + diff.size() + " instead." +
+ "The previous set was " + keys + " and the new set is " + registry.getKeys()));
+ }
+ if (!diff.contains(appContext))
+ {
+ return new FailureResponse(Failure.createErrorFailure("Could not find the requested webapp [" + appContext + "] in the list of depoyed webapps."));
+ }
+
+ //
+ WebApp webApp = registry.getWebApp(appContext);
+ if (webApp == null)
+ {
+ return new FailureResponse(Failure.createAssertionFailure("The web app " + appContext + " was not found"));
+ }
+ if (!appContext.equals(webApp.getContextPath()))
+ {
+ return new FailureResponse(Failure.createAssertionFailure("The web app context is not equals to the expected value [" + appContext + "] but has the value " + webApp.getContextPath()));
+ }
+
+ return null;
+ }
+
+}
Added: components/wci/trunk/test/src/test/resources/portal-test-spi-cs-jar/org/jboss/portal/test/web/server-beans.xml
===================================================================
--- components/wci/trunk/test/src/test/resources/portal-test-spi-cs-jar/org/jboss/portal/test/web/server-beans.xml (rev 0)
+++ components/wci/trunk/test/src/test/resources/portal-test-spi-cs-jar/org/jboss/portal/test/web/server-beans.xml 2009-10-14 03:49:15 UTC (rev 341)
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_2_0.xsd"
+ xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="RemoteTestSuite" class="org.jboss.unit.remote.driver.CompositeRemoteTestDriver">
+ <constructor>
+ <parameter class="org.jboss.unit.driver.impl.composite.AbstractCompositeTestDriver"><inject bean="TestSuite"/></parameter>
+ </constructor>
+ </bean>
+
+ <bean name="TestDriverServer" class="org.jboss.unit.remote.driver.RemoteTestDriverServer">
+ <property name="delegate"><inject bean="RemoteTestSuite"/></property>
+ </bean>
+
+ <bean name="TestDriverServerExporter" class="org.jboss.portal.test.framework.impl.generic.server.GenericServiceExporter">
+ <constructor>
+ <parameter>socket://localhost:5400</parameter>
+ <parameter><inject bean="TestDriverServer"/></parameter>
+ <parameter>org.jboss.unit.remote.driver.RemoteTestDriver</parameter>
+ </constructor>
+ </bean>
+
+ <bean name="ServletContainerFactory" GetTestCaseclass="org.gatein.wci.impl.DefaultServletContainerFactory">
+ <constructor factoryClass="org.gatein.wci.impl.DefaultServletContainerFactory" factoryMethod="getInstance"/>
+ </bean>
+
+ <bean name="ServletContainer" class="org.gatein.wci.ServletContainer">
+ <constructor factoryMethod="getServletContainer">
+ <factory bean="ServletContainerFactory"/>
+ </constructor>
+ </bean>
+
+ <bean name="TestSuite" class="org.jboss.unit.driver.impl.composite.CompositeTestDriver"/>
+
+ <bean name="SPITestCase" class="org.gatein.wci.spi.SPITestCase">
+ <install bean="TestSuite" method="mount">
+ <parameter><this/></parameter>
+ </install>
+ <uninstall bean="TestSuite" method="unmount">
+ <parameter><this/></parameter>
+ </uninstall>
+ </bean>
+
+ <bean name="SPICompatiblityTestCase" class="org.gatein.wci.spi.SPICompatibilityTestCase">
+ <install bean="TestSuite" method="mount">
+ <parameter><this/></parameter>
+ </install>
+ <uninstall bean="TestSuite" method="unmount">
+ <parameter><this/></parameter>
+ </uninstall>
+ </bean>
+
+</deployment>
Added: components/wci/trunk/test/src/test/resources/spi/exo/app-war/WEB-INF/web.xml
===================================================================
--- components/wci/trunk/test/src/test/resources/spi/exo/app-war/WEB-INF/web.xml (rev 0)
+++ components/wci/trunk/test/src/test/resources/spi/exo/app-war/WEB-INF/web.xml 2009-10-14 03:49:15 UTC (rev 341)
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+ <web-app>
+
+ <listener>
+ <listener-class>org.exoplatform.services.portletcontainer.impl.servlet.PortletApplicationListener</listener-class>
+ </listener>
+
+ <servlet>
+ <servlet-name>PortletWrapper</servlet-name>
+ <servlet-class>org.exoplatform.services.portletcontainer.impl.servlet.ServletWrapper</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>PortletWrapper</servlet-name>
+ <url-pattern>/PortletWrapper</url-pattern>
+ </servlet-mapping>
+</web-app>
\ No newline at end of file
Added: components/wci/trunk/test/src/test/resources/support/jboss-4.2-exo/server-war/WEB-INF/jboss-web.xml
===================================================================
--- components/wci/trunk/test/src/test/resources/support/jboss-4.2-exo/server-war/WEB-INF/jboss-web.xml (rev 0)
+++ components/wci/trunk/test/src/test/resources/support/jboss-4.2-exo/server-war/WEB-INF/jboss-web.xml 2009-10-14 03:49:15 UTC (rev 341)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<!DOCTYPE jboss-web PUBLIC
+ "-//JBoss//DTD Web Application 4.2//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-web_4_2.dtd">
+<jboss-web>
+ <class-loading java2ClassLoadingCompliance="false">
+ <loader-repository>test:loader=portlet</loader-repository>
+ </class-loading>
+</jboss-web>
\ No newline at end of file
Added: components/wci/trunk/test/src/test/resources/support/jboss-4.2-exo/server-war/WEB-INF/web.xml
===================================================================
--- components/wci/trunk/test/src/test/resources/support/jboss-4.2-exo/server-war/WEB-INF/web.xml (rev 0)
+++ components/wci/trunk/test/src/test/resources/support/jboss-4.2-exo/server-war/WEB-INF/web.xml 2009-10-14 03:49:15 UTC (rev 341)
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+ <context-param>
+ <param-name>jboss.portal.mc.beans_resource_location</param-name>
+ <param-value>org/jboss/portal/test/web/server-beans.xml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>jboss.portal.mc.beans_resource_type</param-name>
+ <param-value>classloader</param-value>
+ </context-param>
+ <listener>
+ <listener-class>org.exoplatform.services.portletcontainer.impl.servlet.PortletApplicationListener</listener-class>
+ </listener>
+ <listener>
+ <listener-class>org.gatein.common.mc.bootstrap.WebBootstrap</listener-class>
+ </listener>
+ <listener>
+ <listener-class>org.gatein.wci.impl.generic.GenericServletContainerContext</listener-class>
+ </listener>
+ <servlet>
+ <servlet-name>TestServlet</servlet-name>
+ <servlet-class>org.gatein.wci.TestServlet</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet>
+ <servlet-name>PortletWrapper</servlet-name>
+ <servlet-class>org.exoplatform.services.portletcontainer.impl.servlet.ServletWrapper</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>TestServlet</servlet-name>
+ <url-pattern>/</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>PortletWrapper</servlet-name>
+ <url-pattern>/PortletWrapper</url-pattern>
+ </servlet-mapping>
+</web-app>
Added: components/wci/trunk/test/src/test/resources/support/jboss-5.1-exo/server-war/META-INF/context.xml
===================================================================
--- components/wci/trunk/test/src/test/resources/support/jboss-5.1-exo/server-war/META-INF/context.xml (rev 0)
+++ components/wci/trunk/test/src/test/resources/support/jboss-5.1-exo/server-war/META-INF/context.xml 2009-10-14 03:49:15 UTC (rev 341)
@@ -0,0 +1,2 @@
+<Context crossContext="true">
+</Context>
\ No newline at end of file
Added: components/wci/trunk/test/src/test/resources/support/jboss-5.1-exo/server-war/WEB-INF/jboss-web.xml
===================================================================
--- components/wci/trunk/test/src/test/resources/support/jboss-5.1-exo/server-war/WEB-INF/jboss-web.xml (rev 0)
+++ components/wci/trunk/test/src/test/resources/support/jboss-5.1-exo/server-war/WEB-INF/jboss-web.xml 2009-10-14 03:49:15 UTC (rev 341)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<!DOCTYPE jboss-web PUBLIC
+ "-//JBoss//DTD Web Application 4.2//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-web_4_2.dtd">
+<jboss-web>
+ <class-loading java2ClassLoadingCompliance="false">
+ <loader-repository>test:loader=portlet</loader-repository>
+ </class-loading>
+</jboss-web>
\ No newline at end of file
Added: components/wci/trunk/test/src/test/resources/support/jboss-5.1-exo/server-war/WEB-INF/web.xml
===================================================================
--- components/wci/trunk/test/src/test/resources/support/jboss-5.1-exo/server-war/WEB-INF/web.xml (rev 0)
+++ components/wci/trunk/test/src/test/resources/support/jboss-5.1-exo/server-war/WEB-INF/web.xml 2009-10-14 03:49:15 UTC (rev 341)
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+ <context-param>
+ <param-name>jboss.portal.mc.beans_resource_location</param-name>
+ <param-value>org/jboss/portal/test/web/server-beans.xml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>jboss.portal.mc.beans_resource_type</param-name>
+ <param-value>classloader</param-value>
+ </context-param>
+ <listener>
+ <listener-class>org.exoplatform.services.portletcontainer.impl.servlet.PortletApplicationListener</listener-class>
+ </listener>
+ <listener>
+ <listener-class>org.gatein.common.mc.bootstrap.WebBootstrap</listener-class>
+ </listener>
+ <listener>
+ <listener-class>org.gatein.wci.impl.generic.GenericServletContainerContext</listener-class>
+ </listener>
+ <servlet>
+ <servlet-name>PortletWrapper</servlet-name>
+ <servlet-class>org.exoplatform.services.portletcontainer.impl.servlet.ServletWrapper</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>TestServlet</servlet-name>
+ <servlet-class>org.gatein.wci.TestServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>TestServlet</servlet-name>
+ <url-pattern>/</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>PortletWrapper</servlet-name>
+ <url-pattern>/PortletWrapper</url-pattern>
+ </servlet-mapping>
+</web-app>
Added: components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/META-INF/context.xml
===================================================================
--- components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/META-INF/context.xml (rev 0)
+++ components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/META-INF/context.xml 2009-10-14 03:49:15 UTC (rev 341)
@@ -0,0 +1,2 @@
+<Context crossContext="true">
+</Context>
\ No newline at end of file
Added: components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/WEB-INF/classes/log4j.properties
===================================================================
--- components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/WEB-INF/classes/log4j.properties (rev 0)
+++ components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/WEB-INF/classes/log4j.properties 2009-10-14 03:49:15 UTC (rev 341)
@@ -0,0 +1,13 @@
+### ====================================================================== ###
+## ##
+## JBoss Bootstrap Log4j Configuration ##
+## ##
+### ====================================================================== ###
+
+log4j.rootCategory=ALL, CONSOLE
+
+log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
+log4j.appender.CONSOLE.Threshold=DEBUG
+log4j.appender.CONSOLE.Target=System.out
+log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
+log4j.appender.CONSOLE.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{1}] %m%n
Added: components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/WEB-INF/classes/logging.properties
===================================================================
--- components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/WEB-INF/classes/logging.properties (rev 0)
+++ components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/WEB-INF/classes/logging.properties 2009-10-14 03:49:15 UTC (rev 341)
@@ -0,0 +1,13 @@
+handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
+
+############################################################
+# Handler specific properties.
+# Describes specific configuration info for Handlers.
+############################################################
+
+org.apache.juli.FileHandler.level = FINE
+org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+org.apache.juli.FileHandler.prefix = test-spi.
+
+java.util.logging.ConsoleHandler.level = FINE
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
Added: components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/WEB-INF/web.xml
===================================================================
--- components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/WEB-INF/web.xml (rev 0)
+++ components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/WEB-INF/web.xml 2009-10-14 03:49:15 UTC (rev 341)
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+ <context-param>
+ <param-name>jboss.portal.mc.beans_resource_location</param-name>
+ <param-value>org/jboss/portal/test/web/server-beans.xml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>jboss.portal.mc.beans_resource_type</param-name>
+ <param-value>classloader</param-value>
+ </context-param>
+ <listener>
+ <listener-class>org.exoplatform.services.portletcontainer.impl.servlet.PortletApplicationListener</listener-class>
+ </listener>
+ <listener>
+ <listener-class>org.gatein.common.mc.bootstrap.WebBootstrap</listener-class>
+ </listener>
+ <listener>
+ <listener-class>org.gatein.wci.impl.generic.GenericServletContainerContext</listener-class>
+ </listener>
+ <servlet>
+ <servlet-name>TestServlet</servlet-name>
+ <servlet-class>org.gatein.wci.TestServlet</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet>
+ <servlet-name>PortletWrapper</servlet-name>
+ <servlet-class>org.exoplatform.services.portletcontainer.impl.servlet.ServletWrapper</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>TestServlet</servlet-name>
+ <url-pattern>/</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>PortletWrapper</servlet-name>
+ <url-pattern>/PortletWrapper</url-pattern>
+ </servlet-mapping>
+</web-app>
15 years, 2 months
gatein SVN: r339 - components/common/trunk/common/src/main/java/org/gatein/common/util.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-10-13 10:17:18 -0400 (Tue, 13 Oct 2009)
New Revision: 339
Modified:
components/common/trunk/common/src/main/java/org/gatein/common/util/ParameterValidation.java
Log:
- Added existsAndIsNotEmpty for arrays as well.
Modified: components/common/trunk/common/src/main/java/org/gatein/common/util/ParameterValidation.java
===================================================================
--- components/common/trunk/common/src/main/java/org/gatein/common/util/ParameterValidation.java 2009-10-13 13:27:59 UTC (rev 338)
+++ components/common/trunk/common/src/main/java/org/gatein/common/util/ParameterValidation.java 2009-10-13 14:17:18 UTC (rev 339)
@@ -178,6 +178,11 @@
return map != null && !map.isEmpty();
}
+ public static <T> boolean existsAndIsNotEmpty(T[] array)
+ {
+ return array != null && array.length > 0;
+ }
+
/**
* Checks if a given value matches the given format (as a regular expression). If yes, returns it as is. Otherwise,
* returns the default value.
15 years, 2 months
gatein SVN: r338 - components/wsrp/trunk/common/src/main/java/org/gatein/wsrp.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-10-13 09:27:59 -0400 (Tue, 13 Oct 2009)
New Revision: 338
Modified:
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/UserContextConverter.java
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPTypeFactory.java
Log:
- Avoid NPEs.
- Provide a dummy implementation of RenderURL.getPublicNavigationalStateChanges so that GateIn doesn't crash.
Modified: components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/UserContextConverter.java
===================================================================
--- components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/UserContextConverter.java 2009-10-13 12:32:13 UTC (rev 337)
+++ components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/UserContextConverter.java 2009-10-13 13:27:59 UTC (rev 338)
@@ -68,7 +68,10 @@
{
org.oasis.wsrp.v1.UserContext wsrpUserContext = WSRPTypeFactory.createUserContext(userContextKey);
wsrpUserContext.setProfile(createUserProfileFrom(userContext));
- wsrpUserContext.getUserCategories().addAll(userCategories);
+ if (WSRPTypeFactory.existsAndIsNotEmpty(userCategories))
+ {
+ wsrpUserContext.getUserCategories().addAll(userCategories);
+ }
return wsrpUserContext;
}
@@ -76,7 +79,7 @@
{
Map<String, String> userInfos = userContext.getInformations();
- if (userInfos == null || userInfos.isEmpty())
+ if (!WSRPTypeFactory.existsAndIsNotEmpty(userInfos))
{
return null;
}
@@ -169,8 +172,7 @@
}
/**
- * Builds a Portal {@link org.gatein.pc.api.spi.UserContext} from a WSRP {@link
- * org.oasis.wsrp.v1.UserContext}.
+ * Builds a Portal {@link org.gatein.pc.api.spi.UserContext} from a WSRP {@link org.oasis.wsrp.v1.UserContext}.
*
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
* @since 2.4 (May 8, 2006)
@@ -300,21 +302,19 @@
public List<Locale> getLocales()
{
- int length = desiredLocales.size();
- if (length > 0)
+ List<Locale> locales = Collections.emptyList();
+
+ if (WSRPTypeFactory.existsAndIsNotEmpty(desiredLocales))
{
- List<Locale> locales = new ArrayList<Locale>(length);
+ locales = new ArrayList<Locale>(desiredLocales.size());
for (String desiredLocale : desiredLocales)
{
Locale locale = WSRPUtils.getLocale(desiredLocale);
locales.add(locale);
}
- return locales;
}
- else
- {
- return Collections.emptyList();
- }
+
+ return locales;
}
public Object getAttribute(String arg0)
Modified: components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPTypeFactory.java
===================================================================
--- components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPTypeFactory.java 2009-10-13 12:32:13 UTC (rev 337)
+++ components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPTypeFactory.java 2009-10-13 13:27:59 UTC (rev 338)
@@ -675,7 +675,8 @@
public Map<String, String[]> getPublicNavigationalStateChanges()
{
- throw new UnsupportedOperationException("getPublicNavigationalStateChanges is not currently supported!"); // todo: fix me
+ // todo: implement properly
+ return null;
}
public Mode getMode()
@@ -1120,8 +1121,23 @@
return markupType;
}
- private static boolean existsAndIsNotEmpty(Collection collection)
+ /**
+ * @param collection
+ * @return
+ * @deprecated use ParameterValidation.existsAndIsNotEmpty instead
+ */
+ static boolean existsAndIsNotEmpty(Collection collection)
{
return collection != null && !collection.isEmpty();
}
+
+ /**
+ * @param map
+ * @return
+ * @deprecated use ParameterValidation.existsAndIsNotEmpty instead
+ */
+ static boolean existsAndIsNotEmpty(Map map)
+ {
+ return map != null && !map.isEmpty();
+ }
}
15 years, 2 months
gatein SVN: r337 - components/common/trunk/common/src/main/java/org/gatein/common/util.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-10-13 08:32:13 -0400 (Tue, 13 Oct 2009)
New Revision: 337
Modified:
components/common/trunk/common/src/main/java/org/gatein/common/util/ParameterValidation.java
Log:
- Added collection checking methods.
Modified: components/common/trunk/common/src/main/java/org/gatein/common/util/ParameterValidation.java
===================================================================
--- components/common/trunk/common/src/main/java/org/gatein/common/util/ParameterValidation.java 2009-10-12 15:55:25 UTC (rev 336)
+++ components/common/trunk/common/src/main/java/org/gatein/common/util/ParameterValidation.java 2009-10-13 12:32:13 UTC (rev 337)
@@ -25,7 +25,9 @@
import org.apache.log4j.Logger;
import java.util.Arrays;
+import java.util.Collection;
import java.util.List;
+import java.util.Map;
import java.util.regex.Pattern;
/**
@@ -166,6 +168,16 @@
}
}
+ public static boolean existsAndIsNotEmpty(Collection collection)
+ {
+ return collection != null && !collection.isEmpty();
+ }
+
+ public static boolean existsAndIsNotEmpty(Map map)
+ {
+ return map != null && !map.isEmpty();
+ }
+
/**
* Checks if a given value matches the given format (as a regular expression). If yes, returns it as is. Otherwise,
* returns the default value.
15 years, 2 months
gatein SVN: r336 - components/pc/trunk.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-10-12 11:55:25 -0400 (Mon, 12 Oct 2009)
New Revision: 336
Modified:
components/pc/trunk/pom.xml
Log:
Using fixed and updated versions
Modified: components/pc/trunk/pom.xml
===================================================================
--- components/pc/trunk/pom.xml 2009-10-12 14:59:16 UTC (rev 335)
+++ components/pc/trunk/pom.xml 2009-10-12 15:55:25 UTC (rev 336)
@@ -24,12 +24,12 @@
</scm>
<properties>
- <version.gatein.common>2.0.0-Beta02</version.gatein.common>
- <version.gatein.wci>2.0.0-SNAPSHOT</version.gatein.wci>
+ <version.gatein.common>2.0.0-Beta03</version.gatein.common>
+ <version.gatein.wci>2.0.0-Beta02</version.gatein.wci>
<!-- used in test module by maven-antrun-extended-plugin -->
- <version.jboss.unit>1.2.2</version.jboss.unit>
- <version.cargo>1.0.1-SNAPSHOT</version.cargo>
+ <version.jboss.unit>1.2.3</version.jboss.unit>
+ <version.cargo>1.0.1-alpha-1</version.cargo>
</properties>
<dependencyManagement>
15 years, 2 months
gatein SVN: r335 - in components/wci/trunk: exo and 4 other directories.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-10-12 10:59:16 -0400 (Mon, 12 Oct 2009)
New Revision: 335
Modified:
components/wci/trunk/exo/pom.xml
components/wci/trunk/jetty/pom.xml
components/wci/trunk/pom.xml
components/wci/trunk/test/pom.xml
components/wci/trunk/tomcat/pom.xml
components/wci/trunk/wci/pom.xml
Log:
[maven-release-plugin] prepare for next development iteration
Modified: components/wci/trunk/exo/pom.xml
===================================================================
--- components/wci/trunk/exo/pom.xml 2009-10-12 14:59:00 UTC (rev 334)
+++ components/wci/trunk/exo/pom.xml 2009-10-12 14:59:16 UTC (rev 335)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.wci</groupId>
<artifactId>wci-parent</artifactId>
- <version>2.0.0-Beta02</version>
+ <version>2.0.0-CR1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wci-exo</artifactId>
Modified: components/wci/trunk/jetty/pom.xml
===================================================================
--- components/wci/trunk/jetty/pom.xml 2009-10-12 14:59:00 UTC (rev 334)
+++ components/wci/trunk/jetty/pom.xml 2009-10-12 14:59:16 UTC (rev 335)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.wci</groupId>
<artifactId>wci-parent</artifactId>
- <version>2.0.0-Beta02</version>
+ <version>2.0.0-CR1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wci-jetty</artifactId>
Modified: components/wci/trunk/pom.xml
===================================================================
--- components/wci/trunk/pom.xml 2009-10-12 14:59:00 UTC (rev 334)
+++ components/wci/trunk/pom.xml 2009-10-12 14:59:16 UTC (rev 335)
@@ -6,7 +6,7 @@
<groupId>org.gatein.wci</groupId>
<artifactId>wci-parent</artifactId>
- <version>2.0.0-Beta02</version>
+ <version>2.0.0-CR1-SNAPSHOT</version>
<packaging>pom</packaging>
<parent>
@@ -16,9 +16,9 @@
</parent>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/gatein/components/wci/tags/2.0.0-B...</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/wci/tags/2.0.0-Beta02</developerConnection>
- <url>http://fisheye.jboss.org/browse/gatein/components/wci/tags/2.0.0-Beta02</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/gatein/components/wci/trunk/</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/wci/trunk/</developerConnection>
+ <url>http://fisheye.jboss.org/browse/gatein/components/wci/trunk/</url>
</scm>
<properties>
Modified: components/wci/trunk/test/pom.xml
===================================================================
--- components/wci/trunk/test/pom.xml 2009-10-12 14:59:00 UTC (rev 334)
+++ components/wci/trunk/test/pom.xml 2009-10-12 14:59:16 UTC (rev 335)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.wci</groupId>
<artifactId>wci-parent</artifactId>
- <version>2.0.0-Beta02</version>
+ <version>2.0.0-CR1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wci-test</artifactId>
Modified: components/wci/trunk/tomcat/pom.xml
===================================================================
--- components/wci/trunk/tomcat/pom.xml 2009-10-12 14:59:00 UTC (rev 334)
+++ components/wci/trunk/tomcat/pom.xml 2009-10-12 14:59:16 UTC (rev 335)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.wci</groupId>
<artifactId>wci-parent</artifactId>
- <version>2.0.0-Beta02</version>
+ <version>2.0.0-CR1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wci-tomcat</artifactId>
Modified: components/wci/trunk/wci/pom.xml
===================================================================
--- components/wci/trunk/wci/pom.xml 2009-10-12 14:59:00 UTC (rev 334)
+++ components/wci/trunk/wci/pom.xml 2009-10-12 14:59:16 UTC (rev 335)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.wci</groupId>
<artifactId>wci-parent</artifactId>
- <version>2.0.0-Beta02</version>
+ <version>2.0.0-CR1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wci-wci</artifactId>
15 years, 2 months
gatein SVN: r334 - components/wci/tags.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-10-12 10:59:00 -0400 (Mon, 12 Oct 2009)
New Revision: 334
Added:
components/wci/tags/2.0.0-Beta02/
Log:
[maven-scm] copy for tag 2.0.0-Beta02
Copied: components/wci/tags/2.0.0-Beta02 (from rev 333, components/wci/trunk)
15 years, 2 months