JBoss Portal SVN: r10369 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-03-24 18:48:30 -0400 (Mon, 24 Mar 2008)
New Revision: 10369
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/installation.xml
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml
Log:
minor corrections for consistency
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml 2008-03-24 14:29:56 UTC (rev 10368)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml 2008-03-24 22:48:30 UTC (rev 10369)
@@ -14,7 +14,7 @@
</chapterinfo>
<title>Customizing your Installation</title>
<para>
- This chapter describes how to customize the default installation. This includes the JBoss EAP or JBoss AS listening port, email and proxy settings, and database dialect settings. For further configuration details, please see <xref linkend="portaldescriptors"/> and <xref linkend="troubleshooting"/>.
+ This chapter describes how to customize the default installation. This includes the JBoss EAP or JBoss AS listening port, email and proxy settings, and database dialect settings. For further configuration details, refer to <xref linkend="portaldescriptors"/> and <xref linkend="troubleshooting"/>.
</para>
<sect1>
<title>Changing the Port</title>
@@ -31,7 +31,7 @@
This example changes the default port to port 8088. The JBoss EAP or JBoss AS server must be restarted before the new port settings will take affect.
</para>
<para>
- The default SSL port is 8843. To enable HTTPS support, refer to the <ulink url="http://docs.jboss.org/jbossas/jboss4guide/r4/html/ch9.chapt.html#d0e21962">JBoss AS Guide</ulink>. For further information, please see the <ulink url="http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html">Tomcat's SSL configuration how-to</ulink>.
+ The default SSL port is 8843. To enable HTTPS support, refer to the <ulink url="http://docs.jboss.org/jbossas/jboss4guide/r4/html/ch9.chapt.html#d0e21962">JBoss AS Guide</ulink>. For further information, refer to <ulink url="http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html">Tomcat's SSL configuration how-to</ulink>.
</para>
<para>
Please refer to <xref linkend="wsrp-ports"/> to update the WSRP service after having changed the port.
@@ -117,7 +117,7 @@
</listitem>
<listitem>
<para>
- Re-build and re-deploy JBoss Portal. See <xref linkend="install_source"/> for build instructions.
+ Rebuild and redeploy JBoss Portal. Refer to <xref linkend="install_source"/> for build instructions.
</para>
</listitem>
</orderedlist>
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/installation.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/installation.xml 2008-03-24 14:29:56 UTC (rev 10368)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/installation.xml 2008-03-24 22:48:30 UTC (rev 10369)
@@ -2,7 +2,7 @@
<chapter id="installation">
<title>Installation</title>
<para>Depending on your needs, there are several different methods to install JBoss Portal. Pre-configured clustered versions (<computeroutput>JBoss Portal Binary (Clustered)</computeroutput>) are available from the
- <ulink url="http://labs.jboss.com/portal/jbossportal/download/index.html">JBoss Portal Downloads</ulink> page. Clustered versions of JBoss Portal must be deployed in the <filename>JBOSS_INSTALLATION_DIRECTORY/server/all/deploy/</filename> directory. All JBoss AS instances must reference the same datasource. See <xref linkend="install_source_env"/> for details on how to configure JBoss Portal for clustering.
+ <ulink url="http://labs.jboss.com/portal/jbossportal/download/index.html">JBoss Portal Downloads</ulink> page. Clustered versions of JBoss Portal must be deployed in the <filename>JBOSS_INSTALLATION_DIRECTORY/server/all/deploy/</filename> directory. All JBoss AS instances must reference the same datasource. Refer to <xref linkend="install_source_env"/> for details on how to configure JBoss Portal for clustering.
</para>
<para>
An environment variable, <computeroutput>JBOSS_HOME</computeroutput>, is configured in <xref linkend="install_source_env"/>. References to <computeroutput>$JBOSS_HOME</computeroutput> assume this to be your <replaceable>JBOSS_INSTALLATION_DIRECTORY</replaceable>.
@@ -259,7 +259,7 @@
</imageobject>
</mediaobject>
<para>
- If the source files were obtained from SVN, change into the <filename>trunk/src/</filename> directory to see the directories from the above image. As well, there will be an empty <filename>thirdparty</filename> directory. This directory will contain files after building the JBoss Portal source code (see <xref linkend="building_deploying_from_source" />). For more information about the JBoss Portal SVN repository, and accessing different versions of the JBoss Portal codebase, please visit the <ulink url="http://wiki.jboss.org/wiki/Wiki.jsp?page=PortalSVNRepo">JBoss Portal SVN Repo</ulink> page on the JBoss Wiki.
+ If the source files were obtained from SVN, change into the <filename>trunk/src/</filename> directory to see the directories from the above image. As well, there will be an empty <filename>thirdparty</filename> directory. This directory will contain files after building the JBoss Portal source code (refer to <xref linkend="building_deploying_from_source" />). For more information about the JBoss Portal SVN repository, and accessing different versions of the JBoss Portal codebase, please visit the <ulink url="http://wiki.jboss.org/wiki/Wiki.jsp?page=PortalSVNRepo">JBoss Portal SVN Repo</ulink> page on the JBoss Wiki.
</para>
</sect2>
<sect2>
@@ -364,7 +364,7 @@
<note>
<title>Portal Modules</title>
<para>
- The previous steps install a bare version of JBoss Portal. In previous versions, several additional modules were deployed as well, but this has since been modularized to provide greater flexibility. To deploy additional modules, see the <ulink url="http://wiki.jboss.org/wiki/Wiki.jsp?page=PortalModules">Portal's module list</ulink> for more information. To deploy all modules at once, change into the <filename>build</filename> directory. If you are running Linux, run the <command>./build.sh deploy-all</command> command. If you are running Microsoft Windows, run the <command>build.bat deploy-all</command> command.
+ The previous steps install a bare version of JBoss Portal. In previous versions, several additional modules were deployed as well, but this has since been modularized to provide greater flexibility. To deploy additional modules, refer to the <ulink url="http://wiki.jboss.org/wiki/Wiki.jsp?page=PortalModules">Portal's module list</ulink> for more information. To deploy all modules at once, change into the <filename>build</filename> directory. If you are running Linux, run the <command>./build.sh deploy-all</command> command. If you are running Microsoft Windows, run the <command>build.bat deploy-all</command> command.
</para>
</note>
</para>
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml 2008-03-24 14:29:56 UTC (rev 10368)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml 2008-03-24 22:48:30 UTC (rev 10369)
@@ -223,7 +223,7 @@
rResponse.setContentType("text/html");</screen></term>
<listitem>
<para>
- As in the servlet-world, you must declare what content-type the portlet will be
+ As in the servlet world, you must declare what content-type the portlet will be
responding in. Do this before starting to write content, or the portlet will throw an exception.
</para>
</listitem>
@@ -649,7 +649,7 @@
<sect3>
<title>Package Structure</title>
<para>
- The application descriptors for the HelloWorldJSPPortlet portlet are similar to those from the HelloWorldPortlet (<xref linkend="first_portlet_descriptors"/>). See <xref linkend="descriptors_portlet"/> for further information about application descriptors.
+ The application descriptors for the HelloWorldJSPPortlet portlet are similar to those from the HelloWorldPortlet (<xref linkend="first_portlet_descriptors"/>). Refer to <xref linkend="descriptors_portlet"/> for further information about application descriptors.
</para>
<para>
The HelloWorldJSPPortlet portlet contains the traditional portlet and JBoss Portal specific application descriptors. The following is an example of the directory structure of the HelloWorldJSPPortlet portlet:
@@ -775,7 +775,7 @@
</screen></term>
<listitem>
<para>
- As in the servlet-world, you must declare what content-type the portlet will be responding in. Do this before starting to write content, or the portlet will throw an exception.
+ As in the servlet world, you must declare what content-type the portlet will be responding in. Do this before starting to write content, or the portlet will throw an exception.
</para>
</listitem>
</varlistentry>
18 years, 1 month
JBoss Portal SVN: r10368 - in modules/test/trunk: .settings and 30 other directories.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2008-03-24 10:29:56 -0400 (Mon, 24 Mar 2008)
New Revision: 10368
Added:
modules/test/trunk/.settings/org.eclipse.jdt.ui.prefs
modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/
modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/ClickLinkCommand.java
modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/ClickLinkResponse.java
modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/GetPageCommand.java
modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/GetPageResponse.java
modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/WebPageConversation.java
modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/WebPageData.java
modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/WebPageDriverCommand.java
modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/WebPageDriverResponse.java
modules/test/trunk/remote/src/test/build.xml
modules/test/trunk/remote/src/test/java/org/jboss/unit/
modules/test/trunk/remote/src/test/java/org/jboss/unit/test/
modules/test/trunk/remote/src/test/java/org/jboss/unit/test/remote/
modules/test/trunk/remote/src/test/java/org/jboss/unit/test/remote/ActualBootstrap.java
modules/test/trunk/remote/src/test/java/org/jboss/unit/test/remote/WebBootstrap.java
modules/test/trunk/remote/src/test/java/org/jboss/unit/test/remote/webpage/
modules/test/trunk/remote/src/test/java/org/jboss/unit/test/remote/webpage/ClickLinkCommandTestCase.java
modules/test/trunk/remote/src/test/java/org/jboss/unit/test/remote/webpage/GetPageCommandTestCase.java
modules/test/trunk/remote/src/test/resources/ear/
modules/test/trunk/remote/src/test/resources/ear/META-INF/
modules/test/trunk/remote/src/test/resources/ear/META-INF/application.xml
modules/test/trunk/remote/src/test/resources/ear/META-INF/jboss-app.xml
modules/test/trunk/remote/src/test/resources/remote-jboss-unit.xml
modules/test/trunk/remote/src/test/resources/server-beans.xml
modules/test/trunk/remote/src/test/resources/servers.xml
modules/test/trunk/remote/src/test/resources/war/
modules/test/trunk/remote/src/test/resources/war/WEB-INF/
modules/test/trunk/remote/src/test/resources/war/WEB-INF/web.xml
modules/test/trunk/remote/src/test/resources/war/index.html
modules/test/trunk/remote/src/test/resources/war/link1.html
Modified:
modules/test/trunk/
modules/test/trunk/.classpath
modules/test/trunk/.settings/org.eclipse.jdt.core.prefs
modules/test/trunk/build/pom.xml
modules/test/trunk/docs/
modules/test/trunk/docs/user-guide/
modules/test/trunk/mc/
modules/test/trunk/remote/
modules/test/trunk/remote/pom.xml
modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/handler/http/HTTPHandler.java
modules/test/trunk/test/agent/
modules/test/trunk/test/core/
modules/test/trunk/test/generic/
modules/test/trunk/test/jboss/
modules/test/trunk/test/opends/
modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/impl/generic/agent/GenericTestAgent.java
modules/test/trunk/tooling/ant/
modules/test/trunk/tooling/core/
modules/test/trunk/tooling/examples/ant/
modules/test/trunk/tooling/maven2/
modules/test/trunk/unit/
Log:
core selenium integration for web browser based test cases
Property changes on: modules/test/trunk
___________________________________________________________________
Name: svn:ignore
- thirdparty
+ thirdparty
bin
Modified: modules/test/trunk/.classpath
===================================================================
--- modules/test/trunk/.classpath 2008-03-23 00:15:32 UTC (rev 10367)
+++ modules/test/trunk/.classpath 2008-03-24 14:29:56 UTC (rev 10368)
@@ -1,27 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="test/src/main"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="lib" path="thirdparty/junit/lib/junit.jar"/>
- <classpathentry kind="lib" path="thirdparty/apache-log4j/lib/log4j.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss-portal/modules/common/lib/portal-common-lib.jar"/>
- <classpathentry kind="lib" path="thirdparty/apache-httpclient/lib/commons-httpclient.jar"/>
- <classpathentry kind="lib" path="test/selenium-java-client-driver.jar"/>
- <classpathentry kind="lib" path="thirdparty/jbossas/core-libs/lib/jboss-j2ee.jar"/>
- <classpathentry kind="lib" path="thirdparty/jbossas/core-libs/lib/jboss-jca.jar"/>
- <classpathentry kind="lib" path="thirdparty/jbossas/core-libs/lib/jboss-local-jdbc.jar"/>
- <classpathentry kind="lib" path="thirdparty/hibernate/lib/hibernate3.jar"/>
- <classpathentry kind="lib" path="thirdparty/jbossas/core-libs/lib/jnp-client.jar"/>
- <classpathentry kind="lib" path="thirdparty/jbossas/core-libs/lib/jnpserver.jar"/>
- <classpathentry kind="lib" path="thirdparty/jbossas/core-libs/lib/jboss-common.jar"/>
- <classpathentry kind="lib" path="thirdparty/jbossas/core-libs/lib/jboss-transaction.jar"/>
- <classpathentry kind="lib" path="thirdparty/jbossas/core-libs/lib/jboss.jar"/>
- <classpathentry kind="lib" path="thirdparty/jbossas/core-libs/lib/jboss-system.jar"/>
- <classpathentry kind="lib" path="thirdparty/jbossas/core-libs/lib/jboss-jmx.jar"/>
- <classpathentry kind="lib" path="thirdparty/sun-opends/lib/OpenDS.jar"/>
- <classpathentry kind="lib" path="thirdparty/codehaus/cargo/lib/cargo-core-uberjar-0.9.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss/remoting/lib/jboss-remoting.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss/microcontainer/lib/jboss-microcontainer.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss/microcontainer/lib/jboss-dependency.jar"/>
+ <classpathentry kind="src" path="test/src/main/java"/>
+ <classpathentry kind="src" path="mc/src/main/java"/>
+ <classpathentry kind="src" path="mc/src/test/java"/>
+ <classpathentry kind="src" path="remote/src/main/java"/>
+ <classpathentry kind="src" path="remote/src/test/java"/>
+ <classpathentry kind="src" path="unit/src/main/java"/>
+ <classpathentry kind="src" path="unit/src/test/java"/>
+ <classpathentry kind="lib" path="/home/soshah/.m2/repository/apache-log4j/log4j/1.2.14/log4j-1.2.14.jar"/>
+ <classpathentry kind="lib" path="/home/soshah/.m2/repository/apache-httpclient/commons-httpclient/3.0.1/commons-httpclient-3.0.1.jar"/>
+ <classpathentry kind="lib" path="/home/soshah/.m2/repository/org/jboss/microcontainer/jboss-kernel/2.0.0.Beta9/jboss-kernel-2.0.0.Beta9.jar"/>
+ <classpathentry kind="lib" path="/home/soshah/.m2/repository/org/jboss/microcontainer/jboss-dependency/2.0.0.Beta9/jboss-dependency-2.0.0.Beta9.jar"/>
+ <classpathentry kind="lib" path="/home/soshah/.m2/repository/jboss/jbossas/core-libs/jboss-transaction/4.0.4.GA/jboss-transaction-4.0.4.GA.jar"/>
+ <classpathentry kind="lib" path="/home/soshah/.m2/repository/jboss/jbossas/core-libs/jboss-jca/4.0.4.GA/jboss-jca-4.0.4.GA.jar"/>
+ <classpathentry kind="lib" path="/home/soshah/.m2/repository/jboss/jbossas/core-libs/jnpserver/4.0.4.GA/jnpserver-4.0.4.GA.jar"/>
+ <classpathentry kind="lib" path="/home/soshah/.m2/repository/jboss/jbossas/core-libs/jboss-local-jdbc/4.0.4.GA/jboss-local-jdbc-4.0.4.GA.jar"/>
+ <classpathentry kind="lib" path="/home/soshah/.m2/repository/jboss/jbossas/core-libs/jboss/4.0.4.GA/jboss-4.0.4.GA.jar"/>
+ <classpathentry kind="lib" path="/home/soshah/.m2/repository/jboss/jboss-j2ee/4.2.0.GA/jboss-j2ee-4.2.0.GA.jar"/>
+ <classpathentry kind="lib" path="/home/soshah/.m2/repository/jboss/jboss-common-core/2.2.0.GA/jboss-common-core-2.2.0.GA.jar"/>
+ <classpathentry kind="lib" path="/home/soshah/.m2/repository/jboss/jboss-jmx/4.2.0.GA/jboss-jmx-4.2.0.GA.jar"/>
+ <classpathentry kind="lib" path="/home/soshah/.m2/repository/jboss/jboss-system/4.2.0.GA/jboss-system-4.2.0.GA.jar"/>
+ <classpathentry kind="lib" path="/home/soshah/.m2/repository/jboss/jboss-common-logging-spi/2.0.4.GA/jboss-common-logging-spi-2.0.4.GA.jar"/>
+ <classpathentry kind="lib" path="/home/soshah/.m2/repository/jboss/jboss-remoting/2.2.1.GA/jboss-remoting-2.2.1.GA.jar"/>
+ <classpathentry kind="lib" path="/home/soshah/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar"/>
+ <classpathentry kind="lib" path="/home/soshah/.m2/repository/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar"/>
+ <classpathentry kind="lib" path="/home/soshah/.m2/repository/org/openqa/selenium/client-drivers/selenium-java-client-driver/0.9.2/selenium-java-client-driver-0.9.2.jar"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: modules/test/trunk/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- modules/test/trunk/.settings/org.eclipse.jdt.core.prefs 2008-03-23 00:15:32 UTC (rev 10367)
+++ modules/test/trunk/.settings/org.eclipse.jdt.core.prefs 2008-03-24 14:29:56 UTC (rev 10368)
@@ -1,12 +1,12 @@
-#Thu Sep 20 15:11:39 CEST 2007
+#Mon Mar 03 17:40:33 EST 2008
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.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.compliance=1.5
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
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Added: modules/test/trunk/.settings/org.eclipse.jdt.ui.prefs
===================================================================
--- modules/test/trunk/.settings/org.eclipse.jdt.ui.prefs (rev 0)
+++ modules/test/trunk/.settings/org.eclipse.jdt.ui.prefs 2008-03-24 14:29:56 UTC (rev 10368)
@@ -0,0 +1,3 @@
+#Mon Mar 03 17:40:33 EST 2008
+eclipse.preferences.version=1
+internal.default.compliance=default
Modified: modules/test/trunk/build/pom.xml
===================================================================
--- modules/test/trunk/build/pom.xml 2008-03-23 00:15:32 UTC (rev 10367)
+++ modules/test/trunk/build/pom.xml 2008-03-24 14:29:56 UTC (rev 10368)
@@ -66,7 +66,12 @@
<releases>
<enabled>false</enabled>
</releases>
- </repository>
+ </repository>
+ <repository>
+ <id>openqa-releases</id>
+ <name>OpenQA Selenium Repository</name>
+ <url>http://archiva.openqa.org/repository/releases/</url>
+ </repository>
</repositories>
<pluginRepositories>
<pluginRepository>
@@ -75,8 +80,7 @@
<snapshots>
<enabled>true</enabled>
</snapshots>
- </pluginRepository>
-
+ </pluginRepository>
</pluginRepositories>
<build>
Property changes on: modules/test/trunk/docs
___________________________________________________________________
Name: svn:ignore
+ docbook-support
Property changes on: modules/test/trunk/docs/user-guide
___________________________________________________________________
Name: svn:ignore
+ build
target
Property changes on: modules/test/trunk/mc
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: modules/test/trunk/remote
___________________________________________________________________
Name: svn:ignore
+ target
Modified: modules/test/trunk/remote/pom.xml
===================================================================
--- modules/test/trunk/remote/pom.xml 2008-03-23 00:15:32 UTC (rev 10367)
+++ modules/test/trunk/remote/pom.xml 2008-03-24 14:29:56 UTC (rev 10368)
@@ -14,43 +14,187 @@
<dependencies>
<dependency>
<groupId>org.jboss.unit</groupId>
- <artifactId>jboss-unit</artifactId>
+ <artifactId>jboss-unit</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.unit</groupId>
- <artifactId>portal-test</artifactId>
- <version>${project.version}</version>
+ <artifactId>portal-test</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-kernel</artifactId>
</dependency>
<dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-container</artifactId>
+ <version>${version.jboss.microcontainer}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-dependency</artifactId>
+ <version>${version.jboss.microcontainer}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openqa.selenium.client-drivers</groupId>
+ <artifactId>selenium-java-client-driver</artifactId>
+ <version>0.9.2</version>
+ </dependency>
+ <!--
+ <dependency>
<groupId>apache-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss.microcontainer</groupId>
- <artifactId>jboss-kernel</artifactId>
- </dependency>
+ <groupId>apache-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ </dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
+ </dependency>
+ -->
+
+ <!-- test scope dependencies -->
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ <scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.jboss.unit</groupId>
+ <artifactId>portal-test-generic</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.unit</groupId>
+ <artifactId>jboss-unit-mc</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-common-core</artifactId>
+ <version>2.2.3.GA</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-remoting</artifactId>
+ <version>2.2.1.GA</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>apache-log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.14</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ <version>1.3</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
- <plugins>
+ <plugins>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <skip>false</skip>
- <includes>
- <include>**/*Tests.java</include>
- </includes>
- </configuration>
- </plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>selenium-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>start</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>start-server</goal>
+ </goals>
+ <configuration>
+ <background>true</background>
+ <port>12345</port>
+ </configuration>
+ </execution>
+
+ <execution>
+ <id>stop</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>stop-server</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.jvnet.maven-antrun-extended-plugin</groupId>
+ <artifactId>maven-antrun-extended-plugin</artifactId>
+ <version>1.13</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.unit</groupId>
+ <artifactId>jboss-unit-tooling-ant</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.unit</groupId>
+ <artifactId>jboss-unit-tooling-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <!--stuff to run servers for tests-->
+ <dependency>
+ <groupId>cargo</groupId>
+ <artifactId>cargo-ant</artifactId>
+ <version>${version.cargo}</version>
+ </dependency>
+ <dependency>
+ <groupId>cargo</groupId>
+ <artifactId>cargo-core-uberjar</artifactId>
+ <version>${version.cargo}</version>
+ </dependency>
+ </dependencies>
+ <executions>
+ <execution>
+ <id>test</id>
+ <phase>integration-test</phase>
+ <configuration>
+ <tasks>
+ <property name="test_classpath" refid="maven.test.classpath"/>
+ <property name="plugin_classpath" refid="maven.plugin.classpath"/>
+ <property name="project.version" value="${project.version}"/>
+
+ <property name="dependency.jboss-unit.jar" value="${maven.dependency.org.jboss.unit.jboss-unit.jar.path}"/>
+ <property name="dependency.portal-test-generic.jar" value="${maven.dependency.org.jboss.unit.portal-test-generic.jar.path}"/>
+ <property name="dependency.portal-test.jar" value="${maven.dependency.org.jboss.unit.portal-test.jar.path}"/>
+ <property name="dependency.jboss-unit-mc.jar" value="${maven.dependency.org.jboss.unit.jboss-unit-mc.jar.path}"/>
+ <property name="dependency.jboss-kernel.jar" value="${maven.dependency.org.jboss.microcontainer.jboss-kernel.jar.path}"/>
+ <property name="dependency.jboss-container.jar" value="${maven.dependency.org.jboss.microcontainer.jboss-container.jar.path}"/>
+ <property name="dependency.jboss-dependency.jar" value="${maven.dependency.org.jboss.microcontainer.jboss-dependency.jar.path}"/>
+ <property name="dependency.jboss-common-core.jar" value="${maven.dependency.org.jboss.jboss-common-core.jar.path}"/>
+ <property name="dependency.jboss-remoting.jar" value="${maven.dependency.jboss.jboss-remoting.jar.path}"/>
+
+
+ <ant antfile="${basedir}/src/test/build.xml">
+ <target name="run.test.remote"/>
+ </ant>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
<properties>
-
</properties>
</project>
Modified: modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/handler/http/HTTPHandler.java
===================================================================
--- modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/handler/http/HTTPHandler.java 2008-03-23 00:15:32 UTC (rev 10367)
+++ modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/handler/http/HTTPHandler.java 2008-03-24 14:29:56 UTC (rev 10368)
@@ -34,6 +34,13 @@
import org.jboss.unit.remote.driver.handler.http.command.DoPostCommand;
import org.jboss.unit.remote.driver.handler.http.command.DoGetCommand;
import org.jboss.unit.remote.driver.handler.http.command.HTTPDriverCommand;
+import org.jboss.unit.remote.driver.webpage.WebPageDriverResponse;
+import org.jboss.unit.remote.driver.webpage.GetPageResponse;
+import org.jboss.unit.remote.driver.webpage.GetPageCommand;
+import org.jboss.unit.remote.driver.webpage.ClickLinkResponse;
+import org.jboss.unit.remote.driver.webpage.ClickLinkCommand;
+import org.jboss.unit.remote.driver.webpage.WebPageDriverCommand;
+import org.jboss.unit.remote.driver.webpage.WebPageConversation;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -75,6 +82,20 @@
}
}
}
+ else if(responseContext.getResponse() instanceof WebPageDriverResponse)
+ {
+ WebPageDriverResponse resp = (WebPageDriverResponse)responseContext.getResponse();
+ if(resp instanceof GetPageResponse)
+ {
+ GetPageResponse pr = (GetPageResponse)resp;
+ return new RemoteDriverCommandContext(responseContext, new GetPageCommand(pr.getUri()));
+ }
+ else if(resp instanceof ClickLinkResponse)
+ {
+ ClickLinkResponse pr = (ClickLinkResponse)resp;
+ return new RemoteDriverCommandContext(responseContext, new ClickLinkCommand(pr.getUri(), pr.getLink()));
+ }
+ }
//
if (nextHandler != null)
@@ -102,6 +123,18 @@
//
return httpConversation.invoke(commandContext);
}
+ else if(commandContext.getCommand() instanceof WebPageDriverCommand)
+ {
+ WebPageConversation webConversation = (WebPageConversation)conversation.getAttribute("web.conversation");
+
+ if(webConversation == null)
+ {
+ webConversation = new WebPageConversation(conversation);
+ conversation.setAttribute("web.conversation", webConversation);
+ }
+
+ return webConversation.invoke(commandContext);
+ }
//
if (nextHandler != null)
Added: modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/ClickLinkCommand.java
===================================================================
--- modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/ClickLinkCommand.java (rev 0)
+++ modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/ClickLinkCommand.java 2008-03-24 14:29:56 UTC (rev 10368)
@@ -0,0 +1,88 @@
+/******************************************************************************
+ * 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.unit.remote.driver.webpage;
+
+import java.net.URI;
+
+import org.jboss.unit.remote.driver.RemoteDriverCommandContext;
+
+import com.thoughtworks.selenium.DefaultSelenium;
+import com.thoughtworks.selenium.Selenium;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class ClickLinkCommand extends WebPageDriverCommand
+{
+ private String link = null;
+
+ /**
+ *
+ * @param uri
+ * @param link
+ */
+ public ClickLinkCommand(URI uri, String link)
+ {
+ super(uri);
+ this.link = link;
+ }
+
+
+ public String getLink()
+ {
+ return link;
+ }
+
+
+ /**
+ *
+ */
+ public void execute(RemoteDriverCommandContext webPageCommandContext)
+ {
+ Selenium browser = null;
+ try
+ {
+ browser = new DefaultSelenium("localhost",12345, "*firefox /home/soshah/firefox/firefox-bin", uri.toString());
+ browser.start();
+ browser.open(uri.toString());
+
+
+ //Now click the link on this page
+ browser.click(this.link);
+
+ //Get the page data now
+ WebPageData pageData = this.extractPageData(browser);
+
+
+ webPageCommandContext.getPayload().put("pageData", pageData);
+ }
+ finally
+ {
+ if(browser != null)
+ {
+ browser.stop();
+ }
+ }
+ }
+}
Added: modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/ClickLinkResponse.java
===================================================================
--- modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/ClickLinkResponse.java (rev 0)
+++ modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/ClickLinkResponse.java 2008-03-24 14:29:56 UTC (rev 10368)
@@ -0,0 +1,50 @@
+/******************************************************************************
+ * 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.unit.remote.driver.webpage;
+
+import java.net.URI;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class ClickLinkResponse extends WebPageDriverResponse
+{
+ private String link = null;
+
+ /**
+ *
+ * @param pageUrl
+ */
+ public ClickLinkResponse(URI uri, String link)
+ {
+ super(uri);
+ this.link = link;
+ }
+
+ public String getLink()
+ {
+ return link;
+ }
+
+}
Added: modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/GetPageCommand.java
===================================================================
--- modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/GetPageCommand.java (rev 0)
+++ modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/GetPageCommand.java 2008-03-24 14:29:56 UTC (rev 10368)
@@ -0,0 +1,74 @@
+/******************************************************************************
+ * 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.unit.remote.driver.webpage;
+
+import java.net.URI;
+
+import org.jboss.unit.remote.driver.RemoteDriverCommandContext;
+
+import com.thoughtworks.selenium.Selenium;
+import com.thoughtworks.selenium.DefaultSelenium;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class GetPageCommand extends WebPageDriverCommand
+{
+ /**
+ *
+ * @param uri
+ */
+ public GetPageCommand(URI uri)
+ {
+ super(uri);
+ }
+
+
+ /**
+ *
+ * @param webPageCommandContext
+ * @return
+ */
+ public void execute(RemoteDriverCommandContext webPageCommandContext)
+ {
+ Selenium browser = null;
+ try
+ {
+ browser = new DefaultSelenium("localhost",12345, "*firefox /home/soshah/firefox/firefox-bin", uri.toString());
+ browser.start();
+ browser.open(uri.toString());
+
+ WebPageData pageData = this.extractPageData(browser);
+
+ webPageCommandContext.getPayload().put("pageData", pageData);
+ }
+ finally
+ {
+ if(browser != null)
+ {
+ browser.stop();
+ }
+ }
+ }
+}
Added: modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/GetPageResponse.java
===================================================================
--- modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/GetPageResponse.java (rev 0)
+++ modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/GetPageResponse.java 2008-03-24 14:29:56 UTC (rev 10368)
@@ -0,0 +1,41 @@
+/******************************************************************************
+ * 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.unit.remote.driver.webpage;
+
+import java.net.URI;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class GetPageResponse extends WebPageDriverResponse
+{
+ /**
+ *
+ * @param pageUrl
+ */
+ public GetPageResponse(URI uri)
+ {
+ super(uri);
+ }
+}
Added: modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/WebPageConversation.java
===================================================================
--- modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/WebPageConversation.java (rev 0)
+++ modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/WebPageConversation.java 2008-03-24 14:29:56 UTC (rev 10368)
@@ -0,0 +1,112 @@
+/******************************************************************************
+ * 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.unit.remote.driver.webpage;
+
+import org.jboss.portal.test.framework.server.Node;
+import org.jboss.unit.driver.DriverCommand;
+import org.jboss.portal.test.framework.server.NodeId;
+import org.jboss.unit.remote.driver.RemoteDriverCommandContext;
+import org.jboss.unit.remote.driver.RemoteDriverResponseContext;
+import org.jboss.unit.remote.driver.TestConversation;
+import org.jboss.unit.remote.ResponseContext;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class WebPageConversation
+{
+ private TestConversation currentConversation = null;
+
+ /**
+ *
+ * @param currentConversation
+ */
+ public WebPageConversation(TestConversation currentConversation)
+ {
+ this.currentConversation = currentConversation;
+ }
+
+ /**
+ *
+ * @param commandContext
+ * @return
+ * @throws Exception
+ */
+ public RemoteDriverResponseContext invoke(RemoteDriverCommandContext commandContext) throws Exception
+ {
+ RemoteDriverResponseContext responseContext = null;
+
+ DriverCommand command = commandContext.getCommand();
+ if(command instanceof WebPageDriverCommand)
+ {
+ ((WebPageDriverCommand)command).execute(commandContext);
+
+ //Push the data extracted from executing the command over to the Server Side Extension of the Test
+ this.pushContext(commandContext);
+
+ //Generate a Response
+ responseContext = this.generateResponse(commandContext);
+ }
+
+ return responseContext;
+ }
+
+ /**
+ *
+ * @param commandContext
+ */
+ private void pushContext(RemoteDriverCommandContext commandContext)
+ {
+ NodeId nodeId = NodeId.locate();
+
+ //Update to the next node
+ Node node = this.currentConversation.getDriver().getNodeManager().getNode(nodeId);
+ if (node == null)
+ {
+ throw new RuntimeException("Server Side Node could not be located. Make sure the Server Side Test Driver is deployed");
+ }
+ this.currentConversation.setNode(node);
+
+ // Push context to the node
+ this.currentConversation.pushContext(commandContext);
+ }
+
+ /**
+ *
+ * @param commandContext
+ */
+ private RemoteDriverResponseContext generateResponse(RemoteDriverCommandContext commandContext)
+ {
+ RemoteDriverResponseContext remoteResponseContext = null;
+
+ ResponseContext responseContext = this.currentConversation.popContext();
+
+ if(responseContext != null)
+ {
+ remoteResponseContext = commandContext.createResponseContext(responseContext.getResponse());
+ }
+
+ return remoteResponseContext;
+ }
+}
Added: modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/WebPageData.java
===================================================================
--- modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/WebPageData.java (rev 0)
+++ modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/WebPageData.java 2008-03-24 14:29:56 UTC (rev 10368)
@@ -0,0 +1,176 @@
+/******************************************************************************
+ * 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.unit.remote.driver.webpage;
+
+import java.io.Serializable;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class WebPageData implements Serializable
+{
+ private String alert = null;
+ private String[] buttons = null;
+ private String[] fields = null;
+ private String[] links = null;
+ private String[] windowIds = null;
+ private String[] windowNames = null;
+ private String[] windowTitles = null;
+ private String bodyText = null;
+ private String confirmation = null;
+ private String cookie = null;
+ private String htmlSource = null;
+ private String location = null;
+ private String prompt = null;
+
+ public String getAlert()
+ {
+ return alert;
+ }
+
+ public void setAlert(String alert)
+ {
+ this.alert = alert;
+ }
+
+ public String getBodyText()
+ {
+ return bodyText;
+ }
+
+ public void setBodyText(String bodyText)
+ {
+ this.bodyText = bodyText;
+ }
+
+ public String[] getButtons()
+ {
+ return buttons;
+ }
+
+ public void setButtons(String[] buttons)
+ {
+ this.buttons = buttons;
+ }
+
+ public String getConfirmation()
+ {
+ return confirmation;
+ }
+
+ public void setConfirmation(String confirmation)
+ {
+ this.confirmation = confirmation;
+ }
+
+ public String getCookie()
+ {
+ return cookie;
+ }
+
+ public void setCookie(String cookie)
+ {
+ this.cookie = cookie;
+ }
+
+ public String[] getFields()
+ {
+ return fields;
+ }
+
+ public void setFields(String[] fields)
+ {
+ this.fields = fields;
+ }
+
+ public String getPrompt()
+ {
+ return prompt;
+ }
+
+ public void setPrompt(String prompt)
+ {
+ this.prompt = prompt;
+ }
+
+ public String getHtmlSource()
+ {
+ return htmlSource;
+ }
+
+ public void setHtmlSource(String htmlSource)
+ {
+ this.htmlSource = htmlSource;
+ }
+
+ public String[] getLinks()
+ {
+ return links;
+ }
+
+ public void setLinks(String[] links)
+ {
+ this.links = links;
+ }
+
+ public String getLocation()
+ {
+ return location;
+ }
+
+ public void setLocation(String location)
+ {
+ this.location = location;
+ }
+
+ public String[] getWindowIds()
+ {
+ return windowIds;
+ }
+
+ public void setWindowIds(String[] windowIds)
+ {
+ this.windowIds = windowIds;
+ }
+
+ public String[] getWindowNames()
+ {
+ return windowNames;
+ }
+
+ public void setWindowNames(String[] windowNames)
+ {
+ this.windowNames = windowNames;
+ }
+
+ public String[] getWindowTitles()
+ {
+ return windowTitles;
+ }
+
+ public void setWindowTitles(String[] windowTitles)
+ {
+ this.windowTitles = windowTitles;
+ }
+}
Added: modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/WebPageDriverCommand.java
===================================================================
--- modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/WebPageDriverCommand.java (rev 0)
+++ modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/WebPageDriverCommand.java 2008-03-24 14:29:56 UTC (rev 10368)
@@ -0,0 +1,111 @@
+/******************************************************************************
+ * 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.unit.remote.driver.webpage;
+
+import java.net.URI;
+
+import com.thoughtworks.selenium.Selenium;
+
+import org.jboss.unit.remote.driver.RemoteDriverCommandContext;
+
+import org.jboss.unit.driver.DriverCommand;
+
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public abstract class WebPageDriverCommand extends DriverCommand
+{
+ /**
+ *
+ */
+ protected URI uri = null;
+
+ public WebPageDriverCommand(URI uri)
+ {
+ this.uri = uri;
+ }
+
+ /**
+ *
+ * @param webPageCommandContext
+ * @return
+ */
+ public abstract void execute(RemoteDriverCommandContext webPageCommandContext);
+
+ /**
+ *
+ * @return
+ */
+ public URI getUri()
+ {
+ return this.uri;
+ }
+
+ /**
+ *
+ * @param browser
+ * @return
+ */
+ public WebPageData extractPageData(Selenium browser)
+ {
+ WebPageData pageData = new WebPageData();
+ if(browser.isAlertPresent())
+ {
+ pageData.setAlert(browser.getAlert());
+ }
+
+ pageData.setButtons(browser.getAllButtons());
+
+ pageData.setLinks(browser.getAllLinks());
+
+ pageData.setFields(browser.getAllFields());
+
+ pageData.setWindowIds(browser.getAllWindowIds());
+
+ pageData.setWindowNames(browser.getAllWindowNames());
+
+ pageData.setWindowTitles(browser.getAllWindowTitles());
+
+ pageData.setBodyText(browser.getBodyText());
+
+ if(browser.isConfirmationPresent())
+ {
+ pageData.setConfirmation(browser.getConfirmation());
+ }
+
+ pageData.setCookie(browser.getCookie());
+
+ pageData.setHtmlSource(browser.getHtmlSource());
+
+ pageData.setLocation(browser.getLocation());
+
+ if(browser.isPromptPresent())
+ {
+ pageData.setPrompt(browser.getPrompt());
+ }
+
+ return pageData;
+ }
+}
Added: modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/WebPageDriverResponse.java
===================================================================
--- modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/WebPageDriverResponse.java (rev 0)
+++ modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/WebPageDriverResponse.java 2008-03-24 14:29:56 UTC (rev 10368)
@@ -0,0 +1,57 @@
+/******************************************************************************
+ * 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.unit.remote.driver.webpage;
+
+import org.jboss.unit.driver.DriverResponse;
+
+import java.net.URI;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public abstract class WebPageDriverResponse extends DriverResponse
+{
+ /**
+ *
+ */
+ protected URI uri = null;
+
+ /**
+ *
+ * @param uri
+ */
+ public WebPageDriverResponse(URI uri)
+ {
+ this.uri = uri;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public URI getUri()
+ {
+ return this.uri;
+ }
+}
Added: modules/test/trunk/remote/src/test/build.xml
===================================================================
--- modules/test/trunk/remote/src/test/build.xml (rev 0)
+++ modules/test/trunk/remote/src/test/build.xml 2008-03-24 14:29:56 UTC (rev 10368)
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<project default="" name="JBoss Unit Remote Tests">
+ <target name="prepare_env" depends="evaluate_properties">
+ <property name="target" value="${basedir}/target"/>
+ </target>
+
+ <!--Lets make the check in one place so the build fail in the beggining instead of end-->
+ <target name="evaluate_properties">
+
+ <property environment="env"/>
+
+ <!--If properties are not in command line check if they are set in env-->
+ <condition property="JBOSS_4_2_1_HOME" value="${env.JBOSS_4_2_1_HOME}">
+ <and>
+ <isset property="env.JBOSS_4_2_1_HOME"/>
+ <not>
+ <isset property="JBOSS_4_2_1_HOME"/>
+ </not>
+ </and>
+ </condition>
+
+ <fail message="Please set the environment variable JBOSS_4_2_1_HOME">
+ <condition>
+ <and>
+ <not>
+ <isset property="JBOSS_4_2_1_HOME"/>
+ </not>
+ </and>
+ </condition>
+ </fail>
+ </target>
+
+ <target name="package-tests" depends="prepare_env">
+ <mkdir dir="${target}/test"/>
+
+ <jar jarfile="${target}/test/test-remote.jar">
+ <fileset dir="${target}/test-classes" includes="**/*.class, server-beans.xml, servers.xml"/>
+ </jar>
+
+ <war jarfile="${target}/test/test-remote.war" needxmlfile="false">
+ <fileset dir="${basedir}/src/test/resources/war"/>
+ <classes dir="${target}/classes"/>
+ <lib file="${target}/test/test-remote.jar"/>
+ <lib file="${dependency.jboss-unit.jar}"/>
+ <lib file="${dependency.portal-test-generic.jar}"/>
+ <lib file="${dependency.portal-test.jar}"/>
+ <lib file="${dependency.jboss-unit-mc.jar}"/>
+ <lib file="${dependency.jboss-kernel.jar}"/>
+ <lib file="${dependency.jboss-container.jar}"/>
+ <lib file="${dependency.jboss-dependency.jar}"/>
+ <lib file="${dependency.jboss-common-core.jar}"/>
+ <lib file="${dependency.jboss-remoting.jar}"/>
+ </war>
+
+ <jar jarfile="${target}/test/test-remote.ear">
+ <fileset dir="${basedir}/src/test/resources/ear"/>
+ <fileset file="${target}/test/test-remote.war"/>
+ </jar>
+ </target>
+
+ <target name="test.remote">
+ <taskdef name="jboss-unit" classname="org.jboss.unit.tooling.ant.JBossUnitTask" classpath="${plugin_classpath}"/>
+ <jboss-unit jpda="${clientDebug}" jpdaPort="5005" jpdaSuspend="true">
+ <tests config="${basedir}/src/test/resources/remote-jboss-unit.xml">
+ <property name="serverName" value="RemoteJBoss_4_2_1"/>
+ <property name="archivePath" value="${target}/test"/>
+ <property name="archiveId" value="test-remote.ear"/>
+
+ <classpath>
+ <pathelement path="${test_classpath}"/>
+ </classpath>
+ </tests>
+ </jboss-unit>
+ </target>
+
+ <target name="cargo.jboss4x.start" depends="cargo.setup">
+ <cargo
+ containerId="jboss42x"
+ home="${JBOSS_4_2_1_HOME}"
+ log="${cargo.log.dir}/cargo.shutdown.log"
+ output="${cargo.log.dir}/cargo.server.log"
+ action="start"
+ wait="false">
+ <sharedClasspath>
+ </sharedClasspath>
+ <configuration>
+ <property name="cargo.servlet.port" value="8080"/>
+ <property name="cargo.logging" value="high"/>
+ <property name="cargo.jvmargs" value="${cargo.jvmargs.value}"/>
+ </configuration>
+ </cargo>
+ </target>
+
+ <target name="cargo.jboss4x.stop" depends="cargo.setup">
+ <cargo
+ containerId="jboss42x"
+ home="${JBOSS_4_2_1_HOME}"
+ log="${cargo.log.dir}/cargo.startup.log"
+ action="stop">
+ <configuration>
+ <property name="cargo.rmi.port" value="1099"/>
+ </configuration>
+ </cargo>
+ </target>
+
+ <target name="run.test.remote" depends="package-tests">
+ <!-- turn serverside debugging on and off here -->
+ <property name="serverDebug" value="false"/>
+
+ <!-- start the jboss unit remote server side components -->
+ <condition property="debug" value="-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8787,suspend=y" else="">
+ <istrue value="${serverDebug}"/>
+ </condition>
+ <antcall target="cargo.jboss4x.start">
+ <param name="cargo.jvmargs.value" value="${debug}"/>
+ </antcall>
+
+ <!-- run the actual jboss unit remote test suite -->
+ <antcall target="test.remote">
+ <!-- turn client side debugging on and off here -->
+ <param name="clientDebug" value="false"/>
+ </antcall>
+
+ <!-- stop the jboss unit remote server side components -->
+ <antcall target="cargo.jboss4x.stop"/>
+ </target>
+
+ <target name="cargo.setup" depends="prepare_env">
+ <property name="cargo.log.dir" value="${target}/test/cargo"/>
+ <mkdir dir="${cargo.log.dir}"/>
+ <taskdef resource="cargo.tasks">
+ <classpath>
+ <pathelement path="${plugin_classpath}"/>
+ </classpath>
+ </taskdef>
+ </target>
+</project>
Property changes on: modules/test/trunk/remote/src/test/build.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: modules/test/trunk/remote/src/test/java/org/jboss/unit/test/remote/ActualBootstrap.java
===================================================================
--- modules/test/trunk/remote/src/test/java/org/jboss/unit/test/remote/ActualBootstrap.java (rev 0)
+++ modules/test/trunk/remote/src/test/java/org/jboss/unit/test/remote/ActualBootstrap.java 2008-03-24 14:29:56 UTC (rev 10368)
@@ -0,0 +1,55 @@
+/******************************************************************************
+ * 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.unit.test.remote;
+
+import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ActualBootstrap extends BasicBootstrap
+{
+
+ /** . */
+ private final WebBootstrap callback;
+
+ // I don't know why we need to declare it since super() does not declare it
+ public ActualBootstrap(WebBootstrap callback) throws Exception
+ {
+ super();
+
+ //
+ this.callback = callback;
+ }
+
+ protected void bootstrap() throws Throwable
+ {
+ super.bootstrap();
+
+ //
+ callback.boostrap();
+ }
+
+}
+
Added: modules/test/trunk/remote/src/test/java/org/jboss/unit/test/remote/WebBootstrap.java
===================================================================
--- modules/test/trunk/remote/src/test/java/org/jboss/unit/test/remote/WebBootstrap.java (rev 0)
+++ modules/test/trunk/remote/src/test/java/org/jboss/unit/test/remote/WebBootstrap.java 2008-03-24 14:29:56 UTC (rev 10368)
@@ -0,0 +1,246 @@
+/******************************************************************************
+ * 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.unit.test.remote;
+
+import org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer;
+import org.jboss.kernel.spi.deployment.KernelDeployment;
+import org.jboss.kernel.spi.event.KernelEventListener;
+import org.jboss.kernel.spi.event.KernelEvent;
+import org.jboss.kernel.spi.registry.KernelRegistry;
+import org.jboss.kernel.spi.registry.KernelRegistryEntry;
+import org.apache.log4j.Logger;
+
+import javax.servlet.ServletContext;
+import javax.servlet.ServletContextListener;
+import javax.servlet.ServletContextEvent;
+import java.net.URL;
+import java.net.MalformedURLException;
+
+/**
+ * A kernel bootstrap with a life cycle triggered by the <code>ServletContextListener</code> interface.
+ * All beans will be injected as servlet context attributes. The bean xml file must be available as
+ * a servlet context resource under the path <i>/WEB-INF/jboss-beans.xml</i>.
+ *
+ * @todo specify an alternative logger name
+ * @todo implement the specification of an alternative xml file path
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class WebBootstrap implements ServletContextListener, KernelEventListener
+{
+
+ /**
+ * The servlet context init parameter name for the bean resource location. For instance for a web application
+ * resource it could be <i>/WEB-INF/my-beans.xml</i>, for the web application classloader resource it could be
+ * <i>org/jboss/portal/my-beans.xml</i>. If no init parameter is declared then the litteral value
+ * <i>/WEB-INF/jboss-beans.xml</i> is used and the lookup is done in the servlet context resourcees.
+ */
+ public static final String BEANS_RESOURCE_LOCATION_KEY = "jboss.portal.mc.beans_resource_location";
+
+ /**
+ * The servlet context init parameter name for the bean resource type which can be the servlet context
+ * or the web application classloader. If no value is specified the servlet context will be used for
+ * resource lookup. The legal values are <i>context</i> for the servlet context and <i>classloader</i>
+ * for the web application classloader.
+ */
+ public static final String BEANS_RESOURCE_TYPE_KEY = "jboss.portal.mc.beans_resource_type";
+
+ /** Default value for the bean resource location. */
+ public static final String DEFAULT_JBOSS_BEANS_RESOURCE_LOCATION = "/WEB-INF/jboss-beans.xml";
+
+ /** Servlet context resource type. */
+ public static final String CONTEXT_RESOURCE_TYPE = "context";
+
+ /** Classloader resource type. */
+ public static final String CLASSLOADER_RESOURCE_TYPE = "classloader";
+
+ /** . */
+ private final static Logger log = Logger.getLogger(WebBootstrap.class);
+
+ /** . */
+ private ServletContext servletContext;
+
+ /** . */
+ private BeanXMLDeployer deployer;
+
+ /** . */
+ private KernelDeployment deployment;
+
+ /** . */
+ private boolean registered;
+
+ /** . */
+ private ActualBootstrap bootstrap;
+
+ public void contextInitialized(ServletContextEvent event)
+ {
+ servletContext = event.getServletContext();
+
+ //
+ try
+ {
+ bootstrap = new ActualBootstrap(this);
+
+ //
+ bootstrap.run();
+
+ //
+ log.info("Web kernel started");
+ }
+ catch (Exception e)
+ {
+ log.info("Web kernel boostrap failed", e);
+ }
+ }
+
+ public void contextDestroyed(ServletContextEvent event)
+ {
+ log.info("Web kernel shutdown");
+
+ //
+ if (deployment != null)
+ {
+ deployer.undeploy(deployment);
+ }
+
+ //
+ if (registered)
+ {
+ registered = false;
+ try
+ {
+ KernelRegistry registry = bootstrap.getKernel().getRegistry();
+ registry.unregisterListener(this, null, "ABC");
+ }
+ catch (Throwable throwable)
+ {
+ log.error("Cannot unregister kernel registry listener", throwable);
+ }
+ }
+
+ //
+ servletContext = null;
+
+ //
+ log.info("Web kernel stopped");
+ }
+
+ public void onEvent(KernelEvent event, Object object)
+ {
+ Object context = event.getContext();
+ if (context instanceof String)
+ {
+ String key = (String)context;
+ String type = event.getType();
+ if ("KERNEL_REGISTRY_REGISTERED".equals(type))
+ {
+ KernelRegistryEntry entry = bootstrap.getKernel().getRegistry().getEntry(context);
+ Object target = entry.getTarget();
+ servletContext.setAttribute(key, target);
+ }
+ else if ("KERNEL_REGISTRY_UNREGISTERED".equals(type))
+ {
+ servletContext.removeAttribute(key);
+ }
+ }
+ }
+
+ void boostrap() throws Throwable
+ {
+ //
+ bootstrap.getKernel().getRegistry().registerListener(WebBootstrap.this, null, "ABC");
+ registered = true;
+
+ //
+ deployer = new BeanXMLDeployer(bootstrap.getKernel());
+
+ //
+ URL url = getBeansURL();
+
+ //
+ if (url != null)
+ {
+ log.debug("About to deploy beans url=" + url);
+ deployment = deployer.deploy(url);
+ }
+ else
+ {
+ log.error("No valid beans URL was determined");
+ }
+ }
+
+ protected URL getBeansURL()
+ {
+ String location = servletContext.getInitParameter(BEANS_RESOURCE_LOCATION_KEY);
+ String type = servletContext.getInitParameter(BEANS_RESOURCE_TYPE_KEY);
+
+ //
+ if (location == null)
+ {
+ location = DEFAULT_JBOSS_BEANS_RESOURCE_LOCATION;
+ type = CONTEXT_RESOURCE_TYPE;
+ }
+ else if (type == null)
+ {
+ type = CONTEXT_RESOURCE_TYPE;
+ }
+
+ //
+ if (CONTEXT_RESOURCE_TYPE.equals(type))
+ {
+ try
+ {
+ return servletContext.getResource(location);
+ }
+ catch (MalformedURLException e)
+ {
+ log.error("Cannot obtain beans definition file from servlet context with location=" + location, e);
+
+ //
+ return null;
+ }
+ }
+ else if (CLASSLOADER_RESOURCE_TYPE.equals(type))
+ {
+ URL resource = Thread.currentThread().getContextClassLoader().getResource(location);
+
+ //
+ if (resource == null)
+ {
+ log.error("Cannot obtain bean definition file from thread context classloader with location=" + location);
+ }
+
+ //
+ return resource;
+ }
+ else
+ {
+ log.error("Cannot obtain bean definition file since the context type cannot be determined type=" + type);
+
+ //
+ return null;
+ }
+ }
+}
+
Added: modules/test/trunk/remote/src/test/java/org/jboss/unit/test/remote/webpage/ClickLinkCommandTestCase.java
===================================================================
--- modules/test/trunk/remote/src/test/java/org/jboss/unit/test/remote/webpage/ClickLinkCommandTestCase.java (rev 0)
+++ modules/test/trunk/remote/src/test/java/org/jboss/unit/test/remote/webpage/ClickLinkCommandTestCase.java 2008-03-24 14:29:56 UTC (rev 10368)
@@ -0,0 +1,169 @@
+/******************************************************************************
+ * 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.unit.test.remote.webpage;
+
+import org.jboss.unit.TestId;
+import org.jboss.unit.driver.DriverCommand;
+import org.jboss.unit.driver.DriverContext;
+import org.jboss.unit.driver.DriverException;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.command.StartTestCommand;
+import static org.jboss.unit.api.Assert.*;
+import org.jboss.unit.info.TestInfo;
+import org.jboss.unit.info.impl.SimpleTestCaseInfo;
+import org.jboss.unit.driver.response.EndTestResponse;
+import org.jboss.unit.remote.RequestContext;
+import org.jboss.unit.remote.ResponseContext;
+import org.jboss.unit.remote.driver.RemoteTestDriver;
+
+import org.jboss.unit.remote.driver.webpage.ClickLinkResponse;
+import org.jboss.unit.remote.driver.webpage.WebPageData;
+
+import org.jboss.logging.Logger;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.net.URI;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class ClickLinkCommandTestCase implements RemoteTestDriver
+{
+ private static Logger log = Logger.getLogger(ClickLinkCommandTestCase.class);
+
+ private TestInfo info = null;
+ private DriverResponse activeResponse = null;
+ private RequestContext testContext = null;
+
+ private String uri = null;
+ private String link = null;
+
+ /**
+ *
+ *
+ */
+ public ClickLinkCommandTestCase()
+ {
+
+ }
+
+ /**
+ *
+ * @return
+ */
+ public String getUri()
+ {
+ return uri;
+ }
+
+ /**
+ *
+ * @param uri
+ */
+ public void setUri(String uri)
+ {
+ this.uri = uri;
+ }
+
+
+ public String getLink()
+ {
+ return link;
+ }
+
+ public void setLink(String link)
+ {
+ this.link = link;
+ }
+ //----------------------------------------------------------------------------------------------------------------------------------------------------
+ /**
+ *
+ */
+ public void initDriver(DriverContext context) throws DriverException
+ {
+ this.info = new SimpleTestCaseInfo(this.getClass().getName());
+ }
+
+ /**
+ *
+ */
+ public void destroyDriver()
+ {
+ }
+
+ /**
+ *
+ */
+ public TestInfo getInfo()
+ {
+ return this.info;
+ }
+
+ /**
+ *
+ */
+ public DriverResponse invoke(TestId id, DriverCommand command)
+ {
+ try
+ {
+ if(command instanceof StartTestCommand)
+ {
+ this.activeResponse = new ClickLinkResponse(new URI(this.uri), this.link);
+ }
+ else
+ {
+ //assess data after extracting data from client side
+ WebPageData pageData = (WebPageData)testContext.getPayload().get("pageData");
+ assertNotNull(pageData);
+
+ this.activeResponse = new EndTestResponse();
+ }
+
+ return this.activeResponse;
+ }
+ catch(Exception e)
+ {
+ log.error(e);
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ *
+ */
+ public void pushContext(TestId testId, RequestContext testContext)
+ {
+ this.testContext = testContext;
+ }
+
+ /**
+ *
+ */
+ public ResponseContext popContext(TestId testId)
+ {
+ DriverResponse response = this.invoke(testId, null);
+ return new ResponseContext(response, new HashMap<String, Serializable>());
+ }
+}
Added: modules/test/trunk/remote/src/test/java/org/jboss/unit/test/remote/webpage/GetPageCommandTestCase.java
===================================================================
--- modules/test/trunk/remote/src/test/java/org/jboss/unit/test/remote/webpage/GetPageCommandTestCase.java (rev 0)
+++ modules/test/trunk/remote/src/test/java/org/jboss/unit/test/remote/webpage/GetPageCommandTestCase.java 2008-03-24 14:29:56 UTC (rev 10368)
@@ -0,0 +1,157 @@
+/******************************************************************************
+ * 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.unit.test.remote.webpage;
+
+import org.jboss.unit.TestId;
+import org.jboss.unit.driver.DriverCommand;
+import org.jboss.unit.driver.DriverContext;
+import org.jboss.unit.driver.DriverException;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.command.StartTestCommand;
+import static org.jboss.unit.api.Assert.*;
+import org.jboss.unit.info.TestInfo;
+import org.jboss.unit.info.impl.SimpleTestCaseInfo;
+import org.jboss.unit.driver.response.EndTestResponse;
+import org.jboss.unit.remote.RequestContext;
+import org.jboss.unit.remote.ResponseContext;
+import org.jboss.unit.remote.driver.RemoteTestDriver;
+
+import org.jboss.unit.remote.driver.webpage.GetPageResponse;
+import org.jboss.unit.remote.driver.webpage.WebPageData;
+
+import org.jboss.logging.Logger;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.net.URI;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class GetPageCommandTestCase implements RemoteTestDriver
+{
+ private static Logger log = Logger.getLogger(GetPageCommandTestCase.class);
+
+ private TestInfo info = null;
+ private DriverResponse activeResponse = null;
+ private RequestContext testContext = null;
+
+ private String uri = null;
+
+ /**
+ *
+ *
+ */
+ public GetPageCommandTestCase()
+ {
+
+ }
+
+ /**
+ *
+ * @return
+ */
+ public String getUri()
+ {
+ return uri;
+ }
+
+ /**
+ *
+ * @param uri
+ */
+ public void setUri(String uri)
+ {
+ this.uri = uri;
+ }
+ //----------------------------------------------------------------------------------------------------------------------------------------------------
+ /**
+ *
+ */
+ public void initDriver(DriverContext context) throws DriverException
+ {
+ this.info = new SimpleTestCaseInfo(this.getClass().getName());
+ }
+
+ /**
+ *
+ */
+ public void destroyDriver()
+ {
+ }
+
+ /**
+ *
+ */
+ public TestInfo getInfo()
+ {
+ return this.info;
+ }
+
+ /**
+ *
+ */
+ public DriverResponse invoke(TestId id, DriverCommand command)
+ {
+ try
+ {
+ if(command instanceof StartTestCommand)
+ {
+ this.activeResponse = new GetPageResponse(new URI(this.uri));
+ }
+ else
+ {
+ //assess data after extracting data from client side
+ WebPageData pageData = (WebPageData)testContext.getPayload().get("pageData");
+ assertNotNull(pageData);
+
+ this.activeResponse = new EndTestResponse();
+ }
+
+ return this.activeResponse;
+ }
+ catch(Exception e)
+ {
+ log.error(e);
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ *
+ */
+ public void pushContext(TestId testId, RequestContext testContext)
+ {
+ this.testContext = testContext;
+ }
+
+ /**
+ *
+ */
+ public ResponseContext popContext(TestId testId)
+ {
+ DriverResponse response = this.invoke(testId, null);
+ return new ResponseContext(response, new HashMap<String, Serializable>());
+ }
+}
Added: modules/test/trunk/remote/src/test/resources/ear/META-INF/application.xml
===================================================================
--- modules/test/trunk/remote/src/test/resources/ear/META-INF/application.xml (rev 0)
+++ modules/test/trunk/remote/src/test/resources/ear/META-INF/application.xml 2008-03-24 14:29:56 UTC (rev 10368)
@@ -0,0 +1,9 @@
+<application>
+ <module>
+ <web>
+ <web-uri>
+ test-remote.war
+ </web-uri>
+ </web>
+ </module>
+</application>
\ No newline at end of file
Added: modules/test/trunk/remote/src/test/resources/ear/META-INF/jboss-app.xml
===================================================================
--- modules/test/trunk/remote/src/test/resources/ear/META-INF/jboss-app.xml (rev 0)
+++ modules/test/trunk/remote/src/test/resources/ear/META-INF/jboss-app.xml 2008-03-24 14:29:56 UTC (rev 10368)
@@ -0,0 +1,3 @@
+<jboss-app>
+ <loader-repository>test:loader=test-remote</loader-repository>
+</jboss-app>
\ No newline at end of file
Added: modules/test/trunk/remote/src/test/resources/remote-jboss-unit.xml
===================================================================
--- modules/test/trunk/remote/src/test/resources/remote-jboss-unit.xml (rev 0)
+++ modules/test/trunk/remote/src/test/resources/remote-jboss-unit.xml 2008-03-24 14:29:56 UTC (rev 10368)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jboss-unit
+ xmlns="urn:jboss:jboss-unit:1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:jboss-unit:1.0 jboss-unit_1_0.xsd">
+ <generic>
+ <class name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
+ </generic>
+</jboss-unit>
\ No newline at end of file
Added: modules/test/trunk/remote/src/test/resources/server-beans.xml
===================================================================
--- modules/test/trunk/remote/src/test/resources/server-beans.xml (rev 0)
+++ modules/test/trunk/remote/src/test/resources/server-beans.xml 2008-03-24 14:29:56 UTC (rev 10368)
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_2_0.xsd"
+ xmlns="urn:jboss:bean-deployer:2.0">
+
+ <!-- Setting up remoting infrastructure -->
+ <bean name="RemoteTestSuite" class="org.jboss.unit.remote.driver.CompositeRemoteTestDriver">
+ <constructor>
+ <parameter class="org.jboss.unit.driver.impl.composite.AbstractCompositeTestDriver"><inject bean="TestSuite"/></parameter>
+ </constructor>
+ </bean>
+
+ <bean name="TestDriverServer" class="org.jboss.unit.remote.driver.RemoteTestDriverServer">
+ <property name="delegate"><inject bean="RemoteTestSuite"/></property>
+ </bean>
+
+ <bean name="TestDriverServerExporter" class="org.jboss.portal.test.framework.impl.generic.server.GenericServiceExporter">
+ <constructor>
+ <parameter>socket://localhost:5400</parameter>
+ <parameter><inject bean="TestDriverServer"/></parameter>
+ <parameter>org.jboss.unit.remote.driver.RemoteTestDriver</parameter>
+ </constructor>
+ </bean>
+
+ <!-- Setting up the TestSuite to be run on the Server -->
+ <bean name="TestSuite" class="org.jboss.unit.driver.impl.composite.CompositeTestDriver"/>
+
+ <!-- GetPageCommandTestCase -->
+ <bean name="GetPageCommandTestCase" class="org.jboss.unit.test.remote.webpage.GetPageCommandTestCase">
+ <install bean="TestSuite" method="mount">
+ <parameter><this/></parameter>
+ </install>
+ <uninstall bean="TestSuite" method="unmount">
+ <parameter><this/></parameter>
+ </uninstall>
+ <!-- Configuration for the test case -->
+ <!-- url of the web page to be accessed/asserted -->
+ <property name="uri">http://localhost:8080/test-remote</property>
+ </bean>
+
+ <!-- GetPageCommandTestCase -->
+ <bean name="ClickLinkCommandTestCase" class="org.jboss.unit.test.remote.webpage.ClickLinkCommandTestCase">
+ <install bean="TestSuite" method="mount">
+ <parameter><this/></parameter>
+ </install>
+ <uninstall bean="TestSuite" method="unmount">
+ <parameter><this/></parameter>
+ </uninstall>
+ <!-- Configuration for the test case -->
+ <property name="uri">http://localhost:8080/test-remote</property>
+ <property name="link">link1</property>
+ </bean>
+</deployment>
\ No newline at end of file
Added: modules/test/trunk/remote/src/test/resources/servers.xml
===================================================================
--- modules/test/trunk/remote/src/test/resources/servers.xml (rev 0)
+++ modules/test/trunk/remote/src/test/resources/servers.xml 2008-03-24 14:29:56 UTC (rev 10368)
@@ -0,0 +1,42 @@
+<server>
+ <server>
+ <server-name>RemoteJBoss_4_2_1</server-name>
+ <node>
+ <node-id>default</node-id>
+ <service>
+ <service-name>TestDriverServer</service-name>
+ <interface>org.jboss.unit.remote.driver.RemoteTestDriver</interface>
+ <uri>socket://localhost:5400</uri>
+ </service>
+ <deployer>
+ <remote>
+ <name>jboss4x</name>
+ <host>localhost</host>
+ <port>8080</port>
+ </remote>
+ </deployer>
+ </node>
+ </server>
+ <server>
+ <server-name>RemoteTomcat_6_0</server-name>
+ <node>
+ <node-id>default</node-id>
+ <service>
+ <service-name>TestDriverServer</service-name>
+ <interface>org.jboss.unit.remote.driver.RemoteTestDriver</interface>
+ <uri>socket://localhost:5400</uri>
+ </service>
+ <deployer>
+ <remote>
+ <name>tomcat5x</name>
+ <host>localhost</host>
+ <port>8080</port>
+ </remote>
+ <authentication>
+ <username>admin</username>
+ <password>admin</password>
+ </authentication>
+ </deployer>
+ </node>
+ </server>
+</server>
\ No newline at end of file
Added: modules/test/trunk/remote/src/test/resources/war/WEB-INF/web.xml
===================================================================
--- modules/test/trunk/remote/src/test/resources/war/WEB-INF/web.xml (rev 0)
+++ modules/test/trunk/remote/src/test/resources/war/WEB-INF/web.xml 2008-03-24 14:29:56 UTC (rev 10368)
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+ <context-param>
+ <param-name>jboss.portal.mc.beans_resource_location</param-name>
+ <param-value>server-beans.xml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>jboss.portal.mc.beans_resource_type</param-name>
+ <param-value>classloader</param-value>
+ </context-param>
+ <listener>
+ <listener-class>org.jboss.unit.test.remote.WebBootstrap</listener-class>
+ </listener>
+</web-app>
Added: modules/test/trunk/remote/src/test/resources/war/index.html
===================================================================
--- modules/test/trunk/remote/src/test/resources/war/index.html (rev 0)
+++ modules/test/trunk/remote/src/test/resources/war/index.html 2008-03-24 14:29:56 UTC (rev 10368)
@@ -0,0 +1,10 @@
+<html>
+ <head>
+ <title>JBoss Unit Test Framework</title>
+ </head>
+ <body>
+ <h1 id="h1">JBoss Unit Test Framework - Remoting Component</h1>
+
+ <a id="link1" href="link1.html">Link 1</a>
+ </body>
+</html>
\ No newline at end of file
Added: modules/test/trunk/remote/src/test/resources/war/link1.html
===================================================================
--- modules/test/trunk/remote/src/test/resources/war/link1.html (rev 0)
+++ modules/test/trunk/remote/src/test/resources/war/link1.html 2008-03-24 14:29:56 UTC (rev 10368)
@@ -0,0 +1,8 @@
+<html>
+ <head>
+ <title>JBoss Unit Test Framework - Link1</title>
+ </head>
+ <body>
+ <h1 id="h1">JBoss Unit Test Framework - Remoting Component - Link1.html</h1>
+ </body>
+</html>
\ No newline at end of file
Property changes on: modules/test/trunk/test/agent
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: modules/test/trunk/test/core
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: modules/test/trunk/test/generic
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: modules/test/trunk/test/jboss
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: modules/test/trunk/test/opends
___________________________________________________________________
Name: svn:ignore
+ target
Modified: modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/impl/generic/agent/GenericTestAgent.java
===================================================================
--- modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/impl/generic/agent/GenericTestAgent.java 2008-03-23 00:15:32 UTC (rev 10367)
+++ modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/impl/generic/agent/GenericTestAgent.java 2008-03-24 14:29:56 UTC (rev 10368)
@@ -30,6 +30,7 @@
import org.codehaus.cargo.container.deployer.Deployer;
import org.codehaus.cargo.container.deployable.Deployable;
import org.codehaus.cargo.container.deployable.WAR;
+import org.codehaus.cargo.container.deployable.EAR;
import org.codehaus.cargo.container.configuration.Configuration;
import org.codehaus.cargo.container.property.RemotePropertySet;
import org.codehaus.cargo.container.Container;
@@ -143,6 +144,10 @@
{
return new WAR(f.getAbsolutePath());
}
+ else if(f.getName().endsWith(".ear"))
+ {
+ return new EAR(f.getAbsolutePath());
+ }
}
}
throw new IllegalArgumentException("Illegal URL " + url);
Property changes on: modules/test/trunk/tooling/ant
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: modules/test/trunk/tooling/core
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: modules/test/trunk/tooling/examples/ant
___________________________________________________________________
Name: svn:ignore
+ output
Property changes on: modules/test/trunk/tooling/maven2
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: modules/test/trunk/unit
___________________________________________________________________
Name: svn:ignore
+ output
target
18 years, 1 month
JBoss Portal SVN: r10367 - in branches/JBoss_Portal_Branch_2_7/wsrp: src/main/org/jboss/portal/test/wsrp/portlet and 13 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2008-03-22 20:15:32 -0400 (Sat, 22 Mar 2008)
New Revision: 10367
Modified:
branches/JBoss_Portal_Branch_2_7/wsrp/build.xml
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/portlet/GetLocalesPortlet.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer/MarkupTestCase.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer/NeedPortletHandleTest.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/RequestProcessor.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-applicationscope-portlet-war/WEB-INF/portlet.xml
branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-basic-portlet-war/WEB-INF/portlet.xml
branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-dispatcher-portlet-war/WEB-INF/portlet.xml
branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-encodeurl-portlet-war/WEB-INF/portlet.xml
branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-getlocales-portlet-war/WEB-INF/portlet.xml
branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-implicitcloning-portlet-war/WEB-INF/portlet.xml
branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-markup-portlet-war/WEB-INF/portlet.xml
branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-multivalued-portlet-war/WEB-INF/portlet.xml
branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-renderparam-portlet-war/WEB-INF/portlet.xml
branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-session-portlet-war/WEB-INF/portlet.xml
branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-usercontext-portlet-war/WEB-INF/portlet.xml
Log:
- Improved locale support in WSRP:
+ Fixed an issue with the proper locale not being requested
+ Added more tests
- Improved support for multiple portlet per portlet-app in tests (NeedPortletHandledTest.getPortletHandleFrom)
- Added supported-locale elements in portlet descriptors in test portlets.
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/build.xml 2008-03-22 16:01:13 UTC (rev 10366)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/build.xml 2008-03-23 00:15:32 UTC (rev 10367)
@@ -600,10 +600,11 @@
<!-- ImplicitCloning test portlet -->
<package-test-portlet archiveName="implicitcloning" portletName="ImplicitCloning"/>
- <!-- Resourceportlet test portlet -->
+ <!-- Resource test portlet -->
<package-test-portlet archiveName="resource" portletName="Resource"/>
- <!-- Multipart test portlet --><!--<package-test-portlet archiveName="multipart" portletName="Multipart"/>-->
+ <!-- Multipart test portlet -->
+ <!--<package-test-portlet archiveName="multipart" portletName="Multipart"/>-->
<!-- Application scope test portlet -->
<jar jarfile="${build.lib.test}/test-applicationscope-portlet.war">
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/portlet/GetLocalesPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/portlet/GetLocalesPortlet.java 2008-03-22 16:01:13 UTC (rev 10366)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/portlet/GetLocalesPortlet.java 2008-03-23 00:15:32 UTC (rev 10367)
@@ -30,6 +30,7 @@
import javax.portlet.RenderResponse;
import java.io.IOException;
import java.io.PrintWriter;
+import java.util.Locale;
/**
* @author <a href="mailto:boleslaw.dawidowicz@jboss.com">Boleslaw Dawidowicz</a>
@@ -41,14 +42,12 @@
protected void doView(RenderRequest request, RenderResponse response) throws PortletException, PortletSecurityException, IOException
{
-
System.out.println("#GetLocalesPortlet doView()");
- request.getLocales();
+ Locale locale = request.getLocale();
response.setContentType("text/html");
PrintWriter writer = response.getWriter();
- writer.print("GetLocalesPortlet");
+ writer.print(locale.getDisplayName());
writer.close();
-
}
}
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer/MarkupTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer/MarkupTestCase.java 2008-03-22 16:01:13 UTC (rev 10366)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer/MarkupTestCase.java 2008-03-23 00:15:32 UTC (rev 10367)
@@ -47,7 +47,7 @@
import org.jboss.portal.wsrp.core.UpdateResponse;
import java.rmi.RemoteException;
-import java.util.List;
+import java.util.Locale;
/**
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
@@ -341,18 +341,18 @@
String getLocalesPortletArchive = "test-getlocales-portlet.war";
deploy(getLocalesPortletArchive);
- GetMarkup getMarkup = createMarkupRequestForCurrentlyDeployedPortlet();
+ GetMarkup getMarkup = createMarkupRequest(getPortletHandleFrom("Incorrect"));
getMarkup.getMarkupParams().setLocales(new String[]{"en_US"});
- MarkupResponse response = null;
try
{
- response = markupService.getMarkup(getMarkup);
+ markupService.getMarkup(getMarkup);
//fail("Should have trown an UnsupportetLocaleFault"); // ideally cf http://jira.jboss.com/jira/browse/JBPORTAL-857
ExtendedAssert.fail("Should have trown an exception"); // right now
}
catch (Exception expected)
{
+ // expected
}
finally
{
@@ -361,6 +361,52 @@
}
}
+ public void testGetMarkupWithoutDeclaredLocale() throws Exception
+ {
+ undeploy(DEFAULT_MARKUP_PORTLET_WAR);
+ String getLocalesPortletArchive = "test-getlocales-portlet.war";
+ deploy(getLocalesPortletArchive);
+
+ GetMarkup getMarkup = createMarkupRequest(getPortletHandleFrom("No Declared"));
+
+ try
+ {
+ checkMarkupResponse(markupService.getMarkup(getMarkup), Locale.getDefault().getDisplayName());
+ }
+ finally
+ {
+ undeploy(getLocalesPortletArchive);
+ }
+ }
+
+ public void testGetMarkupLocales() throws Exception
+ {
+ undeploy(DEFAULT_MARKUP_PORTLET_WAR);
+ String getLocalesPortletArchive = "test-getlocales-portlet.war";
+ deploy(getLocalesPortletArchive);
+
+ GetMarkup getMarkup = createMarkupRequest(getPortletHandleFrom("Simple"));
+
+ try
+ {
+ getMarkup.getMarkupParams().setLocales(new String[]{"en", "fr"});
+ MarkupResponse response = markupService.getMarkup(getMarkup);
+ checkMarkupResponse(response, Locale.ENGLISH.getDisplayName());
+
+ getMarkup.getMarkupParams().setLocales(new String[]{"fr", "en"});
+ response = markupService.getMarkup(getMarkup);
+ checkMarkupResponse(response, Locale.FRENCH.getDisplayName());
+
+ getMarkup.getMarkupParams().setLocales(new String[]{"de", "en"});
+ response = markupService.getMarkup(getMarkup);
+ checkMarkupResponse(response, Locale.ENGLISH.getDisplayName());
+ }
+ finally
+ {
+ undeploy(getLocalesPortletArchive);
+ }
+ }
+
public void testGetMarkupWithEncodedURLs() throws Exception
{
undeploy(DEFAULT_MARKUP_PORTLET_WAR);
@@ -516,28 +562,13 @@
try
{
- // get handles: current archive contains 2 portlets, one to set the application scoped variable, another one to read it
- List<String> handles = getHandlesForCurrentlyDeployedArchive();
- String handle = handles.get(0);
- String setHandle, getHandle;
- if (handle.contains("Set"))
- {
- setHandle = handle;
- getHandle = handles.get(1);
- }
- else
- {
- getHandle = handle;
- setHandle = handles.get(1);
- }
-
// set appVar to value in the application scope by the first portlet
- PerformBlockingInteraction pbi = WSRPTypeFactory.createDefaultPerformBlockingInteraction(setHandle);
+ PerformBlockingInteraction pbi = WSRPTypeFactory.createDefaultPerformBlockingInteraction(getPortletHandleFrom("Set"));
pbi.getInteractionParams().setFormParameters(new NamedString[]{new NamedString("appVar", "value")});
markupService.performBlockingInteraction(pbi);
// the second portlet reads the appVar value and outputs it
- GetMarkup gm = createMarkupRequest(getHandle);
+ GetMarkup gm = createMarkupRequest(getPortletHandleFrom("Get"));
MarkupResponse res = markupService.getMarkup(gm);
checkMarkupResponse(res, "appVar=value");
}
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer/NeedPortletHandleTest.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer/NeedPortletHandleTest.java 2008-03-22 16:01:13 UTC (rev 10366)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer/NeedPortletHandleTest.java 2008-03-23 00:15:32 UTC (rev 10367)
@@ -211,6 +211,20 @@
return getMarkup;
}
+ protected String getPortletHandleFrom(String partialHandle)
+ {
+ List<String> handles = getHandlesForCurrentlyDeployedArchive();
+ for (String handle : handles)
+ {
+ if (handle.contains(partialHandle))
+ {
+ return handle;
+ }
+ }
+
+ throw new IllegalArgumentException("Couldn't find a portlet handle matching '" + partialHandle + "' in " + currentlyDeployedArchiveName);
+ }
+
protected GetMarkup createMarkupRequest() throws Exception
{
return createMarkupRequestForCurrentlyDeployedPortlet();
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/RequestProcessor.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/RequestProcessor.java 2008-03-22 16:01:13 UTC (rev 10366)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/RequestProcessor.java 2008-03-23 00:15:32 UTC (rev 10367)
@@ -199,11 +199,11 @@
for (int i = 0; markupType == null && i < desiredMIMETypes.length; i++)
{
String desiredMIMEType = desiredMIMETypes[i];
- for (int j = 0; j < markupTypes.length; j++)
+ for (MarkupType type : markupTypes)
{
- if (desiredMIMEType.equals(markupTypes[j].getMimeType()))
+ if (desiredMIMEType.equals(type.getMimeType()))
{
- markupType = markupTypes[j];
+ markupType = type;
break;
}
}
@@ -216,6 +216,45 @@
"None of the specified MIME types are supported by portlet '" + portlet.getContext().getId() + "'", null);
}
+ // use user-desired locales
+ String[] locales = params.getLocales();
+ String[] supportedLocales = markupType.getLocales();
+ if (supportedLocales != null)
+ {
+ // reset markup type locales
+ markupType.setLocales(null);
+ boolean found = false;
+
+ // find the best match
+ for (String locale : locales)
+ {
+ for (String supportedLocale : supportedLocales)
+ {
+ if (locale.equals(supportedLocale))
+ {
+ markupType.setLocales(new String[]{locale});
+ found = true;
+ break;
+ }
+ }
+
+ if (found)
+ {
+ break;
+ }
+ }
+
+ // if no best match was found, use whatever the user gave us
+ if (!found)
+ {
+ markupType.setLocales(locales);
+ }
+ }
+ else
+ {
+ markupType.setLocales(locales);
+ }
+
// get the mode
String mode;
try
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-applicationscope-portlet-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-applicationscope-portlet-war/WEB-INF/portlet.xml 2008-03-22 16:01:13 UTC (rev 10366)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-applicationscope-portlet-war/WEB-INF/portlet.xml 2008-03-23 00:15:32 UTC (rev 10367)
@@ -35,9 +35,11 @@
<portlet-mode>view</portlet-mode>
</supports>
+ <supported-locale>en</supported-locale>
+
<portlet-info>
<title>title</title>
- </portlet-info>
+ </portlet-info>
</portlet>
<portlet>
@@ -50,6 +52,8 @@
<portlet-mode>view</portlet-mode>
</supports>
+ <supported-locale>en</supported-locale>
+
<portlet-info>
<title>title</title>
</portlet-info>
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-basic-portlet-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-basic-portlet-war/WEB-INF/portlet.xml 2008-03-22 16:01:13 UTC (rev 10366)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-basic-portlet-war/WEB-INF/portlet.xml 2008-03-23 00:15:32 UTC (rev 10367)
@@ -34,6 +34,8 @@
<portlet-mode>view</portlet-mode>
</supports>
+ <supported-locale>en</supported-locale>
+
<portlet-info>
<title>title</title>
</portlet-info>
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-dispatcher-portlet-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-dispatcher-portlet-war/WEB-INF/portlet.xml 2008-03-22 16:01:13 UTC (rev 10366)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-dispatcher-portlet-war/WEB-INF/portlet.xml 2008-03-23 00:15:32 UTC (rev 10367)
@@ -34,6 +34,8 @@
<portlet-mode>view</portlet-mode>
</supports>
+ <supported-locale>en</supported-locale>
+
<portlet-info>
<title>title</title>
</portlet-info>
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-encodeurl-portlet-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-encodeurl-portlet-war/WEB-INF/portlet.xml 2008-03-22 16:01:13 UTC (rev 10366)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-encodeurl-portlet-war/WEB-INF/portlet.xml 2008-03-23 00:15:32 UTC (rev 10367)
@@ -34,6 +34,8 @@
<portlet-mode>view</portlet-mode>
</supports>
+ <supported-locale>en</supported-locale>
+
<portlet-info>
<title>title</title>
</portlet-info>
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-getlocales-portlet-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-getlocales-portlet-war/WEB-INF/portlet.xml 2008-03-22 16:01:13 UTC (rev 10366)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-getlocales-portlet-war/WEB-INF/portlet.xml 2008-03-23 00:15:32 UTC (rev 10367)
@@ -34,9 +34,42 @@
<portlet-mode>view</portlet-mode>
</supports>
+ <supported-locale>en</supported-locale>
+ <supported-locale>fr</supported-locale>
+
<portlet-info>
<title>title</title>
</portlet-info>
</portlet>
+ <portlet>
+ <portlet-name>No Declared Supported Locale Portlet</portlet-name>
+ <portlet-class>org.jboss.portal.test.wsrp.portlet.GetLocalesPortlet</portlet-class>
+
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>view</portlet-mode>
+ </supports>
+
+ <portlet-info>
+ <title>title</title>
+ </portlet-info>
+ </portlet>
+
+ <portlet>
+ <portlet-name>Incorrect Supported Locale Portlet</portlet-name>
+ <portlet-class>org.jboss.portal.test.wsrp.portlet.GetLocalesPortlet</portlet-class>
+
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>view</portlet-mode>
+ </supports>
+
+ <supported-locale>blah</supported-locale>
+
+ <portlet-info>
+ <title>title</title>
+ </portlet-info>
+ </portlet>
+
</portlet-app>
\ No newline at end of file
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-implicitcloning-portlet-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-implicitcloning-portlet-war/WEB-INF/portlet.xml 2008-03-22 16:01:13 UTC (rev 10366)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-implicitcloning-portlet-war/WEB-INF/portlet.xml 2008-03-23 00:15:32 UTC (rev 10367)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ JBoss, a division of Red Hat ~
- ~ Copyright 2007, Red Hat Middleware, LLC, and individual ~
+ ~ Copyright 2008, 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. ~
@@ -34,6 +34,8 @@
<portlet-mode>view</portlet-mode>
</supports>
+ <supported-locale>en</supported-locale>
+
<portlet-info>
<title>title</title>
</portlet-info>
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-markup-portlet-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-markup-portlet-war/WEB-INF/portlet.xml 2008-03-22 16:01:13 UTC (rev 10366)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-markup-portlet-war/WEB-INF/portlet.xml 2008-03-23 00:15:32 UTC (rev 10367)
@@ -36,6 +36,8 @@
<portlet-mode>edit</portlet-mode>
</supports>
+ <supported-locale>en</supported-locale>
+
<portlet-info>
<title>title</title>
</portlet-info>
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-multivalued-portlet-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-multivalued-portlet-war/WEB-INF/portlet.xml 2008-03-22 16:01:13 UTC (rev 10366)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-multivalued-portlet-war/WEB-INF/portlet.xml 2008-03-23 00:15:32 UTC (rev 10367)
@@ -35,6 +35,8 @@
<portlet-mode>view</portlet-mode>
</supports>
+ <supported-locale>en</supported-locale>
+
<portlet-info>
<title>title</title>
</portlet-info>
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-renderparam-portlet-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-renderparam-portlet-war/WEB-INF/portlet.xml 2008-03-22 16:01:13 UTC (rev 10366)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-renderparam-portlet-war/WEB-INF/portlet.xml 2008-03-23 00:15:32 UTC (rev 10367)
@@ -34,6 +34,8 @@
<portlet-mode>view</portlet-mode>
</supports>
+ <supported-locale>en</supported-locale>
+
<portlet-info>
<title>Render Parameters Test</title>
</portlet-info>
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-session-portlet-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-session-portlet-war/WEB-INF/portlet.xml 2008-03-22 16:01:13 UTC (rev 10366)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-session-portlet-war/WEB-INF/portlet.xml 2008-03-23 00:15:32 UTC (rev 10367)
@@ -34,6 +34,8 @@
<portlet-mode>view</portlet-mode>
</supports>
+ <supported-locale>en</supported-locale>
+
<portlet-info>
<title>Session Test</title>
</portlet-info>
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-usercontext-portlet-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-usercontext-portlet-war/WEB-INF/portlet.xml 2008-03-22 16:01:13 UTC (rev 10366)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-usercontext-portlet-war/WEB-INF/portlet.xml 2008-03-23 00:15:32 UTC (rev 10367)
@@ -34,6 +34,8 @@
<portlet-mode>view</portlet-mode>
</supports>
+ <supported-locale>en</supported-locale>
+
<portlet-info>
<title>title</title>
</portlet-info>
18 years, 1 month
JBoss Portal SVN: r10366 - modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/taglib.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2008-03-22 12:01:13 -0400 (Sat, 22 Mar 2008)
New Revision: 10366
Modified:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/taglib/ActionURLTestCase.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/taglib/NamespaceTestCase.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/taglib/RenderURLTestCase.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/taglib/ResourceURLTestCase.java
Log:
- Taglib TCK
Modified: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/taglib/ActionURLTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/taglib/ActionURLTestCase.java 2008-03-22 15:51:45 UTC (rev 10365)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/taglib/ActionURLTestCase.java 2008-03-22 16:01:13 UTC (rev 10366)
@@ -24,6 +24,7 @@
import org.jboss.portal.unit.PortletTestCase;
import org.jboss.portal.unit.PortletTestContext;
+import org.jboss.portal.unit.Assertion;
import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.portal.unit.base.AbstractUniversalTestPortlet;
import org.jboss.portal.unit.actions.PortletRenderTestAction;
@@ -50,7 +51,7 @@
* @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
* @version : 0.1 $
*/
-@TestCase
+(a)TestCase({Assertion.JSR286_315})
public class ActionURLTestCase extends TaglibTestCase
{
public ActionURLTestCase(PortletTestCase seq)
Modified: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/taglib/NamespaceTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/taglib/NamespaceTestCase.java 2008-03-22 15:51:45 UTC (rev 10365)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/taglib/NamespaceTestCase.java 2008-03-22 16:01:13 UTC (rev 10366)
@@ -24,6 +24,7 @@
import org.jboss.portal.unit.PortletTestCase;
import org.jboss.portal.unit.PortletTestContext;
+import org.jboss.portal.unit.Assertion;
import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.portal.unit.base.AbstractUniversalTestPortlet;
import org.jboss.portal.unit.actions.PortletRenderTestAction;
@@ -48,7 +49,7 @@
* @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
* @version : 0.1 $
*/
-@TestCase
+(a)TestCase({Assertion.JSR286_346})
public class NamespaceTestCase extends TaglibTestCase
{
Modified: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/taglib/RenderURLTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/taglib/RenderURLTestCase.java 2008-03-22 15:51:45 UTC (rev 10365)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/taglib/RenderURLTestCase.java 2008-03-22 16:01:13 UTC (rev 10366)
@@ -24,6 +24,7 @@
import org.jboss.portal.unit.PortletTestCase;
import org.jboss.portal.unit.PortletTestContext;
+import org.jboss.portal.unit.Assertion;
import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.portal.unit.base.AbstractUniversalTestPortlet;
import org.jboss.portal.unit.actions.PortletRenderTestAction;
@@ -47,7 +48,7 @@
* @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
* @version : 0.1 $
*/
-@TestCase
+(a)TestCase({Assertion.JSR286_327})
public class RenderURLTestCase extends TaglibTestCase
{
public RenderURLTestCase(PortletTestCase seq)
Modified: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/taglib/ResourceURLTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/taglib/ResourceURLTestCase.java 2008-03-22 15:51:45 UTC (rev 10365)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/taglib/ResourceURLTestCase.java 2008-03-22 16:01:13 UTC (rev 10366)
@@ -25,6 +25,7 @@
import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.portal.unit.PortletTestCase;
import org.jboss.portal.unit.PortletTestContext;
+import org.jboss.portal.unit.Assertion;
import org.jboss.portal.unit.base.AbstractUniversalTestPortlet;
import org.jboss.portal.unit.actions.PortletRenderTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
@@ -48,7 +49,7 @@
* @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
* @version : 0.1 $
*/
-@TestCase
+(a)TestCase({Assertion.JSR286_339})
public class ResourceURLTestCase extends TaglibTestCase
{
public ResourceURLTestCase(PortletTestCase seq)
18 years, 1 month
JBoss Portal SVN: r10365 - modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2008-03-22 11:51:45 -0400 (Sat, 22 Mar 2008)
New Revision: 10365
Modified:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/NFContainerAttributesTestCase.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/NFRFContainerAttributesTestCase.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/NFRIContainerAttributesTestCase.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/NIRFContainerAttributesTestCase.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/NIRIContainerAttributesTestCase.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/RFContainerAttributesTestCase.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/RFRFContainerAttributesTestCase.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/RFRIContainerAttributesTestCase.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/RIRFContainerAttributesTestCase.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/RIRIContainerAttributesTestCase.java
Log:
- Missing dispatcher TCK annotations
Modified: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/NFContainerAttributesTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/NFContainerAttributesTestCase.java 2008-03-22 15:09:03 UTC (rev 10364)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/NFContainerAttributesTestCase.java 2008-03-22 15:51:45 UTC (rev 10365)
@@ -23,6 +23,7 @@
package org.jboss.portal.test.portlet.jsr286.tck.dispatcher;
import org.jboss.portal.unit.PortletTestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.portal.unit.annotations.TestCase;
import javax.portlet.PortletRequestDispatcher;
@@ -39,7 +40,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 630 $
*/
-@TestCase
+(a)TestCase({Assertion.JSR286_239})
public class NFContainerAttributesTestCase extends DispatchedContainerAttributesTestCase
{
Modified: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/NFRFContainerAttributesTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/NFRFContainerAttributesTestCase.java 2008-03-22 15:09:03 UTC (rev 10364)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/NFRFContainerAttributesTestCase.java 2008-03-22 15:51:45 UTC (rev 10365)
@@ -23,6 +23,7 @@
package org.jboss.portal.test.portlet.jsr286.tck.dispatcher;
import org.jboss.portal.unit.PortletTestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.portal.portlet.LifeCyclePhase;
@@ -40,7 +41,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 630 $
*/
-@TestCase
+(a)TestCase({Assertion.JSR286_239})
public class NFRFContainerAttributesTestCase extends DispatchedContainerAttributesTestCase
{
Modified: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/NFRIContainerAttributesTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/NFRIContainerAttributesTestCase.java 2008-03-22 15:09:03 UTC (rev 10364)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/NFRIContainerAttributesTestCase.java 2008-03-22 15:51:45 UTC (rev 10365)
@@ -23,6 +23,7 @@
package org.jboss.portal.test.portlet.jsr286.tck.dispatcher;
import org.jboss.portal.unit.PortletTestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.portal.portlet.LifeCyclePhase;
@@ -40,7 +41,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 630 $
*/
-@TestCase
+(a)TestCase({Assertion.JSR286_183})
public class NFRIContainerAttributesTestCase extends DispatchedContainerAttributesTestCase
{
Modified: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/NIRFContainerAttributesTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/NIRFContainerAttributesTestCase.java 2008-03-22 15:09:03 UTC (rev 10364)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/NIRFContainerAttributesTestCase.java 2008-03-22 15:51:45 UTC (rev 10365)
@@ -23,6 +23,7 @@
package org.jboss.portal.test.portlet.jsr286.tck.dispatcher;
import org.jboss.portal.unit.PortletTestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.portal.portlet.LifeCyclePhase;
@@ -40,7 +41,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 630 $
*/
-@TestCase
+(a)TestCase({Assertion.JSR286_239})
public class NIRFContainerAttributesTestCase extends DispatchedContainerAttributesTestCase
{
Modified: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/NIRIContainerAttributesTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/NIRIContainerAttributesTestCase.java 2008-03-22 15:09:03 UTC (rev 10364)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/NIRIContainerAttributesTestCase.java 2008-03-22 15:51:45 UTC (rev 10365)
@@ -23,6 +23,7 @@
package org.jboss.portal.test.portlet.jsr286.tck.dispatcher;
import org.jboss.portal.unit.PortletTestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.portal.unit.annotations.TestCase;
import javax.portlet.PortletRequestDispatcher;
@@ -39,7 +40,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 630 $
*/
-@TestCase
+(a)TestCase({Assertion.JSR286_183})
public class NIRIContainerAttributesTestCase extends DispatchedContainerAttributesTestCase
{
Modified: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/RFContainerAttributesTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/RFContainerAttributesTestCase.java 2008-03-22 15:09:03 UTC (rev 10364)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/RFContainerAttributesTestCase.java 2008-03-22 15:51:45 UTC (rev 10365)
@@ -23,6 +23,7 @@
package org.jboss.portal.test.portlet.jsr286.tck.dispatcher;
import org.jboss.portal.unit.PortletTestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.portal.unit.annotations.TestCase;
import javax.portlet.PortletRequestDispatcher;
@@ -39,7 +40,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 630 $
*/
-@TestCase
+(a)TestCase({Assertion.JSR286_239})
public class RFContainerAttributesTestCase extends DispatchedContainerAttributesTestCase
{
Modified: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/RFRFContainerAttributesTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/RFRFContainerAttributesTestCase.java 2008-03-22 15:09:03 UTC (rev 10364)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/RFRFContainerAttributesTestCase.java 2008-03-22 15:51:45 UTC (rev 10365)
@@ -23,6 +23,7 @@
package org.jboss.portal.test.portlet.jsr286.tck.dispatcher;
import org.jboss.portal.unit.PortletTestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.portal.portlet.LifeCyclePhase;
@@ -40,7 +41,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 630 $
*/
-@TestCase
+(a)TestCase({Assertion.JSR286_239})
public class RFRFContainerAttributesTestCase extends DispatchedContainerAttributesTestCase
{
Modified: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/RFRIContainerAttributesTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/RFRIContainerAttributesTestCase.java 2008-03-22 15:09:03 UTC (rev 10364)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/RFRIContainerAttributesTestCase.java 2008-03-22 15:51:45 UTC (rev 10365)
@@ -23,6 +23,7 @@
package org.jboss.portal.test.portlet.jsr286.tck.dispatcher;
import org.jboss.portal.unit.PortletTestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.portal.portlet.LifeCyclePhase;
@@ -40,7 +41,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 630 $
*/
-@TestCase
+(a)TestCase({Assertion.JSR286_183})
public class RFRIContainerAttributesTestCase extends DispatchedContainerAttributesTestCase
{
Modified: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/RIRFContainerAttributesTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/RIRFContainerAttributesTestCase.java 2008-03-22 15:09:03 UTC (rev 10364)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/RIRFContainerAttributesTestCase.java 2008-03-22 15:51:45 UTC (rev 10365)
@@ -23,6 +23,7 @@
package org.jboss.portal.test.portlet.jsr286.tck.dispatcher;
import org.jboss.portal.unit.PortletTestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.portal.portlet.LifeCyclePhase;
@@ -40,7 +41,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 630 $
*/
-@TestCase
+(a)TestCase({Assertion.JSR286_239})
public class RIRFContainerAttributesTestCase extends DispatchedContainerAttributesTestCase
{
Modified: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/RIRIContainerAttributesTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/RIRIContainerAttributesTestCase.java 2008-03-22 15:09:03 UTC (rev 10364)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/RIRIContainerAttributesTestCase.java 2008-03-22 15:51:45 UTC (rev 10365)
@@ -23,6 +23,7 @@
package org.jboss.portal.test.portlet.jsr286.tck.dispatcher;
import org.jboss.portal.unit.PortletTestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.portal.unit.annotations.TestCase;
import javax.portlet.PortletRequestDispatcher;
@@ -39,7 +40,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 630 $
*/
-@TestCase
+(a)TestCase({Assertion.JSR286_183})
public class RIRIContainerAttributesTestCase extends DispatchedContainerAttributesTestCase
{
18 years, 1 month
JBoss Portal SVN: r10364 - in modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit: reports and 1 other directory.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2008-03-22 11:09:03 -0400 (Sat, 22 Mar 2008)
New Revision: 10364
Modified:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/Assertion.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/reports/ResultProducingListener.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/reports/TestCaseAnnotationProcessor.java
Log:
- API tests report
Modified: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/Assertion.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/Assertion.java 2008-03-22 01:46:36 UTC (rev 10363)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/Assertion.java 2008-03-22 15:09:03 UTC (rev 10364)
@@ -1428,7 +1428,7 @@
// ******************************************************************************************************************
- API286_ACTION_REQUEST_1(new API(ActionRequest.class), Status.disabled("no methods"), "none"),
+ API286_ACTION_REQUEST_1(new API(ActionRequest.class), "ACTION_NAME"),
API286_ACTION_RESPONSE_1(new API(ActionResponse.class), "sendRedirect()"),
@@ -1441,20 +1441,60 @@
API286_BASE_URL_7(new API(BaseURL.class), "setProperty()"),
API286_BASE_URL_8(new API(BaseURL.class), "setParameters()"),
- API286_CACHE_CONTROL(new API(CacheControl.class), ""),
+ API286_CACHE_CONTROL_1(new API(CacheControl.class), "getETag()"),
+ API286_CACHE_CONTROL_2(new API(CacheControl.class), "getExpiriationTime()"),
+ API286_CACHE_CONTROL_3(new API(CacheControl.class), "isPublicScope()"),
+ API286_CACHE_CONTROL_4(new API(CacheControl.class), "setETag()"),
+ API286_CACHE_CONTROL_5(new API(CacheControl.class), "setExpiriationTime()"),
+ API286_CACHE_CONTROL_6(new API(CacheControl.class), "setPublicScope()"),
+ API286_CACHE_CONTROL_7(new API(CacheControl.class), "setUseCachedContent()"),
+ API286_CACHE_CONTROL_8(new API(CacheControl.class), "useCachedContent()"),
+
+ API286_CLIENT_DATA_REQUEST_1(new API(ClientDataRequest.class), "getCharacterEncoding()"),
+ API286_CLIENT_DATA_REQUEST_2(new API(ClientDataRequest.class), "getContentLength()"),
+ API286_CLIENT_DATA_REQUEST_3(new API(ClientDataRequest.class), "getContentType()"),
+ API286_CLIENT_DATA_REQUEST_4(new API(ClientDataRequest.class), "getMethod()"),
+ API286_CLIENT_DATA_REQUEST_5(new API(ClientDataRequest.class), "getPortletInputStream()"),
+ API286_CLIENT_DATA_REQUEST_6(new API(ClientDataRequest.class), "getReader()"),
+ API286_CLIENT_DATA_REQUEST_7(new API(ClientDataRequest.class), "setCharacterEncoding()"),
+
+ API286_EVENT_1(new API(Event.class), "getName()"),
+ API286_EVENT_2(new API(Event.class), "getQName()"),
+ API286_EVENT_3(new API(Event.class), "getValue()"),
- API286_CLIENT_DATA_REQUEST(new API(ClientDataRequest.class), ""),
+ API286_EVENT_PORTLET_1(new API(EventPortlet.class), "processEvent()"),
- API286_EVENT(new API(Event.class), ""),
+ API286_EVENT_REQUEST_1(new API(EventRequest.class), "getEvent()"),
+ API286_EVENT_REQUEST_2(new API(EventRequest.class), "getMethod()"),
- API286_EVENT_PORTLET(new API(EventPortlet.class), ""),
+ API286_EVENT_RESPONSE_1(new API(EventResponse.class), "setRenderParameters()"),
- API286_EVENT_REQUEST(new API(EventRequest.class), ""),
+ API286_GENERIC_PORTLET_1(new API(GenericPortlet.class), "destroy()"),
+ API286_GENERIC_PORTLET_2(new API(GenericPortlet.class), "doDispatch()"),
+ API286_GENERIC_PORTLET_3(new API(GenericPortlet.class), "doEdit()"),
+ API286_GENERIC_PORTLET_4(new API(GenericPortlet.class), "doHeaders()"),
+ API286_GENERIC_PORTLET_5(new API(GenericPortlet.class), "doHelp()"),
+ API286_GENERIC_PORTLET_6(new API(GenericPortlet.class), "doView()"),
+ API286_GENERIC_PORTLET_7(new API(GenericPortlet.class), "getContainerRuntimeOptions()"),
+ API286_GENERIC_PORTLET_8(new API(GenericPortlet.class), "getDefaultNamespace()"),
+ API286_GENERIC_PORTLET_9(new API(GenericPortlet.class), "getInitParameter()"),
+ API286_GENERIC_PORTLET_10(new API(GenericPortlet.class), "getInitParameterNames()"),
+ API286_GENERIC_PORTLET_11(new API(GenericPortlet.class), "getNextPossiblePortletModes()"),
+ API286_GENERIC_PORTLET_12(new API(GenericPortlet.class), "getPortletConfig()"),
+ API286_GENERIC_PORTLET_13(new API(GenericPortlet.class), "getPortletContext()"),
+ API286_GENERIC_PORTLET_14(new API(GenericPortlet.class), "getPortletName()"),
+ API286_GENERIC_PORTLET_15(new API(GenericPortlet.class), "getProcessingEventQNames()"),
+ API286_GENERIC_PORTLET_16(new API(GenericPortlet.class), "getPublicRenderParameterNames()"),
+ API286_GENERIC_PORTLET_17(new API(GenericPortlet.class), "getPublishingEventQNames()"),
+ API286_GENERIC_PORTLET_18(new API(GenericPortlet.class), "getResourceBundle()"),
+ API286_GENERIC_PORTLET_19(new API(GenericPortlet.class), "getSupportedLocales()"),
+ API286_GENERIC_PORTLET_20(new API(GenericPortlet.class), "getTitle()"),
+ API286_GENERIC_PORTLET_21(new API(GenericPortlet.class), "init()"),
+ API286_GENERIC_PORTLET_22(new API(GenericPortlet.class), "processAction()"),
+ API286_GENERIC_PORTLET_23(new API(GenericPortlet.class), "processEvent()"),
+ API286_GENERIC_PORTLET_24(new API(GenericPortlet.class), "render()"),
+ API286_GENERIC_PORTLET_25(new API(GenericPortlet.class), "serveResource()"),
- API286_EVENT_RESPONSE(new API(EventResponse.class), ""),
-
- API286_GENERIC_PORTLET(new API(GenericPortlet.class), ""),
-
API286_MIME_RESPONSE_1(new API(MimeResponse.class), "CACHE_SCOPE"),
API286_MIME_RESPONSE_2(new API(MimeResponse.class), "ETAG"),
API286_MIME_RESPONSE_3(new API(MimeResponse.class), "EXPIRIATION_CACHE"),
@@ -1506,7 +1546,10 @@
API286_PORTLET_CONTEXT_17(new API(PortalContext.class), "removeAttribute()"),
API286_PORTLET_CONTEXT_18(new API(PortalContext.class), "setAttribute()"),
- API286_PORTLET(new API(Portlet.class), ""),
+ API286_PORTLET_1(new API(Portlet.class), "destroy()"),
+ API286_PORTLET_2(new API(Portlet.class), "init()"),
+ API286_PORTLET_3(new API(Portlet.class), "processAction()"),
+ API286_PORTLET_4(new API(Portlet.class), "render()"),
API286_PORTLET_CONFIG_1(new API(PortletConfig.class), "getContainerRuntimeOptions()"),
API286_PORTLET_CONFIG_2(new API(PortletConfig.class), "getDefaultNamespace()"),
@@ -1520,8 +1563,6 @@
API286_PORTLET_CONFIG_10(new API(PortletConfig.class), "getResourceBundle()"),
API286_PORTLET_CONFIG_11(new API(PortletConfig.class), "getSupportedLocales()"),
- API286_PORTLET_EXCEPTION(new API(PortletException.class), ""),
-
API286_PORTLET_MODE_1(new API(PortletMode.class), "EDIT"),
API286_PORTLET_MODE_2(new API(PortletMode.class), "HELP"),
API286_PORTLET_MODE_3(new API(PortletMode.class), "VIEW"),
@@ -1530,8 +1571,6 @@
API286_PORTLET_MODE_6(new API(PortletMode.class), "toString()"),
API286_PORTLET_MODE_7(new API(PortletMode.class), "PortletMode()"),
- API286_PORTLET_MODE_EXCEPTION(new API(PortletModeException.class), ""),
-
API286_PORTLET_PREFERENCES_1(new API(PortletPreferences.class), "getMap()"),
API286_PORTLET_PREFERENCES_2(new API(PortletPreferences.class), "getNames()"),
API286_PORTLET_PREFERENCES_3(new API(PortletPreferences.class), "getValue()"),
@@ -1595,16 +1634,15 @@
API286_PORTLET_REQUEST_51(new API(PortletRequest.class), "removeAttribute()"),
API286_PORTLET_REQUEST_52(new API(PortletRequest.class), "setAttribute"),
- API286_PORTLET_REQUEST_DISPATCHER(new API(PortletRequestDispatcher.class), ""),
-
+ API286_PORTLET_REQUEST_DISPATCHER_1(new API(PortletRequestDispatcher.class), "forward()"),
+ API286_PORTLET_REQUEST_DISPATCHER_2(new API(PortletRequestDispatcher.class), "include()"),
+
API286_PORTLET_RESPONSE_1(new API(PortletResponse.class), "addProperty()"),
API286_PORTLET_RESPONSE_2(new API(PortletResponse.class), "createElement()"),
API286_PORTLET_RESPONSE_3(new API(PortletResponse.class), "encodeURL()"),
API286_PORTLET_RESPONSE_4(new API(PortletResponse.class), "getNamespace()"),
API286_PORTLET_RESPONSE_5(new API(PortletResponse.class), "setProperty()"),
- API286_PORTLET_SECURITY_EXCEPTION(new API(PortletSecurityException.class), ""),
-
API286_PORTLET_SESSION_1(new API(PortletSession.class), "APPLICATION_SCOPE"),
API286_PORTLET_SESSION_2(new API(PortletSession.class), "PORTLET_SCOPE"),
API286_PORTLET_SESSION_3(new API(PortletSession.class), "getAttribute()"),
@@ -1624,19 +1662,27 @@
API286_PORTLET_SESSION_UTIL_1(new API(PortletSessionUtil.class), "decodeAttributeName()"),
API286_PORTLET_SESSION_UTIL_2(new API(PortletSessionUtil.class), "decodeScope()"),
- API286_PORTLET_URL(new API(PortletURL.class), ""),
+ API286_PORTLET_URL_1(new API(PortletURL.class), "getPortletMode()"),
+ API286_PORTLET_URL_2(new API(PortletURL.class), "getWindowState()"),
+ API286_PORTLET_URL_3(new API(PortletURL.class), "removePublicRenderParameter()"),
+ API286_PORTLET_URL_4(new API(PortletURL.class), "setPortletMode()"),
+ API286_PORTLET_URL_5(new API(PortletURL.class), "setWindowState()"),
- API286_PORTLET_URL_GENERATION_LISTENER(new API(PortletURLGenerationListener.class), ""),
+ API286_PORTLET_URL_GENERATION_LISTENER_1(new API(PortletURLGenerationListener.class), "filterActionURL()"),
+ API286_PORTLET_URL_GENERATION_LISTENER_2(new API(PortletURLGenerationListener.class), "filterRenderURL()"),
+ API286_PORTLET_URL_GENERATION_LISTENER_3(new API(PortletURLGenerationListener.class), "filterResourceURL()"),
- API286_PREFERENCES_VALIDATOR(new API(PreferencesValidator.class), ""),
+ API286_PREFERENCES_VALIDATOR_1(new API(PreferencesValidator.class), "validate()"),
- API286_PROCESS_ACTION(new API(ProcessAction.class), ""),
+ API286_PROCESS_ACTION_1(new API(ProcessAction.class), "name"),
- API286_PROCESS_EVENT(new API(ProcessEvent.class), ""),
+ API286_PROCESS_EVENT_1(new API(ProcessEvent.class), "name"),
+ API286_PROCESS_EVENT_2(new API(ProcessEvent.class), "qname"),
- API286_P3P_USER_INFOS(new API(PortletRequest.P3PUserInfos.class), ""),
+ //TODO:
+ //API286_P3P_USER_INFOS(new API(PortletRequest.P3PUserInfos.class), ""),
- API286_RENDER_MODE(new API(RenderMode.class), ""),
+ API286_RENDER_MODE_1(new API(RenderMode.class), "name"),
API286_RENDER_REQUEST_1(new API(RenderRequest.class), "ETAG"),
@@ -1644,13 +1690,26 @@
API286_RENDER_RESPONSE_2(new API(RenderResponse.class), "setNextPossiblePortletModes()"),
API286_RENDER_RESPONSE_3(new API(RenderResponse.class), "setTitle()"),
- API286_RESOURCE_REQUEST(new API(ResourceRequest.class), ""),
+ API286_RESOURCE_REQUEST_1(new API(ResourceRequest.class), "getCacheability()"),
+ API286_RESOURCE_REQUEST_2(new API(ResourceRequest.class), "getETag()"),
+ API286_RESOURCE_REQUEST_3(new API(ResourceRequest.class), "getPrivateRenderParameterMap()"),
+ API286_RESOURCE_REQUEST_4(new API(ResourceRequest.class), "getResourceID()"),
+ API286_RESOURCE_REQUEST_5(new API(ResourceRequest.class), "getResponseContentType()"),
+ API286_RESOURCE_REQUEST_6(new API(ResourceRequest.class), "getResponseContentTypes()"),
- API286_RESOURCE_RESPONSE(new API(ResourceResponse.class), ""),
+ API286_RESOURCE_RESPONSE_1(new API(ResourceResponse.class), "setContentType()"),
+ API286_RESOURCE_RESPONSE_2(new API(ResourceResponse.class), "setNExtPossiblePortletModes()"),
+ API286_RESOURCE_RESPONSE_3(new API(ResourceResponse.class), "setTitle()"),
- API286_RESOURCE_SERVING_PORTLET(new API(ResourceServingPortlet.class), ""),
+ API286_RESOURCE_SERVING_PORTLET_1(new API(ResourceServingPortlet.class), "serveResource()"),
- API286_RESOURCE_URL(new API(ResourceURL.class), ""),
+ API286_RESOURCE_URL_1(new API(ResourceURL.class), "FULL"),
+ API286_RESOURCE_URL_2(new API(ResourceURL.class), "PAGE"),
+ API286_RESOURCE_URL_3(new API(ResourceURL.class), "PORTLET"),
+ API286_RESOURCE_URL_4(new API(ResourceURL.class), "SHARED"),
+ API286_RESOURCE_URL_5(new API(ResourceURL.class), "getCacheability()"),
+ API286_RESOURCE_URL_6(new API(ResourceURL.class), "setCacheability()"),
+ API286_RESOURCE_URL_7(new API(ResourceURL.class), "setResourceID()"),
API286_STATE_AWARE_RESPONSE_1(new API(StateAwareResponse.class), "getPortletMode()"),
API286_STATE_AWARE_RESPONSE_2(new API(StateAwareResponse.class), "getRenderParameterMap()"),
@@ -1673,36 +1732,123 @@
// Portlet Filter
- API286_ACTION_FILTER(new API(ActionFilter.class), ""),
+ API286_ACTION_FILTER_1(new API(ActionFilter.class), "doFilter()"),
- API286_ACTION_REQUEST_WRAPPER(new API(ActionRequestWrapper.class), ""),
+ //API286_ACTION_REQUEST_WRAPPER(new API(ActionRequestWrapper.class), ""),
- API286_ACTION_RESPONSE_WRAPPER(new API(ActionResponseWrapper.class), ""),
+ API286_ACTION_RESPONSE_WRAPPER_1(new API(ActionResponseWrapper.class), "getPortletMode()"),
+ API286_ACTION_RESPONSE_WRAPPER_2(new API(ActionResponseWrapper.class), "getRenderParameterMap()"),
+ API286_ACTION_RESPONSE_WRAPPER_3(new API(ActionResponseWrapper.class), "getResponse()"),
+ API286_ACTION_RESPONSE_WRAPPER_4(new API(ActionResponseWrapper.class), "getWindowState()"),
+ API286_ACTION_RESPONSE_WRAPPER_5(new API(ActionResponseWrapper.class), "removePublicRenderParameter()"),
+ API286_ACTION_RESPONSE_WRAPPER_6(new API(ActionResponseWrapper.class), "sendRedirect()"),
+ API286_ACTION_RESPONSE_WRAPPER_7(new API(ActionResponseWrapper.class), "setEvent()"),
+ API286_ACTION_RESPONSE_WRAPPER_8(new API(ActionResponseWrapper.class), "setPortletMode()"),
+ API286_ACTION_RESPONSE_WRAPPER_9(new API(ActionResponseWrapper.class), "setRenderParameter()"),
+ API286_ACTION_RESPONSE_WRAPPER_10(new API(ActionResponseWrapper.class), "setRenderParameters()"),
+ API286_ACTION_RESPONSE_WRAPPER_11(new API(ActionResponseWrapper.class), "setResponse()"),
+ API286_ACTION_RESPONSE_WRAPPER_12(new API(ActionResponseWrapper.class), "setWindowState()"),
- API286_EVENT_FILTER(new API(EventFilter.class), ""),
+ API286_EVENT_FILTER_1(new API(EventFilter.class), "doFilter()"),
- API286_EVENT_REQUEST_WRAPPER(new API(EventRequestWrapper.class), ""),
+ API286_EVENT_REQUEST_WRAPPER_1(new API(EventRequestWrapper.class), "getEvent()"),
+ API286_EVENT_REQUEST_WRAPPER_2(new API(EventRequestWrapper.class), "getMethod()"),
+ API286_EVENT_REQUEST_WRAPPER_3(new API(EventRequestWrapper.class), "getRequest()"),
+ API286_EVENT_REQUEST_WRAPPER_4(new API(EventRequestWrapper.class), "setRequest()"),
- API286_EVENT_RESPONSE_WRAPPER(new API(EventResponseWrapper.class), ""),
+ API286_EVENT_RESPONSE_WRAPPER_1(new API(EventResponseWrapper.class), "getPortletMode()"),
+ API286_EVENT_RESPONSE_WRAPPER_2(new API(EventResponseWrapper.class), "getRenderParameterMap()"),
+ API286_EVENT_RESPONSE_WRAPPER_3(new API(EventResponseWrapper.class), "getResponse()"),
+ API286_EVENT_RESPONSE_WRAPPER_4(new API(EventResponseWrapper.class), "getWindowState()"),
+ API286_EVENT_RESPONSE_WRAPPER_5(new API(EventResponseWrapper.class), "removePublicRenderParameter()"),
+ API286_EVENT_RESPONSE_WRAPPER_6(new API(EventResponseWrapper.class), "sendRedirect()"),
+ API286_EVENT_RESPONSE_WRAPPER_7(new API(EventResponseWrapper.class), "setEvent()"),
+ API286_EVENT_RESPONSE_WRAPPER_8(new API(EventResponseWrapper.class), "setPortletMode()"),
+ API286_EVENT_RESPONSE_WRAPPER_9(new API(EventResponseWrapper.class), "setRenderParameter()"),
+ API286_EVENT_RESPONSE_WRAPPER_10(new API(EventResponseWrapper.class), "setRenderParameters()"),
+ API286_EVENT_RESPONSE_WRAPPER_11(new API(EventResponseWrapper.class), "setResponse()"),
+ API286_EVENT_RESPONSE_WRAPPER_12(new API(EventResponseWrapper.class), "setWindowState()"),
- API286_FILTER_CHAIN(new API(FilterChain.class), ""),
+ API286_FILTER_CHAIN_1(new API(FilterChain.class), "doFilter()"),
- API286_FILTER_CONFIG(new API(FilterConfig.class), ""),
+ API286_FILTER_CONFIG_1(new API(FilterConfig.class), "getFilterName()"),
+ API286_FILTER_CONFIG_2(new API(FilterConfig.class), "getInitParameter()"),
+ API286_FILTER_CONFIG_3(new API(FilterConfig.class), "getInitParameterNames()"),
+ API286_FILTER_CONFIG_4(new API(FilterConfig.class), "getPortletContext()"),
- API286_PORTLET_FILTER(new API(PortletFilter.class), ""),
+ API286_PORTLET_FILTER_1(new API(PortletFilter.class), "destroy()"),
+ API286_PORTLET_FILTER_2(new API(PortletFilter.class), "init()"),
- API286_RENDER_REQUEST_WRAPPER(new API(RenderRequestWrapper.class), ""),
+ API286_RENDER_REQUEST_WRAPPER_1(new API(RenderRequestWrapper.class), "getETag()"),
+ API286_RENDER_REQUEST_WRAPPER_2(new API(RenderRequestWrapper.class), "getRequest()"),
+ API286_RENDER_REQUEST_WRAPPER_3(new API(RenderRequestWrapper.class), "setRequest()"),
- API286_RENDER_RESPONSE_WRAPPER(new API(RenderResponseWrapper.class), ""),
+ API286_RENDER_RESPONSE_WRAPPER_1(new API(RenderResponseWrapper.class), "createActionURL()"),
+ API286_RENDER_RESPONSE_WRAPPER_2(new API(RenderResponseWrapper.class), "createRenderURL()"),
+ API286_RENDER_RESPONSE_WRAPPER_3(new API(RenderResponseWrapper.class), "createResourceURL()"),
+ API286_RENDER_RESPONSE_WRAPPER_4(new API(RenderResponseWrapper.class), "flushBuffer()"),
+ API286_RENDER_RESPONSE_WRAPPER_5(new API(RenderResponseWrapper.class), "getBufferSize()"),
+ API286_RENDER_RESPONSE_WRAPPER_6(new API(RenderResponseWrapper.class), "getCacheControl()"),
+ API286_RENDER_RESPONSE_WRAPPER_7(new API(RenderResponseWrapper.class), "getCharacterEncoding()"),
+ API286_RENDER_RESPONSE_WRAPPER_8(new API(RenderResponseWrapper.class), "getContentType()"),
+ API286_RENDER_RESPONSE_WRAPPER_9(new API(RenderResponseWrapper.class), "getLocale()"),
+ API286_RENDER_RESPONSE_WRAPPER_10(new API(RenderResponseWrapper.class), "getPortletOutputStream()"),
+ API286_RENDER_RESPONSE_WRAPPER_11(new API(RenderResponseWrapper.class), "getResponse()"),
+ API286_RENDER_RESPONSE_WRAPPER_12(new API(RenderResponseWrapper.class), "getWriter()"),
+ API286_RENDER_RESPONSE_WRAPPER_13(new API(RenderResponseWrapper.class), "isCommited()"),
+ API286_RENDER_RESPONSE_WRAPPER_14(new API(RenderResponseWrapper.class), "reset()"),
+ API286_RENDER_RESPONSE_WRAPPER_15(new API(RenderResponseWrapper.class), "resetBuffer()"),
+ API286_RENDER_RESPONSE_WRAPPER_16(new API(RenderResponseWrapper.class), "setBufferSize()"),
+ API286_RENDER_RESPONSE_WRAPPER_17(new API(RenderResponseWrapper.class), "setContentType()"),
+ API286_RENDER_RESPONSE_WRAPPER_18(new API(RenderResponseWrapper.class), "setNextPossiblePortletModes()"),
+ API286_RENDER_RESPONSE_WRAPPER_19(new API(RenderResponseWrapper.class), "setResponse()"),
+ API286_RENDER_RESPONSE_WRAPPER_20(new API(RenderResponseWrapper.class), "setTitle()"),
- API286_RESOURCE_FILTER(new API(ResourceFilter.class), ""),
+ API286_RESOURCE_FILTER_1(new API(ResourceFilter.class), "doFilter()"),
- API286_RESOURCE_REQUEST_WRAPPER(new API(ResourceRequestWrapper.class), ""),
+ API286_RESOURCE_REQUEST_WRAPPER_1(new API(ResourceRequestWrapper.class), "getCacheability()"),
+ API286_RESOURCE_REQUEST_WRAPPER_2(new API(ResourceRequestWrapper.class), "getCharacterEncoding()"),
+ API286_RESOURCE_REQUEST_WRAPPER_3(new API(ResourceRequestWrapper.class), "getContentLength()"),
+ API286_RESOURCE_REQUEST_WRAPPER_4(new API(ResourceRequestWrapper.class), "getContentType()"),
+ API286_RESOURCE_REQUEST_WRAPPER_5(new API(ResourceRequestWrapper.class), "getETag()"),
+ API286_RESOURCE_REQUEST_WRAPPER_6(new API(ResourceRequestWrapper.class), "getMethod()"),
+ API286_RESOURCE_REQUEST_WRAPPER_7(new API(ResourceRequestWrapper.class), "getPortletInputStream()"),
+ API286_RESOURCE_REQUEST_WRAPPER_8(new API(ResourceRequestWrapper.class), "getPrivateRenderParameterMap()"),
+ API286_RESOURCE_REQUEST_WRAPPER_9(new API(ResourceRequestWrapper.class), "getReader()"),
+ API286_RESOURCE_REQUEST_WRAPPER_10(new API(ResourceRequestWrapper.class), "getRequest()"),
+ API286_RESOURCE_REQUEST_WRAPPER_11(new API(ResourceRequestWrapper.class), "getResourceID()"),
+ API286_RESOURCE_REQUEST_WRAPPER_12(new API(ResourceRequestWrapper.class), "setCharacterEncoding()"),
+ API286_RESOURCE_REQUEST_WRAPPER_13(new API(ResourceRequestWrapper.class), "setRequest()"),
- API286_RESOURCE_RESPONSE_WRAPPER(new API(ResourceResponseWrapper.class), ""),
+ API286_RESOURCE_RESPONSE_WRAPPER_1(new API(ResourceResponseWrapper.class), "createActionURL()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_2(new API(ResourceResponseWrapper.class), "createRenderURL()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_3(new API(ResourceResponseWrapper.class), "createResourceURL()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_4(new API(ResourceResponseWrapper.class), "flushBuffer()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_5(new API(ResourceResponseWrapper.class), "getBufferSize()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_6(new API(ResourceResponseWrapper.class), "getCacheControl()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_7(new API(ResourceResponseWrapper.class), "getCharacterEncoding()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_8(new API(ResourceResponseWrapper.class), "getContentType()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_9(new API(ResourceResponseWrapper.class), "getLocale()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_10(new API(ResourceResponseWrapper.class), "getPortletOutputStream()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_11(new API(ResourceResponseWrapper.class), "getResponse()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_12(new API(ResourceResponseWrapper.class), "getWriter()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_13(new API(ResourceResponseWrapper.class), "isCommited()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_14(new API(ResourceResponseWrapper.class), "reset()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_15(new API(ResourceResponseWrapper.class), "resetBuffer()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_16(new API(ResourceResponseWrapper.class), "setBufferSize()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_17(new API(ResourceResponseWrapper.class), "setCharacterEncoding()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_18(new API(ResourceResponseWrapper.class), "setContentLength()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_19(new API(ResourceResponseWrapper.class), "setContentType()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_20(new API(ResourceResponseWrapper.class), "setLocale()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_21(new API(ResourceResponseWrapper.class), "setResponse()"),
;
+ public String toString()
+ {
+ return this.name();
+ }
+
/**
* An abstract reference.
*/
@@ -1977,4 +2123,6 @@
{
return assertion;
}
+
+
}
Modified: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/reports/ResultProducingListener.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/reports/ResultProducingListener.java 2008-03-22 01:46:36 UTC (rev 10363)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/reports/ResultProducingListener.java 2008-03-22 15:09:03 UTC (rev 10364)
@@ -31,6 +31,9 @@
import java.io.Writer;
import java.util.Map;
import java.util.Set;
+import java.util.List;
+import java.util.Collections;
+import java.util.LinkedList;
/**
* @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
@@ -46,6 +49,8 @@
public static int jsr286Max = 350;
+ public static String api286File = "./target/apt-api286-testcases.csv";
+
public void roundComplete(RoundCompleteEvent event)
{
if (event.getRoundState().finalRound())
@@ -61,13 +66,18 @@
if (!TestCaseAnnotationProcessor.jsr168Assertions.keySet().isEmpty())
{
- print(TestCaseAnnotationProcessor.jsr168Assertions, jsr168File, "JSR168_", jsr168Max);
+ printTCKReport(TestCaseAnnotationProcessor.jsr168Assertions, jsr168File, "JSR168_", jsr168Max);
}
if (!TestCaseAnnotationProcessor.jsr286Assertions.keySet().isEmpty())
{
- print(TestCaseAnnotationProcessor.jsr286Assertions, jsr286File, "JSR286_", jsr286Max);
+ printTCKReport(TestCaseAnnotationProcessor.jsr286Assertions, jsr286File, "JSR286_", jsr286Max);
}
+
+ if (!TestCaseAnnotationProcessor.api286Assertions.keySet().isEmpty())
+ {
+ printAPIReport(TestCaseAnnotationProcessor.api286Assertions, api286File);
+ }
}
catch (Exception e)
{
@@ -103,7 +113,7 @@
- private void print(Map<String, Set<String>> map, String fileName, String pre, int max) throws Exception
+ private void printTCKReport(Map<String, Set<String>> map, String fileName, String pre, int max) throws Exception
{
// Simple stats
@@ -192,7 +202,113 @@
writer.close();
}
+ private void printAPIReport(Map<String, Set<String>> map, String fileName) throws Exception
+ {
+ // Simple stats
+
+ int total = 0;
+ int tested = 0;
+ int not_tested = 0;
+ int inactive = 0;
+
+ File f = new File(fileName);
+
+ Writer writer = new FileWriter(f, false);
+
+ StringBuilder output = new StringBuilder();
+
+ List<Assertion> apiAssertions = getApiAssertions();
+
+ for (Assertion assertion : apiAssertions)
+ {
+ total++;
+
+ String assertionName = assertion.name();
+
+ Set<String> testCases = map.get(assertionName);
+
+ String description = assertion.getDescription().replaceAll(",", " ").trim();
+
+ if (assertion.getRef() != null)
+ {
+ output.append(assertionName).append(",").append(assertion.getRef().toString()).append('\n');
+ output.append("DESCRIPTION: ,").append(description).append('\n');
+ }
+ else
+ {
+ output.append(assertionName).append(",").append(description).append('\n');
+ }
+
+
+ if (assertion.getStatus() != null)
+ {
+ Assertion.Status status = assertion.getStatus();
+ output.append("STATUS:,").append(status).append("\n");
+
+ if (status instanceof Assertion.Inactive || status instanceof Assertion.Duplicate)
+ {
+ inactive++;
+ }
+ }
+
+
+ if (testCases != null)
+ {
+ tested++;
+ for (String testCase : testCases)
+ {
+ output.append("TEST_CASE: ,").append(testCase).append("\n");
+ }
+ }
+ else
+ {
+ not_tested++;
+ output.append("TEST_CASE:,NOT_TESTED\n");
+ }
+
+ output.append(" ,\n");
+ }
+
+ output.append("\n\n");
+
+ writer.write("STATISTICS:,**************************\n");
+ writer.write("TOTAL:," + total + "\n");
+ writer.write("TESTED:," + tested + "\n");
+ writer.write("NOT TESTED:," + not_tested + "\n");
+ writer.write("INACTIVE:," + inactive + " (POSTPONED; TODO; DISABLED; UNTESTABLE or DUPLICATE) \n");
+ float ratio = (float)tested/(float)(total-inactive);
+ writer.write("TESTED RATIO:," + ratio + " ( TESTED/(TOTAL-INACTIVE) ) \n");
+
+ writer.write("\n\n\n\n");
+ writer.write(output.toString());
+ writer.write("\n");
+
+ writer.close();
+ }
+
+ private List<Assertion> getApiAssertions()
+ {
+
+ List<Assertion> result = new LinkedList<Assertion>();
+
+ Assertion[] assertions = Assertion.class.getEnumConstants();
+
+ for (Assertion assertion : assertions)
+ {
+ if (assertion.name().startsWith(TestCaseAnnotationProcessor.api286AssertionPre))
+ {
+ result.add(assertion);
+ }
+ }
+
+ Collections.sort(result);
+
+ return result;
+
+ }
+
+
private Assertion getAssertion(String name)
{
if (name == null)
Modified: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/reports/TestCaseAnnotationProcessor.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/reports/TestCaseAnnotationProcessor.java 2008-03-22 01:46:36 UTC (rev 10363)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/reports/TestCaseAnnotationProcessor.java 2008-03-22 15:09:03 UTC (rev 10364)
@@ -67,11 +67,11 @@
public static String jsr286Pre = "org.jboss.portal.test.portlet.jsr286";
- public static String jsr168AssertionPre = "JSR168";
+ public static String jsr168AssertionPre = "JSR168_";
- public static String jsr286AssertionPre = "JSR286";
+ public static String jsr286AssertionPre = "JSR286_";
- public static String api286AssertionPre = "API286";
+ public static String api286AssertionPre = "API286_";
public static Map<String, Set<String>> jsr168Assertions = new HashMap<String, Set<String>>();
18 years, 1 month
JBoss Portal SVN: r10363 - modules/portlet/trunk/portal/src/main/resources/simple-portal-war/css.
by portal-commits@lists.jboss.org
Author: wesleyhales
Date: 2008-03-21 21:46:36 -0400 (Fri, 21 Mar 2008)
New Revision: 10363
Modified:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/css/debugger.css
Log:
event debugger small change
Modified: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/css/debugger.css
===================================================================
--- modules/portlet/trunk/portal/src/main/resources/simple-portal-war/css/debugger.css 2008-03-21 20:54:38 UTC (rev 10362)
+++ modules/portlet/trunk/portal/src/main/resources/simple-portal-war/css/debugger.css 2008-03-22 01:46:36 UTC (rev 10363)
@@ -3,7 +3,7 @@
}
div.debug-container div.event {
-
+ cursor: pointer;
}
div.debug-container div.event div.event-header {
18 years, 1 month
JBoss Portal SVN: r10362 - in modules/portlet/trunk: portal/src/main/java/org/jboss/portal/portlet/portal/jsp and 3 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-03-21 16:54:38 -0400 (Fri, 21 Mar 2008)
New Revision: 10362
Modified:
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/DebuggerPortlet.java
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/jsp/EventRoute.java
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/jsp/PageEventControllerContext.java
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/layouts/nav/main.jsp
modules/portlet/trunk/samples/src/main/artifacts/basic-portlet-war/WEB-INF/portlet.xml
modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/basic/RandomEventPortlet.java
Log:
improvements of event debugger
Modified: modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/DebuggerPortlet.java
===================================================================
--- modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/DebuggerPortlet.java 2008-03-21 13:58:44 UTC (rev 10361)
+++ modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/DebuggerPortlet.java 2008-03-21 20:54:38 UTC (rev 10362)
@@ -25,6 +25,11 @@
import org.jboss.portal.portlet.portal.jsp.PageEventControllerContext;
import org.jboss.portal.portlet.portal.jsp.EventRoute;
import org.jboss.portal.portlet.portal.jsp.PagePortletControllerContext;
+import org.jboss.portal.portlet.portal.jsp.EventAcknowledgement;
+import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
+import org.jboss.portal.portlet.invocation.response.UpdateNavigationalStateResponse;
+import org.jboss.portal.portlet.invocation.response.ErrorResponse;
+import org.jboss.portal.portlet.ParametersStateString;
import javax.portlet.GenericPortlet;
import javax.portlet.RenderRequest;
@@ -33,6 +38,8 @@
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Random;
+import java.util.Map;
+import java.util.Iterator;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
@@ -44,11 +51,19 @@
protected void doView(RenderRequest req, RenderResponse resp) throws PortletException, IOException
{
PagePortletControllerContext context = (PagePortletControllerContext)req.getAttribute("bilto");
- PageEventControllerContext eventCC = context.getEventControllerContext();
+
+ PageEventControllerContext eventCC = null;
+ if (context != null)
+ {
+ eventCC = context.getEventControllerContext();
+ }
+
//
+ PrintWriter writer = resp.getWriter();
+
+ //
if (eventCC != null)
{
- PrintWriter writer = resp.getWriter();
writer.print("" +
"<a href=\"javascript:showAllDetails()\" >Show All Details</a><br/>" +
"<div class=\"debug-container\">");
@@ -62,6 +77,10 @@
}
writer.println("</div>\n");
}
+ else
+ {
+ writer.println("No event phase happened in the last request");
+ }
}
private void printRoute(EventRoute route, PrintWriter writer,PagePortletControllerContext context, int id, String cid)
@@ -77,7 +96,7 @@
writer.print("<label>Destination: </label>" + context.getPortletInfo(route.getDestination()).getName() + "</p>\n" +
" <div class=\"details\" id=\"details-" + id + cid + "\">\n" +
" <div class=\"details-frame\">\n" +
- " " + route.getAcknowledgement() + "\n" +
+ " " + formatAck(route.getAcknowledgement()) + "\n" +
" <div class=\"dotted-white\"></div>\n" +
" <label>Payload: " + route.getPayload() + "</label>\n" +
" </div>\n" +
@@ -94,7 +113,118 @@
}
}
-
+
+ private String formatAck(EventAcknowledgement ack)
+ {
+ if (ack instanceof EventAcknowledgement.Consumed)
+ {
+ EventAcknowledgement.Consumed consumedAck = (EventAcknowledgement.Consumed)ack;
+ PortletInvocationResponse response = consumedAck.getResponse();
+ if (response instanceof UpdateNavigationalStateResponse)
+ {
+ UpdateNavigationalStateResponse updateResponse = (UpdateNavigationalStateResponse)response;
+
+ //
+ String[] strings = new String[4];
+
+ //
+ if (updateResponse.getMode() != null)
+ {
+ strings[0] = "mode=" + updateResponse.getMode();
+ }
+
+ //
+ if (updateResponse.getWindowState() != null)
+ {
+ strings[1] = "windowstate=" + updateResponse.getWindowState();
+ }
+
+ // Should be ok, we are not consuming remote portlets
+ ParametersStateString newNS = (ParametersStateString)updateResponse.getNavigationalState();
+ if (newNS != null)
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.append("private=");
+ formatMap(newNS.getParameters(), sb);
+ strings[2] = sb.toString();
+ }
+
+ //
+ Map<String, String[]> publicChanges = updateResponse.getPublicNavigationalStateUpdates();
+ if (publicChanges != null)
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.append("public=");
+ formatMap(publicChanges, sb);
+ strings[3] = sb.toString();
+ }
+
+ //
+ StringBuilder sb = new StringBuilder("[");
+ formatList(strings, sb);
+ sb.append("]");
+
+ //
+ return sb.toString();
+ }
+ else if (response instanceof ErrorResponse)
+ {
+ ErrorResponse errorResponse = (ErrorResponse)response;
+
+ //
+ return "Error:" + errorResponse.getMessage();
+ }
+ else
+ {
+ return "Todo format:" + response;
+ }
+ }
+ else
+ {
+ return ack.toString();
+ }
+ }
+
+ private void formatList(String[] strings, StringBuilder sb)
+ {
+ boolean done = false;
+ for (String string : strings)
+ {
+ if (string != null)
+ {
+ sb.append(done ? "," : "").append(string);
+
+ //
+ done = true;
+ }
+ }
+ }
+
+ private void formatMap(Map<String, String[]> map, StringBuilder sb)
+ {
+ sb.append("{");
+ for (Iterator<Map.Entry<String, String[]>> i = map.entrySet().iterator();i.hasNext();)
+ {
+ Map.Entry<String, String[]> entry = i.next();
+
+ //
+ sb.append(entry.getKey());
+
+ //
+ sb.append("=(");
+ String[] value = entry.getValue();
+ formatList(entry.getValue(), sb);
+ sb.append(')');
+
+ //
+ if (i.hasNext())
+ {
+ sb.append(',');
+ }
+ }
+ sb.append("}");
+ }
+
public static int rand(int lo, int hi)
{
Random rn2 = new Random();
Modified: modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/jsp/EventRoute.java
===================================================================
--- modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/jsp/EventRoute.java 2008-03-21 13:58:44 UTC (rev 10361)
+++ modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/jsp/EventRoute.java 2008-03-21 20:54:38 UTC (rev 10362)
@@ -57,7 +57,12 @@
/** . */
EventAcknowledgement acknowledgement;
- public EventRoute(EventRoute parent, QName name, Serializable payload, String source, String destination)
+ public EventRoute(
+ EventRoute parent,
+ QName name,
+ Serializable payload,
+ String source,
+ String destination)
{
this.parent = parent;
this.name = name;
Modified: modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/jsp/PageEventControllerContext.java
===================================================================
--- modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/jsp/PageEventControllerContext.java 2008-03-21 13:58:44 UTC (rev 10361)
+++ modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/jsp/PageEventControllerContext.java 2008-03-21 20:54:38 UTC (rev 10362)
@@ -94,7 +94,12 @@
Event destinationEvent = new Event(producedEvent.getName(), producedEvent.getPayload(), windowId);
//
- EventRoute eventRoute = new EventRoute(relatedRoute, producedEvent.getName(), producedEvent.getPayload(), producedEvent.getWindowId(), destinationEvent.getWindowId());
+ EventRoute eventRoute = new EventRoute(
+ relatedRoute,
+ producedEvent.getName(),
+ producedEvent.getPayload(),
+ producedEvent.getWindowId(),
+ destinationEvent.getWindowId());
//
if (relatedRoute != null)
Modified: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/layouts/nav/main.jsp
===================================================================
--- modules/portlet/trunk/portal/src/main/resources/simple-portal-war/layouts/nav/main.jsp 2008-03-21 13:58:44 UTC (rev 10361)
+++ modules/portlet/trunk/portal/src/main/resources/simple-portal-war/layouts/nav/main.jsp 2008-03-21 20:54:38 UTC (rev 10362)
@@ -29,6 +29,9 @@
<li>
<a href="${pageContext.request.contextPath}/demo/demo3.jsp" class="${fn:substringAfter(pageContext.request.servletPath, 'demo/') == 'demo3.jsp' ? 'selected' : ''}">Demo3</a>
</li>
+ <li>
+ <a href="${pageContext.request.contextPath}/demo/demo4.jsp" class="${fn:substringAfter(pageContext.request.servletPath, 'demo/') == 'demo4.jsp' ? 'selected' : ''}">Demo3</a>
+ </li>
</ul>
<br class="clear"/>
</div>
Modified: modules/portlet/trunk/samples/src/main/artifacts/basic-portlet-war/WEB-INF/portlet.xml
===================================================================
--- modules/portlet/trunk/samples/src/main/artifacts/basic-portlet-war/WEB-INF/portlet.xml 2008-03-21 13:58:44 UTC (rev 10361)
+++ modules/portlet/trunk/samples/src/main/artifacts/basic-portlet-war/WEB-INF/portlet.xml 2008-03-21 20:54:38 UTC (rev 10362)
@@ -74,12 +74,7 @@
<portlet-info>
<title>A portlet that generate events randomly</title>
</portlet-info>
-<!--
<supported-processing-event>
- <name>Event1</name>
- </supported-processing-event>
--->
- <supported-processing-event>
<name>Event2</name>
</supported-processing-event>
<supported-processing-event>
@@ -94,6 +89,8 @@
<supported-publishing-event>
<name>Event3</name>
</supported-publishing-event>
+ <supported-public-render-parameter>foo</supported-public-render-parameter>
+ <supported-public-render-parameter>bar</supported-public-render-parameter>
</portlet>
<portlet>
@@ -108,12 +105,7 @@
<supported-processing-event>
<name>Event1</name>
</supported-processing-event>
-<!--
<supported-processing-event>
- <name>Event2</name>
- </supported-processing-event>
--->
- <supported-processing-event>
<name>Event3</name>
</supported-processing-event>
<supported-publishing-event>
@@ -125,6 +117,9 @@
<supported-publishing-event>
<name>Event3</name>
</supported-publishing-event>
+ <supported-public-render-parameter>foo</supported-public-render-parameter>
+ <supported-public-render-parameter>juu</supported-public-render-parameter>
+ <supported-public-render-parameter>daa</supported-public-render-parameter>
</portlet>
<portlet>
@@ -142,11 +137,6 @@
<supported-processing-event>
<name>Event2</name>
</supported-processing-event>
-<!--
- <supported-processing-event>
- <name>Event3</name>
- </supported-processing-event>
--->
<supported-publishing-event>
<name>Event1</name>
</supported-publishing-event>
@@ -156,6 +146,9 @@
<supported-publishing-event>
<name>Event3</name>
</supported-publishing-event>
+ <supported-public-render-parameter>bar</supported-public-render-parameter>
+ <supported-public-render-parameter>juu</supported-public-render-parameter>
+ <supported-public-render-parameter>zee</supported-public-render-parameter>
</portlet>
<filter>
@@ -201,4 +194,29 @@
<value-type>java.lang.Integer</value-type>
</event-definition>
+ <public-render-parameter>
+ <identifier>foo</identifier>
+ <name>foo</name>
+ </public-render-parameter>
+
+ <public-render-parameter>
+ <identifier>bar</identifier>
+ <name>bar</name>
+ </public-render-parameter>
+
+ <public-render-parameter>
+ <identifier>juu</identifier>
+ <name>juu</name>
+ </public-render-parameter>
+
+ <public-render-parameter>
+ <identifier>daa</identifier>
+ <name>daa</name>
+ </public-render-parameter>
+
+ <public-render-parameter>
+ <identifier>zee</identifier>
+ <name>zee</name>
+ </public-render-parameter>
+
</portlet-app>
Modified: modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/basic/RandomEventPortlet.java
===================================================================
--- modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/basic/RandomEventPortlet.java 2008-03-21 13:58:44 UTC (rev 10361)
+++ modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/basic/RandomEventPortlet.java 2008-03-21 20:54:38 UTC (rev 10362)
@@ -53,13 +53,28 @@
};
/** . */
+ private static final String[] PARAM_NAMES = {
+ "foo", "bar", "juu", "daa", "zee"
+ };
+
+ /** . */
+ private static final String[] PARAM_VALUES = {
+ "red", "green", "blue", "yellow", "white", "black"
+ };
+
+ /** . */
private static final Random random = new Random();
private static QName pickQName()
{
+ return pickValue(QNAMES);
+ }
+
+ private static <T> T pickValue(T[] values)
+ {
synchronized (random)
{
- return QNAMES[random.nextInt(QNAMES.length)];
+ return values[random.nextInt(values.length)];
}
}
@@ -76,7 +91,7 @@
int repeat = Integer.parseInt(req.getParameter("repeat"));
//
- publishEvent(resp, repeat);
+ publishState(resp, repeat);
}
public void processEvent(EventRequest req, EventResponse resp) throws PortletException, IOException
@@ -100,14 +115,19 @@
//
if (repeat > 0)
{
- publishEvent(resp, repeat - 1);
+ publishState(resp, repeat - 1);
}
}
- private void publishEvent(StateAwareResponse resp, int repeat)
+ private void publishState(StateAwareResponse resp, int repeat)
{
QName name = pickQName();
resp.setEvent(name, repeat);
+
+ //
+ resp.setRenderParameter(pickValue(PARAM_NAMES), pickValue(PARAM_VALUES));
+
+ //
System.out.println("Portlet " + getPortletConfig().getPortletName() + " generated the event (" + name + "," + repeat + ")");
}
18 years, 1 month
JBoss Portal SVN: r10361 - in modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal: jsp and 1 other directory.
by portal-commits@lists.jboss.org
Author: wesleyhales
Date: 2008-03-21 09:58:44 -0400 (Fri, 21 Mar 2008)
New Revision: 10361
Modified:
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/DebuggerPortlet.java
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/jsp/ControllerFilter.java
Log:
event debugger portlet ui changes
Modified: modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/DebuggerPortlet.java
===================================================================
--- modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/DebuggerPortlet.java 2008-03-21 10:14:06 UTC (rev 10360)
+++ modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/DebuggerPortlet.java 2008-03-21 13:58:44 UTC (rev 10361)
@@ -24,6 +24,7 @@
import org.jboss.portal.portlet.portal.jsp.PageEventControllerContext;
import org.jboss.portal.portlet.portal.jsp.EventRoute;
+import org.jboss.portal.portlet.portal.jsp.PagePortletControllerContext;
import javax.portlet.GenericPortlet;
import javax.portlet.RenderRequest;
@@ -42,8 +43,8 @@
protected void doView(RenderRequest req, RenderResponse resp) throws PortletException, IOException
{
- PageEventControllerContext eventCC = (PageEventControllerContext)req.getAttribute("bilto");
-
+ PagePortletControllerContext context = (PagePortletControllerContext)req.getAttribute("bilto");
+ PageEventControllerContext eventCC = context.getEventControllerContext();
//
if (eventCC != null)
{
@@ -56,23 +57,24 @@
{
id = rand(1,1000);
writer.println("<div class=\"event\" id=\"event-" + id + "\">\n");
- printRoute(route, writer, id, "");
+ printRoute(route, writer, context, id, "");
writer.println("</div>\n");
}
writer.println("</div>\n");
}
}
- private void printRoute(EventRoute route, PrintWriter writer, int id, String cid)
+ private void printRoute(EventRoute route, PrintWriter writer,PagePortletControllerContext context, int id, String cid)
{
- writer.print("<div onmouseover=\"showDetails(this,'details-" + id + cid + "')\" onmouseout=\"hideDetails(this,'details-" + id + cid + "')\">" +
+ writer.print("<div onmouseover=\"showDetails(this,'details-" + id + cid + "')\" onmouseout=\"hideDetails(this,'details-" + id + cid + "')\" onclick=\"new Effect.Highlight('" + context.getPortletInfo(route.getSource()).getName() + "', {startcolor:'#990000', endcolor:'ffffdd',queue: {position:'start', scope: 'highlight', limit:2}});new Effect.Highlight('" + context.getPortletInfo(route.getDestination()).getName() + "', {startcolor:'#990000', endcolor:'ffffdd',queue: {position:'end', scope: 'highlight', limit:2}});\" >" +
"<div class=\"event-header\">\n" +
- " <h4>" + route.getName().getLocalPart() + "</h4>\n" +
+ " <h4>" + context.getPortletInfo(route.getSource()).getName() + "</h4>\n" +
+ " <div>Event: " + route.getName().getLocalPart() + "</div>\n" +
" </div>\n");
writer.print("<div class=\"event-body\">" +
- "<p><label>Source: </label>" + route.getSource() + "<img src=\"/simple-portal/images/debug/arrow.gif\" alt=\"\"/>");
- writer.print("<label>Destination: </label>" + route.getDestination() + "</p>\n" +
+ "<p><label>Source: </label>" + context.getPortletInfo(route.getSource()).getName() + "<img src=\"/simple-portal/images/debug/arrow.gif\" alt=\"\"/>");
+ writer.print("<label>Destination: </label>" + context.getPortletInfo(route.getDestination()).getName() + "</p>\n" +
" <div class=\"details\" id=\"details-" + id + cid + "\">\n" +
" <div class=\"details-frame\">\n" +
" " + route.getAcknowledgement() + "\n" +
@@ -87,7 +89,7 @@
{
id = rand(1,1000);
writer.println("<div class=\"children\">");
- printRoute(child, writer, id, "a");
+ printRoute(child, writer, context, id, "a");
writer.println("</div>");
}
Modified: modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/jsp/ControllerFilter.java
===================================================================
--- modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/jsp/ControllerFilter.java 2008-03-21 10:14:06 UTC (rev 10360)
+++ modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/jsp/ControllerFilter.java 2008-03-21 13:58:44 UTC (rev 10361)
@@ -140,7 +140,7 @@
pageNavigationalState = pageUpdate.getPageNavigationalState();
//
- req.setAttribute("bilto", context.getEventControllerContext());
+ req.setAttribute("bilto", context);
// We perform a send redirect on actions
if (request instanceof PortletActionRequest && redirectAfterAction)
18 years, 1 month
JBoss Portal SVN: r10360 - modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/info.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-03-21 06:14:06 -0400 (Fri, 21 Mar 2008)
New Revision: 10360
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/info/ContainerCapabilitiesInfo.java
Log:
revert back change about supporting by default the english locale as cannot find a mention of it in the spec and it breaks the JSR286 assertion 34 (The getSupportedLocales method of the PortletConfig interface returns the supported locales found in the portlet definition in the deployment descriptor with the supported-locale element or an empty enumeration if no supported locales are defined for the current portlet definition.)
Modified: modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/info/ContainerCapabilitiesInfo.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/info/ContainerCapabilitiesInfo.java 2008-03-21 02:36:35 UTC (rev 10359)
+++ modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/info/ContainerCapabilitiesInfo.java 2008-03-21 10:14:06 UTC (rev 10360)
@@ -37,8 +37,6 @@
/**
* This object holds the content type and mode capabilities.
- * <p/>
- * Todo : use the media type object ?
*
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
@@ -70,8 +68,6 @@
//
this.supportedLocales = new HashSet<Locale>();
- this.supportedLocales.add(Locale.ENGLISH);
-
this.supportedModes = supportedModes;
this.supportedWindowStates = supportedWindowStates;
}
18 years, 1 month