JBoss Portal SVN: r10093 - modules/test/tags.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-02-22 18:35:21 -0500 (Fri, 22 Feb 2008)
New Revision: 10093
Added:
modules/test/tags/JBOSS_UNIT_1_2_0_BETA1/
Log:
tagging jboss unit 1.2.Beta1
Copied: modules/test/tags/JBOSS_UNIT_1_2_0_BETA1 (from rev 9886, modules/test)
16 years, 7 months
JBoss Portal SVN: r10092 - modules/test/tags.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-02-22 18:32:08 -0500 (Fri, 22 Feb 2008)
New Revision: 10092
Added:
modules/test/tags/JBOSS_UNIT_1_2_0_BETA2/
Log:
tagging jboss unit 1.2.Beta2
Copied: modules/test/tags/JBOSS_UNIT_1_2_0_BETA2 (from rev 10091, modules/test)
16 years, 7 months
JBoss Portal SVN: r10091 - in modules/test/trunk: build and 21 other directories.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2008-02-22 18:26:34 -0500 (Fri, 22 Feb 2008)
New Revision: 10091
Added:
modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/
modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/Log4JWriter.java
modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/MultiValuedPropertyMap.java
modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/ParameterValidation.java
modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/Tools.java
modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/io/
modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/io/IOTools.java
modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/io/Serialization.java
modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/io/SerializationFilter.java
modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/io/UndeclaredIOException.java
modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/xml/
modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/xml/TooManyElementException.java
modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/xml/XMLTools.java
Modified:
modules/test/trunk/build/pom.xml
modules/test/trunk/docs/pom.xml
modules/test/trunk/docs/user-guide/pom.xml
modules/test/trunk/mc/pom.xml
modules/test/trunk/pom.xml
modules/test/trunk/remote/pom.xml
modules/test/trunk/test/agent/pom.xml
modules/test/trunk/test/core/pom.xml
modules/test/trunk/test/generic/pom.xml
modules/test/trunk/test/jboss/pom.xml
modules/test/trunk/test/opends/pom.xml
modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/embedded/DSConfig.java
modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/embedded/DataSourceSupport.java
modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/embedded/HibernateSupport.java
modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/impl/generic/config/ServerConfig.java
modules/test/trunk/tooling/ant/pom.xml
modules/test/trunk/tooling/core/pom.xml
modules/test/trunk/tooling/examples/maven2/pom.xml
modules/test/trunk/tooling/maven2/pom.xml
modules/test/trunk/tooling/pom.xml
modules/test/trunk/unit/pom.xml
Log:
remove dependency to portal common and change version to 1.2.0.Beta2
Modified: modules/test/trunk/build/pom.xml
===================================================================
--- modules/test/trunk/build/pom.xml 2008-02-22 16:28:22 UTC (rev 10090)
+++ modules/test/trunk/build/pom.xml 2008-02-22 23:26:34 UTC (rev 10091)
@@ -18,14 +18,13 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.unit</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.0.Beta2</version>
<packaging>pom</packaging>
<name>JBoss Portal Test Module</name>
<url>http://www.jboss.com/products/jbossmc</url>
<description>JBoss Portal Test Module</description>
<properties>
- <version.portal.common>1.2.0-SNAPSHOT</version.portal.common>
<version.jboss.microcontainer>2.0.0.Beta9</version.jboss.microcontainer>
<version.apache.httpclient>3.0.1</version.apache.httpclient>
<version.cargo>0.9-portal</version.cargo>
@@ -39,6 +38,10 @@
<version.junit>3.8.1</version.junit>
<version.log4j>1.2.14</version.log4j>
<version.sleepycat>3.0.12</version.sleepycat>
+ <version.jboss-j2ee>4.2.0.GA</version.jboss-j2ee>
+ <version.jboss-common-core>2.2.0.GA</version.jboss-common-core>
+ <version.jboss-jmx>4.2.0.GA</version.jboss-jmx>
+ <version.jboss-system>4.2.0.GA</version.jboss-system>
</properties>
@@ -128,11 +131,6 @@
</dependency>
- <dependency>
- <groupId>org.jboss.portal.common</groupId>
- <artifactId>common-common</artifactId>
- <version>${version.portal.common}</version>
- </dependency>
<dependency>
<groupId>org.jboss.microcontainer</groupId>
@@ -244,6 +242,27 @@
<version>${version.sleepycat}</version>
</dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-j2ee</artifactId>
+ <version>${version.jboss-j2ee}</version>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-common-core</artifactId>
+ <version>${version.jboss-common-core}</version>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-jmx</artifactId>
+ <version>${version.jboss-jmx}</version>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-system</artifactId>
+ <version>${version.jboss-system}</version>
+ </dependency>
+
</dependencies>
</dependencyManagement>
Modified: modules/test/trunk/docs/pom.xml
===================================================================
--- modules/test/trunk/docs/pom.xml 2008-02-22 16:28:22 UTC (rev 10090)
+++ modules/test/trunk/docs/pom.xml 2008-02-22 23:26:34 UTC (rev 10091)
@@ -4,13 +4,13 @@
<parent>
<groupId>org.jboss.unit</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.0.Beta2</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<artifactId>docs-aggregator</artifactId>
<packaging>pom</packaging>
<name>JBoss Portal Portlet Docs Aggregator</name>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.0.Beta2</version>
<url>http://labs.jboss.com/jbossportal</url>
<modules>
Modified: modules/test/trunk/docs/user-guide/pom.xml
===================================================================
--- modules/test/trunk/docs/user-guide/pom.xml 2008-02-22 16:28:22 UTC (rev 10090)
+++ modules/test/trunk/docs/user-guide/pom.xml 2008-02-22 23:26:34 UTC (rev 10091)
@@ -60,7 +60,7 @@
<groupId>org.jboss.unit</groupId>
<artifactId>user-guide-${translation}</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.0.Beta2</version>
<packaging>jdocbook</packaging>
<name>User_Guide_(${translation})</name>
Modified: modules/test/trunk/mc/pom.xml
===================================================================
--- modules/test/trunk/mc/pom.xml 2008-02-22 16:28:22 UTC (rev 10090)
+++ modules/test/trunk/mc/pom.xml 2008-02-22 23:26:34 UTC (rev 10091)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.unit</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.0.Beta2</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/test/trunk/pom.xml
===================================================================
--- modules/test/trunk/pom.xml 2008-02-22 16:28:22 UTC (rev 10090)
+++ modules/test/trunk/pom.xml 2008-02-22 23:26:34 UTC (rev 10091)
@@ -5,7 +5,7 @@
<artifactId>module-aggregator</artifactId>
<packaging>pom</packaging>
<name>JBoss Portal Modules Test</name>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.0.Beta2</version>
<url>http://labs.jboss.com/jbossportal</url>
<dependencies/>
Modified: modules/test/trunk/remote/pom.xml
===================================================================
--- modules/test/trunk/remote/pom.xml 2008-02-22 16:28:22 UTC (rev 10090)
+++ modules/test/trunk/remote/pom.xml 2008-02-22 23:26:34 UTC (rev 10091)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.unit</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.0.Beta2</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/test/trunk/test/agent/pom.xml
===================================================================
--- modules/test/trunk/test/agent/pom.xml 2008-02-22 16:28:22 UTC (rev 10090)
+++ modules/test/trunk/test/agent/pom.xml 2008-02-22 23:26:34 UTC (rev 10091)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.unit</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.0.Beta2</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -13,10 +13,6 @@
<dependencies>
<dependency>
- <groupId>org.jboss.portal.common</groupId>
- <artifactId>common-common</artifactId>
- </dependency>
- <dependency>
<groupId>cargo</groupId>
<artifactId>core</artifactId>
</dependency>
Modified: modules/test/trunk/test/core/pom.xml
===================================================================
--- modules/test/trunk/test/core/pom.xml 2008-02-22 16:28:22 UTC (rev 10090)
+++ modules/test/trunk/test/core/pom.xml 2008-02-22 23:26:34 UTC (rev 10091)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.unit</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.0.Beta2</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -13,10 +13,6 @@
<dependencies>
<dependency>
- <groupId>org.jboss.portal.common</groupId>
- <artifactId>common-common</artifactId>
- </dependency>
- <dependency>
<groupId>cargo</groupId>
<artifactId>core</artifactId>
</dependency>
@@ -52,6 +48,26 @@
<groupId>jboss.jbossas.core-libs</groupId>
<artifactId>jboss</artifactId>
</dependency>
+ <dependency>
+ <groupId>apache-log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-j2ee</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-common-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-jmx</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-system</artifactId>
+ </dependency>
</dependencies>
<build>
Modified: modules/test/trunk/test/generic/pom.xml
===================================================================
--- modules/test/trunk/test/generic/pom.xml 2008-02-22 16:28:22 UTC (rev 10090)
+++ modules/test/trunk/test/generic/pom.xml 2008-02-22 23:26:34 UTC (rev 10091)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.unit</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.0.Beta2</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -13,10 +13,6 @@
<dependencies>
<dependency>
- <groupId>org.jboss.portal.common</groupId>
- <artifactId>common-common</artifactId>
- </dependency>
- <dependency>
<groupId>cargo</groupId>
<artifactId>core</artifactId>
</dependency>
@@ -56,6 +52,14 @@
<groupId>jboss</groupId>
<artifactId>jboss-remoting</artifactId>
</dependency>
+ <dependency>
+ <groupId>apache-log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-common-core</artifactId>
+ </dependency>
</dependencies>
<build>
@@ -76,6 +80,7 @@
<include>org/jboss/portal/test/framework/agent/**</include>
<include>org/jboss/portal/test/framework/server/**</include>
+ <include>org/jboss/portal/test/framework/common/**</include>
</includes>
</configuration>
</plugin>
Modified: modules/test/trunk/test/jboss/pom.xml
===================================================================
--- modules/test/trunk/test/jboss/pom.xml 2008-02-22 16:28:22 UTC (rev 10090)
+++ modules/test/trunk/test/jboss/pom.xml 2008-02-22 23:26:34 UTC (rev 10091)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.unit</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.0.Beta2</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -13,10 +13,6 @@
<dependencies>
<dependency>
- <groupId>org.jboss.portal.common</groupId>
- <artifactId>common-common</artifactId>
- </dependency>
- <dependency>
<groupId>cargo</groupId>
<artifactId>core</artifactId>
</dependency>
@@ -56,6 +52,10 @@
<groupId>jboss</groupId>
<artifactId>jboss-remoting</artifactId>
</dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-common-core</artifactId>
+ </dependency>
</dependencies>
<build>
Modified: modules/test/trunk/test/opends/pom.xml
===================================================================
--- modules/test/trunk/test/opends/pom.xml 2008-02-22 16:28:22 UTC (rev 10090)
+++ modules/test/trunk/test/opends/pom.xml 2008-02-22 23:26:34 UTC (rev 10091)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.unit</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.0.Beta2</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Added: modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/Log4JWriter.java
===================================================================
--- modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/Log4JWriter.java (rev 0)
+++ modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/Log4JWriter.java 2008-02-22 23:26:34 UTC (rev 10091)
@@ -0,0 +1,86 @@
+/*
+* 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.
+*/
+
+package org.jboss.portal.test.framework.common;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.Level;
+
+import java.io.Writer;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 5451 $
+ */
+public class Log4JWriter extends Writer
+{
+
+ /** The open/closed status. */
+ private boolean open;
+
+ /** The logger. */
+ private Logger log;
+
+ /** The logging level. */
+ private Level level;
+
+ /**
+ * @throws IllegalArgumentException if log or level is null
+ */
+ public Log4JWriter(Logger log, Level level) throws IllegalArgumentException
+ {
+ if (log == null)
+ {
+ throw new IllegalArgumentException("No logger provided");
+ }
+ if (level == null)
+ {
+ throw new IllegalArgumentException("No level provided");
+ }
+ this.open = false;
+ this.log = log;
+ this.level = level;
+ }
+
+ public void write(char cbuf[], int off, int len) throws IOException
+ {
+ if (open)
+ {
+ log.log(level, new String(cbuf, off, len));
+ }
+ else
+ {
+ throw new IOException("Stream closed");
+ }
+ }
+
+ public void flush() throws IOException
+ {
+ }
+
+ public void close() throws IOException
+ {
+ open = false;
+ }
+}
+
Added: modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/MultiValuedPropertyMap.java
===================================================================
--- modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/MultiValuedPropertyMap.java (rev 0)
+++ modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/MultiValuedPropertyMap.java 2008-02-22 23:26:34 UTC (rev 10091)
@@ -0,0 +1,44 @@
+/*
+* 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.
+*/
+
+package org.jboss.portal.test.framework.common;
+
+import java.util.List;
+import java.util.Set;
+
+/**
+ * A property map with multi valued properties.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public interface MultiValuedPropertyMap<T>
+{
+ T getValue(String key) throws IllegalArgumentException;
+ List<T> getValues(String key) throws IllegalArgumentException;
+ void addValue(String key, T value) throws IllegalArgumentException;
+ void setValue(String key, T value) throws IllegalArgumentException;
+ Set<String> keySet();
+ void clear();
+ int size();
+ void append(MultiValuedPropertyMap<T> appended) throws IllegalArgumentException;
+}
Added: modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/ParameterValidation.java
===================================================================
--- modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/ParameterValidation.java (rev 0)
+++ modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/ParameterValidation.java 2008-02-22 23:26:34 UTC (rev 10091)
@@ -0,0 +1,67 @@
+/*
+* 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.
+*/
+
+package org.jboss.portal.test.framework.common;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 5757 $
+ * @since 2.4 (May 31, 2006)
+ */
+public class ParameterValidation
+{
+ public static void throwIllegalArgExceptionIfNullOrEmpty(String valueToCheck, String valueName, String contextName)
+ {
+ if (isNullOrEmpty(valueToCheck))
+ {
+ throw new IllegalArgumentException((contextName != null ? contextName + " r" : "R") + "equires a non-null, non-empty " + valueName);
+ }
+ }
+
+ /** @since 2.6 */
+ public static boolean isNullOrEmpty(String valueToCheck)
+ {
+ return valueToCheck == null || valueToCheck.length() == 0;
+ }
+
+ public static void throwIllegalArgExceptionIfNull(Object objectToTest, String name)
+ {
+ if (objectToTest == null)
+ {
+ throw new IllegalArgumentException("Must pass a non null " + name);
+ }
+ }
+
+ /** @since 2.4.1 */
+ public static void throwIllegalArgExceptionIfNullOrEmpty(Object[] array, String name)
+ {
+ if (array == null)
+ {
+ throw new IllegalArgumentException("Must pass a non-null " + name);
+ }
+ if (array.length == 0)
+ {
+ throw new IllegalArgumentException("Must pass a non-empty " + name);
+ }
+ }
+}
+
Added: modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/Tools.java
===================================================================
--- modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/Tools.java (rev 0)
+++ modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/Tools.java 2008-02-22 23:26:34 UTC (rev 10091)
@@ -0,0 +1,1023 @@
+/*
+* 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.
+*/
+
+package org.jboss.portal.test.framework.common;
+
+import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.lang.reflect.Array;
+import java.math.BigInteger;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.net.UnknownHostException;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Enumeration;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.NoSuchElementException;
+import java.util.ResourceBundle;
+import java.util.Set;
+import java.util.Collections;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
+ * @author <a href="mailto:boleslaw dot dawidowicz at jboss.com">Boleslaw Dawidowicz</a>
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 7377 $
+ */
+public class Tools
+{
+
+ public static final int DEFAULT_BUFFER_SIZE = 512;
+
+ public static final Logger log = Logger.getLogger(Tools.class);
+
+ /** 16 chars long VMID. */
+ public static final String VMID = VMID();
+
+ private static String VMID()
+ {
+ try
+ {
+ BigInteger bi = BigInteger.valueOf(0);
+ byte[] address = java.net.InetAddress.getLocalHost().getAddress();
+ for (int i = 0; i < 4; i++)
+ {
+ bi = bi.shiftLeft(8);
+ bi = bi.add(BigInteger.valueOf(address[i]));
+ }
+ bi = bi.shiftLeft(32);
+ int code = System.identityHashCode(new Object());
+ bi = bi.add(BigInteger.valueOf(code));
+ byte[] bytes = bi.toByteArray();
+ StringBuffer buffer = new StringBuffer();
+ char[] chars = "0123456789ABCDEF".toCharArray();
+ for (int i = 0; i < bytes.length; i++)
+ {
+ buffer.append(chars[(bytes[i] & 0xF0) >> 4]).append(chars[bytes[i] & 0xF]);
+ }
+ return buffer.toString();
+ }
+ catch (UnknownHostException e)
+ {
+ e.printStackTrace(System.err);
+ throw new Error("Cannot create VMID");
+ }
+ }
+
+ public static final Enumeration EMPTY_ENUMERATION = new Enumeration()
+ {
+ public boolean hasMoreElements()
+ {
+ return false;
+ }
+
+ public Object nextElement()
+ {
+ throw new NoSuchElementException();
+ }
+ };
+
+ public static final Iterator EMPTY_ITERATOR = new Iterator()
+ {
+ public boolean hasNext()
+ {
+ return false;
+ }
+
+ public Object next()
+ {
+ throw new NoSuchElementException();
+ }
+
+ public void remove()
+ {
+ throw new UnsupportedOperationException();
+ }
+ };
+
+ public static final ResourceBundle EMPTY_BUNDLE = new ResourceBundle()
+ {
+ protected Object handleGetObject(String key)
+ {
+ return null;
+ }
+
+ public Enumeration getKeys()
+ {
+ return EMPTY_ENUMERATION;
+ }
+ };
+
+ public static <E> Enumeration<E> emptyEnumeration()
+ {
+ return (Enumeration<E>)EMPTY_ENUMERATION;
+ }
+
+ public static <E> Iterator<E> emptyIterator()
+ {
+ return (Iterator<E>)EMPTY_ITERATOR;
+ }
+
+ public static <E> Enumeration<E> toEnumeration(final Iterator<E> iterator)
+ {
+ if (iterator == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ return new Enumeration<E>()
+ {
+ public boolean hasMoreElements()
+ {
+ return iterator.hasNext();
+ }
+
+ public E nextElement()
+ {
+ return iterator.next();
+ }
+ };
+ }
+
+ public static <E> Enumeration<E> toEnumeration(final E[] objects)
+ {
+ if (objects == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ return new Enumeration<E>()
+ {
+ int index = 0;
+
+ public boolean hasMoreElements()
+ {
+ return index < objects.length;
+ }
+
+ public E nextElement()
+ {
+ if (index < objects.length)
+ {
+ return objects[index++];
+ }
+ else
+ {
+ throw new NoSuchElementException();
+ }
+ }
+ };
+ }
+
+ public static <E> Enumeration<E> toEnumeration(final E o)
+ {
+ return new Enumeration<E>()
+ {
+ boolean hasMore = true;
+
+ public boolean hasMoreElements()
+ {
+ return hasMore;
+ }
+
+ public E nextElement()
+ {
+ if (hasMore)
+ {
+ hasMore = false;
+ }
+ else
+ {
+ throw new NoSuchElementException();
+ }
+ return o;
+ }
+ };
+ }
+
+ public static <E> Set<E> toSet(Enumeration<E> e)
+ {
+ if (e == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ HashSet<E> set = new HashSet<E>();
+ while (e.hasMoreElements())
+ {
+ set.add(e.nextElement());
+ }
+ return set;
+ }
+
+ public static <E> Set<E> toSet(E... objects)
+ {
+ if (objects == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ HashSet<E> set = new HashSet<E>();
+ for (E object : objects)
+ {
+ set.add(object);
+ }
+ return set;
+ }
+
+ /**
+ * Transforms an iterator into an unordered Set
+ *
+ * @param iterator The iterator to transform
+ * @return A HashSet
+ */
+ public static <E> Set<E> toSet(Iterator<E> iterator)
+ {
+ if (iterator == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ return toSet(iterator, false);
+ }
+
+ /**
+ * Transforms an iterator into a Set
+ *
+ * @param iterator The iterator to transform
+ * @param preserveOrder true if the set must respect the ordering of the iterator
+ * @return a LinkedHashSet if ordered is true, a HashSet otherwise
+ */
+ public static <E> Set<E> toSet(Iterator<E> iterator, boolean preserveOrder)
+ {
+ if (iterator == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ Set<E> set;
+ if (preserveOrder)
+ {
+ set = new LinkedHashSet<E>();
+ }
+ else
+ {
+ set = new HashSet<E>();
+ }
+ while (iterator.hasNext())
+ {
+ set.add(iterator.next());
+ }
+ return set;
+ }
+
+ public static <E> List<E> toList(Enumeration<E> e)
+ {
+ if (e == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ List<E> list = new ArrayList<E>();
+ while (e.hasMoreElements())
+ {
+ list.add(e.nextElement());
+ }
+ return list;
+ }
+
+ public static <E> List<E> toList(Iterator<E> iterator)
+ {
+ if (iterator == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ List<E> list = new ArrayList<E>();
+ while (iterator.hasNext())
+ {
+ list.add(iterator.next());
+ }
+ return list;
+ }
+
+ public static <E> List<E> toList(E... objects)
+ {
+ if (objects == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ List<E> list = new ArrayList<E>(objects.length);
+ for (E object : objects)
+ {
+ list.add(object);
+ }
+ return list;
+ }
+
+ /**
+ * Consider remove this method as it cannot be generified.
+ *
+ * @param i
+ * @return
+ */
+ @Deprecated
+ public static Object[] toArray(Iterator i)
+ {
+ // This method cannot be generified.
+ return toList(i).toArray();
+ }
+
+ /**
+ * Returns a singleton iterator.
+ *
+ * @param o the singleton object
+ * @return the iterator
+ */
+ public static <E> Iterator<E> iterator(final E o)
+ {
+ return new Iterator<E>()
+ {
+ /** The status of the iterator. */
+ boolean done = false;
+
+ public boolean hasNext()
+ {
+ return !done;
+ }
+
+ public E next()
+ {
+ if (done)
+ {
+ throw new NoSuchElementException("Already iterated");
+ }
+ done = true;
+ return o;
+ }
+
+ public void remove()
+ {
+ throw new UnsupportedOperationException("read only");
+ }
+ };
+ }
+
+ /**
+ * Returns an iterator over the array elements.
+ *
+ * @param objects the array containing the objects to iterate on
+ * @return the iterator
+ * @throws IllegalArgumentException if the object array is null or the specified range is not valid
+ */
+ public static <E> Iterator<E> iterator(final E... objects) throws IllegalArgumentException
+ {
+ if (objects == null)
+ {
+ throw new IllegalArgumentException("No null object array");
+ }
+ return iterator(objects, 0, objects.length);
+ }
+
+ /**
+ * Returns an iterator over the array elements within the specified range. The range is considered as valid
+ * if the from argument is greater or equals than zero, the to argument is lesser or equals than array size
+ * and the from argument is lesser or equals to the to argument.
+ *
+ * @param objects the array containing the objects to iterate on
+ * @param from the inclusive start index
+ * @param to the exclusive stop index
+ * @return the iterator
+ * @throws IllegalArgumentException if the object array is null or the specified range is not valid or if the range is not valid
+ */
+ public static <E> Iterator<E> iterator(final E[] objects, final int from, final int to) throws IllegalArgumentException
+ {
+ if (objects == null)
+ {
+ throw new IllegalArgumentException("No null object array");
+ }
+ if (from > to || from < 0 || to > objects.length)
+ {
+ throw new IllegalArgumentException("Invalid range [" + from + "," + to + "] for array of length " + objects.length);
+ }
+ return new Iterator<E>()
+ {
+ /** . */
+ int index = from;
+
+ public boolean hasNext()
+ {
+ return index < to;
+ }
+
+ public E next()
+ {
+ if (index >= to)
+ {
+ throw new NoSuchElementException("Index is greater than the array length");
+ }
+ return objects[index++];
+ }
+
+ public void remove()
+ {
+ throw new UnsupportedOperationException("read only");
+ }
+ };
+ }
+
+ public static int computeStringHash(int hash, String s)
+ {
+ char[] chars = s.toCharArray();
+ int length = chars.length;
+ for (int i = 0; i < length; i++)
+ {
+ char c = chars[i];
+ hash = 31 * hash + c;
+ }
+ return hash;
+ }
+
+ /**
+ * Computes an md5 hash of a string.
+ *
+ * @param text the hashed string
+ * @return the string hash
+ * @throws NullPointerException if text is null
+ */
+ public static byte[] md5(String text)
+ {
+ // arguments check
+ if (text == null)
+ {
+ throw new NullPointerException("null text");
+ }
+
+ try
+ {
+ MessageDigest md = MessageDigest.getInstance("MD5");
+ md.update(text.getBytes());
+ return md.digest();
+ }
+ catch (NoSuchAlgorithmException e)
+ {
+ log.error("Cannot find MD5 algorithm", e);
+ throw new RuntimeException("Cannot find MD5 algorithm");
+ }
+ }
+
+ /**
+ * Computes an md5 hash and returns the result as a string in hexadecimal format.
+ *
+ * @param text the hashed string
+ * @return the string hash
+ * @throws NullPointerException if text is null
+ */
+ public static String md5AsHexString(String text)
+ {
+ return toHexString(md5(text));
+ }
+
+ /**
+ * Computes a hash with specified algorighm and returns the result as a string in hexadecimal format
+ *
+ * @param text
+ * @param algorithm
+ * @param encoding
+ * @return
+ * @throws NoSuchAlgorithmException
+ */
+ public static String hashAndEncodeString(String text, String algorithm, String encoding) throws NoSuchAlgorithmException
+ {
+ // arguments check
+ if (text == null)
+ {
+ throw new NullPointerException("null text");
+ }
+ if (algorithm == null)
+ {
+ throw new NullPointerException("null algorithm");
+ }
+ if (encoding == null)
+ {
+ throw new NullPointerException("null encoding");
+ }
+
+ MessageDigest md = MessageDigest.getInstance(algorithm);
+ md.update(text.getBytes());
+ byte[] encoded = md.digest();
+
+ if ("HEX".equalsIgnoreCase(encoding))
+ {
+ return toHexString(encoded);
+ }
+ //TODO: add base64 support here
+ else
+ {
+ throw new IllegalArgumentException("Not supported encoding: " + encoding);
+ }
+
+ }
+
+
+ /**
+ * Returns a string in the hexadecimal format.
+ *
+ * @param bytes the converted bytes
+ * @return the hexadecimal string representing the bytes data
+ * @throws IllegalArgumentException if the byte array is null
+ */
+ public static String toHexString(byte[] bytes)
+ {
+ if (bytes == null)
+ {
+ throw new IllegalArgumentException("byte array must not be null");
+ }
+ StringBuffer hex = new StringBuffer(bytes.length * 2);
+ for (int i = 0; i < bytes.length; i++)
+ {
+ hex.append(Character.forDigit((bytes[i] & 0XF0) >> 4, 16));
+ hex.append(Character.forDigit((bytes[i] & 0X0F), 16));
+ }
+ return hex.toString();
+ }
+
+ /**
+ * Returns a byte array converted from the hexadecimal format.
+ *
+ * @param hex the string to convert
+ * @return the byte array corresponding
+ * @throws IllegalArgumentException if the string is null or does not have the good format
+ */
+ public static byte[] fromHexString(String hex)
+ {
+ if (hex == null)
+ {
+ throw new IllegalArgumentException("Hex string must not be null");
+ }
+ if (hex.length() % 2 == 1)
+ {
+ throw new IllegalArgumentException("Hex string length is not even : " + hex.length());
+ }
+ int index = 0;
+ byte[] bytes = new byte[hex.length() / 2];
+ for (int i = 0; i < bytes.length; i++)
+ {
+ char chigh = hex.charAt(index++);
+ int high = Character.digit(chigh, 16);
+ if (high == -1)
+ {
+ throw new IllegalArgumentException("Hex string contains a bad char : " + chigh);
+ }
+ char clow = hex.charAt(index++);
+ int low = Character.digit(clow, 16);
+ if (low == -1)
+ {
+ throw new IllegalArgumentException("Hex string contains a bad char : " + clow);
+ }
+ byte value = (byte)((high << 4) + low);
+ bytes[i] = value;
+ }
+ return bytes;
+ }
+
+ /**
+ *
+ */
+ public static String generateTemporaryHash(String value, long time)
+ {
+ if (value == null)
+ {
+ throw new IllegalArgumentException("id must not be null");
+ }
+
+ Calendar calendar = Calendar.getInstance();
+ calendar.setTimeInMillis(time);
+ calendar.set(Calendar.MINUTE, 0);
+ calendar.set(Calendar.SECOND, 0);
+ calendar.set(Calendar.MILLISECOND, 0);
+ return md5AsHexString(value + calendar.getTimeInMillis());
+ }
+
+ /**
+ *
+ */
+ public static boolean confirmTemporaryHash(String hash, String value, long time)
+ {
+ if (hash == null)
+ {
+ return false;
+ }
+ if (value == null)
+ {
+ throw new IllegalArgumentException("value must not be null");
+ }
+
+ Calendar calendar = Calendar.getInstance();
+ calendar.setTimeInMillis(time);
+ calendar.set(Calendar.MINUTE, 0);
+ calendar.set(Calendar.SECOND, 0);
+ calendar.set(Calendar.MILLISECOND, 0);
+ String expected = md5AsHexString(value + calendar.getTimeInMillis());
+ if (expected.equals(hash))
+ {
+ return true;
+ }
+ calendar.add(Calendar.HOUR_OF_DAY, -1);
+ expected = md5AsHexString(value + calendar.getTimeInMillis());
+ return expected.equals(hash);
+ }
+
+ public static String getShortNameOf(Class clazz)
+ {
+ return clazz.getSimpleName();
+ }
+
+ public static String getPackageOf(Class clazz)
+ {
+ String name = clazz.getName();
+ int index = name.lastIndexOf('.');
+ if (index != -1)
+ {
+ name = name.substring(0, index);
+ }
+ else
+ {
+ name = "";
+ }
+ return name;
+ }
+
+ public static String buildClassLoaderInfo(ClassLoader loader)
+ {
+ if (loader == null)
+ {
+ throw new IllegalArgumentException("no loader");
+ }
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("ClassLoader[Name=").append(loader.getClass().getName());
+ buffer.append(",HashCode=").append(loader.hashCode());
+ buffer.append(",IdentityHashCode=").append(System.identityHashCode(loader));
+ if (loader instanceof URLClassLoader)
+ {
+ URLClassLoader urlLoader = (URLClassLoader)loader;
+ URL[] urls = urlLoader.getURLs();
+ for (int i = 0; i < urls.length; i++)
+ {
+ URL url = urls[i];
+ buffer.append(",URL(").append(i).append(")=").append(url);
+ }
+ }
+ try
+ {
+ Class uclClass = Thread.currentThread().getContextClassLoader().loadClass("org.jboss.mx.loading.UnifiedClassLoader");
+ Class loaderClass = loader.getClass();
+ if (uclClass.isAssignableFrom(loaderClass))
+ {
+ URL url = (URL)loaderClass.getMethod("getURL", new Class[0]).invoke(loader, new Object[0]);
+ buffer.append(",GetURL=").append(url);
+ }
+ }
+ catch (Exception e)
+ {
+ log.error("Cannot get UCL infos", e);
+ }
+ buffer.append("]");
+ return buffer.toString();
+ }
+
+ public static String dumpClassLoaderHierarchyInfo(ClassLoader loader)
+ {
+ StringWriter writer = new StringWriter();
+ dumpClassLoaderHierarchyInfo(writer, loader);
+ return writer.toString();
+ }
+
+ public static void dumpClassLoaderHierarchyInfo(Writer writer, ClassLoader loader)
+ {
+ if (writer == null)
+ {
+ throw new IllegalArgumentException("no writer");
+ }
+ if (loader == null)
+ {
+ throw new IllegalArgumentException("no loader");
+ }
+
+ //
+ PrintWriter pw = null;
+ if (writer instanceof PrintWriter)
+ {
+ pw = (PrintWriter)writer;
+ }
+ else
+ {
+ pw = new PrintWriter(writer);
+ }
+
+ pw.println("<classloader-dump>");
+ while (loader != null)
+ {
+ pw.println(buildClassLoaderInfo(loader));
+ loader = loader.getParent();
+ }
+ pw.print("</classloader-dump>");
+ pw.flush();
+ }
+
+ public static void dumpClassLoaderHierarchyInfo(Logger log, ClassLoader loader)
+ {
+ Writer writer = new Log4JWriter(log, Level.DEBUG);
+ dumpClassLoaderHierarchyInfo(writer, loader);
+ }
+
+ public static void dumpClassLoaderHierarchyInfo(Logger log, Level level, ClassLoader loader)
+ {
+ Writer writer = new Log4JWriter(log, level);
+ dumpClassLoaderHierarchyInfo(writer, loader);
+ }
+
+ /**
+ * Replace occurence in a string.
+ *
+ * @param string the source string
+ * @param pattern the replaced pattern
+ * @param replacement the replacement text
+ * @return the new string
+ */
+ public static String replace(String string, String pattern, String replacement)
+ {
+ StringBuffer buffer = new StringBuffer(string.length());
+ int previous = 0;
+ int current = string.indexOf(pattern);
+ while (current != -1)
+ {
+ buffer.append(string.substring(previous, current));
+ buffer.append(replacement);
+ previous = current + pattern.length();
+ current = string.indexOf(pattern, previous);
+ }
+ buffer.append(string.substring(previous));
+ return buffer.toString();
+ }
+
+ /**
+ * Append an object to an array of objects. The original array is not modified. The returned array
+ * will be of the same component type of the provided array and its first n elements where n is the size
+ * of the provided array will be the elements of the provided array. The last element of the array will be
+ * the provided object to append.
+ *
+ * @param array the array to augment
+ * @param o the object to append
+ * @return a new array
+ * @throws IllegalArgumentException if the array is null
+ * @throws ClassCastException if the appended object class prevents it from being added to the array
+ */
+ public static <E> E[] appendTo(E[] array, E o) throws IllegalArgumentException, ClassCastException
+ {
+ if (array == null)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ //
+ Class componentType = array.getClass().getComponentType();
+ if (o != null && !componentType.isAssignableFrom(o.getClass()))
+ {
+ throw new ClassCastException("Object with class " + o.getClass().getName() + " cannot be casted to class " + componentType.getName());
+ }
+
+ //
+ E[] copy = (E[])Array.newInstance(componentType, array.length + 1);
+ System.arraycopy(array, 0, copy, 0, array.length);
+ copy[array.length] = o;
+
+ //
+ return copy;
+ }
+
+ /**
+ * Return true if
+ * <ul>
+ * <li>o1 is null and o2 is null</li<
+ * <li>o1 is not null and the invocation of <code>equals(Object o)</code> on o1 wit o2 as argument returns true</li>
+ * </ul>
+ *
+ * @param o1 the first argument
+ * @param o2 the second argument
+ * @return if arguments are equals according to the semantic defined by the method contract
+ */
+ public static boolean safeEquals(Object o1, Object o2)
+ {
+ if (o1 == null)
+ {
+ return o2 == null;
+ }
+ else
+ {
+ return o1.equals(o2);
+ }
+ }
+
+ public static String replaceAllInstancesOfBoundedString(String initial, String prefix, String suffix, String replacement)
+ {
+ return replaceBoundedString(initial, prefix, suffix, replacement, true, false);
+ }
+
+ /**
+ * Todo : define what "bounded" means.
+ *
+ * @param initial
+ * @param prefix
+ * @param suffix
+ * @param replacement
+ * @param replaceIfBoundedStringEmpty
+ * @param keepBoundaries
+ * @return
+ */
+ public static String replaceBoundedString(String initial, String prefix, String suffix, String replacement,
+ boolean replaceIfBoundedStringEmpty, boolean keepBoundaries)
+ {
+ if (initial == null || initial.length() == 0)
+ {
+ return initial;
+ }
+
+ ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(prefix, "prefix", "Tools.replaceBoundedString");
+ ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(suffix, "suffix", "Tools.replaceBoundedString");
+ ParameterValidation.throwIllegalArgExceptionIfNull(replacement, "replacement");
+
+ StringBuffer tmp = new StringBuffer(initial);
+ int prefixIndex = tmp.indexOf(prefix);
+ int suffixLength = suffix.length();
+ int prefixLength = prefix.length();
+
+ while (prefixIndex != -1)
+ {
+ int suffixIndex = tmp.indexOf(suffix, prefixIndex);
+
+ if (suffixIndex != -1)
+ {
+ // we don't care about empty bounded strings or prefix and suffix don't delimit an empty String => replace!
+ if (replaceIfBoundedStringEmpty || suffixIndex != prefixIndex + prefixLength)
+ {
+ if (keepBoundaries)
+ {
+ tmp.delete(prefixIndex + prefixLength, suffixIndex);
+ tmp.insert(prefixIndex + prefixLength, replacement);
+ }
+ else
+ {
+ tmp.delete(prefixIndex, suffixIndex + suffixLength);
+ tmp.insert(prefixIndex, replacement);
+ }
+ }
+ }
+
+ prefixIndex = tmp.indexOf(prefix, prefixIndex + prefixLength);
+ }
+
+ return tmp.toString();
+ }
+
+ /**
+ * Determines if value is contained in array.
+ *
+ * todo: correct this method contract in order to make it more reusable, it looks like for now like a method
+ * which has a contract convenient only for some kind of callers.
+ *
+ * 1/ null value should be accepted (or the method should be called isContainedInButNotForNullValue ?)
+ * 2/ null array should not be accepted (or the method should be called isContainedInExceptIfThePassedArrayIsNull ?)
+ *
+ * @param value
+ * @param array
+ * @return
+ * @since 2.4.2
+ */
+ public static boolean isContainedIn(Object value, Object[] array)
+ {
+ if (value == null)
+ {
+ return false;
+ }
+
+ //
+ if (array != null)
+ {
+ for (Object anArray : array)
+ {
+ if (value.equals(anArray))
+ {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Attempt to cast the value argument to the provided type argument. If the value argument type is assignable
+ * to the provided type, the value is returned, otherwise if it is not or the value is null, null is returned.
+ *
+ * todo: Move that to common package.
+ *
+ * @param value the value to cast
+ * @param type the type to downcast
+ * @return the casted value or null
+ */
+ public static <T> T safeCast(Object value, Class<T> type)
+ {
+ if (value == null)
+ {
+ return null;
+ }
+ else
+ {
+ if (type.isAssignableFrom(value.getClass()))
+ {
+ return type.cast(value);
+ }
+ else
+ {
+ return null;
+ }
+ }
+ }
+
+ public static <T> MultiValuedPropertyMap<T> emptyMultiValuedPropertyMap()
+ {
+ return new MultiValuedPropertyMap<T>()
+ {
+ public T getValue(String key) throws IllegalArgumentException
+ {
+ if (key == null)
+ {
+ throw new IllegalArgumentException("Key cannot be null");
+ }
+ return null;
+ }
+
+ public List<T> getValues(String key) throws IllegalArgumentException
+ {
+ if (key == null)
+ {
+ throw new IllegalArgumentException("Key cannot be null");
+ }
+ return null;
+ }
+
+ public void addValue(String key, T value) throws IllegalArgumentException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void setValue(String key, T value) throws IllegalArgumentException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public Set<String> keySet()
+ {
+ return Collections.emptySet();
+ }
+
+ public int size()
+ {
+ return 0;
+ }
+
+ public void clear()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void append(MultiValuedPropertyMap<T> appended) throws IllegalArgumentException
+ {
+ throw new UnsupportedOperationException();
+ }
+ };
+ }
+
+}
\ No newline at end of file
Added: modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/io/IOTools.java
===================================================================
--- modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/io/IOTools.java (rev 0)
+++ modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/io/IOTools.java 2008-02-22 23:26:34 UTC (rev 10091)
@@ -0,0 +1,497 @@
+/*
+* 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.
+*/
+
+package org.jboss.portal.test.framework.common.io;
+
+import org.jboss.portal.test.framework.common.Tools;
+import org.apache.log4j.Logger;
+
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.lang.reflect.InvocationTargetException;
+import java.io.OutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+import java.io.ByteArrayOutputStream;
+import java.io.Writer;
+import java.io.Serializable;
+import java.io.ObjectOutputStream;
+import java.io.ByteArrayInputStream;
+import java.io.ObjectInputStream;
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.DataOutputStream;
+import java.util.Map;
+
+/**
+ * IO tools.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class IOTools
+{
+
+ /** The logger. */
+ public static final Logger log = Logger.getLogger(IOTools.class);
+
+ /** . */
+ private static final Object[] EMPTY_ARGS = new Object[0];
+
+ /** . */
+ private static final Class[] EMPTY_PARAMETER_TYPES = new Class[0];
+
+ /**
+ * <p>Attempt to close an object. Null argument value is authorized and no operation will be performed in that
+ * use case.</p>
+ *
+ * <p>It will try to obtain a <code>close()</code> method by reflection and it
+ * will be invoked only if the method is public and not static. If the method is called, any <code>Error</code>
+ * or <code>RuntimeException</code> will be rethrown, any other kind of throwable will not be rethrown in any form.</p>
+ *
+ * @param closable the object to close
+ */
+ public static void safeClose(Object closable)
+ {
+ if (closable != null)
+ {
+ try
+ {
+ Method m = closable.getClass().getMethod("close", EMPTY_PARAMETER_TYPES);
+ if (Modifier.isStatic(m.getModifiers()))
+ {
+ log.warn("close() method on closable object is static");
+ return;
+ }
+ m.invoke(closable, EMPTY_ARGS);
+ }
+ catch (NoSuchMethodException e)
+ {
+ log.warn("The closable object does not have a close() method", e);
+ }
+ catch (IllegalAccessException e)
+ {
+ log.warn("Cannot access close() method on closable object", e);
+ }
+ catch (InvocationTargetException e)
+ {
+ Throwable t = e.getCause();
+
+ //
+ if (t instanceof RuntimeException)
+ {
+ log.error("The close() method threw a runtime exception", t);
+ throw (RuntimeException)t;
+ }
+ else if (t instanceof Error)
+ {
+ log.error("The close() method threw an error", t);
+ throw (Error)t;
+ }
+ else if (t instanceof Exception)
+ {
+ log.error("The close() method threw an exception", t);
+ }
+ else
+ {
+ log.error("The close() method threw an unexpected throwable", t);
+ }
+ }
+ }
+ }
+
+ /**
+ * <p>Attempt to close an <code>OutputStream</code>. Null argument value is authorized and no operation will be performed in that
+ * use case.</p>
+ *
+ * @param out the stream to close
+ */
+ public static void safeClose(OutputStream out)
+ {
+ if (out != null)
+ {
+ try
+ {
+ out.close();
+ }
+ catch (IOException e)
+ {
+ log.error("Error while closing outstream", e);
+ }
+ }
+ }
+
+ /**
+ * <p>Attempt to close an <code>InputStream</code>. Null argument value is authorized and no operation will be performed in that
+ * use case.</p>
+ *
+ * @param in the stream to close
+ */
+ public static void safeClose(InputStream in)
+ {
+ if (in != null)
+ {
+ try
+ {
+ in.close();
+ }
+ catch (IOException e)
+ {
+ log.error("Error while closing inputstream", e);
+ }
+ }
+ }
+
+ /**
+ * <p>Attempt to close an <code>Reader</code>. Null argument value is authorized and no operation will be performed in that
+ * use case.</p>
+ *
+ * @param reader the stream to close
+ */
+ public static void safeClose(Reader reader)
+ {
+ if (reader != null)
+ {
+ try
+ {
+ reader.close();
+ }
+ catch (IOException e)
+ {
+ log.error("Error while closing reader", e);
+ }
+ }
+ }
+
+ /**
+ * <p>Attempt to close an <code>Writer</code>. Null argument value is authorized and no operation will be performed in that
+ * use case.</p>
+ *
+ * @param writer the stream to close
+ */
+ public static void safeClose(Writer writer)
+ {
+ if (writer != null)
+ {
+ try
+ {
+ writer.close();
+ }
+ catch (IOException e)
+ {
+ log.error("Error while closing writer", e);
+ }
+ }
+ }
+
+ /**
+ * @see #getBytes(java.io.InputStream, int)
+ * @param in the input stream
+ * @return the bytes read from the stream
+ * @throws java.io.IOException
+ * @throws IllegalArgumentException if the input stream is null
+ */
+ public static byte[] getBytes(InputStream in) throws IOException, IllegalArgumentException
+ {
+ return getBytes(in, Tools.DEFAULT_BUFFER_SIZE);
+ }
+
+ /**
+ * Get the bytes from the provided input stream. No attempt will be made to close the stream.
+ *
+ * @param in the input stream
+ * @param bufferSize the buffer size used to copy the bytes
+ * @return the bytes read from the stream
+ * @throws java.io.IOException
+ * @throws IllegalArgumentException if the input stream is null or the buffer size < 1
+ */
+ public static byte[] getBytes(InputStream in, int bufferSize) throws IOException, IllegalArgumentException
+ {
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ copy(in, out, bufferSize);
+ return out.toByteArray();
+ }
+
+ /**
+ * @see #copy(java.io.InputStream, java.io.OutputStream, int)
+ * @param in the incoming stream
+ * @param out the outcoming stream
+ * @throws IllegalArgumentException if an argument is null
+ */
+ public static void copy(InputStream in, OutputStream out) throws IOException
+ {
+ copy(in, out, Tools.DEFAULT_BUFFER_SIZE);
+ }
+
+ /**
+ * Pipe an incoming stream in an outcoming stream until no bytes is available from the input stream.
+ * No attempts will be made to close the streams.
+ *
+ * @param in the incoming stream
+ * @param out the outcoming stream
+ * @param bufferSize the buffer size
+ * @throws IllegalArgumentException if bufferSize < 1 or an argument is null
+ */
+ public static void copy(InputStream in, OutputStream out, int bufferSize) throws IOException
+ {
+ // arguments check
+ if (in == null)
+ {
+ throw new IllegalArgumentException("null in");
+ }
+ if (out == null)
+ {
+ throw new IllegalArgumentException("null out");
+ }
+ if (bufferSize < 1)
+ {
+ throw new IllegalArgumentException("Buffer size is too small");
+ }
+
+ // do the job
+ byte[] buffer = new byte[bufferSize];
+ while (true)
+ {
+ int i = in.read(buffer);
+ if (i == 0)
+ {
+ continue;
+ }
+ if (i == -1)
+ {
+ break;
+ }
+ out.write(buffer, 0, i);
+ }
+ }
+
+ /**
+ * Pipe an input stream in an output stream.
+ *
+ * @param reader the incoming reader
+ * @param writer the outcoming writer
+ * @throws IllegalArgumentException if an argument is null
+ */
+ public static void copy(Reader reader, Writer writer) throws IOException
+ {
+ copy(reader, writer, Tools.DEFAULT_BUFFER_SIZE);
+ }
+
+ /**
+ * Pipe an incoming stream in an outcoming stream.
+ *
+ * @param reader the incoming reader
+ * @param writer the outcoming writer
+ * @param bufferSize the buffer size
+ * @throws IllegalArgumentException if bufferSize < 1 or an argument is null
+ */
+ public static void copy(Reader reader, Writer writer, int bufferSize) throws IOException
+ {
+ // arguments check
+ if (reader == null)
+ {
+ throw new IllegalArgumentException("null in");
+ }
+ if (writer == null)
+ {
+ throw new IllegalArgumentException("null out");
+ }
+ if (bufferSize < 1)
+ {
+ throw new IllegalArgumentException("Buffer size is too small");
+ }
+
+ // do the job
+ char[] buffer = new char[bufferSize];
+ while (true)
+ {
+ int i = reader.read(buffer);
+ if (i == 0)
+ {
+ continue;
+ }
+ if (i == -1)
+ {
+ break;
+ }
+ writer.write(buffer, 0, i);
+ }
+ }
+
+ /**
+ * Clone an object implementing the <code>Serializable</code> interface.
+ *
+ * @param serializable
+ * @return
+ * @throws IllegalArgumentException if the serializable object is null
+ * @throws IOException
+ */
+ public static <S extends Serializable> S clone(S serializable) throws IllegalArgumentException, IOException
+ {
+ if (serializable == null)
+ {
+ throw new IllegalArgumentException("Cannot clone null");
+ }
+ try
+ {
+ return (S)unserialize(serialize(serializable));
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new Error("Got a class not found exception for a class that was used", e);
+ }
+ }
+
+ public static byte[] serialize(Serializable serializable) throws IllegalArgumentException, IOException
+ {
+ if (serializable == null)
+ {
+ throw new IllegalArgumentException("No null serializable accepted");
+ }
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ObjectOutputStream oos = new ObjectOutputStream(baos);
+ oos.writeObject(serializable);
+ oos.close();
+ return baos.toByteArray();
+ }
+
+ public static Serializable unserialize(byte[] bytes) throws IllegalArgumentException, IOException, ClassNotFoundException
+ {
+ if (bytes == null)
+ {
+ throw new IllegalArgumentException("No null serializable accepted");
+ }
+ ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
+ ObjectInputStream ois = new ObjectInputStream(bais);
+ return (Serializable)ois.readObject();
+ }
+
+ public static <T> byte[] serialize(Serialization<T> serialization, T t)
+ {
+ return serialize(serialization, SerializationFilter.TRIVIAL, t);
+ }
+
+ public static <T> byte[] serialize(Serialization<T> serialization, SerializationFilter filter, T t)
+ {
+ if (serialization == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (t == null)
+ {
+ throw new IllegalArgumentException("No null object to serialize");
+ }
+ try
+ {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ filter.serialize(serialization, t, baos);
+ return baos.toByteArray();
+ }
+ catch (IOException e)
+ {
+ throw new UndeclaredIOException(e);
+ }
+ }
+
+ public static <T> T unserialize(Serialization<T> serialization, byte[] bytes)
+ {
+ return unserialize(serialization, SerializationFilter.TRIVIAL, bytes);
+ }
+
+ public static <T> T unserialize(Serialization<T> serialization, SerializationFilter filter, byte[] bytes)
+ {
+ if (serialization == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (bytes == null)
+ {
+ throw new IllegalArgumentException("No null bytes to unserialize");
+ }
+ try
+ {
+ ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
+ return filter.unserialize(serialization, bais);
+ }
+ catch (IOException e)
+ {
+ throw new UndeclaredIOException(e);
+ }
+ }
+
+ /**
+ * Check that the provided input stream is buffered. If the argument is already an instance of <code>BufferedInputStream</code>
+ * no operation will be performed, otherwise a instance of <code>BufferedInputStream</code> will be created and returned.
+ *
+ * If the provided argument is null, the null value is returned.
+ *
+ * @param in the stream
+ * @return a buffered wrapper
+ */
+ public static BufferedInputStream safeBufferedWrapper(InputStream in)
+ {
+ if (in != null)
+ {
+ if (in instanceof BufferedInputStream)
+ {
+ return (BufferedInputStream)in;
+ }
+ else
+ {
+ return new BufferedInputStream(in);
+ }
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ /**
+ * Check that the provided output stream is buffered. If the argument is already an instance of <code>BufferedOutputStream</code>
+ * no operation will be performed, otherwise a instance of <code>BufferedOutputStream</code> will be created and returned.
+ *
+ * If the provided argument is null, the null value is returned.
+ *
+ * @param out the stream
+ * @return a buffered wrapper
+ */
+ public static BufferedOutputStream safeBufferedWrapper(OutputStream out)
+ {
+ if (out != null)
+ {
+ if (out instanceof BufferedOutputStream)
+ {
+ return (BufferedOutputStream)out;
+ }
+ else
+ {
+ return new BufferedOutputStream(out);
+ }
+ }
+ else
+ {
+ return null;
+ }
+ }
+}
Added: modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/io/Serialization.java
===================================================================
--- modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/io/Serialization.java (rev 0)
+++ modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/io/Serialization.java 2008-02-22 23:26:34 UTC (rev 10091)
@@ -0,0 +1,121 @@
+/*
+* 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.
+*/
+
+package org.jboss.portal.test.framework.common.io;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.DataInputStream;
+import java.io.OutputStream;
+import java.io.InputStream;
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public interface Serialization<T>
+{
+
+ Serialization<Map<String, String[]>> PARAMETER_MAP = new Serialization<Map<String, String[]>>()
+ {
+ public void serialize(Map<String, String[]> map, OutputStream out) throws IOException, IllegalArgumentException
+ {
+ if (map == null)
+ {
+ throw new IllegalArgumentException("No null map allowed");
+ }
+
+ //
+ DataOutputStream data = out instanceof DataOutputStream ? (DataOutputStream)out : new DataOutputStream(out);
+
+ //
+ data.writeInt(map.size());
+
+ //
+ for (Map.Entry entry : map.entrySet())
+ {
+ String name = (String)entry.getKey();
+ data.writeUTF(name);
+
+ //
+ String[] values = (String[])entry.getValue();
+ if (values == null)
+ {
+ throw new IllegalArgumentException("No null values are allowed in the map");
+ }
+
+ //
+ int length = values.length;
+ data.writeInt(length);
+
+ //
+ for (String value : values)
+ {
+ if (value == null)
+ {
+ throw new IllegalArgumentException("No null value in the String[] are allowed in the map");
+ }
+ data.writeUTF(value);
+ }
+ }
+
+ //
+ data.flush();
+ }
+
+ public Map<String, String[]> unserialize(InputStream in) throws IOException
+ {
+ if (in == null)
+ {
+ throw new IllegalArgumentException("No null input stream");
+ }
+
+ //
+ DataInputStream data = in instanceof DataInputStream ? (DataInputStream)in : new DataInputStream(in);
+
+ //
+ int size = data.readInt();
+ Map<String, String[]> tmp = new HashMap<String, String[]>(size);
+ while (size-- > 0)
+ {
+ String name = data.readUTF();
+ int length = data.readInt();
+ String[] values = new String[length];
+ for (int i = 0;i < length;i++)
+ {
+ values[i] = data.readUTF();
+ }
+ tmp.put(name, values);
+ }
+
+ //
+ return tmp;
+ }
+ };
+
+ public abstract void serialize(T t, OutputStream out) throws IOException, IllegalArgumentException;
+
+ public abstract T unserialize(InputStream in) throws IOException, IllegalArgumentException;
+
+}
Added: modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/io/SerializationFilter.java
===================================================================
--- modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/io/SerializationFilter.java (rev 0)
+++ modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/io/SerializationFilter.java 2008-02-22 23:26:34 UTC (rev 10091)
@@ -0,0 +1,77 @@
+/*
+* 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.
+*/
+
+package org.jboss.portal.test.framework.common.io;
+
+import java.io.OutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.zip.GZIPOutputStream;
+import java.util.zip.GZIPInputStream;
+
+/**
+ * Filters a stream for serialize/unserialize operations.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public interface SerializationFilter
+{
+
+ SerializationFilter TRIVIAL = new SerializationFilter()
+ {
+ public <T> void serialize(Serialization<T> serialization, T t, OutputStream out) throws IllegalArgumentException, IOException
+ {
+ serialization.serialize(t, out);
+ }
+
+ public <T> T unserialize(Serialization<T> serialization, InputStream in) throws IllegalArgumentException, IOException
+ {
+ return serialization.unserialize(in);
+ }
+ };
+
+ /**
+ * Use GZIP streams.
+ */
+ SerializationFilter COMPRESSOR = new SerializationFilter()
+ {
+ public <T> void serialize(Serialization<T> serialization, T t, OutputStream out) throws IllegalArgumentException, IOException
+ {
+ GZIPOutputStream zos = new GZIPOutputStream(out);
+ serialization.serialize(t, zos);
+ zos.finish();
+ }
+
+ public <T> T unserialize(Serialization<T> serialization, InputStream in) throws IllegalArgumentException, IOException
+ {
+ GZIPInputStream zis = new GZIPInputStream(in);
+ return serialization.unserialize(zis);
+ }
+ };
+
+ <T> void serialize(Serialization<T> serialization, T t, OutputStream out) throws IllegalArgumentException, IOException;
+
+ <T> T unserialize(Serialization<T> serialization, InputStream in) throws IllegalArgumentException, IOException;
+
+}
+
Added: modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/io/UndeclaredIOException.java
===================================================================
--- modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/io/UndeclaredIOException.java (rev 0)
+++ modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/io/UndeclaredIOException.java 2008-02-22 23:26:34 UTC (rev 10091)
@@ -0,0 +1,45 @@
+/*
+* 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.
+*/
+
+package org.jboss.portal.test.framework.common.io;
+
+import java.io.IOException;
+import java.lang.reflect.UndeclaredThrowableException;
+
+/**
+ * Avoid a method to declare an IOException in its signature when it is not necessary.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 7228 $
+ */
+public class UndeclaredIOException extends UndeclaredThrowableException
+{
+ public UndeclaredIOException(IOException undeclaredIOException)
+ {
+ super(undeclaredIOException);
+ }
+
+ public UndeclaredIOException(IOException undeclaredIOException, String s)
+ {
+ super(undeclaredIOException, s);
+ }
+}
\ No newline at end of file
Added: modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/xml/TooManyElementException.java
===================================================================
--- modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/xml/TooManyElementException.java (rev 0)
+++ modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/xml/TooManyElementException.java 2008-02-22 23:26:34 UTC (rev 10091)
@@ -0,0 +1,52 @@
+/*
+* 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.
+*/
+
+package org.jboss.portal.test.framework.common.xml;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 7380 $
+ */
+public class TooManyElementException extends RuntimeException
+{
+ /** The serialVersionUID */
+ private static final long serialVersionUID = -2381186243988987102L;
+
+ public TooManyElementException()
+ {
+ }
+
+ public TooManyElementException(String message)
+ {
+ super(message);
+ }
+
+ public TooManyElementException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public TooManyElementException(Throwable cause)
+ {
+ super(cause);
+ }
+}
\ No newline at end of file
Added: modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/xml/XMLTools.java
===================================================================
--- modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/xml/XMLTools.java (rev 0)
+++ modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/common/xml/XMLTools.java 2008-02-22 23:26:34 UTC (rev 10091)
@@ -0,0 +1,469 @@
+/*
+* 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.
+*/
+
+package org.jboss.portal.test.framework.common.xml;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.Text;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import java.io.IOException;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Properties;
+import java.util.NoSuchElementException;
+
+/**
+ * Utilities for dealing with XML.
+ *
+ * @author <a href="mailto:mholzner@novell.com">Martin Holzner</a>
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 7686 $
+ */
+public class XMLTools
+{
+
+ /** Namespace URI for XML lang. */
+ public static final String XML_LANG_NAMESPACE_URI = "http://www.w3.org/XML/1998/namespace";
+
+ /** Document builder factory. */
+ private static final DocumentBuilderFactory buildFactory = DocumentBuilderFactory.newInstance();
+
+ /** Transformer factory. */
+ private static final TransformerFactory transformerFactory = TransformerFactory.newInstance();
+
+ /** Default output format which is : no xml declaration, no document type, indent. */
+ private static Properties DEFAULT_FORMAT = createFormat(true, false, true, "utf-8");
+
+ /** . */
+ public static final String PARAM_YES = "yes";
+
+ /** . */
+ public static final String PARAM_NO = "no";
+
+ /** . */
+ public static final String ATTRIB_OMIT_XML_DECLARATION = "omit-xml-declaration";
+
+ /** . */
+ public static final String ATTRIB_CDATA_SECTION_ELEMENTS = "cdata-section-elements";
+
+ /** . */
+ public static final String ATTRIB_METHOD = "method";
+
+ /** . */
+ public static final String ATTRIB_INDENT = "indent";
+
+ /** . */
+ public static final String ATTRIB_HREF = "href";
+
+ /** . */
+ public static final String DIRECTIVE_IMPORT = "xsl:import";
+
+ /** . */
+ public static final String DIRECTIVE_INCLUDE = "xsl:include";
+
+ /** . */
+ public static final boolean DEFAULT_NAMESPACE_AWARE = true;
+
+ /** . */
+ public static final boolean DEFAULT_VALIDATION = false;
+
+ /** prevent instantiation */
+ private XMLTools()
+ {
+ }
+
+ /** Return the builder factory. */
+ public static DocumentBuilderFactory getDocumentBuilderFactory()
+ {
+ return buildFactory;
+ }
+
+ /**
+ *
+ */
+ private static Properties createFormat(boolean omitXMLDeclaration, boolean standalone, boolean indented, String encoding)
+ {
+ Properties format = new Properties();
+ format.setProperty(OutputKeys.OMIT_XML_DECLARATION, omitXMLDeclaration ? "yes" : "no");
+ format.setProperty(OutputKeys.STANDALONE, standalone ? "yes" : "no");
+ format.setProperty(OutputKeys.INDENT, indented ? "yes" : "no");
+ format.setProperty(OutputKeys.ENCODING, encoding);
+ return format;
+ }
+
+ /**
+ *
+ */
+ public static String toString(Document doc, boolean omitXMLDeclaration, boolean standalone, boolean indented, String encoding) throws TransformerException
+ {
+ Properties format = createFormat(omitXMLDeclaration, standalone, indented, encoding);
+ return toString(doc, format);
+ }
+
+ /**
+ * Serialize the document with the default format : - No XML declaration - Indented - Encoding is UTF-8
+ *
+ * @see #toString(Document,Properties)
+ */
+ public static String toString(Document doc) throws TransformerException
+ {
+ return toString(doc, DEFAULT_FORMAT);
+ }
+
+ /** @see #toString(Document) */
+ public static String toString(Element element) throws ParserConfigurationException, TransformerException
+ {
+ return toString(element, DEFAULT_FORMAT);
+ }
+
+ /** Converts an element to a String representation. */
+ private static String toString(Element element, Properties properties) throws ParserConfigurationException, TransformerException
+ {
+ Document doc = buildFactory.newDocumentBuilder().newDocument();
+ element = (Element)doc.importNode(element, true);
+ doc.appendChild(element);
+ return toString(doc, properties);
+ }
+
+ /** Converts an document to a String representation. */
+ private static String toString(Document doc, Properties format) throws TransformerException
+ {
+ Transformer transformer = transformerFactory.newTransformer();
+ transformer.setOutputProperties(format);
+ StringWriter writer = new StringWriter();
+ Source source = new DOMSource(doc);
+ Result result = new StreamResult(writer);
+ transformer.transform(source, result);
+ return writer.toString();
+ }
+
+ /** Parse a string into a document. */
+ public static Document toDocument(String text) throws ParserConfigurationException, SAXException, IOException
+ {
+ DocumentBuilder builder = buildFactory.newDocumentBuilder();
+ StringReader reader = new StringReader(text);
+ InputSource source = new InputSource();
+ source.setCharacterStream(reader);
+ return builder.parse(source);
+ }
+
+ /** Parse a string into an element. */
+ public static Element toElement(String text) throws ParserConfigurationException, SAXException, IOException
+ {
+ Document doc = toDocument(text);
+ return doc.getDocumentElement();
+ }
+
+ public static Document toDocument(Element element) throws ParserConfigurationException, SAXException, IOException
+ {
+ if (element == null)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ //
+ Document doc = buildFactory.newDocumentBuilder().newDocument();
+ element = (Element)doc.importNode(element, true);
+ doc.appendChild(element);
+ return doc;
+ }
+
+ /**
+ * Perform trimming by default
+ *
+ * @param element
+ * @return
+ * @throws IllegalArgumentException
+ * @see #asString(org.w3c.dom.Element,boolean)
+ */
+ public static String asString(Element element) throws IllegalArgumentException
+ {
+ return asString(element, true);
+ }
+
+ /**
+ * Get the element's content as a string.
+ *
+ * @param element the container
+ * @param trim true if text should be trimmed before returning result
+ * @throws IllegalArgumentException if the element content is mixed or null
+ */
+ public static String asString(Element element, boolean trim) throws IllegalArgumentException
+ {
+ if (element == null)
+ {
+ throw new IllegalArgumentException("No null element allowed");
+ }
+
+ //
+ StringBuffer buffer = new StringBuffer();
+ NodeList children = element.getChildNodes();
+ for (int i = 0; i < children.getLength(); i++)
+ {
+ Node child = children.item(i);
+ switch (child.getNodeType())
+ {
+ case Node.CDATA_SECTION_NODE:
+ case Node.TEXT_NODE:
+ buffer.append(((Text)child).getData());
+ break;
+ case Node.ELEMENT_NODE:
+ throw new IllegalArgumentException("Mixed content not allowed");
+ default:
+ break;
+ }
+ }
+ String result = buffer.toString();
+ if (trim)
+ {
+ result = result.trim();
+ }
+ return result;
+ }
+
+ /**
+ * Return the optional unique child of an element.
+ *
+ * @param element the parent element
+ * @param strict true if the element must be present
+ * @return the child element or null if it does not exist and strict is false
+ * @throws IllegalArgumentException if an argument is null
+ * @throws java.util.NoSuchElementException if strict is true and the element is not present
+ * @throws TooManyElementException if more than one element is found
+ */
+ public static Element getUniqueChild(Element element, boolean strict) throws IllegalArgumentException,
+ NoSuchElementException, TooManyElementException
+ {
+ if (element == null)
+ {
+ throw new IllegalArgumentException("No element specified");
+ }
+ Element childElt = null;
+ NodeList list = element.getChildNodes();
+ for (int i = 0; i < list.getLength(); i++)
+ {
+ Node childNode = list.item(i);
+ if (childNode instanceof Element)
+ {
+ if (childElt == null)
+ {
+ childElt = (Element)childNode;
+ }
+ else
+ {
+ throw new TooManyElementException("More than one child element for element " + element.getNodeName());
+ }
+ }
+ }
+ if (strict && childElt == null)
+ {
+ throw new NoSuchElementException("No child element for element " + element.getNodeName());
+ }
+ return childElt;
+ }
+
+ /**
+ * Return an optional child of an element with the specified name.
+ *
+ * @param element the parent element
+ * @param name the child name
+ * @param strict if the child must be present
+ * @return the child element or null if it does not exist and strict is set to false
+ * @throws IllegalArgumentException if an argument is null
+ * @throws NoSuchElementException if strict is true and the element is not present
+ * @throws TooManyElementException if more than one element is found
+ */
+ public static Element getUniqueChild(Element element, String name, boolean strict) throws IllegalArgumentException,
+ NoSuchElementException, TooManyElementException
+ {
+ return getUniqueChild(element, null, name, strict);
+ }
+
+ /**
+ * Return an optional child of an element with the specified name and the optionally specified namespace uri.
+ *
+ * @param element the parent element
+ * @param name the child name
+ * @param uri the child uri
+ * @param strict if the child must be present
+ * @return the child element or null if it does not exist and strict is set to false
+ * @throws IllegalArgumentException if an argument is null
+ * @throws NoSuchElementException if strict is true and the element is not present
+ * @throws TooManyElementException if more than one element is found
+ */
+ public static Element getUniqueChild(Element element, String uri, String name, boolean strict) throws IllegalArgumentException,
+ NoSuchElementException, TooManyElementException
+ {
+ List list = getChildren(element, uri, name);
+ switch (list.size())
+ {
+ case 0:
+ if (strict)
+ {
+ throw new NoSuchElementException("Missing child " + name + " of element " + element.getNodeName());
+ }
+ else
+ {
+ return null;
+ }
+ case 1:
+ return (Element)list.get(0);
+ default:
+ throw new TooManyElementException("Too many children for element " + element.getNodeName());
+ }
+ }
+
+ /**
+ * Return an iterator for all the children of the given element having the specified name.
+ *
+ * @param element the parent element
+ * @param name the child names
+ * @return an iterator for the designated elements
+ * @throws IllegalArgumentException if the element is null or the name is null
+ */
+ public static Iterator<Element> getChildrenIterator(Element element, String name) throws IllegalArgumentException
+ {
+ return getChildren(element, name).iterator();
+ }
+
+ /**
+ * Return an iterator for all the children of the given element having the specified name and the optionally
+ * specified namesspace uri.
+ *
+ * @param element the parent element
+ * @param uri the children uri
+ * @param name the children name
+ * @return an iterator for the designated elements
+ * @throws IllegalArgumentException if the element is null or the name is null
+ */
+ public static Iterator<Element> getChildrenIterator(Element element, String uri, String name) throws IllegalArgumentException
+ {
+ return getChildren(element, uri, name).iterator();
+ }
+
+ /**
+ * Return all the children of the given element having the specified name. The collection object can be modified.
+ *
+ * @param element the parent element
+ * @param name the child names
+ * @return a list of elements
+ * @throws IllegalArgumentException if the element is null or the name is null
+ */
+ public static List<Element> getChildren(Element element, String name) throws IllegalArgumentException
+ {
+ return getChildren(element, null, name);
+ }
+
+ /**
+ * Return all the children of the given element having the specified name and the optionally specified namespace URI.
+ * The collection object can be modified.
+ *
+ * @param element the parent element
+ * @param uri the children uri
+ * @param name the children name
+ * @return a list of elements
+ * @throws IllegalArgumentException if the element is null or the name is null
+ */
+ public static List<Element> getChildren(Element element, String uri, String name) throws IllegalArgumentException
+ {
+ if (element == null)
+ {
+ throw new IllegalArgumentException("No element found");
+ }
+ if (name == null)
+ {
+ throw new IllegalArgumentException("No name specified");
+ }
+ ArrayList<Element> result = new ArrayList<Element>();
+ NodeList list = element.getChildNodes();
+ for (int i = 0; i < list.getLength(); i++)
+ {
+ Node node = list.item(i);
+ if (node.getNodeType() == Node.ELEMENT_NODE)
+ {
+ Element childElt = (Element)node;
+
+ //
+ if (uri == null)
+ {
+ if (childElt.getTagName().equals(name))
+ {
+ result.add(childElt);
+ }
+ }
+ else if (uri.equals(childElt.getNamespaceURI()))
+ {
+ if (childElt.getLocalName().equals(name))
+ {
+ result.add(childElt);
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ public static Properties loadXMLProperties(Element propertiesElt)
+ {
+ if (propertiesElt == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ Properties props = new Properties();
+ for (Element entryElt : getChildren(propertiesElt, "entry"))
+ {
+ String key = entryElt.getAttribute("key");
+ String value = asString(entryElt);
+ props.put(key, value);
+ }
+ return props;
+ }
+
+ public static Properties loadXMLProperties(Document doc)
+ {
+ if (doc == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ return loadXMLProperties(doc.getDocumentElement());
+ }
+
+}
\ No newline at end of file
Modified: modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/embedded/DSConfig.java
===================================================================
--- modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/embedded/DSConfig.java 2008-02-22 16:28:22 UTC (rev 10090)
+++ modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/embedded/DSConfig.java 2008-02-22 23:26:34 UTC (rev 10091)
@@ -23,10 +23,10 @@
package org.jboss.portal.test.framework.embedded;
-import org.jboss.portal.common.xml.XMLTools;
-import org.jboss.portal.common.io.IOTools;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
+import org.jboss.portal.test.framework.common.xml.XMLTools;
+import org.jboss.portal.test.framework.common.io.IOTools;
import java.io.InputStream;
import java.net.URL;
Modified: modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/embedded/DataSourceSupport.java
===================================================================
--- modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/embedded/DataSourceSupport.java 2008-02-22 16:28:22 UTC (rev 10090)
+++ modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/embedded/DataSourceSupport.java 2008-02-22 23:26:34 UTC (rev 10091)
@@ -23,10 +23,10 @@
package org.jboss.portal.test.framework.embedded;
-import org.jboss.portal.common.xml.XMLTools;
-import org.jboss.portal.common.io.IOTools;
import org.jboss.resource.adapter.jdbc.local.LocalTxDataSource;
import org.jboss.resource.connectionmanager.CachedConnectionManagerReference;
+import org.jboss.portal.test.framework.common.xml.XMLTools;
+import org.jboss.portal.test.framework.common.io.IOTools;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
Modified: modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/embedded/HibernateSupport.java
===================================================================
--- modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/embedded/HibernateSupport.java 2008-02-22 16:28:22 UTC (rev 10090)
+++ modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/embedded/HibernateSupport.java 2008-02-22 23:26:34 UTC (rev 10091)
@@ -31,8 +31,8 @@
import org.hibernate.cfg.Configuration;
import org.hibernate.cfg.Settings;
import org.hibernate.tool.hbm2ddl.SchemaExport;
-import org.jboss.portal.common.xml.XMLTools;
-import org.jboss.portal.common.io.IOTools;
+import org.jboss.portal.test.framework.common.xml.XMLTools;
+import org.jboss.portal.test.framework.common.io.IOTools;
import org.w3c.dom.Element;
import org.w3c.dom.Document;
import org.jboss.logging.Logger;
Modified: modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/impl/generic/config/ServerConfig.java
===================================================================
--- modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/impl/generic/config/ServerConfig.java 2008-02-22 16:28:22 UTC (rev 10090)
+++ modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/impl/generic/config/ServerConfig.java 2008-02-22 23:26:34 UTC (rev 10091)
@@ -24,8 +24,8 @@
import org.w3c.dom.Element;
import org.w3c.dom.Document;
-import org.jboss.portal.common.xml.XMLTools;
-import org.jboss.portal.common.io.IOTools;
+import org.jboss.portal.test.framework.common.io.IOTools;
+import org.jboss.portal.test.framework.common.xml.XMLTools;
import java.net.URL;
import java.util.Iterator;
Modified: modules/test/trunk/tooling/ant/pom.xml
===================================================================
--- modules/test/trunk/tooling/ant/pom.xml 2008-02-22 16:28:22 UTC (rev 10090)
+++ modules/test/trunk/tooling/ant/pom.xml 2008-02-22 23:26:34 UTC (rev 10091)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.unit</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.0.Beta2</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/test/trunk/tooling/core/pom.xml
===================================================================
--- modules/test/trunk/tooling/core/pom.xml 2008-02-22 16:28:22 UTC (rev 10090)
+++ modules/test/trunk/tooling/core/pom.xml 2008-02-22 23:26:34 UTC (rev 10091)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.unit</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.0.Beta2</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/test/trunk/tooling/examples/maven2/pom.xml
===================================================================
--- modules/test/trunk/tooling/examples/maven2/pom.xml 2008-02-22 16:28:22 UTC (rev 10090)
+++ modules/test/trunk/tooling/examples/maven2/pom.xml 2008-02-22 23:26:34 UTC (rev 10091)
@@ -11,7 +11,7 @@
<dependency>
<groupId>org.jboss.unit</groupId>
<artifactId>jboss-unit</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.0.Beta2</version>
</dependency>
</dependencies>
@@ -39,7 +39,7 @@
<plugin>
<groupId>org.jboss.unit</groupId>
<artifactId>jboss-unit-tooling-maven2</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.0.Beta2</version>
<executions>
<execution>
<phase>test</phase>
Modified: modules/test/trunk/tooling/maven2/pom.xml
===================================================================
--- modules/test/trunk/tooling/maven2/pom.xml 2008-02-22 16:28:22 UTC (rev 10090)
+++ modules/test/trunk/tooling/maven2/pom.xml 2008-02-22 23:26:34 UTC (rev 10091)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.unit</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.0.Beta2</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/test/trunk/tooling/pom.xml
===================================================================
--- modules/test/trunk/tooling/pom.xml 2008-02-22 16:28:22 UTC (rev 10090)
+++ modules/test/trunk/tooling/pom.xml 2008-02-22 23:26:34 UTC (rev 10091)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.unit</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.0.Beta2</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -11,7 +11,7 @@
<artifactId>jboss-unit-tooling-aggregator</artifactId>
<packaging>pom</packaging>
<name>JBoss Unit Tooling (aggregator)</name>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.0.Beta2</version>
<modules>
<module>core</module>
<module>ant</module>
Modified: modules/test/trunk/unit/pom.xml
===================================================================
--- modules/test/trunk/unit/pom.xml 2008-02-22 16:28:22 UTC (rev 10090)
+++ modules/test/trunk/unit/pom.xml 2008-02-22 23:26:34 UTC (rev 10091)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.unit</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.0.Beta2</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -17,7 +17,7 @@
<groupId>junit</groupId>
</dependency>
</dependencies>
-
+
<build>
<plugins>
<plugin>
16 years, 7 months
JBoss Portal SVN: r10090 - in branches/JBoss_Portal_Branch_2_7: core and 22 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-02-22 11:28:22 -0500 (Fri, 22 Feb 2008)
New Revision: 10090
Removed:
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/tck/
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/test/
Modified:
branches/JBoss_Portal_Branch_2_7/build/build-thirdparty.xml
branches/JBoss_Portal_Branch_2_7/core-cms/.classpath
branches/JBoss_Portal_Branch_2_7/core-cms/src/main/org/jboss/portal/core/cms/CMSObjectCommandFactoryService.java
branches/JBoss_Portal_Branch_2_7/core-identity/.classpath
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/impl/IdentityCommandFactoryService.java
branches/JBoss_Portal_Branch_2_7/core-samples/.classpath
branches/JBoss_Portal_Branch_2_7/core-search/src/main/org/jboss/portal/core/search/service/SearchResultCommandFactoryService.java
branches/JBoss_Portal_Branch_2_7/core/.classpath
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/controller/node/EventBroadcasterInterceptor.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/HeaderInterceptor.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerResponseFactory.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/deployment/jboss/PortletAppDeployment.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/api/node/AbstractPortalNodeURL.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/instance/InstanceSecurityInterceptor.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/instance/command/action/InvokePortletInstanceActionCommand.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowActionCommand.java
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFInvocation.java
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFRenderContext.java
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletActionEvent.java
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletRenderEvent.java
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/framework/support/TestPortletInvocationContext.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/MarkupTestCase.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/ActionContextRequestContext.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/ActionHandler.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/RenderHandler.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/RequestPrecursor.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/WSRPConsumerImpl.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/ActionRequestProcessor.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/MarkupHandler.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPActionContext.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPRequestContext.java
Log:
Started to move to the new API.
Build is *broken* it is expected
Modified: branches/JBoss_Portal_Branch_2_7/build/build-thirdparty.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/build/build-thirdparty.xml 2008-02-22 15:19:14 UTC (rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/build/build-thirdparty.xml 2008-02-22 16:28:22 UTC (rev 10090)
@@ -47,10 +47,10 @@
are pushed to the http://repository.jboss.com site.
-->
- <componentref name="jboss-portal/modules/common" version="1.1.0"/>
- <componentref name="jboss-portal/modules/web" version="1.1.0"/>
+ <componentref name="jboss-portal/modules/common" version="trunk-SNAPSHOT"/>
+ <componentref name="jboss-portal/modules/web" version="trunk-SNAPSHOT"/>
<componentref name="jboss-portal/modules/test" version="1.0.1"/>
- <componentref name="jboss-portal/modules/portlet" version="1.0.1"/>
+ <componentref name="jboss-portal/modules/portlet" version="trunk-SNAPSHOT"/>
<componentref name="jboss-portal/modules/identity" version="1.0.1"/>
<componentref name="antlr" version="2.7.6.ga"/>
<componentref name="apache-ant" version="1.6.5"/>
@@ -120,6 +120,7 @@
<componentref name="wutka-dtdparser" version="1.2.1"/>
<componentref name="portals-bridges" version="1.0.3"/>
<componentref name="tagsoup" version="1.2"/>
+ <componentref name="portlet" version="2.0-Draft32"/>
<!-- For the presentation branch only, not the mainstream branch -->
Modified: branches/JBoss_Portal_Branch_2_7/core/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/.classpath 2008-02-22 15:19:14 UTC (rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/core/.classpath 2008-02-22 16:28:22 UTC (rev 10090)
@@ -44,7 +44,7 @@
<classpathentry combineaccessrules="false" kind="src" path="/portlet-server"/>
<classpathentry kind="lib" path="/thirdparty/apache-xerces/lib/xml-apis.jar"/>
<classpathentry kind="lib" path="/thirdparty/freemarker/lib/freemarker.jar"/>
- <classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-lib.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-lib.jar" sourcepath="/module-common"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/web/lib/portal-web-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-portal-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/identity/lib/portal-identity-lib.jar"/>
@@ -55,6 +55,7 @@
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/test/lib/portal-test-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-federation-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-jsr168api-lib.jar"/>
- <classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar" sourcepath="/module-portlet"/>
+ <classpathentry kind="lib" path="/thirdparty/portlet/lib/portlet-api.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java 2008-02-22 15:19:14 UTC (rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java 2008-02-22 16:28:22 UTC (rev 10090)
@@ -53,7 +53,7 @@
import org.jboss.portal.core.model.portal.command.view.ViewPortalCommand;
import org.jboss.portal.core.theme.PageRendition;
import org.jboss.portal.identity.User;
-import org.jboss.portal.portlet.PortletParametersStateString;
+import org.jboss.portal.portlet.ParametersStateString;
import org.jboss.portal.security.PortalSecurityException;
import org.jboss.portal.security.spi.auth.PortalAuthorizationManager;
import org.jboss.portal.security.spi.auth.PortalAuthorizationManagerFactory;
@@ -235,7 +235,7 @@
if (isDashboard)
{
// Edit page
- PortletParametersStateString navState = new PortletParametersStateString();
+ ParametersStateString navState = ParametersStateString.create();
navState.setValue("editPageSelect", pageName);
InvokePortletInstanceRenderCommand command = new InvokePortletInstanceRenderCommand("DashboardConfigPortletInstance", navState);
rd.setAttribute("org.jboss.portal.header.EDIT_DASHBOARD_URL", new PortalURLImpl(command, controllerCtx, null, null));
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/controller/node/EventBroadcasterInterceptor.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/controller/node/EventBroadcasterInterceptor.java 2008-02-22 15:19:14 UTC (rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/controller/node/EventBroadcasterInterceptor.java 2008-02-22 16:28:22 UTC (rev 10090)
@@ -35,6 +35,7 @@
import org.jboss.portal.api.node.event.WindowRenderEvent;
import org.jboss.portal.common.invocation.InvocationException;
import org.jboss.portal.common.util.LazyMap;
+import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.core.controller.CommandRedirectionException;
import org.jboss.portal.core.controller.ControllerCommand;
import org.jboss.portal.core.controller.ControllerInterceptor;
@@ -50,8 +51,7 @@
import org.jboss.portal.core.model.portal.command.render.RenderWindowCommand;
import org.jboss.portal.core.model.portal.navstate.WindowNavigationalState;
import org.jboss.portal.core.navstate.NavigationalStateKey;
-import org.jboss.portal.portlet.PortletParameters;
-import org.jboss.portal.portlet.PortletParametersStateString;
+import org.jboss.portal.portlet.ParametersStateString;
import org.jboss.portal.portlet.StateString;
import java.util.Map;
@@ -146,10 +146,10 @@
Map params = wae.getParameters();
//
- PortletParameters interactionParams;
+ ParameterMap interactionParams;
if (params instanceof ActionParameterMap)
{
- interactionParams = (PortletParameters)((ActionParameterMap)params).createDelegate();
+ interactionParams = (ParameterMap)((ActionParameterMap)params).createDelegate();
}
else
{
@@ -164,7 +164,7 @@
mode,
windowState,
null,
- new PortletParametersStateString(interactionParams),
+ ParametersStateString.create(interactionParams),
null);
}
}
@@ -174,8 +174,8 @@
//
Map params = wne.getParameters();
- PortletParameters navigationalParams = asParameters(params);
- StateString state = navigationalParams != null ? new PortletParametersStateString(navigationalParams) : null;
+ ParameterMap navigationalParams = asParameters(params);
+ StateString state = navigationalParams != null ? ParametersStateString.create(navigationalParams) : null;
//
return new InvokePortletWindowRenderCommand(nodeRef, mode, windowState, state);
@@ -205,13 +205,13 @@
InvokePortletWindowActionCommand iwac = (InvokePortletWindowActionCommand)wc;
// Get form parameters
- PortletParameters formParameters = iwac.getFormParameters();
+ ParameterMap formParameters = iwac.getFormParameters();
// Get interaction parameters
- PortletParameters interactionParameters = null;
- if (iwac.getInteractionState() instanceof PortletParametersStateString)
+ ParameterMap interactionParameters = null;
+ if (iwac.getInteractionState() instanceof ParametersStateString)
{
- interactionParameters = ((PortletParametersStateString)iwac.getInteractionState()).getParameters();
+ interactionParameters = ((ParametersStateString)iwac.getInteractionState()).getParameters();
}
// Build a map that represents the parameters of the action
@@ -235,7 +235,7 @@
}
else
{
- actionParameters = new PortletParameters();
+ actionParameters = new ParameterMap();
}
}
@@ -257,9 +257,9 @@
//
StateString navigationalState = iwrc.getNavigationalState();
- if (navigationalState instanceof PortletParametersStateString)
+ if (navigationalState instanceof ParametersStateString)
{
- Map params = ((PortletParametersStateString)navigationalState).getParameters();
+ Map params = ((ParametersStateString)navigationalState).getParameters();
event.setParameters(params);
}
@@ -280,9 +280,9 @@
event.setWindowState(navstate.getWindowState());
StateString parametersState = navstate.getContentState();
- if (parametersState instanceof PortletParametersStateString)
+ if (parametersState instanceof ParametersStateString)
{
- Map params = ((PortletParametersStateString)parametersState).getParameters();
+ Map params = ((ParametersStateString)parametersState).getParameters();
event.setParameters(params);
}
}
@@ -304,21 +304,21 @@
* @param map
* @return
*/
- private PortletParameters asParameters(Map map)
+ private ParameterMap asParameters(Map map)
{
if (map == null)
{
return null;
}
- else if (map instanceof PortletParameters)
+ else if (map instanceof ParameterMap)
{
- return (PortletParameters)map;
+ return (ParameterMap)map;
}
else
{
try
{
- return new PortletParameters(map);
+ return new ParameterMap(map);
}
catch (IllegalArgumentException e)
{
@@ -336,15 +336,15 @@
private static class ActionParameterMap extends LazyMap
{
/** . */
- private PortletParameters formParams;
+ private ParameterMap formParams;
/** . */
- private PortletParameters interactionParams;
+ private ParameterMap interactionParams;
/** . */
- private PortletParameters params;
+ private ParameterMap params;
- public ActionParameterMap(PortletParameters interactionParams, PortletParameters formParams)
+ public ActionParameterMap(ParameterMap interactionParams, ParameterMap formParams)
{
this.formParams = formParams;
this.interactionParams = interactionParams;
@@ -355,7 +355,7 @@
{
if (params == null)
{
- params = new PortletParameters(interactionParams);
+ params = new ParameterMap(interactionParams);
params.append(formParams);
}
return params;
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/HeaderInterceptor.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/HeaderInterceptor.java 2008-02-22 15:19:14 UTC (rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/HeaderInterceptor.java 2008-02-22 16:28:22 UTC (rev 10090)
@@ -58,6 +58,7 @@
StringWriter buffer = null;
// Get existing header which may be null
+
String headerChars = fragment.getHeader();
// Add declaratively injected header content here (get it via the component)
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerResponseFactory.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerResponseFactory.java 2008-02-22 15:19:14 UTC (rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerResponseFactory.java 2008-02-22 16:28:22 UTC (rev 10090)
@@ -37,8 +37,7 @@
import org.jboss.portal.portlet.NoSuchPortletException;
import org.jboss.portal.portlet.PortletInvokerException;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
-import org.jboss.portal.portlet.invocation.response.RenderResponse;
-import org.jboss.portal.portlet.spi.ActionContext;
+import org.jboss.portal.portlet.invocation.response.UpdateNavigationalStateResponse;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -59,11 +58,11 @@
}
}
- public static ControllerResponse createActionResponse(PortalObjectId targetId, ActionContext actionContext, PortletInvocationResponse response)
+ public static ControllerResponse createActionResponse(PortalObjectId targetId, RequestContext reqContext, PortletInvocationResponse response)
{
- if (response instanceof RenderResponse)
+ if (response instanceof UpdateNavigationalStateResponse)
{
- RenderResponse renderResult = (RenderResponse)response;
+ UpdateNavigationalStateResponse renderResult = (UpdateNavigationalStateResponse)response;
//
Mode mode = renderResult.getMode();
@@ -90,9 +89,9 @@
public static ControllerResponse createActionResponse(String instanceId, PortletInvocationResponse response)
{
- if (response instanceof org.jboss.portal.portlet.invocation.response.RenderResponse)
+ if (response instanceof UpdateNavigationalStateResponse)
{
- RenderResponse renderResult = (RenderResponse)response;
+ UpdateNavigationalStateResponse renderResult = (UpdateNavigationalStateResponse)response;
//
return new PortletInstanceActionResponse(instanceId, null, null, renderResult.getNavigationalState());
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java 2008-02-22 15:19:14 UTC (rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java 2008-02-22 16:28:22 UTC (rev 10090)
@@ -34,7 +34,6 @@
import org.jboss.portal.core.model.portal.command.action.InvokePortletWindowActionCommand;
import org.jboss.portal.core.model.portal.command.action.InvokePortletWindowRenderCommand;
import org.jboss.portal.portlet.ActionURL;
-import org.jboss.portal.portlet.PortletParameters;
import org.jboss.portal.portlet.PortletURL;
import org.jboss.portal.portlet.RenderURL;
import org.jboss.portal.portlet.StateString;
@@ -78,7 +77,7 @@
WindowState windowState,
StateString navigationalState,
StateString interactionState,
- PortletParameters form,
+ ParameterMap form,
Window window,
Portal portal)
{
@@ -93,7 +92,7 @@
WindowState windowState,
StateString navigationalState,
StateString interactionState,
- PortletParameters form,
+ ParameterMap form,
PortletContextFactory cf,
InvokePortletCommandFactory cpc)
{
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/deployment/jboss/PortletAppDeployment.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/deployment/jboss/PortletAppDeployment.java 2008-02-22 15:19:14 UTC (rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/deployment/jboss/PortletAppDeployment.java 2008-02-22 16:28:22 UTC (rev 10090)
@@ -51,7 +51,6 @@
import org.jboss.portal.portlet.InvalidPortletIdException;
import org.jboss.portal.portlet.NoSuchPortletException;
import org.jboss.portal.portlet.PortletInvokerException;
-import org.jboss.portal.portlet.impl.jsr168.metadata.PreferenceMetaData;
import org.jboss.portal.portlet.state.PropertyChange;
import org.jboss.portal.portlet.state.PropertyMap;
import org.jboss.portal.security.RoleSecurityBinding;
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/api/node/AbstractPortalNodeURL.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/api/node/AbstractPortalNodeURL.java 2008-02-22 15:19:14 UTC (rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/api/node/AbstractPortalNodeURL.java 2008-02-22 16:28:22 UTC (rev 10090)
@@ -25,7 +25,7 @@
import org.jboss.portal.api.node.PortalNodeURL;
import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.core.model.portal.PortalObjectId;
-import org.jboss.portal.portlet.PortletParametersStateString;
+import org.jboss.portal.portlet.ParametersStateString;
import org.jboss.portal.server.request.URLContext;
/**
@@ -42,7 +42,7 @@
protected ControllerContext controllerContext;
/** . */
- protected PortletParametersStateString parameters;
+ protected ParametersStateString parameters;
/** . */
protected Boolean wantSecure;
@@ -61,7 +61,7 @@
this.id = id;
this.controllerContext = controllerContext;
this.relative = true;
- this.parameters = new PortletParametersStateString();
+ this.parameters = ParametersStateString.create();
}
public void setParameter(String name, String value)
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java 2008-02-22 15:19:14 UTC (rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java 2008-02-22 16:28:22 UTC (rev 10090)
@@ -39,7 +39,7 @@
import org.jboss.portal.core.model.portal.content.WindowRendition;
import org.jboss.portal.core.model.portal.content.ContentRendererContext;
import org.jboss.portal.core.model.portal.navstate.WindowNavigationalState;
-import org.jboss.portal.portlet.PortletParametersStateString;
+import org.jboss.portal.portlet.ParametersStateString;
import java.util.Iterator;
import java.util.Map;
@@ -180,7 +180,7 @@
//
if (navigationalState == null)
{
- PortletParametersStateString state = new PortletParametersStateString();
+ ParametersStateString state = ParametersStateString.create();
//
for (Iterator i = content.getParameterNames(); i.hasNext();)
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/instance/InstanceSecurityInterceptor.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/instance/InstanceSecurityInterceptor.java 2008-02-22 15:19:14 UTC (rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/instance/InstanceSecurityInterceptor.java 2008-02-22 16:28:22 UTC (rev 10090)
@@ -64,7 +64,7 @@
{
// Compute the security mask
int mask = InstancePermission.VIEW_MASK;
- Mode mode = invocation.getPortletContext().getMode();
+ Mode mode = invocation.getMode();
if (Mode.ADMIN.equals(mode))
{
mask |= InstancePermission.ADMIN_MASK;
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/instance/command/action/InvokePortletInstanceActionCommand.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/instance/command/action/InvokePortletInstanceActionCommand.java 2008-02-22 15:19:14 UTC (rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/instance/command/action/InvokePortletInstanceActionCommand.java 2008-02-22 16:28:22 UTC (rev 10090)
@@ -24,6 +24,7 @@
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
+import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.core.controller.ControllerException;
import org.jboss.portal.core.controller.ControllerResponse;
import org.jboss.portal.core.controller.command.info.CommandInfo;
@@ -34,7 +35,6 @@
import org.jboss.portal.core.model.instance.InvokePortletInstanceCommandFactory;
import org.jboss.portal.core.model.instance.command.PortletInstanceCommand;
import org.jboss.portal.portlet.PortletInvokerException;
-import org.jboss.portal.portlet.PortletParameters;
import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.invocation.ActionInvocation;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
@@ -50,13 +50,13 @@
private StateString interactionState;
/** The nform. */
- private PortletParameters form;
+ private ParameterMap form;
public InvokePortletInstanceActionCommand(
String instanceId,
StateString navigationalState,
StateString interactionState,
- PortletParameters form)
+ ParameterMap form)
{
super(instanceId, navigationalState);
@@ -70,7 +70,7 @@
return interactionState;
}
- public PortletParameters getForm()
+ public ParameterMap getForm()
{
return form;
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowActionCommand.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowActionCommand.java 2008-02-22 15:19:14 UTC (rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowActionCommand.java 2008-02-22 16:28:22 UTC (rev 10090)
@@ -25,6 +25,7 @@
import org.jboss.logging.Logger;
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
+import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.core.controller.ControllerException;
import org.jboss.portal.core.controller.ControllerResponse;
import org.jboss.portal.core.controller.NoSuchResourceException;
@@ -37,11 +38,10 @@
import org.jboss.portal.core.model.portal.PortalObjectId;
import org.jboss.portal.identity.User;
import org.jboss.portal.portlet.PortletInvokerException;
-import org.jboss.portal.portlet.PortletParameters;
import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.invocation.PortletInvocation;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
-import org.jboss.portal.portlet.spi.ActionContext;
+import org.jboss.portal.portlet.spi.RequestContext;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -63,7 +63,7 @@
private StateString interactionState;
/** . */
- private PortletParameters formParameters;
+ private ParameterMap formParameters;
/** The instance. */
protected Instance instance;
@@ -74,7 +74,7 @@
WindowState windowState,
StateString navigationalState,
StateString interactionState,
- PortletParameters formParameters)
+ ParameterMap formParameters)
throws IllegalArgumentException
{
super(windowId, mode, windowState);
@@ -100,12 +100,12 @@
this.interactionState = interactionState;
}
- public PortletParameters getFormParameters()
+ public ParameterMap getFormParameters()
{
return formParameters;
}
- public void setFormParameters(PortletParameters formParameters)
+ public void setFormParameters(ParameterMap formParameters)
{
this.formParameters = formParameters;
}
@@ -174,7 +174,7 @@
PortletInvocationResponse response = instance.invoke(invocation);
//
- return ControllerResponseFactory.createActionResponse(targetId, (ActionContext)invocation.getContext(), response);
+ return ControllerResponseFactory.createActionResponse(targetId, (RequestContext)invocation.getContext(), response);
}
catch (PortletInvokerException e)
{
Modified: branches/JBoss_Portal_Branch_2_7/core-cms/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-cms/.classpath 2008-02-22 15:19:14 UTC (rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/core-cms/.classpath 2008-02-22 16:28:22 UTC (rev 10090)
@@ -27,5 +27,6 @@
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-portal-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-jsr168api-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/portlet/lib/portlet-api.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_7/core-cms/src/main/org/jboss/portal/core/cms/CMSObjectCommandFactoryService.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-cms/src/main/org/jboss/portal/core/cms/CMSObjectCommandFactoryService.java 2008-02-22 15:19:14 UTC (rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/core-cms/src/main/org/jboss/portal/core/cms/CMSObjectCommandFactoryService.java 2008-02-22 16:28:22 UTC (rev 10090)
@@ -36,7 +36,7 @@
import org.jboss.portal.core.model.portal.PortalObjectId;
import org.jboss.portal.core.model.portal.PortalObjectPath;
import org.jboss.portal.core.model.portal.command.action.InvokePortletWindowRenderCommand;
-import org.jboss.portal.portlet.PortletParametersStateString;
+import org.jboss.portal.portlet.ParametersStateString;
import org.jboss.portal.server.ServerInvocation;
import org.jboss.portal.server.config.ServerConfig;
@@ -154,7 +154,7 @@
else
{
// Set the content as a render parameter
- PortletParametersStateString parameters = new PortletParametersStateString();
+ ParametersStateString parameters = ParametersStateString.create();
parameters.setValue(CMSPortlet.RENDER_PARAMETER_PATH, path);
// Perform a render URL on the target window
@@ -167,7 +167,7 @@
{
if (e.toString().indexOf("Access to this resource is denied") != -1)
{
- PortletParametersStateString parameters = new PortletParametersStateString();
+ ParametersStateString parameters = ParametersStateString.create();
parameters.setValue("path", requestPath);
return new InvokePortletWindowRenderCommand(targetWindowId, Mode.VIEW, null, parameters);
}
Modified: branches/JBoss_Portal_Branch_2_7/core-identity/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-identity/.classpath 2008-02-22 15:19:14 UTC (rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/core-identity/.classpath 2008-02-22 16:28:22 UTC (rev 10090)
@@ -48,6 +48,6 @@
<classpathentry kind="lib" path="/thirdparty/jboss/jbossxb/lib/jboss-xml-binding.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/theme"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar"/>
- <classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-jsr168api-lib.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/portlet/lib/portlet-api.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/impl/IdentityCommandFactoryService.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/impl/IdentityCommandFactoryService.java 2008-02-22 15:19:14 UTC (rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/impl/IdentityCommandFactoryService.java 2008-02-22 16:28:22 UTC (rev 10090)
@@ -30,7 +30,7 @@
import org.jboss.portal.core.identity.services.metadata.CoreIdentityConfigurationException;
import org.jboss.portal.core.identity.services.workflow.ValidateEmailService;
import org.jboss.portal.core.model.instance.command.action.InvokePortletInstanceRenderCommand;
-import org.jboss.portal.portlet.PortletParametersStateString;
+import org.jboss.portal.portlet.ParametersStateString;
import org.jboss.portal.server.ServerInvocation;
/**
@@ -58,7 +58,7 @@
public ControllerCommand doMapping(ControllerContext controllerContext, ServerInvocation invocation, String host,
String contextPath, String requestPath)
{
- PortletParametersStateString renderParameters = new PortletParametersStateString();
+ ParametersStateString renderParameters = ParametersStateString.create();
String operation = IdentityConstants.VALIDATION_FAILED;
if (requestPath != null && requestPath.length() > 1)
Modified: branches/JBoss_Portal_Branch_2_7/core-samples/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-samples/.classpath 2008-02-22 15:19:14 UTC (rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/core-samples/.classpath 2008-02-22 16:28:22 UTC (rev 10090)
@@ -14,8 +14,8 @@
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/identity/lib/portal-identity-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-portal-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-jmx.jar" sourcepath="/JBoss_AS_4.0.5/jmx/src/main"/>
- <classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-jsr168api-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/sun-servlet/lib/servlet-api.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/portlet/lib/portlet-api.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_7/core-search/src/main/org/jboss/portal/core/search/service/SearchResultCommandFactoryService.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-search/src/main/org/jboss/portal/core/search/service/SearchResultCommandFactoryService.java 2008-02-22 15:19:14 UTC (rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/core-search/src/main/org/jboss/portal/core/search/service/SearchResultCommandFactoryService.java 2008-02-22 16:28:22 UTC (rev 10090)
@@ -33,7 +33,7 @@
import org.jboss.portal.core.model.portal.PortalObjectId;
import org.jboss.portal.core.model.portal.PortalObjectPath;
import org.jboss.portal.core.model.portal.command.action.InvokePortletWindowRenderCommand;
-import org.jboss.portal.portlet.PortletParametersStateString;
+import org.jboss.portal.portlet.ParametersStateString;
import org.jboss.portal.server.ServerInvocation;
/**
@@ -48,7 +48,7 @@
{
Map parameters = invocation.getServerContext().getQueryParameterMap();
- PortletParametersStateString renderParameters = new PortletParametersStateString();
+ ParametersStateString renderParameters = ParametersStateString.create();
String targetWindowRef = null;
Iterator it = parameters.keySet().iterator();
Modified: branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFInvocation.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFInvocation.java 2008-02-22 15:19:14 UTC (rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFInvocation.java 2008-02-22 16:28:22 UTC (rev 10090)
@@ -27,10 +27,10 @@
import org.jboss.portal.common.text.FastURLEncoder;
import org.jboss.portal.common.util.MarkupInfo;
import org.jboss.portal.common.util.MediaType;
+import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.portlet.Portlet;
import org.jboss.portal.portlet.PortletInvoker;
import org.jboss.portal.portlet.PortletInvokerException;
-import org.jboss.portal.portlet.PortletParameters;
import org.jboss.portal.portlet.PortletURL;
import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.bridge.JBossServletContextProvider;
@@ -162,7 +162,7 @@
Portlet portlet,
Mode mode,
WindowState windowState,
- PortletParameters navState) throws PortletInvokerException
+ ParameterMap navState) throws PortletInvokerException
{
//
RenderContext renderContext = new JSFRenderContext(
Modified: branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFRenderContext.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFRenderContext.java 2008-02-22 15:19:14 UTC (rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFRenderContext.java 2008-02-22 16:28:22 UTC (rev 10090)
@@ -29,8 +29,8 @@
import org.jboss.portal.common.invocation.resolver.PrincipalAttributeResolver;
import org.jboss.portal.common.invocation.resolver.RequestAttributeResolver;
import org.jboss.portal.common.util.MarkupInfo;
-import org.jboss.portal.portlet.PortletParameters;
-import org.jboss.portal.portlet.PortletParametersStateString;
+import org.jboss.portal.common.util.ParameterMap;
+import org.jboss.portal.portlet.ParametersStateString;
import org.jboss.portal.portlet.PortletURL;
import org.jboss.portal.portlet.impl.spi.AbstractRenderContext;
import org.jboss.portal.portlet.invocation.PortletInvocation;
@@ -51,11 +51,11 @@
public JSFRenderContext(
Mode mode, WindowState
windowState,
- PortletParameters navState,
+ ParameterMap navState,
MarkupInfo markupInfo,
JSFInvocation invocation)
{
- super(mode, windowState, navState != null ? new PortletParametersStateString(navState) : null, markupInfo);
+ super(mode, windowState, navState != null ? ParametersStateString.create(navState) : null, markupInfo);
//
this.invocation = invocation;
Modified: branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletActionEvent.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletActionEvent.java 2008-02-22 15:19:14 UTC (rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletActionEvent.java 2008-02-22 16:28:22 UTC (rev 10090)
@@ -24,12 +24,12 @@
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
+import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.portlet.Portlet;
import org.jboss.portal.portlet.PortletInvokerException;
-import org.jboss.portal.portlet.PortletParameters;
-import org.jboss.portal.portlet.PortletParametersStateString;
+import org.jboss.portal.portlet.ParametersStateString;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
-import org.jboss.portal.portlet.invocation.response.RenderResponse;
+import org.jboss.portal.portlet.invocation.response.UpdateNavigationalStateResponse;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
@@ -43,7 +43,7 @@
{
/** . */
- private final PortletParameters interactionState;
+ private final ParameterMap interactionState;
/** . */
private Mode mode;
@@ -51,7 +51,7 @@
/** . */
private WindowState windowState;
- PortletActionEvent(UIComponent uiComponent, PortletParameters interactionState, Mode mode, WindowState windowState)
+ PortletActionEvent(UIComponent uiComponent, ParameterMap interactionState, Mode mode, WindowState windowState)
{
super(uiComponent);
@@ -117,13 +117,13 @@
//
try
{
- PortletInvocationResponse pir = invocation.action(portlet, mode, windowState, new PortletParametersStateString(interactionState));
- if (pir instanceof RenderResponse)
+ PortletInvocationResponse pir = invocation.action(portlet, mode, windowState, ParametersStateString.create(interactionState));
+ if (pir instanceof UpdateNavigationalStateResponse)
{
- RenderResponse render = (RenderResponse)pir;
+ UpdateNavigationalStateResponse render = (UpdateNavigationalStateResponse)pir;
//
- uiportlet.setInternalNavState(((PortletParametersStateString)render.getNavigationalState()).getParameters());
+ uiportlet.setInternalNavState(((ParametersStateString)render.getNavigationalState()).getParameters());
//
if (render.getWindowState() != null)
Modified: branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletRenderEvent.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletRenderEvent.java 2008-02-22 15:19:14 UTC (rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletRenderEvent.java 2008-02-22 16:28:22 UTC (rev 10090)
@@ -24,7 +24,7 @@
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
-import org.jboss.portal.portlet.PortletParameters;
+import org.jboss.portal.common.util.ParameterMap;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
@@ -38,7 +38,7 @@
{
/** . */
- private final PortletParameters navState;
+ private final ParameterMap navState;
/** . */
private Mode mode;
@@ -46,7 +46,7 @@
/** . */
private WindowState windowState;
- public PortletRenderEvent(UIComponent uiComponent, PortletParameters navState, Mode mode, WindowState windowState)
+ public PortletRenderEvent(UIComponent uiComponent, ParameterMap navState, Mode mode, WindowState windowState)
{
super(uiComponent);
Modified: branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java 2008-02-22 15:19:14 UTC (rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java 2008-02-22 16:28:22 UTC (rev 10090)
@@ -24,13 +24,13 @@
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
+import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.faces.util.ActionEventDispatcher;
import org.jboss.portal.portlet.Portlet;
import org.jboss.portal.portlet.PortletContext;
import org.jboss.portal.portlet.PortletInvoker;
import org.jboss.portal.portlet.PortletInvokerException;
-import org.jboss.portal.portlet.PortletParameters;
-import org.jboss.portal.portlet.PortletParametersStateString;
+import org.jboss.portal.portlet.ParametersStateString;
import org.jboss.portal.portlet.impl.PortletRequestDecoder;
import org.jboss.portal.portlet.invocation.response.FragmentResponse;
import org.jboss.portal.portlet.invocation.response.InsufficientPrivilegesResponse;
@@ -90,7 +90,7 @@
private String onClick;
/** The internal nav state. */
- private PortletParameters internalNavState;
+ private ParameterMap internalNavState;
/** The internal window state value. */
private WindowState internalWindowState;
@@ -303,7 +303,7 @@
this.internalMode = mode;
}
- void setInternalNavState(PortletParameters navState)
+ void setInternalNavState(ParameterMap navState)
{
ValueBinding vb = getValueBinding("renderParameters");
if (vb != null)
@@ -318,13 +318,13 @@
}
}
- PortletParameters getInternalNavState()
+ ParameterMap getInternalNavState()
{
ValueBinding vb = getValueBinding("renderParameters");
if (vb != null)
{
Map renderParameters = (Map)vb.getValue(getFacesContext());
- return PortletParameters.wrap(renderParameters);
+ return ParameterMap.wrap(renderParameters);
}
else
{
@@ -385,7 +385,7 @@
String opaqueValue = null;
if (internalNavState != null)
{
- opaqueValue = new PortletParametersStateString(internalNavState).getStringValue();
+ opaqueValue = ParametersStateString.create(internalNavState).getStringValue();
}
//
@@ -412,13 +412,13 @@
//
portletId = (String)values[1];
- internalNavState = serializedNavState != null ? new PortletParametersStateString(serializedNavState).getParameters() : null;
+ internalNavState = serializedNavState != null ? ParametersStateString.create(serializedNavState).getParameters() : null;
portletListener = (MethodBinding)restoreAttachedState(faces, values[3]);
supportedWindowStates = (Set)values[4];
supportedModes = (Set)values[5];
initialWindowState = (String)values[6];
initialMode = (String)values[7];
- internalNavState = (PortletParameters)values[8];
+ internalNavState = (ParameterMap)values[8];
internalMode = (Mode)values[9];
onClick = (String)values[10];
}
@@ -460,7 +460,7 @@
case PortletRequestDecoder.RENDER_TYPE:
PortletRenderEvent prevent = new PortletRenderEvent(
this,
- ((PortletParametersStateString)decoder.getNavigationalState()).getParameters(),
+ ((ParametersStateString)decoder.getNavigationalState()).getParameters(),
mode,
windowState);
prevent.setPhaseId(PhaseId.INVOKE_APPLICATION);
@@ -477,7 +477,7 @@
}
PortletActionEvent paevent = new PortletActionEvent(
this,
- ((PortletParametersStateString)decoder.getInteractionState()).getParameters(),
+ ((ParametersStateString)decoder.getInteractionState()).getParameters(),
mode,
windowState);
paevent.setPhaseId(PhaseId.INVOKE_APPLICATION);
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/framework/support/TestPortletInvocationContext.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/framework/support/TestPortletInvocationContext.java 2008-02-22 15:19:14 UTC (rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/framework/support/TestPortletInvocationContext.java 2008-02-22 16:28:22 UTC (rev 10090)
@@ -28,7 +28,7 @@
import org.jboss.portal.common.invocation.resolver.RequestAttributeResolver;
import org.jboss.portal.common.util.MarkupInfo;
import org.jboss.portal.common.util.MediaType;
-import org.jboss.portal.portlet.PortletParameters;
+import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.portlet.PortletURL;
import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.impl.spi.AbstractPortletInvocationContext;
@@ -145,7 +145,7 @@
return null;
}
- public PortletParameters getForm()
+ public ParameterMap getForm()
{
return null;
}
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/MarkupTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/MarkupTestCase.java 2008-02-22 15:19:14 UTC (rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/MarkupTestCase.java 2008-02-22 16:28:22 UTC (rev 10090)
@@ -33,7 +33,7 @@
import org.jboss.portal.portlet.invocation.response.ErrorResponse;
import org.jboss.portal.portlet.invocation.response.FragmentResponse;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
-import org.jboss.portal.portlet.invocation.response.RenderResponse;
+import org.jboss.portal.portlet.invocation.response.UpdateNavigationalStateResponse;
import org.jboss.portal.portlet.spi.WindowContext;
import org.jboss.portal.test.wsrp.framework.support.BasicInstanceContext;
import org.jboss.portal.test.wsrp.framework.support.BasicSecurityContext;
@@ -107,8 +107,8 @@
PortletInvocationResponse response = consumer.invoke(action);
ExtendedAssert.assertNotNull(response);
- ExtendedAssert.assertTrue("Was expecting a RenderResponse. Got: " + response, response instanceof RenderResponse);
- RenderResponse render = (RenderResponse)response;
+ ExtendedAssert.assertTrue("Was expecting a RenderResponse. Got: " + response, response instanceof UpdateNavigationalStateResponse);
+ UpdateNavigationalStateResponse render = (UpdateNavigationalStateResponse)response;
ExtendedAssert.assertEquals(BasicMarkupBehavior.NS, render.getNavigationalState().getStringValue());
}
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/ActionContextRequestContext.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/ActionContextRequestContext.java 2008-02-22 15:19:14 UTC (rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/ActionContextRequestContext.java 2008-02-22 16:28:22 UTC (rev 10090)
@@ -23,9 +23,9 @@
package org.jboss.portal.wsrp.consumer;
-import org.apache.commons.fileupload.RequestContext;
-import org.jboss.portal.portlet.spi.ActionContext;
+import org.jboss.portal.portlet.spi.RequestContext;
+import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
@@ -36,9 +36,9 @@
*/
public class ActionContextRequestContext implements RequestContext
{
- private ActionContext actionContext;
+ private RequestContext actionContext;
- public ActionContextRequestContext(ActionContext actionContext)
+ public ActionContextRequestContext(RequestContext actionContext)
{
this.actionContext = actionContext;
}
@@ -62,4 +62,8 @@
{
return actionContext.getInputStream();
}
+
+ public BufferedReader getReader() throws IOException {
+ return actionContext.getReader();
+ }
}
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/ActionHandler.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/ActionHandler.java 2008-02-22 15:19:14 UTC (rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/ActionHandler.java 2008-02-22 16:28:22 UTC (rev 10090)
@@ -27,18 +27,18 @@
import org.apache.commons.fileupload.FileItemStream;
import org.apache.commons.fileupload.FileUpload;
import org.apache.commons.fileupload.util.Streams;
+import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.common.util.ParameterValidation;
import org.jboss.portal.portlet.PortletInvokerException;
-import org.jboss.portal.portlet.PortletParameters;
-import org.jboss.portal.portlet.PortletParametersStateString;
+import org.jboss.portal.portlet.ParametersStateString;
import org.jboss.portal.portlet.StateEvent;
import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.invocation.PortletInvocation;
import org.jboss.portal.portlet.invocation.response.ErrorResponse;
import org.jboss.portal.portlet.invocation.response.HTTPRedirectionResponse;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
-import org.jboss.portal.portlet.invocation.response.RenderResponse;
-import org.jboss.portal.portlet.spi.ActionContext;
+import org.jboss.portal.portlet.invocation.response.UpdateNavigationalStateResponse;
+import org.jboss.portal.portlet.spi.RequestContext;
import org.jboss.portal.portlet.spi.InstanceContext;
import org.jboss.portal.portlet.state.AccessMode;
import org.jboss.portal.wsrp.WSRPTypeFactory;
@@ -96,7 +96,7 @@
if (interactionState != null)
{
String state = interactionState.getStringValue();
- if (!PortletParametersStateString.JBPNS_PREFIX.equals(state)) // fix-me: see JBPORTAL-900
+ if (!ParametersStateString.JBPNS_PREFIX.equals(state)) // fix-me: see JBPORTAL-900
{
interactionParams.setInteractionState(state);
}
@@ -167,7 +167,7 @@
else
{
// if the content is not multipart, then check for form parameters
- PortletParameters params = actionContext.getForm();
+ ParameterMap params = actionContext.getForm();
if (params != null && !params.isEmpty())
{
int capacity = params.size();
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/RenderHandler.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/RenderHandler.java 2008-02-22 15:19:14 UTC (rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/RenderHandler.java 2008-02-22 16:28:22 UTC (rev 10090)
@@ -190,7 +190,7 @@
if (rewriteURLs)
{
WSRPURLRewriter rewriter = (WSRPURLRewriter)wsrpURLRewriterLocal.get();
- rewriter.setContext(invocation.getPortletContext());
+ rewriter.setContext(invocation.getContext());
rewriter.setSecure(invocation.getSecurityContext().isSecure());
String userId = invocation.getUserContext().getId();
rewriter.setAuthenticated(userId != null); // is this correct?
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/RequestPrecursor.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/RequestPrecursor.java 2008-02-22 15:19:14 UTC (rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/RequestPrecursor.java 2008-02-22 16:28:22 UTC (rev 10090)
@@ -26,8 +26,8 @@
import org.jboss.logging.Logger;
import org.jboss.portal.common.util.ContentInfo;
import org.jboss.portal.common.util.ParameterValidation;
+import org.jboss.portal.portlet.ParametersStateString;
import org.jboss.portal.portlet.PortletInvokerException;
-import org.jboss.portal.portlet.PortletParametersStateString;
import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.invocation.PortletInvocation;
import org.jboss.portal.portlet.spi.PortletInvocationContext;
@@ -82,7 +82,7 @@
// create markup params
UserContext userContext = invocation.getUserContext();
ParameterValidation.throwIllegalArgExceptionIfNull(userContext, USER_CONTEXT);
- PortletInvocationContext context = invocation.getPortletContext();
+ PortletInvocationContext context = invocation.getContext();
ParameterValidation.throwIllegalArgExceptionIfNull(context, INVOCATION_CONTEXT);
ContentInfo streamInfo = context.getMarkupInfo();
ParameterValidation.throwIllegalArgExceptionIfNull(streamInfo, STREAM_INFO);
@@ -118,7 +118,7 @@
if (navigationalState != null)
{
String state = navigationalState.getStringValue();
- if (!PortletParametersStateString.JBPNS_PREFIX.equals(state)) // fix-me: see JBPORTAL-900
+ if (!ParametersStateString.JBPNS_PREFIX.equals(state)) // fix-me: see JBPORTAL-900
{
markupParams.setNavigationalState(state);
}
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/WSRPConsumerImpl.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/WSRPConsumerImpl.java 2008-02-22 15:19:14 UTC (rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/WSRPConsumerImpl.java 2008-02-22 16:28:22 UTC (rev 10090)
@@ -642,7 +642,7 @@
{
// we need to supply the templates since the portlet does URL processing and either doesn't store
// templates in the session or no session has been established yet
- runtimeContext.setTemplates(WSRPTypeFactory.createTemplates(invocation.getPortletContext()));
+ runtimeContext.setTemplates(WSRPTypeFactory.createTemplates(invocation.getContext()));
}
}
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/ActionRequestProcessor.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/ActionRequestProcessor.java 2008-02-22 15:19:14 UTC (rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/ActionRequestProcessor.java 2008-02-22 16:28:22 UTC (rev 10090)
@@ -28,7 +28,7 @@
import org.jboss.portal.portlet.invocation.ActionInvocation;
import org.jboss.portal.portlet.invocation.response.HTTPRedirectionResponse;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
-import org.jboss.portal.portlet.invocation.response.RenderResponse;
+import org.jboss.portal.portlet.invocation.response.UpdateNavigationalStateResponse;
import org.jboss.portal.portlet.spi.PortalContext;
import org.jboss.portal.portlet.spi.SecurityContext;
import org.jboss.portal.portlet.spi.UserContext;
@@ -129,9 +129,9 @@
Object processResponse(PortletInvocationResponse response)
{
- if (response instanceof RenderResponse)
+ if (response instanceof UpdateNavigationalStateResponse)
{
- RenderResponse renderResult = (RenderResponse)response;
+ UpdateNavigationalStateResponse renderResult = (UpdateNavigationalStateResponse)response;
UpdateResponse updateResponse = WSRPTypeFactory.createUpdateResponse();
updateResponse.setNewMode(WSRPUtils.convertJSR168PortletModeNameToWSRPName(getNewStateOrNull(renderResult, true)));
updateResponse.setNewWindowState(WSRPUtils.convertJSR168WindowStateNameToWSRPName(getNewStateOrNull(renderResult, false)));
@@ -155,7 +155,7 @@
}
}
- private String getNewStateOrNull(RenderResponse renderResult, boolean forMode)
+ private String getNewStateOrNull(UpdateNavigationalStateResponse renderResult, boolean forMode)
{
Object state = forMode ? renderResult.getMode() : renderResult.getWindowState();
return state != null ? state.toString() : null;
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/MarkupHandler.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/MarkupHandler.java 2008-02-22 15:19:14 UTC (rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/MarkupHandler.java 2008-02-22 16:28:22 UTC (rev 10090)
@@ -28,7 +28,7 @@
import org.jboss.portal.portlet.invocation.response.FragmentResponse;
import org.jboss.portal.portlet.invocation.response.HTTPRedirectionResponse;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
-import org.jboss.portal.portlet.invocation.response.RenderResponse;
+import org.jboss.portal.portlet.invocation.response.UpdateNavigationalStateResponse;
import org.jboss.portal.portlet.state.producer.PortletStateChangeRequiredException;
import org.jboss.portal.wsrp.WSRPExceptionFactory;
import org.jboss.portal.wsrp.core.AccessDeniedFault;
@@ -196,7 +196,7 @@
}
else
- if (!(response instanceof HTTPRedirectionResponse || response instanceof FragmentResponse || response instanceof RenderResponse))
+ if (!(response instanceof HTTPRedirectionResponse || response instanceof FragmentResponse || response instanceof UpdateNavigationalStateResponse))
{
throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.OPERATION_FAILED,
"Unsupported result type: " + response.getClass().getName(), null);
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPActionContext.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPActionContext.java 2008-02-22 15:19:14 UTC (rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPActionContext.java 2008-02-22 16:28:22 UTC (rev 10090)
@@ -27,11 +27,11 @@
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
import org.jboss.portal.common.util.MarkupInfo;
-import org.jboss.portal.portlet.PortletParameters;
+import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.portlet.StateString;
-import org.jboss.portal.portlet.spi.ActionContext;
import org.jboss.portal.portlet.spi.InstanceContext;
import org.jboss.portal.portlet.spi.PortalContext;
+import org.jboss.portal.portlet.spi.RequestContext;
import org.jboss.portal.portlet.spi.SecurityContext;
import org.jboss.portal.portlet.spi.UserContext;
import org.jboss.portal.portlet.spi.WindowContext;
@@ -58,7 +58,7 @@
* @version $Revision$
* @since 2.4
*/
-abstract class WSRPActionContext extends WSRPPortletInvocationContext implements ActionContext
+abstract class WSRPActionContext extends WSRPPortletInvocationContext implements RequestContext
{
protected String characterEncoding;
protected StateString interactionState;
@@ -103,7 +103,7 @@
static class WSRPSimpleActionContext extends WSRPActionContext
{
- private PortletParameters formParameters;
+ private ParameterMap formParameters;
private String contentType;
protected WSRPSimpleActionContext(StateString navigationalState,
@@ -140,16 +140,16 @@
params.put(paramName, new String[]{paramValue});
}
}
- formParameters = new PortletParameters(params);
+ formParameters = new ParameterMap(params);
}
else
{
- formParameters = new PortletParameters();
+ formParameters = new ParameterMap();
}
}
- public PortletParameters getForm()
+ public ParameterMap getForm()
{
return formParameters;
}
@@ -312,9 +312,9 @@
baos.write(BOUNDARY1);
}
- public PortletParameters getForm()
+ public ParameterMap getForm()
{
- return new PortletParameters();
+ return new ParameterMap();
}
public String getContentType()
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPRequestContext.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPRequestContext.java 2008-02-22 15:19:14 UTC (rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPRequestContext.java 2008-02-22 16:28:22 UTC (rev 10090)
@@ -34,6 +34,6 @@
{
public WSRPRequestContext()
{
- super(ServletAccess.getRequest(), ServletAccess.getResponse());
+ super(ServletAccess.getRequest());
}
}
16 years, 7 months
JBoss Portal SVN: r10089 - in modules/identity/trunk/identity/src/test/java/org/jboss/portal/test/identity: ldap and 1 other directory.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-02-22 10:19:14 -0500 (Fri, 22 Feb 2008)
New Revision: 10089
Modified:
modules/identity/trunk/identity/src/test/java/org/jboss/portal/test/identity/IdentityTestPOJO.java
modules/identity/trunk/identity/src/test/java/org/jboss/portal/test/identity/ldap/LDAPTestPOJO.java
Log:
fixing for MC beta 9
Modified: modules/identity/trunk/identity/src/test/java/org/jboss/portal/test/identity/IdentityTestPOJO.java
===================================================================
--- modules/identity/trunk/identity/src/test/java/org/jboss/portal/test/identity/IdentityTestPOJO.java 2008-02-22 14:53:58 UTC (rev 10088)
+++ modules/identity/trunk/identity/src/test/java/org/jboss/portal/test/identity/IdentityTestPOJO.java 2008-02-22 15:19:14 UTC (rev 10089)
@@ -29,7 +29,7 @@
import org.jboss.portal.identity.MembershipModule;
import org.jboss.portal.identity.UserProfileModule;
import org.jboss.unit.api.pojo.annotations.Parameter;
-import org.jboss.beans.metadata.plugins.annotations.Inject;
+import org.jboss.beans.metadata.api.annotations.Inject;
import org.apache.log4j.Appender;
import org.apache.log4j.ConsoleAppender;
import org.apache.log4j.Logger;
Modified: modules/identity/trunk/identity/src/test/java/org/jboss/portal/test/identity/ldap/LDAPTestPOJO.java
===================================================================
--- modules/identity/trunk/identity/src/test/java/org/jboss/portal/test/identity/ldap/LDAPTestPOJO.java 2008-02-22 14:53:58 UTC (rev 10088)
+++ modules/identity/trunk/identity/src/test/java/org/jboss/portal/test/identity/ldap/LDAPTestPOJO.java 2008-02-22 15:19:14 UTC (rev 10089)
@@ -22,7 +22,6 @@
******************************************************************************/
package org.jboss.portal.test.identity.ldap;
-import org.jboss.beans.metadata.plugins.annotations.Inject;
import org.jboss.portal.test.framework.embedded.DSConfig;
import org.jboss.portal.test.identity.IdentityTestPOJO;
import org.jboss.portal.identity.IdentityConfiguration;
@@ -30,6 +29,7 @@
import org.jboss.unit.api.pojo.annotations.Parameter;
import org.jboss.unit.api.pojo.annotations.Create;
import org.jboss.unit.api.pojo.annotations.Destroy;
+import org.jboss.beans.metadata.api.annotations.Inject;
import org.opends.server.tools.LDAPModify;
import javax.naming.Binding;
16 years, 7 months
JBoss Portal SVN: r10088 - in modules/portlet/trunk: bridge and 11 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-02-22 09:53:58 -0500 (Fri, 22 Feb 2008)
New Revision: 10088
Modified:
modules/portlet/trunk/bridge/pom.xml
modules/portlet/trunk/build/pom.xml
modules/portlet/trunk/controller/pom.xml
modules/portlet/trunk/docs/pom.xml
modules/portlet/trunk/docs/user-guide/pom.xml
modules/portlet/trunk/federation/pom.xml
modules/portlet/trunk/jsr168api/pom.xml
modules/portlet/trunk/management/pom.xml
modules/portlet/trunk/pom.xml
modules/portlet/trunk/portlet/pom.xml
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java
modules/portlet/trunk/test/pom.xml
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletControllerContextImpl.java
Log:
JBPORTAL-1898 : Upgrade JBoss MC to the same version than ASB4
Modified: modules/portlet/trunk/bridge/pom.xml
===================================================================
--- modules/portlet/trunk/bridge/pom.xml 2008-02-22 13:40:29 UTC (rev 10087)
+++ modules/portlet/trunk/bridge/pom.xml 2008-02-22 14:53:58 UTC (rev 10088)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>module-parent</artifactId>
- <version>2.0-Beta1</version>
+ <version>2.0-SNAPSHOT</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/portlet/trunk/build/pom.xml
===================================================================
--- modules/portlet/trunk/build/pom.xml 2008-02-22 13:40:29 UTC (rev 10087)
+++ modules/portlet/trunk/build/pom.xml 2008-02-22 14:53:58 UTC (rev 10088)
@@ -18,7 +18,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>module-parent</artifactId>
- <version>2.0-Beta1</version>
+ <version>2.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>JBoss Portal Portlet Module</name>
<description>JBoss Portal Portlet Module</description>
@@ -40,12 +40,12 @@
<version.jboss-remoting>2.2.1.GA</version.jboss-remoting>
<version.jboss.portal.common>1.2.0-Beta1</version.jboss.portal.common>
<version.jboss.portal.web>1.2.0-SNAPSHOT</version.jboss.portal.web>
- <version.jboss.unit>1.2.0-Beta1</version.jboss.unit>
+ <version.jboss.unit>1.2.0-SNAPSHOT</version.jboss.unit>
<version.log4j>1.2.14</version.log4j>
<version.apache.commons-logging>1.1.1</version.apache.commons-logging>
<version.apache.commons-httpclient>3.0.1</version.apache.commons-httpclient>
<version.trove>2.1.1</version.trove>
- <version.jboss.microcontainer>2.0.0.Beta4</version.jboss.microcontainer>
+ <version.jboss.microcontainer>2.0.0.Beta9</version.jboss.microcontainer>
<version.cargo>0.9-portal</version.cargo>
<version.junit>3.8.1</version.junit>
<version.xerces>2.7.1</version.xerces>
Modified: modules/portlet/trunk/controller/pom.xml
===================================================================
--- modules/portlet/trunk/controller/pom.xml 2008-02-22 13:40:29 UTC (rev 10087)
+++ modules/portlet/trunk/controller/pom.xml 2008-02-22 14:53:58 UTC (rev 10088)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>module-parent</artifactId>
- <version>2.0-Beta1</version>
+ <version>2.0-SNAPSHOT</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/portlet/trunk/docs/pom.xml
===================================================================
--- modules/portlet/trunk/docs/pom.xml 2008-02-22 13:40:29 UTC (rev 10087)
+++ modules/portlet/trunk/docs/pom.xml 2008-02-22 14:53:58 UTC (rev 10088)
@@ -4,7 +4,7 @@
<parent>
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>module-parent</artifactId>
- <version>2.0-Beta1</version>
+ <version>2.0-SNAPSHOT</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<artifactId>docs-aggregator</artifactId>
Modified: modules/portlet/trunk/docs/user-guide/pom.xml
===================================================================
--- modules/portlet/trunk/docs/user-guide/pom.xml 2008-02-22 13:40:29 UTC (rev 10087)
+++ modules/portlet/trunk/docs/user-guide/pom.xml 2008-02-22 14:53:58 UTC (rev 10088)
@@ -11,7 +11,7 @@
</parent>
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>user-guide-${translation}</artifactId>
- <version>2.0-Beta1</version>
+ <version>2.0-SNAPSHOT</version>
<packaging>jdocbook</packaging>
<name>User_Guide_(${translation})</name>
Modified: modules/portlet/trunk/federation/pom.xml
===================================================================
--- modules/portlet/trunk/federation/pom.xml 2008-02-22 13:40:29 UTC (rev 10087)
+++ modules/portlet/trunk/federation/pom.xml 2008-02-22 14:53:58 UTC (rev 10088)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>module-parent</artifactId>
- <version>2.0-Beta1</version>
+ <version>2.0-SNAPSHOT</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/portlet/trunk/jsr168api/pom.xml
===================================================================
--- modules/portlet/trunk/jsr168api/pom.xml 2008-02-22 13:40:29 UTC (rev 10087)
+++ modules/portlet/trunk/jsr168api/pom.xml 2008-02-22 14:53:58 UTC (rev 10088)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>module-parent</artifactId>
- <version>2.0-Beta1</version>
+ <version>2.0-SNAPSHOT</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/portlet/trunk/management/pom.xml
===================================================================
--- modules/portlet/trunk/management/pom.xml 2008-02-22 13:40:29 UTC (rev 10087)
+++ modules/portlet/trunk/management/pom.xml 2008-02-22 14:53:58 UTC (rev 10088)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>module-parent</artifactId>
- <version>2.0-Beta1</version>
+ <version>2.0-SNAPSHOT</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/portlet/trunk/pom.xml
===================================================================
--- modules/portlet/trunk/pom.xml 2008-02-22 13:40:29 UTC (rev 10087)
+++ modules/portlet/trunk/pom.xml 2008-02-22 14:53:58 UTC (rev 10088)
@@ -5,7 +5,7 @@
<artifactId>module-aggregator</artifactId>
<packaging>pom</packaging>
<name>JBoss Portal Portlet Module Aggregator</name>
- <version>2.0-Beta1</version>
+ <version>2.0-SNAPSHOT</version>
<url>http://labs.jboss.com/jbossportal</url>
<dependencies/>
Modified: modules/portlet/trunk/portlet/pom.xml
===================================================================
--- modules/portlet/trunk/portlet/pom.xml 2008-02-22 13:40:29 UTC (rev 10087)
+++ modules/portlet/trunk/portlet/pom.xml 2008-02-22 14:53:58 UTC (rev 10088)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>module-parent</artifactId>
- <version>2.0-Beta1</version>
+ <version>2.0-SNAPSHOT</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java 2008-02-22 13:40:29 UTC (rev 10087)
+++ modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java 2008-02-22 14:53:58 UTC (rev 10088)
@@ -328,7 +328,7 @@
if (filter.getId().equals(filterRef))
{
T filterInstance = filter.instance(type);
- if (filterInstance == null)
+ if (filterInstance != null)
{
list.add(filterInstance);
}
Modified: modules/portlet/trunk/test/pom.xml
===================================================================
--- modules/portlet/trunk/test/pom.xml 2008-02-22 13:40:29 UTC (rev 10087)
+++ modules/portlet/trunk/test/pom.xml 2008-02-22 14:53:58 UTC (rev 10088)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>module-parent</artifactId>
- <version>2.0-Beta1</version>
+ <version>2.0-SNAPSHOT</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletControllerContextImpl.java
===================================================================
--- modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletControllerContextImpl.java 2008-02-22 13:40:29 UTC (rev 10087)
+++ modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletControllerContextImpl.java 2008-02-22 14:53:58 UTC (rev 10088)
@@ -45,7 +45,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public class PortletControllerContextImpl extends AbstractPortletControllerContext
+ public class PortletControllerContextImpl extends AbstractPortletControllerContext
{
/** . */
16 years, 7 months
JBoss Portal SVN: r10087 - modules/web/trunk/build.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-02-22 08:40:29 -0500 (Fri, 22 Feb 2008)
New Revision: 10087
Modified:
modules/web/trunk/build/pom.xml
Log:
JBPORTAL-1898 : Upgrade JBoss MC to the same version than ASB4
Modified: modules/web/trunk/build/pom.xml
===================================================================
--- modules/web/trunk/build/pom.xml 2008-02-22 13:35:44 UTC (rev 10086)
+++ modules/web/trunk/build/pom.xml 2008-02-22 13:40:29 UTC (rev 10087)
@@ -37,12 +37,12 @@
<version.javassist>3.6-beta</version.javassist>
<version.jboss-remoting>2.2.1.GA</version.jboss-remoting>
<version.jboss.portal.common>1.2.0-Beta1</version.jboss.portal.common>
- <version.jboss.unit>1.2.0-Beta1</version.jboss.unit>
+ <version.jboss.unit>1.2.0-SNAPSHOT</version.jboss.unit>
<version.log4j>1.2.14</version.log4j>
<version.apache.commons-logging>1.1.1</version.apache.commons-logging>
<version.apache.commons-httpclient>3.0.1</version.apache.commons-httpclient>
<version.trove>2.1.1</version.trove>
- <version.jboss.microcontainer>2.0.0.Beta4</version.jboss.microcontainer>
+ <version.jboss.microcontainer>2.0.0.Beta9</version.jboss.microcontainer>
<version.cargo>0.9-portal</version.cargo>
<version.junit>3.8.1</version.junit>
<version.xerces>2.7.1</version.xerces>
16 years, 7 months
JBoss Portal SVN: r10086 - modules/identity/trunk/build.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-02-22 08:35:44 -0500 (Fri, 22 Feb 2008)
New Revision: 10086
Modified:
modules/identity/trunk/build/pom.xml
Log:
JBPORTAL-1898 : Upgrade JBoss MC to the same version than ASB4
Modified: modules/identity/trunk/build/pom.xml
===================================================================
--- modules/identity/trunk/build/pom.xml 2008-02-22 13:34:08 UTC (rev 10085)
+++ modules/identity/trunk/build/pom.xml 2008-02-22 13:35:44 UTC (rev 10086)
@@ -30,7 +30,7 @@
<version.ant>1.6.5</version.ant>
<version.jboss.portal.common>1.2.0-SNAPSHOT</version.jboss.portal.common>
<version.jboss.portal.test>1.2.0-SNAPSHOT</version.jboss.portal.test>
- <version.jboss.microcontainer>2.0.0.Beta4</version.jboss.microcontainer>
+ <version.jboss.microcontainer>2.0.0.Beta9</version.jboss.microcontainer>
<version.sun.opends>1.0.0-BUILD04</version.sun.opends>
<version.jboss.jbossas.core-libs>4.0.4.GA</version.jboss.jbossas.core-libs>
<version.jboss.hibernate>3.2.3.GA</version.jboss.hibernate>
16 years, 7 months
JBoss Portal SVN: r10085 - in modules: portlet/trunk and 10 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-02-22 08:34:08 -0500 (Fri, 22 Feb 2008)
New Revision: 10085
Added:
modules/portlet/trunk/.classpath
modules/portlet/trunk/.project
modules/web/trunk/.classpath
modules/web/trunk/.settings/org.eclipse.jdt.ui.prefs
Removed:
modules/web/trunk/.settings/org.eclipse.jdt.core.prefs
Modified:
modules/common/trunk/.classpath
modules/common/trunk/.project
modules/portlet/trunk/
modules/portlet/trunk/bridge/
modules/portlet/trunk/controller/
modules/portlet/trunk/federation/
modules/portlet/trunk/jsr168api/
modules/portlet/trunk/management/
modules/portlet/trunk/portlet/
modules/portlet/trunk/test/
modules/web/trunk/.project
modules/web/trunk/web/
Log:
Fix Eclipse files
Modified: modules/common/trunk/.classpath
===================================================================
--- modules/common/trunk/.classpath 2008-02-22 13:28:59 UTC (rev 10084)
+++ modules/common/trunk/.classpath 2008-02-22 13:34:08 UTC (rev 10085)
@@ -4,16 +4,6 @@
<classpathentry kind="src" path="portal/src/main/java"/>
<classpathentry kind="src" path="common/src/main/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="lib" path="thirdparty/jboss/microcontainer/lib/jboss-microcontainer.jar"/>
- <classpathentry kind="lib" path="thirdparty/sun-servlet/lib/servlet-api.jar"/>
- <classpathentry kind="lib" path="thirdparty/apache-log4j/lib/log4j.jar"/>
- <classpathentry kind="lib" path="thirdparty/apache-ant/lib/ant.jar"/>
- <classpathentry kind="lib" path="thirdparty/oswego-concurrent/lib/concurrent.jar"/>
- <classpathentry kind="lib" path="thirdparty/junit/lib/junit.jar"/>
- <classpathentry kind="lib" path="thirdparty/jbossas/core-libs/lib/jboss-j2ee.jar"/>
- <classpathentry kind="lib" path="thirdparty/apache-httpclient/lib/commons-httpclient.jar"/>
- <classpathentry kind="lib" path="thirdparty/sun-jaf/lib/activation.jar"/>
- <classpathentry kind="lib" path="/home/theute/.m2/repository/org/codehaus/cargo/cargo-core-uberjar/0.8/cargo-core-uberjar-0.8.jar"/>
- <classpathentry kind="lib" path="/home/theute/.m2/repository/ant/ant-junit/1.6.5/ant-junit-1.6.5.jar"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER/modules"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: modules/common/trunk/.project
===================================================================
--- modules/common/trunk/.project 2008-02-22 13:28:59 UTC (rev 10084)
+++ modules/common/trunk/.project 2008-02-22 13:34:08 UTC (rev 10085)
@@ -6,6 +6,11 @@
</projects>
<buildSpec>
<buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
@@ -13,5 +18,6 @@
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
</natures>
</projectDescription>
Property changes on: modules/portlet/trunk
___________________________________________________________________
Name: svn:ignore
- thirdparty
+ thirdparty
target
Added: modules/portlet/trunk/.classpath
===================================================================
--- modules/portlet/trunk/.classpath (rev 0)
+++ modules/portlet/trunk/.classpath 2008-02-22 13:34:08 UTC (rev 10085)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER/modules"/>
+ <classpathentry kind="src" path="portlet/src/main/java"/>
+ <classpathentry kind="src" path="bridge/src/main/java"/>
+ <classpathentry kind="src" path="controller/src/main/java"/>
+ <classpathentry kind="src" path="federation/src/main/java"/>
+ <classpathentry kind="src" path="management/src/main/java"/>
+ <classpathentry kind="src" path="test/src/main/java"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: modules/portlet/trunk/.project
===================================================================
--- modules/portlet/trunk/.project (rev 0)
+++ modules/portlet/trunk/.project 2008-02-22 13:34:08 UTC (rev 10085)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>module-portlet</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
Property changes on: modules/portlet/trunk/bridge
___________________________________________________________________
Name: svn:ignore
- output
+ output
target
Property changes on: modules/portlet/trunk/controller
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: modules/portlet/trunk/federation
___________________________________________________________________
Name: svn:ignore
- output
+ output
target
Property changes on: modules/portlet/trunk/jsr168api
___________________________________________________________________
Name: svn:ignore
- output
+ output
target
Property changes on: modules/portlet/trunk/management
___________________________________________________________________
Name: svn:ignore
- output
+ output
target
Property changes on: modules/portlet/trunk/portlet
___________________________________________________________________
Name: svn:ignore
- output
+ output
target
Property changes on: modules/portlet/trunk/test
___________________________________________________________________
Name: svn:ignore
- output
gen-src
+ output
gen-src
target
Added: modules/web/trunk/.classpath
===================================================================
--- modules/web/trunk/.classpath (rev 0)
+++ modules/web/trunk/.classpath 2008-02-22 13:34:08 UTC (rev 10085)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="web/src/main/java"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER/modules"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Modified: modules/web/trunk/.project
===================================================================
--- modules/web/trunk/.project 2008-02-22 13:28:59 UTC (rev 10084)
+++ modules/web/trunk/.project 2008-02-22 13:34:08 UTC (rev 10085)
@@ -6,6 +6,11 @@
</projects>
<buildSpec>
<buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
@@ -13,5 +18,6 @@
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
</natures>
</projectDescription>
Deleted: modules/web/trunk/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- modules/web/trunk/.settings/org.eclipse.jdt.core.prefs 2008-02-22 13:28:59 UTC (rev 10084)
+++ modules/web/trunk/.settings/org.eclipse.jdt.core.prefs 2008-02-22 13:34:08 UTC (rev 10085)
@@ -1,12 +0,0 @@
-#Thu Sep 20 15:12:51 CEST 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
Added: modules/web/trunk/.settings/org.eclipse.jdt.ui.prefs
===================================================================
--- modules/web/trunk/.settings/org.eclipse.jdt.ui.prefs (rev 0)
+++ modules/web/trunk/.settings/org.eclipse.jdt.ui.prefs 2008-02-22 13:34:08 UTC (rev 10085)
@@ -0,0 +1,3 @@
+#Fri Feb 22 14:30:40 CET 2008
+eclipse.preferences.version=1
+internal.default.compliance=default
Property changes on: modules/web/trunk/web
___________________________________________________________________
Name: svn:ignore
- output
+ output
target
16 years, 7 months
JBoss Portal SVN: r10084 - in modules/common/trunk: build and 3 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-02-22 08:28:59 -0500 (Fri, 22 Feb 2008)
New Revision: 10084
Modified:
modules/common/trunk/build/pom.xml
modules/common/trunk/common/pom.xml
modules/common/trunk/mc/pom.xml
modules/common/trunk/pom.xml
modules/common/trunk/portal/pom.xml
Log:
JBPORTAL-1898 : Upgrade JBoss MC to the same version than ASB4
Modified: modules/common/trunk/build/pom.xml
===================================================================
--- modules/common/trunk/build/pom.xml 2008-02-22 13:20:01 UTC (rev 10083)
+++ modules/common/trunk/build/pom.xml 2008-02-22 13:28:59 UTC (rev 10084)
@@ -10,7 +10,7 @@
<artifactId>module-parent</artifactId>
<packaging>pom</packaging>
<name>JBoss Portal Modules Common</name>
- <version>1.2.0-Beta1</version>
+ <version>1.2.0-SNAPSHOT</version>
<url>http://labs.jboss.com/jbossportal</url>
<properties>
@@ -24,7 +24,7 @@
<version.jboss-common-core>2.2.0.GA</version.jboss-common-core>
<version.log4j>1.2.14</version.log4j>
<version.apache.commons-httpclient>3.0.1</version.apache.commons-httpclient>
- <version.jboss.microcontainer>2.0.0.Beta4</version.jboss.microcontainer>
+ <version.jboss.microcontainer>2.0.0.Beta9</version.jboss.microcontainer>
<version.cargo>0.8</version.cargo>
<version.junit>3.8.1</version.junit>
<version.ant>1.6.5</version.ant>
Modified: modules/common/trunk/common/pom.xml
===================================================================
--- modules/common/trunk/common/pom.xml 2008-02-22 13:20:01 UTC (rev 10083)
+++ modules/common/trunk/common/pom.xml 2008-02-22 13:28:59 UTC (rev 10084)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.portal.common</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-Beta1</version>
+ <version>1.2.0-SNAPSHOT</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/common/trunk/mc/pom.xml
===================================================================
--- modules/common/trunk/mc/pom.xml 2008-02-22 13:20:01 UTC (rev 10083)
+++ modules/common/trunk/mc/pom.xml 2008-02-22 13:28:59 UTC (rev 10084)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.portal.common</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-Beta1</version>
+ <version>1.2.0-SNAPSHOT</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/common/trunk/pom.xml
===================================================================
--- modules/common/trunk/pom.xml 2008-02-22 13:20:01 UTC (rev 10083)
+++ modules/common/trunk/pom.xml 2008-02-22 13:28:59 UTC (rev 10084)
@@ -5,7 +5,7 @@
<artifactId>module-aggregator</artifactId>
<packaging>pom</packaging>
<name>JBoss Portal Modules Common (aggregator)</name>
- <version>1.2.0-Beta1</version>
+ <version>1.2.0-SNAPSHOT</version>
<distributionManagement>
<repository>
Modified: modules/common/trunk/portal/pom.xml
===================================================================
--- modules/common/trunk/portal/pom.xml 2008-02-22 13:20:01 UTC (rev 10083)
+++ modules/common/trunk/portal/pom.xml 2008-02-22 13:28:59 UTC (rev 10084)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.portal.common</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-Beta1</version>
+ <version>1.2.0-SNAPSHOT</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
16 years, 7 months