JBoss Portal SVN: r11177 - in modules/web/trunk/web/src/test/resources/support: jboss-5.0-endpoint and 6 other directories.
by portal-commits@lists.jboss.org
Author: mwringe
Date: 2008-06-27 16:29:07 -0400 (Fri, 27 Jun 2008)
New Revision: 11177
Added:
modules/web/trunk/web/src/test/resources/support/jboss-5.0-endpoint/
modules/web/trunk/web/src/test/resources/support/jboss-5.0-endpoint/default-servlet-mapping-war/
modules/web/trunk/web/src/test/resources/support/jboss-5.0-endpoint/default-servlet-mapping-war/WEB-INF/
modules/web/trunk/web/src/test/resources/support/jboss-5.0-endpoint/default-servlet-mapping-war/WEB-INF/jboss-web.xml
modules/web/trunk/web/src/test/resources/support/jboss-5.0-endpoint/default-servlet-mapping-war/WEB-INF/web.xml
modules/web/trunk/web/src/test/resources/support/jboss-5.0-endpoint/path-mapping-war/
modules/web/trunk/web/src/test/resources/support/jboss-5.0-endpoint/path-mapping-war/WEB-INF/
modules/web/trunk/web/src/test/resources/support/jboss-5.0-endpoint/path-mapping-war/WEB-INF/jboss-web.xml
modules/web/trunk/web/src/test/resources/support/jboss-5.0-endpoint/path-mapping-war/WEB-INF/web.xml
modules/web/trunk/web/src/test/resources/support/jboss-5.0-endpoint/root-path-mapping-war/
modules/web/trunk/web/src/test/resources/support/jboss-5.0-endpoint/root-path-mapping-war/WEB-INF/
modules/web/trunk/web/src/test/resources/support/jboss-5.0-endpoint/root-path-mapping-war/WEB-INF/jboss-web.xml
modules/web/trunk/web/src/test/resources/support/jboss-5.0-endpoint/root-path-mapping-war/WEB-INF/web.xml
Log:
Add jboss-5.0-endpoint folder that was unintentionally absent from the last commit.
Added: modules/web/trunk/web/src/test/resources/support/jboss-5.0-endpoint/default-servlet-mapping-war/WEB-INF/jboss-web.xml
===================================================================
--- modules/web/trunk/web/src/test/resources/support/jboss-5.0-endpoint/default-servlet-mapping-war/WEB-INF/jboss-web.xml (rev 0)
+++ modules/web/trunk/web/src/test/resources/support/jboss-5.0-endpoint/default-servlet-mapping-war/WEB-INF/jboss-web.xml 2008-06-27 20:29:07 UTC (rev 11177)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<!DOCTYPE jboss-web PUBLIC
+ "-//JBoss//DTD Web Application 4.2//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-web_4_2.dtd">
+<jboss-web>
+ <class-loading java2ClassLoadingCompliance="false">
+ <loader-repository>test:loader=portlet</loader-repository>
+ </class-loading>
+</jboss-web>
\ No newline at end of file
Added: modules/web/trunk/web/src/test/resources/support/jboss-5.0-endpoint/default-servlet-mapping-war/WEB-INF/web.xml
===================================================================
--- modules/web/trunk/web/src/test/resources/support/jboss-5.0-endpoint/default-servlet-mapping-war/WEB-INF/web.xml (rev 0)
+++ modules/web/trunk/web/src/test/resources/support/jboss-5.0-endpoint/default-servlet-mapping-war/WEB-INF/web.xml 2008-06-27 20:29:07 UTC (rev 11177)
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+ <context-param>
+ <param-name>jboss.portal.mc.beans_resource_location</param-name>
+ <param-value>org/jboss/portal/test/web/server-beans.xml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>jboss.portal.mc.beans_resource_type</param-name>
+ <param-value>classloader</param-value>
+ </context-param>
+ <listener>
+ <listener-class>org.jboss.portal.common.mc.bootstrap.WebBootstrap</listener-class>
+ </listener>
+ <servlet>
+ <servlet-name>TestServlet</servlet-name>
+ <servlet-class>org.jboss.portal.test.web.TestServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>TestServlet</servlet-name>
+ <url-pattern>/</url-pattern>
+ </servlet-mapping>
+</web-app>
Added: modules/web/trunk/web/src/test/resources/support/jboss-5.0-endpoint/path-mapping-war/WEB-INF/jboss-web.xml
===================================================================
--- modules/web/trunk/web/src/test/resources/support/jboss-5.0-endpoint/path-mapping-war/WEB-INF/jboss-web.xml (rev 0)
+++ modules/web/trunk/web/src/test/resources/support/jboss-5.0-endpoint/path-mapping-war/WEB-INF/jboss-web.xml 2008-06-27 20:29:07 UTC (rev 11177)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<!DOCTYPE jboss-web PUBLIC
+ "-//JBoss//DTD Web Application 4.2//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-web_4_2.dtd">
+<jboss-web>
+ <class-loading java2ClassLoadingCompliance="false">
+ <loader-repository>test:loader=portlet</loader-repository>
+ </class-loading>
+</jboss-web>
\ No newline at end of file
Added: modules/web/trunk/web/src/test/resources/support/jboss-5.0-endpoint/path-mapping-war/WEB-INF/web.xml
===================================================================
--- modules/web/trunk/web/src/test/resources/support/jboss-5.0-endpoint/path-mapping-war/WEB-INF/web.xml (rev 0)
+++ modules/web/trunk/web/src/test/resources/support/jboss-5.0-endpoint/path-mapping-war/WEB-INF/web.xml 2008-06-27 20:29:07 UTC (rev 11177)
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+ <context-param>
+ <param-name>jboss.portal.mc.beans_resource_location</param-name>
+ <param-value>org/jboss/portal/test/web/server-beans.xml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>jboss.portal.mc.beans_resource_type</param-name>
+ <param-value>classloader</param-value>
+ </context-param>
+ <listener>
+ <listener-class>org.jboss.portal.common.mc.bootstrap.WebBootstrap</listener-class>
+ </listener>
+ <servlet>
+ <servlet-name>TestServlet</servlet-name>
+ <servlet-class>org.jboss.portal.test.web.TestServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>TestServlet</servlet-name>
+ <url-pattern>/foo/*</url-pattern>
+ </servlet-mapping>
+</web-app>
Added: modules/web/trunk/web/src/test/resources/support/jboss-5.0-endpoint/root-path-mapping-war/WEB-INF/jboss-web.xml
===================================================================
--- modules/web/trunk/web/src/test/resources/support/jboss-5.0-endpoint/root-path-mapping-war/WEB-INF/jboss-web.xml (rev 0)
+++ modules/web/trunk/web/src/test/resources/support/jboss-5.0-endpoint/root-path-mapping-war/WEB-INF/jboss-web.xml 2008-06-27 20:29:07 UTC (rev 11177)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<!DOCTYPE jboss-web PUBLIC
+ "-//JBoss//DTD Web Application 4.2//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-web_4_2.dtd">
+<jboss-web>
+ <class-loading java2ClassLoadingCompliance="false">
+ <loader-repository>test:loader=portlet</loader-repository>
+ </class-loading>
+</jboss-web>
\ No newline at end of file
Added: modules/web/trunk/web/src/test/resources/support/jboss-5.0-endpoint/root-path-mapping-war/WEB-INF/web.xml
===================================================================
--- modules/web/trunk/web/src/test/resources/support/jboss-5.0-endpoint/root-path-mapping-war/WEB-INF/web.xml (rev 0)
+++ modules/web/trunk/web/src/test/resources/support/jboss-5.0-endpoint/root-path-mapping-war/WEB-INF/web.xml 2008-06-27 20:29:07 UTC (rev 11177)
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+ <context-param>
+ <param-name>jboss.portal.mc.beans_resource_location</param-name>
+ <param-value>org/jboss/portal/test/web/server-beans.xml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>jboss.portal.mc.beans_resource_type</param-name>
+ <param-value>classloader</param-value>
+ </context-param>
+ <listener>
+ <listener-class>org.jboss.portal.common.mc.bootstrap.WebBootstrap</listener-class>
+ </listener>
+ <servlet>
+ <servlet-name>TestServlet</servlet-name>
+ <servlet-class>org.jboss.portal.test.web.TestServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>TestServlet</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>
17 years, 10 months
JBoss Portal SVN: r11176 - in modules/web/trunk: build and 5 other directories.
by portal-commits@lists.jboss.org
Author: mwringe
Date: 2008-06-27 16:15:44 -0400 (Fri, 27 Jun 2008)
New Revision: 11176
Modified:
modules/web/trunk/.classpath
modules/web/trunk/build/pom.xml
modules/web/trunk/web/src/test/build.xml
modules/web/trunk/web/src/test/resources/spi/generic/app-war/WEB-INF/web.xml
modules/web/trunk/web/src/test/resources/support/jboss-5.0-container-servlet/server-war/WEB-INF/web.xml
modules/web/trunk/web/src/test/resources/support/jboss-5.0-generic/server-war/WEB-INF/web.xml
modules/web/trunk/web/src/test/resources/support/jetty-6.1-container-servlet/server-war/WEB-INF/jetty-web.xml
Log:
Add JBoss AS 5 tests (currently tested against beta 4).
Note: load-on-startup will have to be set at 1 until JBAS-5684 is fixed
Modified: modules/web/trunk/.classpath
===================================================================
--- modules/web/trunk/.classpath 2008-06-27 16:04:10 UTC (rev 11175)
+++ modules/web/trunk/.classpath 2008-06-27 20:15:44 UTC (rev 11176)
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="web/src/main/java"/>
+ <classpathentry kind="src" path="web/src/test/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER/modules"/>
<classpathentry kind="output" path="bin"/>
Modified: modules/web/trunk/build/pom.xml
===================================================================
--- modules/web/trunk/build/pom.xml 2008-06-27 16:04:10 UTC (rev 11175)
+++ modules/web/trunk/build/pom.xml 2008-06-27 20:15:44 UTC (rev 11176)
@@ -39,7 +39,7 @@
<version.apache.commons-logging>1.1.1</version.apache.commons-logging>
<version.apache.commons-httpclient>3.0.1</version.apache.commons-httpclient>
<version.jboss.microcontainer>2.0.0.Beta13</version.jboss.microcontainer>
- <version.cargo>1.0-alpha-3</version.cargo>
+ <version.cargo>1.0-alpha-4</version.cargo>
<version.junit>3.8.1</version.junit>
<version.ant>1.7.0</version.ant>
</properties>
Modified: modules/web/trunk/web/src/test/build.xml
===================================================================
--- modules/web/trunk/web/src/test/build.xml 2008-06-27 16:04:10 UTC (rev 11175)
+++ modules/web/trunk/web/src/test/build.xml 2008-06-27 20:15:44 UTC (rev 11176)
@@ -20,8 +20,8 @@
</target>
<target name="tests.call.all" unless="tests">
+ <antcall target="tests.jboss5"/>
<antcall target="tests.jboss"/>
-<!-- <antcall target="tests.jboss5"/> -->
<antcall target="tests.tomcat"/>
<antcall target="tests.jetty"/>
</target>
@@ -34,9 +34,9 @@
<target name="tests.jboss">
<antcall target="tests.jboss-4.2"/>
</target>
-<!-- <target name="tests.jboss5">
+ <target name="tests.jboss5">
<antcall target="tests.jboss-5.0"/>
- </target> -->
+ </target>
<target name="tests.tomcat">
<antcall target="tests.tomcat-6.0"/>
</target>
@@ -87,14 +87,14 @@
</not>
</and>
</condition>
-<!-- <condition property="JBOSS_5_0_HOME" value="${env.JBOSS_5_0_HOME}">
+ <condition property="JBOSS_5_0_HOME" value="${env.JBOSS_5_0_HOME}">
<and>
<isset property="env.JBOSS_5_0_HOME"/>
<not>
<isset property="JBOSS_5_0_HOME"/>
</not>
</and>
- </condition> -->
+ </condition>
<condition property="TOMCAT_6_0_HOME" value="${env.TOMCAT_6_0_HOME}">
<and>
<isset property="env.TOMCAT_6_0_HOME"/>
@@ -128,7 +128,7 @@
</condition>
</fail>
-<!-- <fail message="Please set the environment variable JBOSS_5_0_HOME">
+ <fail message="Please set the environment variable JBOSS_5_0_HOME">
<condition>
<and>
<not>
@@ -136,7 +136,7 @@
</not>
</and>
</condition>
- </fail> -->
+ </fail>
<fail message="Please set the environment variable TOMCAT_6_0_HOME">
<condition>
@@ -211,12 +211,17 @@
<path location="${target}/web-web-${project.version}.jar"/>
</path>
-<!-- <path id="jboss-5.0">
+ <path id="jboss-5.0">
<path refid="portal-common"/>
<path refid="jboss-unit"/>
<path refid="jboss-microcontainer"/>
- </path> -->
+ </path>
+ <path id="jboss-5.0-shared">
+ <path refid="portal-common-shared"/>
+ <path location="${target}/web-web-${project.version}.jar"/>
+ </path>
+
<path id="tomcat-6.0">
<path refid="portal-common"/>
<path refid="jboss-unit"/>
@@ -386,43 +391,53 @@
<!-- JBoss 5.0 container servlet -->
<!-- *************************** -->
- <!--
+ <!-- -->
<copy todir="${test.support}/jboss-5.0-container-servlet/server-war/WEB-INF/lib" flatten="true">
<path refid="jboss-5.0"/>
</copy>
<mkdir dir="${test.temp.lib}/jboss-5.0-container-servlet"/>
- -->
+ <war jarfile="${test.temp.lib}/jboss-5.0-container-servlet/test-spi-server.war">
+ <fileset dir="${test.support}/jboss-5.0-container-servlet/server-war">
+ <exclude name="**/jboss-kernel*.jar"/>
+ </fileset>
+ <lib dir="${test.temp.lib}" includes="portal-test-spi-lib.jar"/>
+ </war>
+ <jar jarfile="${test.temp.lib}/jboss-5.0-container-servlet/test-spi-app.war">
+ <fileset dir="${target}/test-classes/spi/app-war"/>
+ </jar>
<!-- ***************** -->
<!-- JBoss 5.0 generic -->
<!-- ***************** -->
- <!--
<copy todir="${test.support}/jboss-5.0-generic/server-war/WEB-INF/lib" flatten="true">
<path refid="jboss-5.0"/>
</copy>
<mkdir dir="${test.temp.lib}/jboss-5.0-generic"/>
-
- <war jarfile="${test.temp.lib}/jboss-5.0-container-servlet/test-spi-server.war">
- <fileset dir="${test.support}/jboss-5.0-container-servlet/server-war"/>
- <lib dir="${test.temp.lib}" includes="portal-test-spi-lib.jar"/>
- </war>
- <jar jarfile="${test.temp.lib}/jboss-5.0-container-servlet/test-spi-app.war">
- <fileset dir="${target}/test-classes/spi/app-war"/>
- </jar>
<war jarfile="${test.temp.lib}/jboss-5.0-generic/test-spi-server.war">
- <fileset dir="${test.support}/jboss-5.0-generic/server-war"/>
+ <fileset dir="${test.support}/jboss-5.0-generic/server-war">
+ <exclude name="**/jboss-kernel*.jar"/>
+ </fileset>
<lib dir="${test.temp.lib}" includes="portal-test-spi-lib.jar"/>
</war>
<jar jarfile="${test.temp.lib}/jboss-5.0-generic/test-spi-app.war">
- <fileset dir="${target}/test-classes/spi/generic/app-war"/>
+ <fileset dir="${target}/test-classes/spi/generic/app-war">
+ <exclude name="**/jboss-kernel*.jar"/>
+ </fileset>
</jar>
- <war jarfile="${test.temp.lib}/jboss-5.0-container-servlet/test-request-server.war">
- <fileset dir="${test.support}/jboss-5.0-container-servlet/server-war"/>
- <lib dir="${test.temp.lib}" includes="portal-test-request-lib.jar"/>
- </war>
- -->
+ <!--endpoint test case-->
+
+ <jar jarfile="${test.temp.lib}/portal-test-endpoint-lib.jar">
+ <fileset dir="${target}/test-classes/">
+ <include name="org/jboss/portal/test/web/endpoint/**"/>
+ <include name="org/jboss/portal/test/web/ServletTestCase.class"/>
+ <include name="org/jboss/portal/test/web/TestServlet.class"/>
+ <include name="org/jboss/portal/test/web/WebAppRegistry.class"/>
+ </fileset>
+ <fileset dir="${target}/test-classes/portal-test-endpoint-jar"/>
+ </jar>
+
<!-- ********** -->
<!-- Tomcat 6.0 -->
<!-- ********** -->
@@ -508,9 +523,46 @@
<lib dir="${test.temp.lib}" includes="portal-test-endpoint-lib.jar"/>
</war>
+ <!-- ********* -->
+ <!-- JBoss 5.0 -->
+ <!-- ********* -->
+
+ <mkdir dir="${test.temp.lib}/jboss-5.0"/>
+
+ <copy todir="${test.support}/jboss-5.0-endpoint/default-servlet-mapping-war/WEB-INF/lib" flatten="true">
+ <path refid="jboss-5.0"/>
+ </copy>
+ <war jarfile="${test.temp.lib}/jboss-5.0/default-servlet-mapping.war">
+ <fileset dir="${test.support}/jboss-5.0-endpoint/default-servlet-mapping-war">
+ <exclude name="**/jboss-kernel*.jar"/>
+ </fileset>
+ <lib dir="${test.temp.lib}" includes="portal-test-endpoint-lib.jar"/>
+ </war>
+
+ <copy todir="${test.support}/jboss-5.0-endpoint/path-mapping-war/WEB-INF/lib" flatten="true">
+ <path refid="jboss-5.0"/>
+ </copy>
+ <war jarfile="${test.temp.lib}/jboss-5.0/path-mapping.war">
+ <fileset dir="${test.support}/jboss-5.0-endpoint/path-mapping-war">
+ <exclude name="**/jboss-kernel*.jar"/>
+ </fileset>
+ <lib dir="${test.temp.lib}" includes="portal-test-endpoint-lib.jar"/>
+ </war>
+
+ <copy todir="${test.support}/jboss-5.0-endpoint/root-path-mapping-war/WEB-INF/lib" flatten="true">
+ <path refid="jboss-5.0"/>
+ </copy>
+ <war jarfile="${test.temp.lib}/jboss-5.0/root-path-mapping.war">
+ <fileset dir="${test.support}/jboss-5.0-endpoint/root-path-mapping-war">
+ <exclude name="**/jboss-kernel*.jar"/>
+ </fileset>
+ <lib dir="${test.temp.lib}" includes="portal-test-endpoint-lib.jar"/>
+ </war>
+
<!--Strip cargo manager war filename-->
<copy file="${dependency.cargo-manager.war}" tofile="${test.temp.lib}/manager.war"/>
+
</target>
<target name="cargo.setup">
@@ -550,6 +602,7 @@
<property name="cargo.servlet.port" value="8080"/>
<property name="cargo.logging" value="high"/>
<deployable type="war" file="${cargo.war}"/>
+<!-- <property name="cargo.jvmargs" value="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8222"/> -->
</configuration>
</cargo>
</target>
@@ -653,8 +706,15 @@
<param name="test.jboss-4.2.home" value="${JBOSS_4_2_2_HOME}"/>
</antcall>
</target>
+
+ <target name="cargo.jboss-5.0.start" depends="cargo.setup">
+ <!-- The lib portal-test-lib.jar must be loaded at the shared level rather than in the war file
+ otherwise it is somehow inspected and produce a NoClassDefFoundError in the web service integration
+ layer on the class org/jboss/portal/test/framework/driver/remote/RemoteTestDriver for some unknown
+ reason, the class initiating the loading of the RemoteTestDriver class is
+ org.jboss.ws.integration.jboss42.DeployerInterceptorJSE.isWebserviceDeployment(DeployerInterceptorJSE.java:84)
+ -->
-<!-- <target name="cargo.jboss-5.0.start" depends="cargo.setup">
<cargo
containerId="jboss5x"
home="${test.jboss-5.0.home}"
@@ -663,17 +723,16 @@
action="start"
wait="${cargo.wait}">
<sharedClasspath>
- <path location="${dependency.portal-common.jar}"/>
- <path location="${dependency.jboss-unit.jar}"/>
- <path location="${dependency.jboss-unit-remote.jar}"/>
- <path location="${target}/web-web-${project.version}.jar"/>
+ <path refid="jboss-5.0-shared"/>
+
</sharedClasspath>
<configuration>
<property name="cargo.rmi.port" value="1299"/>
<property name="cargo.servlet.port" value="8080"/>
<property name="cargo.logging" value="high"/>
- <deployable type="war" file="${test.spi.server.path}"/>
+ <deployable type="war" file="${cargo.war}"/>
+<!-- <property name="cargo.jvmargs" value="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8222"/> -->
</configuration>
</cargo>
</target>
@@ -690,11 +749,11 @@
</cargo>
</target>
- <target name="tests.jboss-5.0.container-servlet" if="${test.jboss-5.0.home.variable-name}">
- <echo message="Starting JBoss 5.0 container-servlet tests with ${test.jboss-5.0.home}"/>
+ <target name="tests.jboss-5.0.execute" unless="tests.jboss-5.0.execute.skip">
+ <echo message="Starting JBoss 5.0 ${test.jboss-5.0.name} with ${test.jboss-5.0.home} to execute ${test.id} tests"/>
<antcall target="cargo.jboss-5.0.start">
<param name="cargo.wait" value="false"/>
- <param name="test.spi.server.path" value="${test.archive.path}"/>
+ <param name="cargo.war" value="${test.war}"/>
</antcall>
<antcall target="tests.remote">
<param name="test.remote.server.name" value="${test.jboss-5.0.name}"/>
@@ -704,43 +763,61 @@
</antcall>
</target>
- <target name="tests.jboss-5.0.generic" if="${test.jboss-5.0.home.variable-name}">
- <echo message="Starting JBoss 5.0 generic tests with ${test.jboss-5.0.home}"/>
- <antcall target="cargo.jboss-5.0.start">
- <param name="cargo.wait" value="false"/>
- <param name="test.spi.server.path" value="${test.archive.path}"/>
+ <target name="tests.jboss-5.0.spi">
+ <condition property="tests.jboss-5.0.execute.skip">
+ <not>
+ <available file="${test.jboss-5.0.home}" type="dir"/>
+ </not>
+ </condition>
+ <antcall target="tests.jboss-5.0.execute">
+ <param name="test.id" value="${test.jboss-5.0.name}-spi-container-servlet"/>
+ <param name="test.war" value="${test.temp.lib}/jboss-5.0-container-servlet/test-spi-server.war"/>
+ <param name="test.archive.path" value="jboss-5.0-container-servlet"/>
</antcall>
- <antcall target="tests.remote">
- <param name="test.remote.server.name" value="${test.jboss-5.0.name}"/>
- <param name="test.remote.archive.path" value="${test.archive.path}"/>
+ <antcall target="tests.jboss-5.0.execute">
+ <param name="test.id" value="${test.jboss-5.0.name}-spi-generic"/>
+ <param name="test.war" value="${test.temp.lib}/jboss-5.0-generic/test-spi-server.war"/>
+ <param name="test.archive.path" value="jboss-5.0-generic"/>
</antcall>
- <antcall target="cargo.jboss-5.0.stop">
+ </target>
+
+ <target name="tests.jboss-5.0.endpoint">
+ <condition property="tests.jboss-5.0.execute.skip">
+ <not>
+ <available file="${test.jboss-5.0.home}" type="dir"/>
+ </not>
+ </condition>
+ <antcall target="tests.jboss-5.0.execute">
+ <param name="test.id" value="${test.jboss-5.0.name}-endpoint-default-servlet-mapping"/>
+ <param name="test.war" value="${test.temp.lib}/jboss-5.0/default-servlet-mapping.war"/>
+ <param name="test.archive.path" value=""/>
</antcall>
+ <antcall target="tests.jboss-5.0.execute">
+ <param name="test.id" value="${test.jboss-5.0.name}-endpoint-path-mapping"/>
+ <param name="test.war" value="${test.temp.lib}/jboss-5.0/path-mapping.war"/>
+ <param name="test.archive.path" value=""/>
+ </antcall>
+ <antcall target="tests.jboss-5.0.execute">
+ <param name="test.id" value="${test.jboss-5.0.name}-endpoint-root-path-mapping"/>
+ <param name="test.war" value="${test.temp.lib}/jboss-5.0/root-path-mapping.war"/>
+ <param name="test.archive.path" value=""/>
+ </antcall>
</target>
<target name="tests.jboss-5.0">
- <antcall target="tests.jboss-5.0.container-servlet">
- <param name="test.id" value="JBoss-5_0-spi-container-servlet"/>
+
+ <!-- spi tests -->
+ <antcall target="tests.jboss-5.0.spi">
<param name="test.jboss-5.0.name" value="RemoteJBoss_5_0"/>
<param name="test.jboss-5.0.home" value="${JBOSS_5_0_HOME}"/>
- <param name="test.jboss-5.0.home.variable-name" value="JBOSS_5_0_HOME"/>
- <param name="test.archive.path" value="jboss-5.0-container-servlet/test-spi-server.war"/>
</antcall>
- <antcall target="tests.jboss-5.0.generic">
- <param name="test.id" value="JBoss-5_0-spi-generic"/>
+
+ <!-- endpoint tests -->
+ <antcall target="tests.jboss-5.0.endpoint">
<param name="test.jboss-5.0.name" value="RemoteJBoss_5_0"/>
<param name="test.jboss-5.0.home" value="${JBOSS_5_0_HOME}"/>
- <param name="test.jboss-5.0.home.variable-name" value="JBOSS_5_0_HOME"/>
- <param name="test.archive.path" value="jboss-5.0-generic/test-spi-server.war"/>
</antcall>
- <antcall target="tests.jboss-5.0.container-servlet">
- <param name="test.id" value="JBoss-5_0-request-container-servlet"/>
- <param name="test.jboss-5.0.name" value="RemoteJBoss_5_0"/>
- <param name="test.jboss-5.0.home" value="${JBOSS_5_0_HOME}"/>
- <param name="test.jboss-5.0.home.variable-name" value="JBOSS_5_0_HOME"/>
- <param name="test.archive.path" value="jboss-5.0-container-servlet/test-request-server.war"/>
- </antcall>
- </target> -->
+ </target>
<target name="cargo.tomcat-6.0.start" depends="cargo.setup">
Modified: modules/web/trunk/web/src/test/resources/spi/generic/app-war/WEB-INF/web.xml
===================================================================
--- modules/web/trunk/web/src/test/resources/spi/generic/app-war/WEB-INF/web.xml 2008-06-27 16:04:10 UTC (rev 11175)
+++ modules/web/trunk/web/src/test/resources/spi/generic/app-war/WEB-INF/web.xml 2008-06-27 20:15:44 UTC (rev 11176)
@@ -29,7 +29,7 @@
<servlet>
<servlet-name>BootstrapServlet</servlet-name>
<servlet-class>org.jboss.portal.web.impl.generic.GenericBootstrapServlet</servlet-class>
- <load-on-startup>0</load-on-startup>
+ <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>BootstrapServlet</servlet-name>
Modified: modules/web/trunk/web/src/test/resources/support/jboss-5.0-container-servlet/server-war/WEB-INF/web.xml
===================================================================
--- modules/web/trunk/web/src/test/resources/support/jboss-5.0-container-servlet/server-war/WEB-INF/web.xml 2008-06-27 16:04:10 UTC (rev 11175)
+++ modules/web/trunk/web/src/test/resources/support/jboss-5.0-container-servlet/server-war/WEB-INF/web.xml 2008-06-27 20:15:44 UTC (rev 11176)
@@ -40,12 +40,12 @@
<servlet>
<servlet-name>ContainerServlet</servlet-name>
<servlet-class>org.jboss.portal.web.impl.tomcat.TC6ContainerServlet</servlet-class>
- <load-on-startup>0</load-on-startup>
+ <load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>TestServlet</servlet-name>
<servlet-class>org.jboss.portal.test.web.TestServlet</servlet-class>
- <load-on-startup>0</load-on-startup>
+ <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>TestServlet</servlet-name>
Modified: modules/web/trunk/web/src/test/resources/support/jboss-5.0-generic/server-war/WEB-INF/web.xml
===================================================================
--- modules/web/trunk/web/src/test/resources/support/jboss-5.0-generic/server-war/WEB-INF/web.xml 2008-06-27 16:04:10 UTC (rev 11175)
+++ modules/web/trunk/web/src/test/resources/support/jboss-5.0-generic/server-war/WEB-INF/web.xml 2008-06-27 20:15:44 UTC (rev 11176)
@@ -40,12 +40,12 @@
<servlet>
<servlet-name>TestServlet</servlet-name>
<servlet-class>org.jboss.portal.test.web.TestServlet</servlet-class>
- <load-on-startup>0</load-on-startup>
+ <load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>BootstrapServlet</servlet-name>
<servlet-class>org.jboss.portal.web.impl.generic.PortletContainerBootstrapServlet</servlet-class>
- <load-on-startup>0</load-on-startup>
+ <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>TestServlet</servlet-name>
Modified: modules/web/trunk/web/src/test/resources/support/jetty-6.1-container-servlet/server-war/WEB-INF/jetty-web.xml
===================================================================
--- modules/web/trunk/web/src/test/resources/support/jetty-6.1-container-servlet/server-war/WEB-INF/jetty-web.xml 2008-06-27 16:04:10 UTC (rev 11175)
+++ modules/web/trunk/web/src/test/resources/support/jetty-6.1-container-servlet/server-war/WEB-INF/jetty-web.xml 2008-06-27 20:15:44 UTC (rev 11176)
@@ -1,11 +1,23 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
<Configure class="org.mortbay.jetty.webapp.WebAppContext">
+
+ <Get id="serverObject" name="server"/>
+
+ <New id="deployerservlet" class="org.jboss.portal.web.impl.jetty.J6ContainerServlet">
+ <Arg><Ref id="serverObject"/></Arg>
+ </New>
+
+ <New id="servletholder" class="org.mortbay.jetty.servlet.ServletHolder">
+ <Arg><Ref id="deployerservlet"/></Arg>
+ </New>
+
+ <Call name="addServlet">
+ <Arg><Ref id="servletholder"/></Arg>
+ <Arg>ContainerServlet</Arg>
+ </Call>
+
- <Set name="Handler">
- <New id="Jetty6Handler" class="org.jboss.portal.web.impl.jetty.Jetty6Handler">
- </New>
- </Set>
</Configure>
17 years, 10 months
JBoss Portal SVN: r11175 - in docs/branches/JBoss_Portal_Branch_2_7: referenceGuide/en and 1 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-06-27 12:04:10 -0400 (Fri, 27 Jun 2008)
New Revision: 11175
Modified:
docs/branches/JBoss_Portal_Branch_2_7/quickstartuser/en/modules/deployportlet.xml
docs/branches/JBoss_Portal_Branch_2_7/quickstartuser/en/modules/fin.xml
docs/branches/JBoss_Portal_Branch_2_7/quickstartuser/en/modules/forward.xml
docs/branches/JBoss_Portal_Branch_2_7/quickstartuser/en/modules/installation.xml
docs/branches/JBoss_Portal_Branch_2_7/quickstartuser/en/modules/interaction.xml
docs/branches/JBoss_Portal_Branch_2_7/quickstartuser/en/modules/portalterminology.xml
docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/master.xml
docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/ajax.xml
docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/authentication.xml
docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/clustering.xml
docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/cmsPortlet.xml
docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/configuration.xml
docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/contentintegration.xml
docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/errorhandling.xml
docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/identity.xml
docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/identityportlets.xml
docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/ldap.xml
docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/migration.xml
docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/navtabs.xml
docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/portalapi.xml
docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/portletmodes.xml
docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/security.xml
docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/sso.xml
docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/supported.xml
docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/themeandlayouts.xml
docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/troubleshooting.xml
docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/tutorials.xml
docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/urls.xml
docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/widgetintegration.xml
docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/workflow.xml
docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/wsrp.xml
docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/xmldescriptors.xml
Log:
Doc (starting to diverge from 2.6)
Modified: docs/branches/JBoss_Portal_Branch_2_7/quickstartuser/en/modules/deployportlet.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_7/quickstartuser/en/modules/deployportlet.xml 2008-06-27 15:34:50 UTC (rev 11174)
+++ docs/branches/JBoss_Portal_Branch_2_7/quickstartuser/en/modules/deployportlet.xml 2008-06-27 16:04:10 UTC (rev 11175)
@@ -3,26 +3,17 @@
<chapterinfo>
<author>
<firstname>Kevin</firstname>
-
<surname>Barfield</surname>
-
- <email>kbarfiel(a)redhat.com</email>
</author>
<author>
<firstname>Chris</firstname>
-
<surname>DeLashmutt</surname>
-
- <email>cdelashm(a)redhat.com</email>
</author>
<author>
<firstname>Xi</firstname>
-
<surname>Huang</surname>
-
- <email>xhuang(a)redhat.com</email>
</author>
</chapterinfo>
Modified: docs/branches/JBoss_Portal_Branch_2_7/quickstartuser/en/modules/fin.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_7/quickstartuser/en/modules/fin.xml 2008-06-27 15:34:50 UTC (rev 11174)
+++ docs/branches/JBoss_Portal_Branch_2_7/quickstartuser/en/modules/fin.xml 2008-06-27 16:04:10 UTC (rev 11175)
@@ -3,26 +3,17 @@
<chapterinfo>
<author>
<firstname>Kevin</firstname>
-
<surname>Barfield</surname>
-
- <email>kbarfiel(a)redhat.com</email>
</author>
<author>
<firstname>Chris</firstname>
-
<surname>DeLashmutt</surname>
-
- <email>cdelashm(a)redhat.com</email>
</author>
<author>
<firstname>Xi</firstname>
-
<surname>Huang</surname>
-
- <email>xhuang(a)redhat.com</email>
</author>
</chapterinfo>
Modified: docs/branches/JBoss_Portal_Branch_2_7/quickstartuser/en/modules/forward.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_7/quickstartuser/en/modules/forward.xml 2008-06-27 15:34:50 UTC (rev 11174)
+++ docs/branches/JBoss_Portal_Branch_2_7/quickstartuser/en/modules/forward.xml 2008-06-27 16:04:10 UTC (rev 11175)
@@ -3,26 +3,17 @@
<chapterinfo>
<author>
<firstname>Kevin</firstname>
-
<surname>Barfield</surname>
-
- <email>kbarfiel(a)redhat.com</email>
</author>
<author>
<firstname>Chris</firstname>
-
<surname>DeLashmutt</surname>
-
- <email>cdelashm(a)redhat.com</email>
</author>
<author>
<firstname>Xi</firstname>
-
<surname>Huang</surname>
-
- <email>xhuang(a)redhat.com</email>
</author>
</chapterinfo>
Modified: docs/branches/JBoss_Portal_Branch_2_7/quickstartuser/en/modules/installation.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_7/quickstartuser/en/modules/installation.xml 2008-06-27 15:34:50 UTC (rev 11174)
+++ docs/branches/JBoss_Portal_Branch_2_7/quickstartuser/en/modules/installation.xml 2008-06-27 16:04:10 UTC (rev 11175)
@@ -3,26 +3,17 @@
<chapterinfo>
<author>
<firstname>Kevin</firstname>
-
<surname>Barfield</surname>
-
- <email>kbarfiel(a)redhat.com</email>
</author>
<author>
<firstname>Chris</firstname>
-
<surname>DeLashmutt</surname>
-
- <email>cdelashm(a)redhat.com</email>
</author>
<author>
<firstname>Xi</firstname>
-
<surname>Huang</surname>
-
- <email>xhuang(a)redhat.com</email>
</author>
</chapterinfo>
Modified: docs/branches/JBoss_Portal_Branch_2_7/quickstartuser/en/modules/interaction.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_7/quickstartuser/en/modules/interaction.xml 2008-06-27 15:34:50 UTC (rev 11174)
+++ docs/branches/JBoss_Portal_Branch_2_7/quickstartuser/en/modules/interaction.xml 2008-06-27 16:04:10 UTC (rev 11175)
@@ -3,26 +3,17 @@
<chapterinfo>
<author>
<firstname>Kevin</firstname>
-
<surname>Barfield</surname>
-
- <email>kbarfiel(a)redhat.com</email>
</author>
<author>
<firstname>Chris</firstname>
-
<surname>DeLashmutt</surname>
-
- <email>cdelashm(a)redhat.com</email>
</author>
<author>
<firstname>Xi</firstname>
-
<surname>Huang</surname>
-
- <email>xhuang(a)redhat.com</email>
</author>
</chapterinfo>
Modified: docs/branches/JBoss_Portal_Branch_2_7/quickstartuser/en/modules/portalterminology.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_7/quickstartuser/en/modules/portalterminology.xml 2008-06-27 15:34:50 UTC (rev 11174)
+++ docs/branches/JBoss_Portal_Branch_2_7/quickstartuser/en/modules/portalterminology.xml 2008-06-27 16:04:10 UTC (rev 11175)
@@ -3,26 +3,17 @@
<chapterinfo>
<author>
<firstname>Kevin</firstname>
-
<surname>Barfield</surname>
-
- <email>kbarfiel(a)redhat.com</email>
</author>
<author>
<firstname>Chris</firstname>
-
<surname>DeLashmutt</surname>
-
- <email>cdelashm(a)redhat.com</email>
</author>
<author>
<firstname>Xi</firstname>
-
<surname>Huang</surname>
-
- <email>xhuang(a)redhat.com</email>
</author>
</chapterinfo>
Modified: docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/master.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/master.xml 2008-06-27 15:34:50 UTC (rev 11174)
+++ docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/master.xml 2008-06-27 16:04:10 UTC (rev 11175)
@@ -55,7 +55,6 @@
<author>
<firstname>Roy</firstname>
<surname>Russo</surname>
- <email>roy(a)jboss.org</email>
</author>
<author>
<firstname>Boleslaw</firstname>
@@ -67,6 +66,10 @@
<surname>Laprun</surname>
<email>chris.laprun(a)jboss.com</email>
</author>
+ <author>
+ <firstname>Murray</firstname>
+ <surname>McAllister</surname>
+ </author>
</bookinfo>
<toc/>
<!-- Trademark - Trying to make all vendor legal teams happy --> &trademarks;
Modified: docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/ajax.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/ajax.xml 2008-06-27 15:34:50 UTC (rev 11174)
+++ docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/ajax.xml 2008-06-27 16:04:10 UTC (rev 11175)
@@ -4,7 +4,6 @@
<author>
<firstname>Julien</firstname>
<surname>Viet</surname>
- <email>julien.viet(a)jboss.com</email>
</author>
</chapterinfo>
<title>Ajax</title>
Modified: docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/authentication.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/authentication.xml 2008-06-27 15:34:50 UTC (rev 11174)
+++ docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/authentication.xml 2008-06-27 16:04:10 UTC (rev 11175)
@@ -3,7 +3,6 @@
<author>
<firstname>Boleslaw</firstname>
<surname>Dawidowicz</surname>
- <email>boleslaw dot dawidowicz at redhat dot com</email>
</author>
</chapterinfo>
<title>Authentication and Authorization</title>
Modified: docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/clustering.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/clustering.xml 2008-06-27 15:34:50 UTC (rev 11174)
+++ docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/clustering.xml 2008-06-27 16:04:10 UTC (rev 11175)
@@ -4,12 +4,10 @@
<author>
<firstname>Julien</firstname>
<surname>Viet</surname>
- <email>julien.viet(a)jboss.com</email>
</author>
<author>
<firstname>Roy</firstname>
<surname>Russo</surname>
- <email>roy(a)jboss.org</email>
</author>
</chapterinfo>
<title>Clustering Configuration</title>
Modified: docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/cmsPortlet.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/cmsPortlet.xml 2008-06-27 15:34:50 UTC (rev 11174)
+++ docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/cmsPortlet.xml 2008-06-27 16:04:10 UTC (rev 11175)
@@ -4,12 +4,10 @@
<author>
<firstname>Roy</firstname>
<surname>Russo</surname>
- <email>roy @ jboss dot org</email>
</author>
<author>
<firstname>Thomas</firstname>
<surname>Heute</surname>
- <email>theute(a)jboss.org</email>
</author>
</chapterinfo>
<title>CMS Portlet</title>
Modified: docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/configuration.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/configuration.xml 2008-06-27 15:34:50 UTC (rev 11174)
+++ docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/configuration.xml 2008-06-27 16:04:10 UTC (rev 11175)
@@ -4,12 +4,10 @@
<author>
<firstname>Thomas</firstname>
<surname>Heute</surname>
- <email>theute(a)jboss.org</email>
</author>
<author>
<firstname>Roy</firstname>
<surname>Russo</surname>
- <email>roy at jboss dot org</email>
</author>
</chapterinfo>
<title>Customizing your Installation</title>
Modified: docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/contentintegration.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/contentintegration.xml 2008-06-27 15:34:50 UTC (rev 11174)
+++ docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/contentintegration.xml 2008-06-27 16:04:10 UTC (rev 11175)
@@ -4,8 +4,11 @@
<author>
<firstname>Julien</firstname>
<surname>Viet</surname>
- <email>julien @ jboss dot com</email>
</author>
+ <author>
+ <firstname>Thomas</firstname>
+ <surname>Heute</surname>
+ </author>
</chapterinfo>
<title>Content Integration</title>
<para>Since JBoss Portal 2.6 it is possible to provide an easy integration of content within the portal. Up to the 2.4 version
@@ -52,7 +55,7 @@
</para>
<para>At runtime when the portal needs to render a window it delegates the production of markup to a content provider.
The portal comes with a preconfigured set of providers which handles the portlet and the cms content types. The most
- natural way to plug a content provider in the portal is to use a JSR 168 Portlet. Based on a few carefully chosen conventions
+ natural way to plug a content provider in the portal is to use a JSR 286 Portlet. Based on a few carefully chosen conventions
it is possible to provide an efficient content integration with the benefit of using standards and without requiring
the usage of a proprietary API.</para>
</sect1>
@@ -61,7 +64,7 @@
<para>Content providers must be able to allow the user or administrator to chose content from the external resource
it integrates in the portal in order to properly configure a portal window. A few interactions between the portal, the content
provider and the portal user are necessary to achieve that goal. Here again it is possible to provide content
- customization using a JSR 168 Portlet. For that purpose two special portlet modes called
+ customization using a JSR 286 Portlet. For that purpose two special portlet modes called
<emphasis>edit_content</emphasis> and <emphasis>select_content</emphasis> has been introduced. It signals to the portlet
that it is selecting or editing the content portion of the state of a portlet. <emphasis>select_content</emphasis> is
used to select a new content to put in a window while <emphasis>edit_content</emphasis> is used to modify the previously
@@ -80,10 +83,9 @@
<sect2>
<title>Displaying content</title>
<para>At runtime the portal will call the portlet with the view mode when it displays content. It will send
- information about the content to display using the render parameters to the portlet. Therefore the portlet has
- just to read the render parameters and use them to properly display the content in the portlet. The render parameters
- values are the key/value pairs that form the content properties and the resource URI is available under the <emphasis>uri</emphasis>
- parameter name.</para>
+ information about the content to display using the public render parameter <emphasis>urn:jboss:portal:content uri</emphasis> to the portlet. Therefore the portlet has
+ just to read the render parameters and use them to properly display the content in the portlet. The public render parameters
+ values are the key/value pairs that form the content properties and the resource URI of the content to display.</para>
</sect2>
<sect2>
<title>Configuring content</title>
@@ -95,13 +97,7 @@
render parameters to the portlet and the initial set of render parameters will be empty. The portlet can
then use render parameters in order to provide navigation in the content repository. For example the portlet
can navigate the CMS tree and store the current CMS path in the render parameters. Whenever the portlet has decided
- to tell the portal that content has been selected by the user it needs to use an action URL with a special set of
- parameters:
- <itemizedlist>
- <listitem><emphasis>content.action.select</emphasis> equals to any value</listitem>
- <listitem><emphasis>content.uri</emphasis> equals to the content URI</listitem>
- <listitem><emphasis>content.param.</emphasis> used as prefix to configure content parameters</listitem>
- </itemizedlist>
+ to tell the portal that content has been selected by the user it needs to trigger a JSR-286 event with the uri and eventual parameters as payload.
</listitem>
<listitem>The second use case happens when the portal needs to edit existing content. In such situation
everything works as explained before except that the initial set of render parameters of the portlet
@@ -125,9 +121,6 @@
/** The edit_content mode. */
public static final PortletMode EDIT_CONTENT_MODE = new PortletMode("edit_content");
- /** The select_content mode. */
- public static final PortletMode SELECT_CONTENT_MODE = new PortletMode("select_content");
-
...
}
@@ -141,8 +134,7 @@
protected void doDispatch(RenderRequest req, RenderResponse resp)
throws PortletException, PortletSecurityException, IOException
{
- if (EDIT_CONTENT_MODE.equals(req.getPortletMode()) ||
- SELECT_CONTENT_MODE.equals(req.getPortletMode()))
+ if (EDIT_CONTENT_MODE.equals(req.getPortletMode()))
{
doEditContent(req, resp);
}
@@ -226,14 +218,20 @@
protected void doEditContent(RenderRequest req, RenderResponse resp)
throws PortletException, PortletSecurityException, IOException
{
- // Get the uri value optionally provided by the portal
- String uri = req.getParameter("content.uri");
+ String uri = req.getParameter("current_uri");
+ if (uri == null)
+ {
+ // Get the uri value optionally provided by the portal
+ uri = req.getParameter("uri");
+ }
// Get the working directory directory
- File workingDir;
+ File workingDir = null;
+ String currentFileName = null;
if (uri != null)
{
workingDir = getFile(uri).getParentFile();
+ currentFileName = getFile(uri).getName();
}
else
{
@@ -289,9 +287,15 @@
File child = children[i];
if (child.isFile())
{
- selectFileURL.setParameter("content.uri", getContentURI(child));
- writer.print("<li><a href=\"" + selectFileURL + "\">" + child.getName() +
- "</a></li>");
+ selectFileURL.setParameter("current_uri", getContentURI(child));
+ if (child.getName().equals(currentFileName))
+ {
+ writer.print("<li><b>" + child.getName() + "</b></li>");
+ }
+ else
+ {
+ writer.print("<li><a href=\"" + selectFileURL + "\">" + child.getName() + "</a></li>");
+ }
}
}
writer.print("</ul><br/>");
@@ -364,31 +368,47 @@
<emphasis>portlet-instances.xml</emphasis> will create a single instance of our portlet. The
<emphasis>web.xml</emphasis> descriptor will contain a servlet context listener that will hook the content
type in the portal content type registry.</para>
+ <para>First, we need to define the portlet's particular event and render parameters:</para>
<programlisting><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
-<portlet-app
- xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd
- http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
- version="1.0">
- ...
+<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+ version="2.0">
+
<portlet>
<description>File System Content Driven Portlet</description>
<portlet-name>FSContentDrivenPortlet</portlet-name>
<display-name>File System Content Driven Portlet</display-name>
- <portlet-class>org.jboss.portal.core.portlet.test.FSContentDrivenPortlet</portlet-class>
+ <portlet-class>org.jboss.portal.core.samples.basic.FSContentDrivenPortlet</portlet-class>
<supports>
<mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ <portlet-mode>EDIT_CONTENT</portlet-mode>
</supports>
<portlet-info>
<title>File Portlet</title>
<keywords>sample,test</keywords>
</portlet-info>
+ <supported-public-render-parameter>uri</supported-public-render-parameter>
+ <supported-publishing-event xmlns:x="urn:jboss:portal:content">x:select</supported-publishing-event>
</portlet>
- ...
+
+ <public-render-parameter>
+ <identifier>uri</identifier>
+ <qname xmlns:c="urn:jboss:portal:content">c:uri</qname>
+ </public-render-parameter>
+
+ <event-definition>
+ <qname xmlns:x="urn:jboss:portal:content">x:select</qname>
+ <value-type>java.lang.String</value-type>
+ </event-definition>
+
</portlet-app>
]]></programlisting>
+ <para>Note that here we need to use a JSR-286 portlet, this portlet will use the event <emphasis>urn:jboss:portal:content select</emphasis> and have a payload of type
+ <emphasis>java.lang.String</emphasis>. This event will be used to tell the portal the URI selected by the user. This same portlet will also be in charge of
+ rendering the content based on that URI, it will then also need to access the public render parameter qualified with the name: <emphasis>urn:jboss:portal:content uri</emphasis>.
<para>The portlet.xml descriptor</para>
<programlisting><![CDATA[
<deployments>
@@ -425,6 +445,16 @@
it will always be available.</warning>
</sect3>
</sect2>
+ <!--
+ <sect2>
+ <title>Passing parameters along the URI</title>
+ <para>In simple cases like in the example, it was enough to pass a URI, in some cases it can be helpful to pass
+ other parameters, to do so, instead of having a payload of type <emphasis>java.lang.String</emphasis>,
+ simply use the following class: <emphasis>org.jboss.portal.api.content.SelectedContent</emphasis>.
+ </para>
+ </para>
+ </sect2>
+ -->
</sect1>
<sect1>
<title>Configuring window content in deployment descriptor</title>
Modified: docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/errorhandling.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/errorhandling.xml 2008-06-27 15:34:50 UTC (rev 11174)
+++ docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/errorhandling.xml 2008-06-27 16:04:10 UTC (rev 11175)
@@ -4,7 +4,6 @@
<author>
<firstname>Julien</firstname>
<surname>Viet</surname>
- <email>julien.viet(a)jboss.com</email>
</author>
</chapterinfo>
<title>Error Handling Configuration</title>
Modified: docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/identity.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/identity.xml 2008-06-27 15:34:50 UTC (rev 11174)
+++ docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/identity.xml 2008-06-27 16:04:10 UTC (rev 11175)
@@ -3,7 +3,6 @@
<author>
<firstname>Boleslaw</firstname>
<surname>Dawidowicz</surname>
- <email>boleslaw dot dawidowicz at redhat dot com</email>
</author>
</chapterinfo>
<title>JBoss Portal Identity Management</title>
Modified: docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/identityportlets.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/identityportlets.xml 2008-06-27 15:34:50 UTC (rev 11174)
+++ docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/identityportlets.xml 2008-06-27 16:04:10 UTC (rev 11175)
@@ -3,7 +3,6 @@
<author>
<firstname>Emanuel</firstname>
<surname>Muckenhuber</surname>
- <email>emuckenh(a)redhat.com</email>
</author>
</chapterinfo>
<title>JBoss Portal Identity Portlets</title>
Modified: docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/ldap.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/ldap.xml 2008-06-27 15:34:50 UTC (rev 11174)
+++ docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/ldap.xml 2008-06-27 16:04:10 UTC (rev 11175)
@@ -3,7 +3,6 @@
<author>
<firstname>Boleslaw</firstname>
<surname>Dawidowicz</surname>
- <email>boleslaw dot dawidowicz at redhat dot com</email>
</author>
</chapterinfo>
<title>LDAP</title>
Modified: docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/migration.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/migration.xml 2008-06-27 15:34:50 UTC (rev 11174)
+++ docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/migration.xml 2008-06-27 16:04:10 UTC (rev 11175)
@@ -1,17 +1,11 @@
<chapter id="changelog">
<chapterinfo>
<author>
- <firstname>Roy</firstname>
- <surname>Russo</surname>
- <email>roy at jboss dot org</email>
+ <firstname>Thomas</firstname>
+ <surname>Heute</surname>
</author>
- <author>
- <firstname>Boleslaw</firstname>
- <surname>Dawidowicz</surname>
- <email>boleslaw dot dawidowicz at redhat dot com</email>
- </author>
</chapterinfo>
- <title>Upgrading JBoss Portal 2.4 to 2.6</title>
+ <title>Upgrading JBoss Portal 2.6 to 2.7</title>
<para>
<warning>
<para>
@@ -19,1256 +13,50 @@
</para>
</warning>
</para>
- <sect1 id="manual_migration">
- <title>Manual Upgrade</title>
- <para>
- The database schema has not changed since JBoss Portal 2.4; however, there are several differences when using a database created by JBoss Portal 2.4, that prevent simply deploying the latest version of JBoss Portal. For example, some portlets are no longer present in JBoss Portal 2.6, and certain existing portlets are now packaged differently. This chapter describes updating a MySQL database created by JBoss Portal 2.4, for use with JBoss Portal 2.6.
+ <para>
+ JBoss Portal 2.7 compatibility with JBoss Portal 2.6 is very high. The main differences are the use of JSR-286 features to replace
+ JBoss Portal specific features. The database schema hasn't changed.
+ </para>
+
+ <sect1 id="manual_migration">
+ <title>Usage of JBossActionRequest</title>
+ <para>Usage of JBossActionRequest is not available directly anymore. From now on it is only accessible if the
+ <emphasis>org.jboss.portlet.filter.JBossPortletFilter</emphasis> is applied on the portlet.
+ To do so, first you will need to change the <emphasis>portlet.xml</emphasis> descriptor in order to declare
+ the new portlet as a JSR-286 portlet so that the filter can be applied. For a portlet named <emphasis>MyFooPortlet</emphasis>
+ it would now look like this:
</para>
- <para>
- Users, roles, and pages created in JBoss Portal 2.4 should be accessible in JBoss Portal 2.6 deployments.
+<programlisting><![CDATA[
+<portlet-app
+ xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+ version="2.0">
+
+ <filter>
+ <filter-name>JBoss Portlet Filter</filter-name>
+ <filter-class>org.jboss.portlet.filter.JBossPortletFilter</filter-class>
+ <lifecycle>ACTION_PHASE</lifecycle>
+ <lifecycle>RENDER_PHASE</lifecycle>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>JBoss Portlet Filter</filter-name>
+ <portlet-name>MyFooPortlet</portlet-name>
+ </filter-mapping>
+
+
+ <portlet>
+ <description>My foo portlet</description>
+ <portlet-name>MyFooPortlet</portlet-name>
+ ...
+ </portlet>
+</portlet-app>
+
+]]></programlisting>
+ <para>By not adding this filter on a portlet using JBossActionRequest/JBossActionResponse, an error message such as:
+ <emphasis>The request isn't a JBossRenderRequest, you probably need to activate the JBoss Portlet Filter: org.jboss.portlet.filter.JBossPortletFilter on MyFooPortlet</emphasis>
</para>
- <para>
- The upgrade procedure can be straightforward:
- </para>
- <para>
- <orderedlist>
- <listitem>
- <para>
- If you are using the JBoss Portal binary, remove the <filename>$JBOSS_HOME/server/default/deploy/jboss-portal.sar/</filename> directory. If JBoss Portal was built from source, remove the <filename>$JBOSS_HOME/server/default/deploy/jboss-portal.sar</filename> file.
- </para>
- </listitem>
- <!--<listitem>
- Remove <emphasis role="bold">$JBOSS_HOME/server/default/data</emphasis> directory.
- </listitem>-->
- <listitem>
- <para>
- Update the data in the JBoss Portal database, as described in <xref linkend="upgrade_portal_database"/>.
- </para>
- </listitem>
- <listitem>
- <para>
- Deploy JBoss Portal 2.6.
- </para>
- </listitem>
- </orderedlist>
- </para>
- <sect2>
- <title>Themes</title>
- <para>
- In JBoss Portal 2.6, portal pages contain additional areas, such as the <guiicon>Login</guiicon>, <guiicon>Admin</guiicon>, and <guiicon>Dashboard</guiicon> links, on the top right-hand corner of portal pages:
- </para>
- <para>
- <mediaobject>
- <imageobject>
- <imagedata align="center" valign="middle" fileref="images/migration/theme.png"/>
- </imageobject>
- </mediaobject>
- </para>
- <para>
- Since portal pages now contain additional areas, certain themes have changed. If a default theme that exists in JBoss Portal 2.6 is used, such as renaissance, no configuration should be necessary. Using old themes from JBoss Portal 2.4 may make JBoss Portal 2.6 unusable, for example, not being able to log in. To update custom themes, refer to the bundled JBoss Portal 2.6 themes as an example.
- </para>
- </sect2>
- <sect2 id="upgrade_portal_database">
- <title>Updating the Database</title>
- <para>
- The following tables contain all references to portlets:
- </para>
- <para>
- <itemizedlist>
- <listitem>
- <para>
- <emphasis>JBP_INSTANCE</emphasis>
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>JBP_WINDOW</emphasis>
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>JBP_OBJECT_NODE</emphasis>
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para>
- All procedures described in the following sections can performed using the JBoss Portal 2.4 <guiicon>Admin</guiicon> portlet. Treat these directions as guidelines when migrating a large JBoss Portal deployment. Database data can be updated manually using the correct tools for your RDBMS. For example, if you are using a MySQL database, you can use the <ulink url="http://www.mysql.com/products/tools/query-browser/">MySQL Query Browser</ulink>.
- </para>
- <para>
- During the upgrade process, legacy references have to be cleaned up, to either remove them, or to allow JBoss Portal 2.6 to recreate them correctly. Remove all references (instances and windows) to the portlets listed below, as they are not present in JBoss Portal 2.6. This can be done using the JBoss Portal 2.4 <guiicon>Admin</guiicon> portlet:
- </para>
- <para>
- <itemizedlist>
- <listitem>
- <para>
- <emphasis>HeaderContentPortlet</emphasis>
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>URLPortlet</emphasis>
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>TestPortlet</emphasis>
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>PortletA</emphasis>
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>PortletB</emphasis>
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>SecuredTestPortlet</emphasis>
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>CharsetPortlet</emphasis>
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>CounterPortlet</emphasis>
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>CachedCounterPortlet</emphasis>
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>ExceptionPortlet</emphasis>
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>PortletSessionPortlet</emphasis>
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>EncodingPortlet</emphasis>
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para>
- The following instructions refer to a standard JBoss Portal 2.4 deployment. If core portlets, portlet instances, or portlet windows were renamed, make the appropriate modifications. The following is an example of the MySQL Query Browser:
- </para>
- <para>
- <mediaobject>
- <imageobject>
- <imagedata align="center" valign="middle" fileref="images/migration/querybrowser1.png"/>
- </imageobject>
- </mediaobject>
- </para>
- <para>
- <note>
- <title>Requested Resource Error</title>
- <para>
- When running JBoss Portal 2.6 with a database created by JBoss Portal 2.4, a non-existing portlet will try to be displayed, resulting in a <computeroutput>404</computeroutput>, <computeroutput>The requested resource() is not available</computeroutput> error.
- </para>
- </note>
- </para>
- </sect2>
- <sect2>
- <title>Portlet Names</title>
- <para>
- Names of certain core bundled-portlets have changed. Destroy the following instances and use the <guiicon>Admin</guiicon> portlet to recreate them, or edit the <emphasis role="bold">JBP_INSTANCE</emphasis> table as follows:
- </para>
- <para>
- <itemizedlist>
- <listitem>
- <para>
- Change <emphasis>local.samples.JSPPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column to <emphasis>local./portal-jsp-samples.JSPPortlet</emphasis>.
- </para>
- </listitem>
- <listitem>
- <para>
- Change <emphasis>local.portal.CMSPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column to <emphasis>local./portal-cms.CMSPortlet</emphasis>.
- </para>
- </listitem>
- <listitem>
- <para>
- Change <emphasis>local.portal.CMSAdminPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column to <emphasis>local./portal-cms.CMSAdminPortlet</emphasis>.
- </para>
- </listitem>
- <listitem>
- <para>
- Change <emphasis>local.portal.ManagementPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column to <emphasis>local./portal-admin.AdminPortlet</emphasis>.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para>
- Some portlets are no longer present in JBoss Portal 2.6, and certain existing portlets are now packaged differently. Remove the following entries in the <emphasis role="bold">JBP_INSTANCE</emphasis> table, so that JBoss Portal 2.6 can recreate them:
- </para>
- <para>
- <itemizedlist>
- <listitem>
- <para>
- rows containing <emphasis>NewsPortletInstance2</emphasis> in the <emphasis>ID</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>local.portal.NavigationPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>local.samples.HeaderContentPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>local.samples.WeatherPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>local.samples.NewsPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>local.samples.URLPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>local.samples.TestPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>local.samples.PortletA</emphasis> in the <emphasis>PORTLET_REF</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>local.samples.PortletB</emphasis> in the <emphasis>PORTLET_REF</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>local.samples.SecuredTestPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>local.samples.CharsetPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>local.samples.CounterPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>local.samples.CachedCounterPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>local.samples.ExceptionPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>local.samples.PortletSessionPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>local.samples.EncodingPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para>
- Remove the following entries in the <emphasis role="bold">JBP_WINDOW</emphasis> table, so that JBoss Portal 2.6 can recreate them:
- </para>
- <para>
- <itemizedlist>
- <listitem>
- <para>
- rows containing <emphasis>NavigationPortletInstance</emphasis> in the <emphasis>INSTANCE_REF</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>URLPortletInstance</emphasis> in the <emphasis>INSTANCE_REF</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>PortletAInstance</emphasis> in the <emphasis>INSTANCE_REF</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>PortletBInstance</emphasis> in the <emphasis>INSTANCE_REF</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>EncodingPortletInstance</emphasis> in the <emphasis>INSTANCE_REF</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>PortletSessionPortletInstance</emphasis> in the <emphasis>INSTANCE_REF</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>CachedCounterPortletInstance</emphasis> in the <emphasis>INSTANCE_REF</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>CounterPortletInstance</emphasis> in the <emphasis>INSTANCE_REF</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>CharsetPortletInstance</emphasis> in the <emphasis>INSTANCE_REF</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>SecuredTestPortletInstance</emphasis> in the <emphasis>INSTANCE_REF</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>SecuredTestPortletInstance</emphasis> in the <emphasis>INSTANCE_REF</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>ExceptionPortletInstance</emphasis> in the <emphasis>INSTANCE_REF</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>HeaderContentPortletInstance</emphasis> in the <emphasis>INSTANCE_REF</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>TestPortletInstance</emphasis> in the <emphasis>INSTANCE_REF</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>MissingPortletInstance</emphasis> in the <emphasis>INSTANCE_REF</emphasis> column.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para>
- Remove the following entries in the <emphasis role="bold">JBP_OBJECT_NODE</emphasis> table, so that JBoss Portal 2.6 can recreate them:
- </para>
- <para>
- <itemizedlist>
- <listitem>
- <para>
- rows containing <emphasis>NavigationPortletWindow</emphasis> in the <emphasis>NAME</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>URLPortletWindow</emphasis> in the <emphasis>NAME</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>PortletAWindow</emphasis> in the <emphasis>NAME</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>PortletBWindow</emphasis> in the <emphasis>NAME</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>MissingInstanceWindow</emphasis> in the <emphasis>NAME</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>EncodingPortletWindow</emphasis> in the <emphasis>NAME</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>PortletSessionPortletWindow</emphasis> in the <emphasis>NAME</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>CachedCounterPortletWindow</emphasis> in the <emphasis>NAME</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>CounterPortletWindow</emphasis> in the <emphasis>NAME</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>CharsetPortletWindow</emphasis> in the <emphasis>NAME</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>SecuredTestPortletWindow</emphasis> in the <emphasis>NAME</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>ExceptionPortletWindow</emphasis> in the <emphasis>NAME</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>MissingPortletWindow</emphasis> in the <emphasis>NAME</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>HeaderContentPortletWindow</emphasis> in the <emphasis>NAME</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- rows containing <emphasis>TestPortletWindow</emphasis> in the <emphasis>NAME</emphasis> column.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </sect2>
- <sect2>
- <title>CMS</title>
- <para>
- In JBoss Portal 2.6 versions, the way the CMS content is displayed changed significantly. For further information, refer to <xref linkend="contentintegration"/> and <xref linkend="cmsPortlet"/>. Currently there is no need to have more than one instance of the <emphasis>CMSPortlet</emphasis>. The portlet window displays CMS content, not by referring to that portlet instance, but by having the proper <emphasis>content-type</emphasis> defined. The following configuration is in the <filename>jboss-portal.sar/conf/data/default-object.xml</filename> file:
- </para>
- <para>
-<screen><![CDATA[
-<window>
- <window-name>CMSWindow</window-name>
- <content>
- <content-type>cms</content-type>
- <content-uri>/default/index.html</content-uri>
- </content>
- <region>center</region>
- <height>1</height>
-</window>]]>
-</screen>
- </para>
- <para>
- The following example uses the MySQL Query Browser. Open the <emphasis role="bold">JBP_OBJECT_NODE</emphasis> table in your database schema. Look at the <emphasis role="bold">PATH</emphasis> column to identify any occurrences of <emphasis>CMS</emphasis> in your JBoss Portal deployment. Identify any row referring to <emphasis>CMSPortletWindow</emphasis>, and remember the number in the <emphasis role="bold">PK</emphasis> column. The <emphasis role="bold">PK</emphasis> number is needed in the following steps:
- </para>
- <para>
- <mediaobject>
- <imageobject>
- <imagedata align="center" valign="middle" fileref="images/migration/querybrowser2.png"/>
- </imageobject>
- </mediaobject>
- </para>
- <para>
- Go to the <emphasis role="bold">JBP_WINDOW</emphasis> table and find a row with the same
- <emphasis role="bold">PK</emphasis> value from the <emphasis role="bold">JBP_OBJECT_NODE</emphasis> table. In such a row, replace <emphasis>CMSPortletInstance</emphasis> with a path to your CMS resource. For example, by default, JBoss Portal displays <filename>/default/index.html</filename>.
- </para>
- <para>
- Add a row containing the following to the <emphasis role="bold">JBP_PORTAL_OBJECT_PROPS</emphasis> table:
- </para>
- <para>
- <itemizedlist>
- <listitem>
- <para>
- The <emphasis role="bold">PK</emphasis> number remembered from the <emphasis>OBJECT_KEY</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>portal.windowContentType</emphasis> in the <emphasis>NAME</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>cms</emphasis> in the <emphasis>jbp_VALUE</emphasis> column.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para>
- As well, the CMS can be migrated by backing up the <computeroutput>jbp_cms_*</computeroutput> tables, and recreating them in a JBoss Portal 2.6 database. There were no schema changes for the CMS between JBoss Portal 2.4 and JBoss Portal 2.6.
- </para>
- <para>
- <note>
- <title>Portlet Content-type and the path to the CMS Resource</title>
- <para>
- The <guiicon>Admin</guiicon> portlet can be used to change the portlet window content-type, and configure the path to the CMS resource.
- </para>
- </note>
- </para>
- </sect2>
-</sect1>
- <!--<sect1 id="manual_migration">
- <title>Manual Upgrade</title>
- <para>
- Although the database schema remains the same in JBoss Portal 2.6, there are several differences that prevent simply deploying the latest version of JBoss Portal, when using a database created for JBoss Portal 2.4. This chapter describes updating a JBoss Portal 2.4 MySQL database for use with JBoss Portal 2.6.
- </para>
- <para>
- The upgrade procedure can be straightforward:
- </para>
- <para>
- <orderedlist>
- <listitem>
- <para>
- If you are using the JBoss Portal binary, remove the <filename>$JBOSS_HOME/server/default/deploy/jboss-portal.sar/</filename> directory. If JBoss Portal was built from source, remove the <filename>$JBOSS_HOME/server/default/deploy/jboss-portal.sar</filename> file.
- </para>
- </listitem> -->
- <!--<listitem>
- Remove <emphasis role="bold">$JBOSS_HOME/server/default/data</emphasis> directory.
- </listitem>-->
- <!-- <listitem>
- <para>
- Update the data in the JBoss Portal database, as described in <xref linkend="upgrade_portal_database"/>.
- </para>
- </listitem>
- <listitem>
- <para>
- Deploy JBoss Portal 2.6.
- </para>
- </listitem>
- </orderedlist>
- </para>
- <sect2>
- <title>Themes</title>
- <para>
- Themes in JBoss Portal 2.6 have changed since the Portal pages now contain additional areas, such as the <guiicon>Login</guiicon>, <guiicon>Admin</guiicon>, and <guiicon>Dashboard</guiicon> links, on the top right-hand corner:
- </para>
- <para>
- <mediaobject>
- <imageobject>
- <imagedata align="center" valign="middle" fileref="images/migration/theme.png"/>
- </imageobject>
- </mediaobject>
- </para>
- <para>
- If you use a default theme that exists in JBoss Portal 2.6, such as renaissance, no configuration should be necessary. Using old themes from JBoss Portal 2.4 may make JBoss Portal 2.6 unusable, for example, not being able to log in. To update custom themes, please refer to those bundled with JBoss Portal as an example.
- </para>
- </sect2>
- <sect2 id="upgrade_portal_database">
- <title>Updating the Database</title>
- <para>
- All procedures described in the following sections can performed using the AdminPortlet. Treat the directions as guidelines if you need to automate the migration of a large JBoss Portal deployment.
- </para>
- <para>
- Database schema has not changed between the JBoss Portal 2.4 and 2.6 releases, but certain content that is kept in the databases has changed. Data can be updated manually by using the correct tools for your RDBMS. For example, if you are using a MySQL database, you can use the <ulink url="http://www.mysql.com/products/tools/query-browser/">MySQL Query Browser</ulink>.
- </para>
- <para>
- The following instructions refer to a standard JBoss Portal 2.4 deployment. If you named core portlets, portlet instances, or portlet windows differently, you need to make the appropriate modifications. The following is an example of using the MySQL Query Browser:
- </para>
- <para>
- <mediaobject>
- <imageobject>
- <imagedata align="center" valign="middle" fileref="images/migration/querybrowser1.png"/>
- </imageobject>
- </mediaobject>
- </para>
-</sect2>
- <sect2>
- <title>Portlet Names</title>
- <para>
- Names of certain core bundled portlets have changed. Destroy the following instances and use the AdminPortlet to recreate them, or, edit the <emphasis role="bold">JBP_INSTANCE</emphasis> table as follows:
- </para>
- <para>
- <orderedlist>
- <listitem>
- <para>
- Change <emphasis>local.portal.CMSPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column to <emphasis>local./portal-cms.CMSPortlet</emphasis>.
- </para>
- </listitem>
- <listitem>
- <para>
- Change <emphasis>local.portal.CMSAdminPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column to <emphasis>local./portal-cms.CMSAdminPortlet</emphasis>.
- </para>
- </listitem>
- <listitem>
- <para>
- Change <emphasis>local.portal.ManagementPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column to <emphasis>local./portal-admin.AdminPortlet</emphasis>.
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para>
- The <emphasis>NavigationPortlet</emphasis> from JBoss Portal 2.4 has been removed, and its functionality is now replaced by <emphasis>PageCustomizerInterceptor</emphasis>. Remove all references to the <emphasis>NavigationPortlet</emphasis> from all portal pages. Remove <emphasis>NavigationPortletInstance</emphasis> using the AdminPortlet, or edit the database as follows:
- </para>
- <para>
- <orderedlist>
- <listitem>
- <para>
- In the <emphasis>JBP_INSTANCE</emphasis> table, rows containing <emphasis>local.portal.NavigationPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- In the <emphasis>JBP_WINDOW</emphasis> table, rows containing <emphasis>NavigationPortletInstance</emphasis> in the <emphasis>INSTANCE_REF</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- In the <emphasis>JBP_OBJECT</emphasis> table, rows containing <emphasis>NavigationPortletWindow</emphasis> in the <emphasis>NAME</emphasis> column.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </sect2>
- <sect2>
- <title>CMS</title>
- <para>
- In JBoss Portal 2.6 versions, the way the CMS content is displayed changed significantly. For further information, please refer to <xref linkend="contentintegration"/> and <xref linkend="cmsPortlet"/>. Currently there is no need to have more than one instance of the <emphasis>CMSPortlet</emphasis>. The portlet window displays CMS content, not by referring to that portlet instance, but by having the proper <emphasis>content-type</emphasis> defined. The following configuration is in the <filename>jboss-portal.sar/conf/data/default-object.xml</filename> file:
- </para>
- <para>
-<screen><![CDATA[
-<window>
- <window-name>CMSWindow</window-name>
- <content>
- <content-type>cms</content-type>
- <content-uri>/default/index.html</content-uri>
- </content>
- <region>center</region>
- <height>0</height>
-</window>]]>
-</screen>
-</para>
- <para>
- The following example uses the MySQL Query Browser. Open the <emphasis role="bold">JBP_OBJECT_NODE</emphasis> table in your database schema. Look at the <emphasis role="bold">PATH</emphasis> column to identify any occurrences of CMS in your JBoss Portal deployment. Identify any row referring to <emphasis>CMSPortletWindow</emphasis>, and remember the number in <emphasis role="bold">PK</emphasis> column. The <emphasis role="bold">PK</emphasis> number is needed in the following steps:
- </para>
- <para>
- <mediaobject>
- <imageobject>
- <imagedata align="center" valign="middle" fileref="images/migration/querybrowser2.png"/>
- </imageobject>
- </mediaobject>
- </para>
- <para>
- Go to the <emphasis role="bold">JBP_WINDOW</emphasis> table and find a row with the same
- <emphasis role="bold">PK</emphasis> value from the <emphasis role="bold">JBP_OBJECT_NODE</emphasis> table. In such a row, replace <emphasis>CMSPortletInstance</emphasis> with a path to your CMS resource. For example, by default, JBoss Portal displays <filename>/default/index.html</filename>.
- </para>
- <para> Go to the <emphasis role="bold">JBP_PORTAL_OBJECT_PROPS</emphasis> table and add a row containing:
- <itemizedlist>
- <listitem>
- <para>
- The <emphasis role="bold">PK</emphasis> number remembered from the <emphasis>OBJECT_KEY</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>portal.windowContentType</emphasis> in the <emphasis>NAME</emphasis> column.
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>cms</emphasis> in the <emphasis>jbp_VALUE</emphasis> column.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para>
- <note>
- <title>Portlet Content Type and Path to the CMS Resource</title>
- <para>
- You can change the portlet window content type and configure the path to the CMS resource
- using the AdminPortlet.
- </para>
- </note>
- </para>
- </sect2>
-</sect1> -->
- <!--
- <para>This chapter addresses migration issues from version 2.2 to 2.4 of JBoss Portal.</para>
- <sect1 id="migrating_database">
- <title>Migrating the Database</title>
- <para>JBoss Portal 2.4 comes with dedicated web application for database migration.
- This application will migrate your existing JBoss Portal 2.2 database data to a new one, for use with JBoss
- Portal 2.4.
- </para>
- <warning>This migration process should be performed
- <emphasis role="bold">before</emphasis>
- JBoss Portal 2.4 deployment.
- <emphasis role="bold">Follow the exact steps below, in order, or ugly scary things may happen!</emphasis>
- </warning>
- <sect2 id="migration_preparations">
- <title>Database Requirements/Preparation</title>
- <para>You will need two database instances for this migration process to function:</para>
- <itemizedlist>
- <listitem>
- <para>
- <emphasis role="bold">Source JBP 2.2 database</emphasis>
- from which we migrate portal data. (You should already have this!)
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis role="bold">Destination JBP 2.4 database</emphasis>
- to which we migrate portal data.
- </para>
- </listitem>
- </itemizedlist>
- <para>Before you begin the process you must create a separate database to which the data
- will be migrated. Note that the Migration Application performs a Hibernate SchemaExport which
- drops and recreates tables - It is recommended that you backup your database before starting!</para>
- <para>For our example, we have two databases... the existing one for JBoss Portal 2.2, and the new (empty) one
- for JBoss Portal 2.4:
- <itemizedlist>
- <listitem>
- <para>
- JBoss Portal 2.2 DB:
- <emphasis role="bold">jbossportal22</emphasis>
- </para>
- </listitem>
- <listitem>
- <para>
- JBoss Portal 2.4 DB:
- <emphasis role="bold">jbossportal24</emphasis>
- </para>
- </listitem>
- </itemizedlist>
- We will use the above database naming, as examples in the next chapter on configuring the datasource.
- </para>
- </sect2>
- <sect2 id="datasource_prepare">
- <title>DataSource Requirements/Preparation</title>
- <para>The Migration Application will need access to both databases, while its running. For this reason, we need
- to make available both JBoss Application Server datasource files.</para>
- <orderedlist>
- <listitem>
- <para>You should have an existing JBoss Portal 2.2 datasource,
- <emphasis role="bold">portal-ds.xml</emphasis>
- or
- <emphasis role="bold">portal-*-ds.xml</emphasis>
- file that looks like this:
- </para>
- <programlisting>
- <![CDATA[
- <?xml version="1.0" encoding="UTF-8"?>
- <datasources>
- <local-tx-datasource>
- <jndi-name>PortalDS</jndi-name>
- <connection-url>jdbc:mysql://localhost:3306/jbossportal22?useServerPrepStmts=false</connection-url>
- <driver-class>org.gjt.mm.mysql.Driver</driver-class>
- <user-name>portal</user-name>
- <password>portalpassword</password>
- </local-tx-datasource>
- </datasources>
- ]]>
- </programlisting>
- </listitem>
- <listitem>
- <para>Now, you will need to create a second datasource for the destination database. In our example we
- will create,
- <emphasis role="bold">portal-migration-ds.xml</emphasis>
- file that looks like this:
- </para>
- <programlisting>
- <![CDATA[
- <?xml version="1.0" encoding="UTF-8"?>
- <datasources>
- <local-tx-datasource>
- <jndi-name>PortalDS_2_4</jndi-name>
- <connection-url>jdbc:mysql://localhost:3306/jbossportal24?useServerPrepStmts=false</connection-url>
- <driver-class>org.gjt.mm.mysql.Driver</driver-class>
- <user-name>portal</user-name>
- <password>portalpassword</password>
- </local-tx-datasource>
- </datasources>
- ]]>
- </programlisting>
- </listitem>
- </orderedlist>
- </sect2>
- <sect2 id="getting_tool">
- <title>Obtaining the Migration Application</title>
- <para>The JBoss Portal Migration Application can be obtained either as a ready to deploy web application or in source form.</para>
- <sect3 id="getting_app_binary">
- <title>Downloading binary</title>
- <para>You can find a prepared binary at:</para>
- <itemizedlist>
- <listitem>
- <para>
- <ulink url="http://labs.jboss.com/portal/jbossportal/download">Download</ulink>
- section of JBoss Portal project page
- </para>
- </listitem>
- </itemizedlist>
- </sect3>
- <sect3 id="getting_app_source">
- <title>Building from source</title>
- <para>You can obtain portal sources from either:</para>
- <itemizedlist>
- <listitem>
- <para>
- <ulink url="http://labs.jboss.com/portal/jbossportal/download/">Download</ulink>
- section of JBoss Portal project page
- </para>
- </listitem>
- <listitem>
- <para>
- CVS by running following command:
- </para>
- <programlisting>
- <![CDATA[
- cvs -d :pserver:anonymous@anoncvs.forge.jboss.com:/cvsroot/jboss co jboss-portal-2.4
- ]]>
- </programlisting>
- </listitem>
- </itemizedlist>
- <para>Using the second method you will always have all latest updates from portal 2.4 cvs branch</para>
- <para>After downloading the sources you need to build the Migration Application. Before you start be sure
- you have
- <emphasis role="bold">JBOSS_HOME</emphasis>
- environment variable set pointing
- to JBoss Application Server directory. Migration Application archive can be build using following
- commands:
- </para>
- <programlisting>
- <![CDATA[
- cd jboss-portal-2.4
- cd build
- ./build.sh
- cd ..
- cd migration
- ./build.sh
- ]]>
- </programlisting>
- <para>Deployable web application archive can be found at
- <emphasis role="bold">jboss-portal-2.4/migration/output/lib/portal-migration.war</emphasis>
- </para>
- <para>You can also deploy it automatically by executing:</para>
- <programlisting>
- <![CDATA[
- cd jboss-portal-2.4
- cd migration
- ./build.sh deploy
- ]]>
- </programlisting>
- </sect3>
- </sect2>
- <sect2 id="deploying_migration">
- <title>Deploying the Migration Application</title>
- <para>
- The steps below will guide you through deploying and running the migration application:
- <orderedlist>
- <listitem>
- <para>Shut down JBoss Application Server</para>
- </listitem>
- <listitem>
- <para>Undeploy/Remove JBoss Portal 2.2 (JBOSS_HOME/server/default/deploy/jboss-portal.sar)</para>
- </listitem>
- <listitem>
- <para>Delete
- <emphasis>JBOSS_HOME/server/default/data/portal/cms</emphasis>
- (This directory will be created for you, once again, when JBoss Portal 2.4 initializes.
- </para>
- </listitem>
- <listitem>
- <para>Deploy the
- <emphasis role="bold">two</emphasis>
- necessary datasource descriptors, from
- <xref linkend="datasource_prepare"/> to JBOSS_HOME/server/default/deploy/*
- </para>
- </listitem>
- <listitem>
- <para>Deploy the Migration Application, you obtained from
- <xref linkend="getting_tool"/> to JBOSS_HOME/server/default/deploy/portal-migration.war
- </para>
- </listitem>
- <listitem>
- <para>Start JBoss Application Server</para>
- </listitem>
- </orderedlist>
- </para>
- </sect2>
- <sect2 id="running_migration">
- <title>Running the Migration Application</title>
- <orderedlist>
- <listitem>
- <para>After deploying Migration Application you can access it at
- <ulink url="http://localhost:8080/portal-migration">http://localhost:8080/portal-migration</ulink>
- . It is
- password protected so you need to specify:
- <itemizedlist>
- <listitem>
- <para>
- <emphasis role="bold">User:</emphasis>
- admin
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis role="bold">Password:</emphasis>
- simplePassword
- </para>
- </listitem>
- </itemizedlist>
- <note>The Password can be changed in
- <emphasis role="bold">portal-migration.war/WEB-INF/classes/users.properties</emphasis>
- file. Remember to always change the password to a less trivial one, or undeploy the war file after
- the
- migration
- process.
- </note>
- </para>
- </listitem>
- <listitem>
- <para>If you logged in successfully you should access this page:
- <mediaobject>
- <imageobject>
- <imagedata align="center" valign="middle" fileref="images/migration/migration_app_3.jpg"/>
- </imageobject>
- </mediaobject>
- </para>
- </listitem>
- <listitem>
- <para>At
- <emphasis role="bold">Step 2: 2.4 Database Connectivity Check</emphasis>
- you need to provide datasouce name
- that points to JBoss Portal 2.4 database (the destination one)
-
- <mediaobject>
- <imageobject>
- <imagedata align="center" valign="middle" fileref="images/migration/migration_app_4.jpg"/>
- </imageobject>
- </mediaobject>
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis role="bold">Step 3: Create Tables</emphasis>
-
- <mediaobject>
- <imageobject>
- <imagedata align="center" valign="middle" fileref="images/migration/migration_app_5.jpg"/>
- </imageobject>
- </mediaobject>
- </para>
- </listitem>
- <listitem>
- <para>If both connections were valid and database schema was created successfully you can
- follow with the migration process. It is separated into following parts:
- <itemizedlist>
- <listitem>
- <para>
- <emphasis role="bold">CMS Data Migration</emphasis>
- - migrates portal CMS tables content
-
- <imageobject>
- <imagedata align="center" valign="middle" fileref="images/migration/migration_app_6.jpg"/>
- </imageobject>
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis role="bold">User/Role Data Migrate</emphasis>
- - migrates portal user, roles and
- relations beetween them
-
- <imageobject>
- <imagedata align="center" valign="middle" fileref="images/migration/migration_app_7.jpg"/>
- </imageobject>
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis role="bold">Portal Object Data Migrate</emphasis>
- - migrates
- whole portal objects structure. This means nodes like portals, pages and windows.
-
- <imageobject>
- <imagedata align="center" valign="middle" fileref="images/migration/migration_app_8.jpg"/>
- </imageobject>
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis role="bold">Portal Portlet Instance Data Migrate</emphasis>
- - migrates
- all portlet instances presented in portal. For each portlet instance its preferences are also
- persisted. Next, all already migrated users are iterated and user preferences related to
- portlet
- instance are migrated
-
- <imageobject>
- <imagedata align="center" valign="middle" fileref="images/migration/migration_app_9.jpg"/>
- </imageobject>
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis role="bold">Portal Security Data Migrate</emphasis>
- - migrates security data for portal
- objects and portlet instances.
-
- <imageobject>
- <imagedata align="center" valign="middle"
- fileref="images/migration/migration_app_10.jpg"/>
- </imageobject>
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para>Which should lead to a successful end :)
- <imageobject>
- <imagedata align="center" valign="middle" fileref="images/migration/migration_app_11.jpg"/>
- </imageobject>
- </para>
- </listitem>
- </orderedlist>
- <para>
- <note>If any error occured during the migration process you will be provided
- with specific information and asked to retry that step
- <imageobject>
- <imagedata align="center" valign="middle" fileref="images/migration/migration_app_9-fail.jpg"/>
- </imageobject>
- <imageobject>
- <imagedata align="center" valign="middle" fileref="images/migration/migration_app_10-fail.jpg"/>
- </imageobject>
- Always check the Application Server console output or logs after migration to track possible
- errors.
- </note>
- </para>
- </sect2>
- <sect2 id="migration_final">
- <title>Final steps</title>
- <para>After running the Migration Application you need to perform some additional steps to
- finish the process:</para>
- <orderedlist>
- <listitem>
- <para>Shutdown JBoss Application Server</para>
- </listitem>
- <listitem>
- <para>
- Undeploy JBoss Portal 2.2 (jboss-portal.sar)
- </para>
- </listitem>
- <listitem>
- <para>Undeploy the JBoss Portal 2.2 datasource descriptor</para>
- </listitem>
- <listitem>
- <para>Delete
- <emphasis>JBOSS_HOME/server/default/data/portal/cms</emphasis>
- (This directory will be created for you, once again, when JBoss Portal 2.4 initializes.
- </para>
- </listitem>
- <listitem>
- <para>
- Edit your 2.4 datasource file and modify the jndi name:
- <emphasis role="bold">
- <![CDATA[<jndi-name>PortalDS</jndi-name>]]>
- </emphasis>
- </para>
- </listitem>
- <listitem>
- <para>
- Deploy JBoss Portal 2.4.
- </para>
- </listitem>
- <listitem>
- <para>Start JBoss Application Server</para>
- </listitem>
- </orderedlist>
- </sect2>
- </sect1>
- <sect1 id="descriptors_migration">
- <title>Migrating Portlet Descriptors</title>
- <para>Since 2.2 version of JBoss Portal data from portlet descriptor files are persisted
- in database. There is special
- <emphasis role="boled"><![CDATA[<if-exists/>]]></emphasis>
- tag
- that describes what should portal do when he process descriptor and found data for such portlet
- application already in database. Therefore after database migration portal will use persisted data.
- </para>
- <para>There are some differences beetween 2.2 and 2.4 descriptors.
- <emphasis role="bold">portlet-instances.xml</emphasis>
- file was reintroduced
- because of WSRP implementation caused portal architecture changes. Altough to avoid confusion
- legacy descriptors support was implemented in 2.4 so all 2.2 compiliant portlets
- should work out of box.
- </para>
- <para>Even if your 2.2 portlets deployed successfully in 2.4 you should update their
- descriptors. Legacy descriptors support will expire in 2.6 and you will need to use new format
- to achive more complex targets.</para>
- <sect2 id="car_demo_example">
- <title>Car Demo Portlet example</title>
- <para>Let's show descriptor changes using
- <emphasis role="bold">Car Demo</emphasis>
- portlet example which is a presentation of JSF portlet. It can be obtained at
- <ulink url="http://www.portletswap.com">PortletSwap</ulink>
- . In 2.2 prepared version it has such descriptor:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <emphasis role="bold">cardemo-object.xml</emphasis>
- </para>
- <programlisting>
- <![CDATA[
- <?xml version="1.0" encoding="UTF-8"?>
- <deployments>
- <deployment>
- <if-exists>overwrite</if-exists>
- <parent-ref>default</parent-ref>
- <page>
- <page-name>samples</page-name>
- <window>
- <window-name>CarDemoWindow</window-name>
- <instance-ref>CarDemoPortletInstance</instance-ref>
- <region>center</region>
- <height>0</height>
- </window>
- </page>
- </deployment>
- <deployment>
- <if-exists>overwrite</if-exists>
- <instance>
- <instance-name>CarDemoPortletInstance</instance-name>
- <component-ref>cardemo.CarDemoPortlet</component-ref>
- </instance>
- </deployment>
- </deployments>
- ]]>
- </programlisting>
- </listitem>
- </itemizedlist>
- <para>Note that as we said before you can successfully deploy it on JBoss Portal 2.4. But because
- such descriptor format is 2.2 specific you will end with a warning on JBoss Application Server console
- output:</para>
- <programlisting>
- <![CDATA[
- INFO [PortletAppDeployment] These instances have been found in -object.xml, you should put them in the file
- c:\jboss-4.0.4.GA\server\default\.\deploy\cardemo.war\WEB-INF/portlet-instances.xml
- INFO [PortletAppDeployment] <?xml version="1.0" encoding="utf-8" standalone="yes"?>
- <deployments>
- <deployment>
- <instance>
- <instance-id>CarDemoPortletInstance</instance-id>
- <portlet-ref>CarDemoPortlet</portlet-ref>
- </instance>
- </deployment>
- </deployments>
- ]]>
- </programlisting>
- <para>So all you need to do is to follow suggestion you got in the warning message :)</para>
- </sect2>
- <sect2 id="car_demo_update">
- <title>Updating Car Demo Portlet descriptors</title>
- <para>To have descriptors in our example portlet 2.4 valid you need to follow few simple steps:</para>
- <itemizedlist>
- <listitem>
- <para>In
- <emphasis role="bold">cardemo-object.xml</emphasis>
- file comment out whole
- <emphasis role="bold"><![CDATA[<deployment>...</deployment>]]></emphasis>
- tag which contains
- <emphasis role="bold"><![CDATA[<instance>...</instance>]]></emphasis>
- .
- </para>
- </listitem>
- <listitem>
- <para>Copy the text you just commented out and put it in newly created
- <emphasis role="bold">portlet-instances.xml</emphasis>
- file.
- </para>
- </listitem>
- <listitem>
- <para>Edit and change
- <emphasis role="bold">portlet-instances.xml</emphasis>
- file using following rules:
- </para>
- <para>Surround whole file content with
- <emphasis role="bold"><![CDATA[</deployments>]]></emphasis>
- tag.
- </para>
- <para>Replace
- <emphasis role="bold"><![CDATA[</instance-name>]]></emphasis>
- tag with
- <emphasis role="bold"><![CDATA[</instance-id>]]></emphasis>
- one
- </para>
- <para>Replace
- <emphasis role="bold"><![CDATA[</component-ref>]]></emphasis>
- tag with
- <emphasis role="bold"><![CDATA[</portlet-ref>]]></emphasis>
- one
- </para>
- </listitem>
- </itemizedlist>
- <para>So after updates your portlet descriptors should look like this:</para>
- <itemizedlist>
- <listitem>
- <para>
- <emphasis role="bold">cardemo-object.xml</emphasis>
- </para>
- <programlisting>
- <![CDATA[
- <?xml version="1.0" encoding="UTF-8"?>
- <deployments>
- <deployment>
- <if-exists>overwrite</if-exists>
- <parent-ref>default</parent-ref>
- <page>
- <page-name>samples</page-name>
- <window>
- <window-name>CarDemoWindow</window-name>
- <instance-ref>CarDemoPortletInstance</instance-ref>
- <region>center</region>
- <height>0</height>
- </window>
- </page>
- </deployment>
- </deployments>
- ]]>
- </programlisting>
- </listitem>
- <listitem>
- <para>
- <emphasis role="bold">portlet-instances.xml</emphasis>
- </para>
- <programlisting>
- <![CDATA[
- <?xml version="1.0" encoding="utf-8" standalone="yes"?>
- <deployments>
- <deployment>
- <instance>
- <instance-id>CarDemoPortletInstance</instance-id>
- <portlet-ref>CarDemoPortlet</portlet-ref>
- </instance>
- </deployment>
- </deployments>
- ]]>
- </programlisting>
- </listitem>
- </itemizedlist>
- </sect2>
- </sect1>
--->
-
+ </sect1>
+
</chapter>
Modified: docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/navtabs.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/navtabs.xml 2008-06-27 15:34:50 UTC (rev 11174)
+++ docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/navtabs.xml 2008-06-27 16:04:10 UTC (rev 11175)
@@ -8,7 +8,6 @@
<author>
<firstname>Thomas</firstname>
<surname>Heute</surname>
- <email>theute(a)jboss.org</email>
</author>
</chapterinfo>
<title>Navigation Tabs</title>
Modified: docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/portalapi.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/portalapi.xml 2008-06-27 15:34:50 UTC (rev 11174)
+++ docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/portalapi.xml 2008-06-27 16:04:10 UTC (rev 11175)
@@ -3,12 +3,10 @@
<author>
<firstname>Julien</firstname>
<surname>Viet</surname>
- <email>julien(a)jboss.org</email>
</author>
<author>
<firstname>Thomas</firstname>
<surname>Heute</surname>
- <email>theute(a)jboss.org</email>
</author>
</chapterinfo>
<title>Portal API</title>
Modified: docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/portletmodes.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/portletmodes.xml 2008-06-27 15:34:50 UTC (rev 11174)
+++ docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/portletmodes.xml 2008-06-27 16:04:10 UTC (rev 11175)
@@ -4,7 +4,6 @@
<author>
<firstname>Julien</firstname>
<surname>Viet</surname>
- <email>julien.viet(a)jboss.com</email>
</author>
</chapterinfo>
<title>Portlet Modes</title>
Modified: docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/security.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/security.xml 2008-06-27 15:34:50 UTC (rev 11174)
+++ docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/security.xml 2008-06-27 16:04:10 UTC (rev 11175)
@@ -4,12 +4,10 @@
<author>
<firstname>Roy</firstname>
<surname>Russo</surname>
- <email>roy(a)jboss.org</email>
</author>
<author>
<firstname>Julien</firstname>
<surname>Viet</surname>
- <email>julien(a)jboss.org</email>
</author>
</chapterinfo>
<title>Security</title>
Modified: docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/sso.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/sso.xml 2008-06-27 15:34:50 UTC (rev 11174)
+++ docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/sso.xml 2008-06-27 16:04:10 UTC (rev 11175)
@@ -3,12 +3,10 @@
<author>
<firstname>Boleslaw</firstname>
<surname>Dawidowicz</surname>
- <email>boleslaw dot dawidowicz at redhat dot com</email>
</author>
<author>
<firstname>Sohil</firstname>
<surname>Shah</surname>
- <email>sshah(a)redhat.com</email>
</author>
</chapterinfo>
<title>Single Sign ON</title>
Modified: docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/supported.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/supported.xml 2008-06-27 15:34:50 UTC (rev 11174)
+++ docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/supported.xml 2008-06-27 16:04:10 UTC (rev 11175)
@@ -4,11 +4,10 @@
<author>
<firstname>Thomas</firstname>
<surname>Heute</surname>
- <email>theute(a)jboss.org</email>
</author>
<author>
- <surname>Roy Russo</surname>
- <email>roy(a)jboss.org</email>
+ <firstname>Roy</firstname>
+ <surname>Russo</surname>
</author>
</chapterinfo>
<title>System Requirements</title>
Modified: docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/themeandlayouts.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/themeandlayouts.xml 2008-06-27 15:34:50 UTC (rev 11174)
+++ docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/themeandlayouts.xml 2008-06-27 16:04:10 UTC (rev 11175)
@@ -4,17 +4,14 @@
<author>
<firstname>Martin</firstname>
<surname>Holzner</surname>
- <email>mholzner(a)novell.com</email>
</author>
<author>
<firstname>Mark</firstname>
<surname>Fernandes</surname>
- <email>mfernandes(a)novell.com</email>
</author>
<author>
<firstname>Thomas</firstname>
<surname>Heute</surname>
- <email>theute(a)jboss.org</email>
</author>
</chapterinfo>
<title>Layouts and Themes</title>
Modified: docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/troubleshooting.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/troubleshooting.xml 2008-06-27 15:34:50 UTC (rev 11174)
+++ docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/troubleshooting.xml 2008-06-27 16:04:10 UTC (rev 11175)
@@ -2,8 +2,8 @@
<chapter id="troubleshooting">
<chapterinfo>
<author>
- <surname>Roy Russo</surname>
- <email>roy(a)jboss.org</email>
+ <firstname>Roy</firstname>
+ <surname>Russo</surname>
</author>
</chapterinfo>
<title>Troubleshooting and FAQ</title>
Modified: docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/tutorials.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/tutorials.xml 2008-06-27 15:34:50 UTC (rev 11174)
+++ docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/tutorials.xml 2008-06-27 16:04:10 UTC (rev 11175)
@@ -3,17 +3,14 @@
<author>
<firstname>Roy</firstname>
<surname>Russo</surname>
- <email>roy(a)jboss.org</email>
</author>
<author>
<firstname>Chris</firstname>
<surname>Laprun</surname>
- <email>chris.laprun(a)jboss.com</email>
</author>
<author>
<firstname>Thomas</firstname>
<surname>Heute</surname>
- <email>thomas.heute(a)jboss.com</email>
</author>
</chapterinfo>
<title>Portlet Primer</title>
Modified: docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/urls.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/urls.xml 2008-06-27 15:34:50 UTC (rev 11174)
+++ docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/urls.xml 2008-06-27 16:04:10 UTC (rev 11175)
@@ -3,17 +3,14 @@
<author>
<firstname>Julien</firstname>
<surname>Viet</surname>
- <email>julien(a)jboss.org</email>
</author>
<author>
<firstname>Thomas</firstname>
<surname>Heute</surname>
- <email>theute(a)jboss.org</email>
</author>
<author>
<firstname>Roy</firstname>
<surname>Russo</surname>
- <email>roy(a)jboss.org</email>
</author>
</chapterinfo>
<title>Portal URLs</title>
Modified: docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/widgetintegration.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/widgetintegration.xml 2008-06-27 15:34:50 UTC (rev 11174)
+++ docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/widgetintegration.xml 2008-06-27 16:04:10 UTC (rev 11175)
@@ -3,7 +3,6 @@
<author>
<firstname>Emanuel</firstname>
<surname>Muckenhuber</surname>
- <email>emuckenh(a)redhat.com</email>
</author>
</chapterinfo>
<title>Widget Integration</title>
Modified: docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/workflow.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/workflow.xml 2008-06-27 15:34:50 UTC (rev 11174)
+++ docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/workflow.xml 2008-06-27 16:04:10 UTC (rev 11175)
@@ -4,7 +4,6 @@
<author>
<firstname>Sohil</firstname>
<surname>Shah</surname>
- <email>sshah @ redhat dot com</email>
</author>
</chapterinfo>
<title>Portal Workflow</title>
Modified: docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/wsrp.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/wsrp.xml 2008-06-27 15:34:50 UTC (rev 11174)
+++ docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/wsrp.xml 2008-06-27 16:04:10 UTC (rev 11175)
@@ -3,12 +3,10 @@
<author>
<firstname>Julien</firstname>
<surname>Viet</surname>
- <email>julien(a)jboss.org</email>
</author>
<author>
<firstname>Chris</firstname>
<surname>Laprun</surname>
- <email>chris.laprun(a)jboss.com</email>
</author>
</chapterinfo>
Modified: docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/xmldescriptors.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/xmldescriptors.xml 2008-06-27 15:34:50 UTC (rev 11174)
+++ docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/xmldescriptors.xml 2008-06-27 16:04:10 UTC (rev 11175)
@@ -4,7 +4,6 @@
<author>
<firstname>Roy</firstname>
<surname>Russo</surname>
- <email>roy(a)jboss.org</email>
</author>
</chapterinfo>
<title>XML Descriptors</title>
17 years, 10 months
JBoss Portal SVN: r11174 - branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-06-27 11:34:50 -0400 (Fri, 27 Jun 2008)
New Revision: 11174
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossActionResponse.java
Log:
- Deprecate signout method in favor of the event
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossActionResponse.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossActionResponse.java 2008-06-27 15:32:28 UTC (rev 11173)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossActionResponse.java 2008-06-27 15:34:50 UTC (rev 11174)
@@ -150,31 +150,18 @@
/**
* Perform a programmatic sign out.
*
+ * @deprecated Use the QName("urn:jboss:portal", "signOut") event instead
* @throws IllegalStateException if programmatic signout cannot be done
*/
public void signOut() throws IllegalStateException
- {
-
+ {
setEvent(new QName(CoreEventControllerContext.PORTAL_NAMESPACE, "signOut"), null);
-/*
- if (!PortletRequest.FORM_AUTH.equals(preq.getAuthType()))
- {
- throw new IllegalStateException("Cannot perform programmatic signout");
- }
- try
- {
- sendRedirect(null);
- }
- catch (IOException e)
- {
- throw new IllegalStateException("Cannot perform programmatic signout");
- }
- */
}
/**
* Perform a programmatic sign out and navigate to the URL specified by the location parameter.
*
+ * @deprecated Use the QName("urn:jboss:portal", "signOut") event instead (Pass the redirection URL as payload)
* @param location URL to redirect to after signout; can be null to indicate default behavior.
* @throws IllegalStateException if programmatic signout cannot be done
* @throws IllegalArgumentException if the location is not valid
@@ -183,26 +170,6 @@
{
setEvent(new QName(CoreEventControllerContext.PORTAL_NAMESPACE, "signOut"), location);
-// throw new NotYetImplemented();
- /*
- if (!PortletRequest.FORM_AUTH.equals(preq.getAuthType()))
- {
- throw new IllegalStateException("Cannot perform programmatic signout");
- }
- if (location == null)
- {
- throw new IllegalArgumentException("Null location is not accepted");
- }
- URLTools.enforceAbsoluteURL(location);
- try
- {
- sendRedirect(location);
- }
- catch (IOException e)
- {
- throw new IllegalStateException("Cannot perform programmatic signout");
- }
- */
}
}
17 years, 10 months
JBoss Portal SVN: r11173 - branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/basic.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-06-27 11:32:28 -0400 (Fri, 27 Jun 2008)
New Revision: 11173
Modified:
branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/basic/TestPortlet.java
Log:
- Minor
Modified: branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/basic/TestPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/basic/TestPortlet.java 2008-06-27 14:53:01 UTC (rev 11172)
+++ branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/basic/TestPortlet.java 2008-06-27 15:32:28 UTC (rev 11173)
@@ -77,14 +77,21 @@
public void testsignout(JBossActionRequest req, JBossActionResponse resp)
{
- resp.setEvent(new QName("urn:jboss:portal", "signOut"), "");
+ resp.setEvent(new QName("urn:jboss:portal", "signOut"), null);
}
+
public void testsignout2(JBossActionRequest req, JBossActionResponse resp)
{
- resp.signOut();
+ resp.setEvent(new QName("urn:jboss:portal", "signOut"), "http://www.redhat.com");
}
+
public void testsignout3(JBossActionRequest req, JBossActionResponse resp)
{
+ resp.signOut();
+ }
+
+ public void testsignout4(JBossActionRequest req, JBossActionResponse resp)
+ {
resp.signOut("http://www.redhat.com");
}
@@ -266,22 +273,30 @@
writer.write("<p>");
writer.write("<div class=\"portlet-section-header\">Test sign out</div>");
writer.write("<div class=\"portlet-section-body\">");
- writer.write("<div><a href=\"" + actionURL + "\">sign out with signout event</a></div>");
+ writer.write("<div><a href=\"" + actionURL + "\">sign out with signout event</a></div>");
writer.write("</div>");
+ writer.write("</p>");
- actionURL = resp.createActionURL();
actionURL.setParameter("op", "testsignout2");
+ writer.write("<p>");
+ writer.write("<div class=\"portlet-section-header\">Test sign out</div>");
writer.write("<div class=\"portlet-section-body\">");
+ writer.write("<div><a href=\"" + actionURL + "\">sign out with signout event and redirect to Red Hat</a></div>");
+ writer.write("</div>");
+ writer.write("</p>");
+
+ actionURL = resp.createActionURL();
+ actionURL.setParameter("op", "testsignout3");
+ writer.write("<p>");
+ writer.write("<div class=\"portlet-section-header\">Test sign out 2</div>");
+ writer.write("<div class=\"portlet-section-body\">");
writer.write("<div><a href=\"" + actionURL + "\">sign out with former API and no parameter</a></div>");
writer.write("</div>");
-
writer.write("</p>");
//
-
- //
actionURL = resp.createActionURL();
- actionURL.setParameter("op", "testsignout3");
+ actionURL.setParameter("op", "testsignout4");
writer.write("<p>");
writer.write("<div class=\"portlet-section-header\">Test sign out 3</div>");
writer.write("<div class=\"portlet-section-body\">");
17 years, 10 months
JBoss Portal SVN: r11172 - in modules/portlet/trunk: portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/ext and 8 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-06-27 10:53:01 -0400 (Fri, 27 Jun 2008)
New Revision: 11172
Added:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/ext/portletmode/
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/ext/portletmode/PortletModeTestCase.java
modules/portlet/trunk/test/src/test/resources/jsr286/ext/portletmode-war/
modules/portlet/trunk/test/src/test/resources/jsr286/ext/portletmode-war/WEB-INF/
modules/portlet/trunk/test/src/test/resources/jsr286/ext/portletmode-war/WEB-INF/portlet.xml
modules/portlet/trunk/test/src/test/resources/jsr286/ext/portletmode-war/WEB-INF/web.xml
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/PortletRequestImpl.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/Assertion.java
modules/portlet/trunk/test/src/test/build.xml
modules/portlet/trunk/test/src/test/resources/jsr286/ext/portletrequests-war/WEB-INF/portlet.xml
modules/portlet/trunk/test/src/test/resources/test/remote-jboss-unit.xml
Log:
test case for custom portlet modes
Modified: modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/PortletRequestImpl.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/PortletRequestImpl.java 2008-06-27 14:48:49 UTC (rev 11171)
+++ modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/PortletRequestImpl.java 2008-06-27 14:53:01 UTC (rev 11172)
@@ -46,6 +46,7 @@
import org.jboss.portal.portlet.state.PropertyContext;
import org.jboss.portal.portlet.info.CapabilitiesInfo;
import org.jboss.portal.portlet.info.ModeInfo;
+import org.jboss.portal.portlet.info.PortletManagedModeInfo;
import org.jboss.portal.Mode;
import javax.portlet.PortalContext;
@@ -580,6 +581,9 @@
// Get content type
ContentInfo si = invocation.getContext().getMarkupInfo();
+ //
+ org.jboss.portal.portlet.spi.PortalContext portalContext =invocation.getPortalContext();
+
// Get the modes for this content type
CapabilitiesInfo capabilities = container.getInfo().getCapabilities();
@@ -587,7 +591,13 @@
Set<Mode> modes = new HashSet<Mode>();
for (ModeInfo modeInfo : capabilities.getModes(si.getMediaType()))
{
- modes.add(modeInfo.getMode());
+ Mode mode = modeInfo.getMode();
+
+ //
+ if (modeInfo instanceof PortletManagedModeInfo || portalContext.getModes().contains(mode))
+ {
+ modes.add(mode);
+ }
}
//
Added: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/ext/portletmode/PortletModeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/ext/portletmode/PortletModeTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/ext/portletmode/PortletModeTestCase.java 2008-06-27 14:53:01 UTC (rev 11172)
@@ -0,0 +1,238 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * 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. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.test.portlet.jsr286.ext.portletmode;
+
+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.actions.PortletRenderTestAction;
+import org.jboss.portal.unit.actions.PortletActionTestAction;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.common.util.Tools;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletException;
+import javax.portlet.PortletMode;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletURL;
+import javax.portlet.PortletModeException;
+import javax.portlet.PortletRequest;
+import java.io.IOException;
+import java.util.List;
+
+import static org.jboss.unit.api.Assert.*;
+import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+(a)TestCase({Assertion.EXT_PORTLET_MODE_1})
+public class PortletModeTestCase
+{
+
+ /** . */
+ private static final PortletMode CUSTOM_PORTAL = new PortletMode("CUSTOM_PORTAL");
+
+ /** . */
+ private static final PortletMode CUSTOM_PORTLET = new PortletMode("CUSTOM_PORTLET");
+
+ /** . */
+ private static final PortletMode NON_EXISTING = new PortletMode("NON_EXISTING");
+
+ /** . */
+ private static final List<PortletMode> legalModes = Tools.toList(PortletMode.VIEW, PortletMode.HELP, CUSTOM_PORTLET);
+
+ /** . */
+ private static final List<PortletMode> illegalModes = Tools.toList(PortletMode.EDIT, CUSTOM_PORTAL, NON_EXISTING);
+
+ public PortletModeTestCase(PortletTestCase seq)
+ {
+ seq.bindAction(0, UTP1.RENDER_JOIN_POINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws PortletException, IOException
+ {
+ assertEquals(PortletMode.VIEW, request.getPortletMode());
+
+ //
+ testRequest(request, legalModes, illegalModes);
+
+ //
+ testURL(response.createActionURL(), legalModes, illegalModes);
+ testURL(response.createRenderURL(), legalModes, illegalModes);
+
+ //
+ PortletURL url = response.createActionURL();
+ url.setPortletMode(PortletMode.HELP);
+ return new InvokeGetResponse(url.toString());
+ }
+ });
+ seq.bindAction(1, UTP1.ACTION_JOIN_POINT, new PortletActionTestAction()
+ {
+ protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws PortletException, IOException
+ {
+ assertEquals(PortletMode.HELP, request.getPortletMode());
+
+ //
+ testRequest(request, legalModes, illegalModes);
+
+ //
+ testResponse(response, legalModes, illegalModes);
+
+ //
+ response.setPortletMode(PortletMode.HELP);
+ }
+ });
+ seq.bindAction(1, UTP1.RENDER_JOIN_POINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws PortletException, IOException
+ {
+ assertEquals(PortletMode.HELP, request.getPortletMode());
+
+ //
+ testRequest(request, legalModes, illegalModes);
+
+ //
+ testURL(response.createActionURL(), legalModes, illegalModes);
+ testURL(response.createRenderURL(), legalModes, illegalModes);
+
+ //
+ PortletURL url = response.createActionURL();
+ url.setPortletMode(CUSTOM_PORTLET);
+ return new InvokeGetResponse(url.toString());
+ }
+ });
+ seq.bindAction(2, UTP1.ACTION_JOIN_POINT, new PortletActionTestAction()
+ {
+ protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws PortletException, IOException
+ {
+ assertEquals(CUSTOM_PORTLET, request.getPortletMode());
+
+ //
+ testRequest(request, legalModes, illegalModes);
+
+ //
+ testResponse(response, legalModes, illegalModes);
+
+ //
+ response.setPortletMode(CUSTOM_PORTLET);
+ }
+ });
+ seq.bindAction(2, UTP1.RENDER_JOIN_POINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws PortletException, IOException
+ {
+ assertEquals(CUSTOM_PORTLET, request.getPortletMode());
+
+ //
+ testRequest(request, legalModes, illegalModes);
+
+ //
+ testURL(response.createActionURL(), legalModes, illegalModes);
+ testURL(response.createRenderURL(), legalModes, illegalModes);
+
+ //
+ return new EndTestResponse();
+ }
+ });
+ }
+
+ private void testURL(
+ PortletURL url,
+ List<PortletMode> legalModes,
+ List<PortletMode> illegalModes)
+ {
+ for (PortletMode mode : legalModes)
+ {
+ try
+ {
+ url.setPortletMode(mode);
+ }
+ catch (PortletModeException expected)
+ {
+ fail("Was not expecting a portlet mode exception");
+ }
+ }
+ for (PortletMode mode : illegalModes)
+ {
+ try
+ {
+ url.setPortletMode(mode);
+ fail("Was expecting a portlet mode exception");
+ }
+ catch (PortletModeException expected)
+ {
+ }
+ }
+ }
+
+ private void testResponse(
+ ActionResponse response,
+ List<PortletMode> legalModes,
+ List<PortletMode> illegalModes)
+ {
+ for (PortletMode mode : legalModes)
+ {
+ try
+ {
+ response.setPortletMode(mode);
+ }
+ catch (PortletModeException expected)
+ {
+ fail("Was not expecting a portlet mode exception");
+ }
+ }
+ for (PortletMode mode : illegalModes)
+ {
+ try
+ {
+ response.setPortletMode(mode);
+ fail("Was expecting a portlet mode exception");
+ }
+ catch (PortletModeException expected)
+ {
+ }
+ }
+ }
+
+ private void testRequest(
+ PortletRequest url,
+ List<PortletMode> legalModes,
+ List<PortletMode> illegalModes)
+ {
+ for (PortletMode mode : legalModes)
+ {
+ assertTrue(url.isPortletModeAllowed(mode));
+ }
+ for (PortletMode mode : illegalModes)
+ {
+ assertFalse(url.isPortletModeAllowed(mode));
+ }
+ }
+}
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-06-27 14:48:49 UTC (rev 11171)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/Assertion.java 2008-06-27 14:53:01 UTC (rev 11172)
@@ -1899,6 +1899,8 @@
" If a resource parameter is set that has the same name as a render parameter, the render" +
" parameter must be the last entry in the parameter value array."),
+ EXT_PORTLET_MODE_1(new EXT("PortletMode"), "Test custom portlet modes wether they are portal or portlet managed."),
+
EXT_PORTLET_RESPONSES_1(new EXT("PortletResponse"), "Test that character encoding is ignored as specified by the spec in PLT.12.3.1"),
EXT_PORTLET_RESPONSES_2(new EXT("PortletResponse"), "Not setting the content type before getting a stream will use the content type defined" +
" by the portlet request response content type."),
Modified: modules/portlet/trunk/test/src/test/build.xml
===================================================================
--- modules/portlet/trunk/test/src/test/build.xml 2008-06-27 14:48:49 UTC (rev 11171)
+++ modules/portlet/trunk/test/src/test/build.xml 2008-06-27 14:53:01 UTC (rev 11172)
@@ -16,8 +16,8 @@
<antcall target="package-tests"/>
- <!--<antcall target="tests.call.single"/>-->
- <!--<antcall target="tests.call.all"/>-->
+ <antcall target="tests.call.single"/>
+ <antcall target="tests.call.all"/>
</target>
@@ -389,6 +389,7 @@
<package-jsr286-ext-test test="portletinterface"/>
<package-jsr286-ext-test test="event"/>
<package-jsr286-ext-test test="eventsupport"/>
+ <package-jsr286-ext-test test="portletmode"/>
<!-- -->
<jar jarfile="${test.temp.lib}/portlet-test-lib.jar">
Added: modules/portlet/trunk/test/src/test/resources/jsr286/ext/portletmode-war/WEB-INF/portlet.xml
===================================================================
--- modules/portlet/trunk/test/src/test/resources/jsr286/ext/portletmode-war/WEB-INF/portlet.xml (rev 0)
+++ modules/portlet/trunk/test/src/test/resources/jsr286/ext/portletmode-war/WEB-INF/portlet.xml 2008-06-27 14:53:01 UTC (rev 11172)
@@ -0,0 +1,51 @@
+<?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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+ version="2.0">
+
+ <portlet>
+ <portlet-name>UniversalTestPortletA</portlet-name>
+ <portlet-class>org.jboss.portal.test.portlet.framework.UTP1</portlet-class>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ <portlet-mode>HELP</portlet-mode>
+ <portlet-mode>CUSTOM_PORTAL</portlet-mode>
+ <portlet-mode>CUSTOM_PORTLET</portlet-mode>
+ </supports>
+ </portlet>
+
+ <custom-portlet-mode>
+ <portlet-mode>CUSTOM_PORTAL</portlet-mode>
+ </custom-portlet-mode>
+
+ <custom-portlet-mode>
+ <portlet-mode>CUSTOM_PORTLET</portlet-mode>
+ <portal-managed>false</portal-managed>
+ </custom-portlet-mode>
+
+</portlet-app>
Added: modules/portlet/trunk/test/src/test/resources/jsr286/ext/portletmode-war/WEB-INF/web.xml
===================================================================
--- modules/portlet/trunk/test/src/test/resources/jsr286/ext/portletmode-war/WEB-INF/web.xml (rev 0)
+++ modules/portlet/trunk/test/src/test/resources/jsr286/ext/portletmode-war/WEB-INF/web.xml 2008-06-27 14:53:01 UTC (rev 11172)
@@ -0,0 +1,32 @@
+<?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>
+ <listener>
+ <listener-class>org.jboss.portal.unit.PortletTestSuite</listener-class>
+ </listener>
+</web-app>
Modified: modules/portlet/trunk/test/src/test/resources/jsr286/ext/portletrequests-war/WEB-INF/portlet.xml
===================================================================
--- modules/portlet/trunk/test/src/test/resources/jsr286/ext/portletrequests-war/WEB-INF/portlet.xml 2008-06-27 14:48:49 UTC (rev 11171)
+++ modules/portlet/trunk/test/src/test/resources/jsr286/ext/portletrequests-war/WEB-INF/portlet.xml 2008-06-27 14:53:01 UTC (rev 11172)
@@ -90,6 +90,15 @@
</supported-publishing-event>
</portlet>
+ <custom-portlet-mode>
+ <portlet-mode>CUSTOM_PORTAL</portlet-mode>
+ </custom-portlet-mode>
+
+ <custom-portlet-mode>
+ <portlet-mode>CUSTOM_PORTLET</portlet-mode>
+ <portal-managed>false</portal-managed>
+ </custom-portlet-mode>
+
<event-definition>
<name>Event</name>
</event-definition>
Modified: modules/portlet/trunk/test/src/test/resources/test/remote-jboss-unit.xml
===================================================================
--- modules/portlet/trunk/test/src/test/resources/test/remote-jboss-unit.xml 2008-06-27 14:48:49 UTC (rev 11171)
+++ modules/portlet/trunk/test/src/test/resources/test/remote-jboss-unit.xml 2008-06-27 14:53:01 UTC (rev 11172)
@@ -235,6 +235,10 @@
<class name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
<property name="archiveId" value="test-jsr286-ext-event.war"/>
</generic>
+ <generic>
+ <class name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
+ <property name="archiveId" value="test-jsr286-ext-portletmode.war"/>
+ </generic>
<!--Misc Tests-->
<!--
17 years, 10 months
JBoss Portal SVN: r11171 - in branches/JBoss_Portal_Branch_2_7: core/src/main/org/jboss/portal/core/impl/model/content/generic and 2 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-06-27 10:48:49 -0400 (Fri, 27 Jun 2008)
New Revision: 11171
Modified:
branches/JBoss_Portal_Branch_2_7/api/src/main/org/jboss/portal/api/content/SelectedContent.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java
branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/google/GGWidgetPortlet.java
branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidgetPortlet.java
Log:
- Make content framework parameters cleaner
Modified: branches/JBoss_Portal_Branch_2_7/api/src/main/org/jboss/portal/api/content/SelectedContent.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/api/src/main/org/jboss/portal/api/content/SelectedContent.java 2008-06-27 13:08:10 UTC (rev 11170)
+++ branches/JBoss_Portal_Branch_2_7/api/src/main/org/jboss/portal/api/content/SelectedContent.java 2008-06-27 14:48:49 UTC (rev 11171)
@@ -53,16 +53,5 @@
{
return parameters;
}
-
- public static String encode(String key, String value)
- {
- return key + "__EQUALS__" + value;
- }
-
- public static String[] decode(String encoded)
- {
- String[] foo = encoded.split("__EQUALS__");
- return foo;
- }
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java 2008-06-27 13:08:10 UTC (rev 11170)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java 2008-06-27 14:48:49 UTC (rev 11171)
@@ -42,6 +42,7 @@
import org.jboss.portal.core.model.portal.content.ContentRendererContext;
import org.jboss.portal.core.model.portal.content.WindowRendition;
import org.jboss.portal.identity.User;
+import org.jboss.portal.portlet.ParametersStateString;
import org.jboss.portal.portlet.Portlet;
import org.jboss.portal.portlet.PortletInvokerException;
import org.jboss.portal.portlet.controller.state.PortletWindowNavigationalState;
@@ -237,16 +238,19 @@
}
if (id_parameters != null)
{
- List<String> encodedParams = new ArrayList<String>();
+ List<String> paramNames = new ArrayList<String>();
Iterator<String> params = content.getParameterNames();
+ ParameterMap parameterMap2 = new ParameterMap();
while (params.hasNext())
{
String name = params.next();
String value = content.getParameter(name);
- encodedParams.add(SelectedContent.encode(name, value));
+ parameterMap2.put(id_parameters + "." + name, new String[]{value});
+ paramNames.add(name);
}
+ invocation.setNavigationalState(ParametersStateString.create(parameterMap2));
- parameterMap.put(id_parameters, encodedParams.toArray(new String[encodedParams.size()]));
+ parameterMap.put(id_parameters, paramNames.toArray(new String[paramNames.size()]));
}
invocation.setPublicNavigationalState(parameterMap);
}
Modified: branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/google/GGWidgetPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/google/GGWidgetPortlet.java 2008-06-27 13:08:10 UTC (rev 11170)
+++ branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/google/GGWidgetPortlet.java 2008-06-27 14:48:49 UTC (rev 11171)
@@ -146,14 +146,13 @@
Map<String, String> parametersMap = new HashMap<String, String>();
- String[] parameters = req.getParameterValues("parameters");
- if (parameters != null)
+ String[] parametersNames = req.getParameterValues("parameters");
+ if (parametersNames != null)
{
- for (String encoded: parameters)
+ for (String parameterName: parametersNames)
{
- String[] decodedValue = SelectedContent.decode(encoded);
- String value = (decodedValue.length == 2) ? decodedValue[1] : "";
- parametersMap.put(decodedValue[0], value);
+ String[] value = req.getParameterValues("parameters." + parameterName);
+ parametersMap.put(parameterName, value[0]);
}
}
Modified: branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidgetPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidgetPortlet.java 2008-06-27 13:08:10 UTC (rev 11170)
+++ branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidgetPortlet.java 2008-06-27 14:48:49 UTC (rev 11171)
@@ -188,14 +188,13 @@
Map<String, String> parametersMap = new HashMap<String, String>();
- String[] parameters = req.getParameterValues("parameters");
- if (parameters != null)
+ String[] parametersNames = req.getParameterValues("parameters");
+ if (parametersNames != null)
{
- for (String encoded: parameters)
+ for (String parameterName: parametersNames)
{
- String[] decodedValue = SelectedContent.decode(encoded);
- String value = (decodedValue.length == 2) ? decodedValue[1] : "";
- parametersMap.put(decodedValue[0], value);
+ String[] value = req.getParameterValues("parameters." + parameterName);
+ parametersMap.put(parameterName, value[0]);
}
}
17 years, 10 months
JBoss Portal SVN: r11170 - in branches/JBoss_Portal_Branch_2_7: core-identity/src/resources/portal-identity-sar/conf/processes and 2 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-06-27 09:08:10 -0400 (Fri, 27 Jun 2008)
New Revision: 11170
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/identity-ui-configuration.xml
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/processes/jbp_identity_validate_email.xml
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/processes/jbp_identity_validation_approval_workflow.xml
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/processes/jbp_identity_validation_workflow.xml
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/WEB-INF/portlet.xml
branches/JBoss_Portal_Branch_2_7/workflow/src/resources/portal-workflow-sar/META-INF/jboss-service.xml
Log:
Put back the timers, still need a process to regularly cleanup
Modified: branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/identity-ui-configuration.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/identity-ui-configuration.xml 2008-06-27 13:06:21 UTC (rev 11169)
+++ branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/identity-ui-configuration.xml 2008-06-27 13:08:10 UTC (rev 11170)
@@ -30,7 +30,7 @@
- jbp_identity_validation_workflow: Email verification, No admin approval
- jbp_identity_validation_approval_workflow: Email verification, Admin approval
-->
- <subscription-mode>automatic</subscription-mode>
+ <subscription-mode>jbp_identity_validation_approval_workflow</subscription-mode>
<!--
overwrite-workflow: overwrites existing process definitions
-->
Modified: branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/processes/jbp_identity_validate_email.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/processes/jbp_identity_validate_email.xml 2008-06-27 13:06:21 UTC (rev 11169)
+++ branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/processes/jbp_identity_validate_email.xml 2008-06-27 13:08:10 UTC (rev 11170)
@@ -31,9 +31,7 @@
</transition>
</start-state>
<state name="validate_email">
- <!--
<timer name="time_to_expire" duedate="2 days" transition="timedOut" />
- -->
<transition name="validated" to="end">
<action class="org.jboss.portal.core.identity.services.workflow.impl.UpdateEmailAction"/>
</transition>
Modified: branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/processes/jbp_identity_validation_approval_workflow.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/processes/jbp_identity_validation_approval_workflow.xml 2008-06-27 13:06:21 UTC (rev 11169)
+++ branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/processes/jbp_identity_validation_approval_workflow.xml 2008-06-27 13:08:10 UTC (rev 11170)
@@ -31,9 +31,7 @@
</transition>
</start-state>
<state name="validate_email">
- <!--
<timer name="time_to_expire" duedate="2 days" transition="timedOut" />
- -->
<transition name="validated" to="admin_approval"/>
<transition name="timedOut" to="end"/>
</state>
Modified: branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/processes/jbp_identity_validation_workflow.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/processes/jbp_identity_validation_workflow.xml 2008-06-27 13:06:21 UTC (rev 11169)
+++ branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/processes/jbp_identity_validation_workflow.xml 2008-06-27 13:08:10 UTC (rev 11170)
@@ -31,9 +31,7 @@
</transition>
</start-state>
<state name="validate_email">
- <!--
<timer name="time_to_expire" duedate="2 days" transition="timedOut" />
- -->
<transition name="validated" to="end">
<action class="org.jboss.portal.core.identity.services.workflow.impl.CreateUserAction"/>
</transition>
Modified: branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/WEB-INF/portlet.xml 2008-06-27 13:06:21 UTC (rev 11169)
+++ branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/WEB-INF/portlet.xml 2008-06-27 13:08:10 UTC (rev 11170)
@@ -68,7 +68,7 @@
<preference>
<!-- Use captcha verification -->
<name>captcha</name>
- <value>false</value>
+ <value>true</value>
</preference>
<preference>
<!--
Modified: branches/JBoss_Portal_Branch_2_7/workflow/src/resources/portal-workflow-sar/META-INF/jboss-service.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/workflow/src/resources/portal-workflow-sar/META-INF/jboss-service.xml 2008-06-27 13:06:21 UTC (rev 11169)
+++ branches/JBoss_Portal_Branch_2_7/workflow/src/resources/portal-workflow-sar/META-INF/jboss-service.xml 2008-06-27 13:08:10 UTC (rev 11170)
@@ -55,8 +55,8 @@
<![CDATA[
<jbpm-configuration>
<jbpm-context>
- <service name="persistence" factory="org.jbpm.persistence.db.DbPersistenceServiceFactory" />
- <!--service name="scheduler" factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" /-->
+ <service name="persistence" factory="org.jbpm.persistence.jta.JtaDbPersistenceServiceFactory" />
+ <service name="scheduler" factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" />
<service name="message" factory="org.jbpm.msg.db.DbMessageServiceFactory" />
<service name="tx" factory="org.jbpm.tx.TxServiceFactory"/>
</jbpm-context>
17 years, 10 months
JBoss Portal SVN: r11169 - in branches/JBoss_Portal_Branch_2_7: core/src/resources/portal-core-war/WEB-INF and 4 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-06-27 09:06:21 -0400 (Fri, 27 Jun 2008)
New Revision: 11169
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/common/PageManagerBean.java
branches/JBoss_Portal_Branch_2_7/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSContentEditorPortlet.java
branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/basic/FSContentDrivenPortlet.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/ui/content/portlet/PortletContentEditorPortlet.java
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-war/WEB-INF/portlet.xml
Log:
Imrpove content selectors
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/ui/content/portlet/PortletContentEditorPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/ui/content/portlet/PortletContentEditorPortlet.java 2008-06-27 12:08:04 UTC (rev 11168)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/ui/content/portlet/PortletContentEditorPortlet.java 2008-06-27 13:06:21 UTC (rev 11169)
@@ -104,8 +104,13 @@
protected void getContent(RenderRequest req, RenderResponse resp, boolean newContent) throws PortletException, PortletSecurityException, IOException
{
- String selectedURI = req.getParameter(CONTENT_URI);
-
+ String selectedURI = req.getParameter("current_uri");
+ if (selectedURI == null)
+ {
+ // Get the uri value optionally provided by the portal
+ selectedURI = req.getParameter("uri");
+ }
+
//
resp.setContentType("text/html");
PrintWriter writer = resp.getWriter();
Modified: branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-war/WEB-INF/portlet.xml 2008-06-27 12:08:04 UTC (rev 11168)
+++ branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-war/WEB-INF/portlet.xml 2008-06-27 13:06:21 UTC (rev 11169)
@@ -43,6 +43,7 @@
<keywords>management,admin</keywords>
</portlet-info>
<supported-publishing-event xmlns:x="urn:jboss:portal:content">x:select</supported-publishing-event>
+ <supported-public-render-parameter>uri</supported-public-render-parameter>
</portlet>
<user-attribute>
<name>user.name.nickName</name>
@@ -57,9 +58,14 @@
<name>user.name.family</name>
</user-attribute>
- <event-definition>
- <qname xmlns:x="urn:jboss:portal:content">x:select</qname>
- <value-type>java.lang.String</value-type>
- </event-definition>
+ <event-definition>
+ <qname xmlns:x="urn:jboss:portal:content">x:select</qname>
+ <value-type>java.lang.String</value-type>
+ </event-definition>
+ <public-render-parameter>
+ <identifier>uri</identifier>
+ <qname xmlns:c="urn:jboss:portal:content">c:uri</qname>
+ </public-render-parameter>
+
</portlet-app>
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2008-06-27 12:08:04 UTC (rev 11168)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2008-06-27 13:06:21 UTC (rev 11169)
@@ -61,7 +61,6 @@
import org.jboss.portal.core.model.portal.PortalObjectPath;
import org.jboss.portal.core.model.portal.PortalObjectPermission;
import org.jboss.portal.core.model.portal.Window;
-import org.jboss.portal.faces.component.portlet.PortletActionEvent;
import org.jboss.portal.faces.component.portlet.PortletEventEvent;
import org.jboss.portal.identity.RoleModule;
import org.jboss.portal.portlet.Portlet;
@@ -82,9 +81,6 @@
/** The serialVersionUID */
private static final long serialVersionUID = -8923517554726982622L;
- /** . */
- private static final String CONTENT_URI = "content.uri";
-
private static final QName CONTENT_SELECT = new QName("urn:jboss:portal:content", "select");
// Configuration
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/common/PageManagerBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/common/PageManagerBean.java 2008-06-27 12:08:04 UTC (rev 11168)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/common/PageManagerBean.java 2008-06-27 13:06:21 UTC (rev 11169)
@@ -35,7 +35,6 @@
import org.jboss.portal.core.model.portal.Page;
import org.jboss.portal.core.model.portal.PortalObject;
import org.jboss.portal.core.model.portal.Window;
-import org.jboss.portal.faces.component.portlet.PortletActionEvent;
import org.jboss.portal.faces.component.portlet.PortletEventEvent;
import org.jboss.portal.faces.component.portlet.PortletRenderEvent;
import org.jboss.portal.faces.el.PropertyValue;
@@ -71,18 +70,6 @@
public class PageManagerBean
{
- /** . */
- private static final String CONTENT_ACTION_SELECT = "content.action.select";
-
- /** . */
- private static final String CONTENT_URI = "content.uri";
-
- /** . */
- private static final String CONTENT_PARAM_PREFIX = "content.param.";
-
- /** . */
- private static final int CONTENT_PARAM_PREFIX_LENGTH = CONTENT_PARAM_PREFIX.length();
-
private static final QName CONTENT_SELECT = new QName("urn:jboss:portal:content", "select");
/** . */
@@ -103,7 +90,7 @@
this.layoutService = layoutService;
this.portletInvoker = portletInvoker;
this.selectedContentType = ContentType.PORTLET;
- this.selectedRenderParameters = new HashMap();
+ this.selectedRenderParameters = new HashMap<String, String>();
}
/** . */
@@ -431,50 +418,6 @@
}
}
}
- /*
- else if (event instanceof PortletActionEvent)
- {
- PortletActionEvent actionEvent = (PortletActionEvent)event;
- Map actionParams = actionEvent.getParameterMap();
-*/
- /*
- // Keep window name and region defined
- String[] windowNames = ((String[])actionParams.get("windowName"));
- if (windowNames != null && windowNames.length > 0)
- {
- setWindowName(windowNames[0]);
- }
- */
- /*
- //
- if (actionParams.get(CONTENT_ACTION_SELECT) != null)
- {
- String[] uris = (String[])actionParams.get(CONTENT_URI);
- if (uris != null && uris.length > 0)
- {
- String uri = uris[0];
-
- //
- Map parameters = new HashMap();
- for (Iterator i = actionParams.entrySet().iterator(); i.hasNext();)
- {
- Map.Entry entry = (Map.Entry)i.next();
- String name = (String)entry.getKey();
- if (name.startsWith(CONTENT_PARAM_PREFIX))
- {
- String paramName = name.substring(CONTENT_PARAM_PREFIX_LENGTH);
- String paramValue = ((String[])entry.getValue())[0];
- parameters.put(paramName, paramValue);
- }
- }
-
- //
- this.selectedContentURI = uri;
- this.selectedContentParameters = parameters;
- }
- }
- */
-// }
}
/** Return the <Region>List on the selected object which must be a page. */
Modified: branches/JBoss_Portal_Branch_2_7/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSContentEditorPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSContentEditorPortlet.java 2008-06-27 12:08:04 UTC (rev 11168)
+++ branches/JBoss_Portal_Branch_2_7/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSContentEditorPortlet.java 2008-06-27 13:06:21 UTC (rev 11169)
@@ -111,6 +111,12 @@
String sPath = req.getParameter("path");
String contentUri = req.getParameter("content.uri");
+ if (contentUri == null)
+ {
+ // Get the uri value optionally provided by the portal
+ contentUri = req.getParameter("uri");
+ }
+
if (sPath == null)
{
sPath = "/";
Modified: branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/basic/FSContentDrivenPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/basic/FSContentDrivenPortlet.java 2008-06-27 12:08:04 UTC (rev 11168)
+++ branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/basic/FSContentDrivenPortlet.java 2008-06-27 13:06:21 UTC (rev 11169)
@@ -50,6 +50,7 @@
* <p>Content URI is defined as the canonical path of the file relative to the war file context root.</p>
*
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
* @version $Revision: 1.1 $
*/
public class FSContentDrivenPortlet extends GenericPortlet
@@ -58,6 +59,7 @@
/** The edit_content mode. */
public static final PortletMode EDIT_CONTENT_MODE = new PortletMode("edit_content");
+ /** The QName of the event for the portal */
private static final QName CONTENT_SELECT = new QName("urn:jboss:portal:content", "select");
@@ -77,15 +79,20 @@
/** Implements the edit content functionnality. */
protected void doEditContent(RenderRequest req, RenderResponse resp) throws PortletException, PortletSecurityException, IOException
{
-
- // Get the uri value optionally provided by the portal
- String uri = req.getParameter("content.uri");
+ String uri = req.getParameter("current_uri");
+ if (uri == null)
+ {
+ // Get the uri value optionally provided by the portal
+ uri = req.getParameter("uri");
+ }
// Get the working directory directory
- File workingDir;
+ File workingDir = null;
+ String currentFileName = null;
if (uri != null)
{
workingDir = getFile(uri).getParentFile();
+ currentFileName = getFile(uri).getName();
}
else
{
@@ -132,14 +139,20 @@
writer.print("Files:<br/>");
writer.print("<ul>");
PortletURL selectFileURL = resp.createActionURL();
- selectFileURL.setParameter("content.action.select", "select");
for (int i = 0; i < children.length; i++)
{
File child = children[i];
if (child.isFile())
{
- selectFileURL.setParameter("content.uri", getContentURI(child));
- writer.print("<li><a href=\"" + selectFileURL + "\">" + child.getName() + "</a></li>");
+ selectFileURL.setParameter("current_uri", getContentURI(child));
+ if (child.getName().equals(currentFileName))
+ {
+ writer.print("<li><b>" + child.getName() + "</b></li>");
+ }
+ else
+ {
+ writer.print("<li><a href=\"" + selectFileURL + "\">" + child.getName() + "</a></li>");
+ }
}
}
writer.print("</ul><br/>");
@@ -198,12 +211,14 @@
{
if (EDIT_CONTENT_MODE.equals(req.getPortletMode()))
{
- String contentURI = req.getParameter("content.uri");
+ String contentURI = req.getParameter("current_uri");
// We just propagate the content URI as a render parameter for the doEditContent method
if (contentURI != null)
{
- resp.setRenderParameter("content.uri", contentURI);
+ resp.setRenderParameter("current_uri", contentURI);
+
+ // Tell the portal which URI has been selected by the user
resp.setEvent(CONTENT_SELECT, contentURI);
}
}
17 years, 10 months
JBoss Portal SVN: r11168 - in branches/JBoss_Portal_Branch_2_7: core/src/main/org/jboss/portal/core/impl/model/content/generic and 7 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-06-27 08:08:04 -0400 (Fri, 27 Jun 2008)
New Revision: 11168
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/common/PageManagerBean.java
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editWindow.xhtml
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/AbstractContent.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/portal/WindowImpl.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/content/Content.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/content/spi/handler/ContentState.java
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java
Log:
Fixing content framework some more
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/AbstractContent.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/AbstractContent.java 2008-06-27 10:57:35 UTC (rev 11167)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/AbstractContent.java 2008-06-27 12:08:04 UTC (rev 11168)
@@ -26,6 +26,7 @@
import org.jboss.portal.core.model.content.spi.handler.ContentState;
import java.util.Iterator;
+import java.util.Map;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -72,6 +73,11 @@
state.setParameter(name, value);
}
+ public void setParameters(Map<String, String> parameters) throws IllegalArgumentException
+ {
+ state.setParameters(parameters);
+ }
+
public Iterator<String> getParameterNames()
{
return state.getParameterNames();
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java 2008-06-27 10:57:35 UTC (rev 11167)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java 2008-06-27 12:08:04 UTC (rev 11168)
@@ -210,19 +210,17 @@
PortletInfo portletInfo = portlet.getInfo();
NavigationInfo navigationInfo = portletInfo.getNavigation();
- // todo : use instead of loop (waiting for new version of PC 2.0 that has the method):
- //id = navigationInfo.getPublicParameter(CoreConstants.JBOSS_PORTAL_CONTENT_URI);
- for (ParameterInfo parameterInfo : navigationInfo.getPublicParameters())
+ ParameterInfo parameterInfo = navigationInfo.getPublicParameter(CoreConstants.JBOSS_PORTAL_CONTENT_URI);
+ if (parameterInfo != null)
{
- if (parameterInfo.getName().equals(CoreConstants.JBOSS_PORTAL_CONTENT_URI))
- {
- id_uri = parameterInfo.getId();
- }
- if (parameterInfo.getName().equals(CoreConstants.JBOSS_PORTAL_CONTENT_PARAMETERS))
- {
- id_parameters = parameterInfo.getId();
- }
+ id_uri = parameterInfo.getId();
}
+
+ parameterInfo = navigationInfo.getPublicParameter(CoreConstants.JBOSS_PORTAL_CONTENT_PARAMETERS);
+ if (parameterInfo != null)
+ {
+ id_parameters = parameterInfo.getId();
+ }
}
catch (PortletInvokerException e)
{
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java 2008-06-27 10:57:35 UTC (rev 11167)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java 2008-06-27 12:08:04 UTC (rev 11168)
@@ -62,7 +62,7 @@
private Long key;
/** . */
- private Map declaredPropertyMap;
+ private Map<String, String> declaredPropertyMap;
/** . */
private String listener;
@@ -477,17 +477,17 @@
return unmodifiableProperties;
}
- public Map getDeclaredPropertyMap()
+ public Map<String, String> getDeclaredPropertyMap()
{
return declaredPropertyMap;
}
- public void setDeclaredPropertyMap(Map properties)
+ public void setDeclaredPropertyMap(Map<String, String> properties)
{
this.declaredPropertyMap = properties;
}
- public Map getDeclaredProperties()
+ public Map<String, String> getDeclaredProperties()
{
return Collections.unmodifiableMap(declaredPropertyMap);
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/portal/WindowImpl.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/portal/WindowImpl.java 2008-06-27 10:57:35 UTC (rev 11167)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/portal/WindowImpl.java 2008-06-27 12:08:04 UTC (rev 11168)
@@ -35,6 +35,8 @@
import java.util.HashMap;
import java.util.Iterator;
+import java.util.Map;
+import java.util.Map.Entry;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -267,6 +269,15 @@
setDeclaredProperty("content." + name, value);
}
+ public void setParameters(Map<String, String> parameters) throws IllegalArgumentException
+ {
+ clearParameters();
+ for (Entry<String, String> entry: parameters.entrySet())
+ {
+ setParameter(entry.getKey(), entry.getValue());
+ }
+ }
+
public String getParameter(String name) throws IllegalArgumentException
{
return getDeclaredProperty("content." + name);
@@ -274,7 +285,7 @@
public void clearParameters()
{
- for (Iterator i = getDeclaredProperties().keySet().iterator(); i.hasNext();)
+ for (Iterator<String> i = getDeclaredProperties().keySet().iterator(); i.hasNext();)
{
String propertyName = (String)i.next();
if (propertyName.startsWith("content."))
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/content/Content.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/content/Content.java 2008-06-27 10:57:35 UTC (rev 11167)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/content/Content.java 2008-06-27 12:08:04 UTC (rev 11168)
@@ -25,6 +25,7 @@
import org.jboss.portal.common.i18n.LocalizedString;
import java.util.Iterator;
+import java.util.Map;
/**
* Defines the base interface for content.
@@ -67,6 +68,8 @@
void setParameter(String name, String value) throws IllegalArgumentException;
+ void setParameters(Map<String, String> parameters) throws IllegalArgumentException;
+
String getParameter(String name) throws IllegalArgumentException;
void clearParameters();
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/content/spi/handler/ContentState.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/content/spi/handler/ContentState.java 2008-06-27 10:57:35 UTC (rev 11167)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/content/spi/handler/ContentState.java 2008-06-27 12:08:04 UTC (rev 11168)
@@ -23,6 +23,7 @@
package org.jboss.portal.core.model.content.spi.handler;
import java.util.Iterator;
+import java.util.Map;
/**
* Represents the state of the content which consist in an URI and a set of properties.
@@ -50,6 +51,8 @@
void setParameter(String name, String value) throws IllegalArgumentException;
+ void setParameters(Map<String, String> parameters) throws IllegalArgumentException;
+
String getParameter(String name) throws IllegalArgumentException;
void clearParameters();
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2008-06-27 10:57:35 UTC (rev 11167)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2008-06-27 12:08:04 UTC (rev 11168)
@@ -38,7 +38,10 @@
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
import javax.faces.model.SelectItem;
+import javax.xml.namespace.QName;
+import org.jboss.portal.api.content.SelectedContent;
+import org.jboss.portal.core.CoreConstants;
import org.jboss.portal.core.admin.ui.actions.AddPageAction;
import org.jboss.portal.core.admin.ui.actions.PropertyAction;
import org.jboss.portal.core.admin.ui.common.PageManagerBean;
@@ -59,8 +62,13 @@
import org.jboss.portal.core.model.portal.PortalObjectPermission;
import org.jboss.portal.core.model.portal.Window;
import org.jboss.portal.faces.component.portlet.PortletActionEvent;
+import org.jboss.portal.faces.component.portlet.PortletEventEvent;
import org.jboss.portal.identity.RoleModule;
+import org.jboss.portal.portlet.Portlet;
import org.jboss.portal.portlet.PortletInvoker;
+import org.jboss.portal.portlet.info.NavigationInfo;
+import org.jboss.portal.portlet.info.ParameterInfo;
+import org.jboss.portal.portlet.invocation.response.UpdateNavigationalStateResponse.Event;
import org.jboss.portal.security.RoleSecurityBinding;
import org.jboss.portal.security.SecurityConstants;
import org.jboss.portal.security.spi.provider.DomainConfigurator;
@@ -77,6 +85,8 @@
/** . */
private static final String CONTENT_URI = "content.uri";
+ private static final QName CONTENT_SELECT = new QName("urn:jboss:portal:content", "select");
+
// Configuration
/** . */
@@ -123,7 +133,7 @@
private Map selectedContentParameters = new HashMap();
/** . */
- private Map renderParameters;
+ private Map<String, String[]> renderParameters;
// Runtime state
@@ -490,7 +500,7 @@
{
PortalObjectId poid = getSelectedPortalObjectId();
- Map pmap = getRequestParameterMap();
+ Map<String, String> pmap = getRequestParameterMap();
maximizedStateExists = Boolean.valueOf((String)pmap.get("maximizedStateExists"));
PortalObject object = portalObjectContainer.getObject(poid);
@@ -515,8 +525,17 @@
Content content = window.getContent();
if (content != null)
{
- renderParameters = new HashMap();
- renderParameters.put(CONTENT_URI, new String[]{content.getURI()});
+ renderParameters = new HashMap<String, String[]>();
+
+ Portlet portlet = instanceContainer.getDefinition(getSelectedContentEditorInstance()).getPortlet();
+
+ NavigationInfo navigationInfo = portlet.getInfo().getNavigation();
+
+ ParameterInfo parameterInfo = navigationInfo.getPublicParameter(CoreConstants.JBOSS_PORTAL_CONTENT_URI);
+ if (parameterInfo != null)
+ {
+ renderParameters.put(parameterInfo.getId(), new String[]{content.getURI()});
+ }
}
break;
}
@@ -534,7 +553,7 @@
private PortalObjectId getSelectedPortalObjectId()
{
// Get id
- Map pmap = getRequestParameterMap();
+ Map<String, String> pmap = getRequestParameterMap();
String id = (String)pmap.get("id");
// Set the state from the id
@@ -544,11 +563,11 @@
public void selectPlugin()
{
// Get plugin
- Map pmap = getRequestParameterMap();
+ Map<String, String> pmap = getRequestParameterMap();
selectedPlugin = (String)pmap.get("plugin");
}
- public Map getRequestParameterMap()
+ public Map<String, String> getRequestParameterMap()
{
return FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
}
@@ -709,16 +728,18 @@
public void processEvent(ActionEvent event)
{
- if (event instanceof PortletActionEvent)
+ if (event instanceof PortletEventEvent)
{
- PortletActionEvent actionEvent = (PortletActionEvent)event;
- Map actionParams = actionEvent.getParameterMap();
- if (actionParams.get("content.action.select") != null)
+ PortletEventEvent eventEvent = (PortletEventEvent)event;
+ Event portletEvent = eventEvent.getEvent();
+ QName name = portletEvent.getName();
+ // only react to content selection events
+ if(CONTENT_SELECT.equals(name))
{
- String[] uris = (String[])actionParams.get(CONTENT_URI);
- if (uris != null && uris.length > 0)
+ if (portletEvent.getPayload() instanceof String)
{
- String uri = uris[0];
+ String uri = (String)portletEvent.getPayload();
+
PortalObject po = getSelectedObject();
switch (po.getType())
{
@@ -731,6 +752,25 @@
}
}
}
+ else if (portletEvent.getPayload() instanceof SelectedContent)
+ {
+ SelectedContent selectedContent = (SelectedContent)portletEvent.getPayload();
+ String uri= selectedContent.getUri();
+ Map<String, String> parameters = selectedContent.getParameters();
+
+ PortalObject po = getSelectedObject();
+ switch (po.getType())
+ {
+ case PortalObject.TYPE_WINDOW:
+ {
+ Window window = (Window)po;
+ window.getContent().setURI(uri);
+ window.getContent().setParameters(parameters);
+ selectParentObject(event);
+ break;
+ }
+ }
+ }
}
}
}
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/common/PageManagerBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/common/PageManagerBean.java 2008-06-27 10:57:35 UTC (rev 11167)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/common/PageManagerBean.java 2008-06-27 12:08:04 UTC (rev 11168)
@@ -431,11 +431,12 @@
}
}
}
+ /*
else if (event instanceof PortletActionEvent)
{
PortletActionEvent actionEvent = (PortletActionEvent)event;
Map actionParams = actionEvent.getParameterMap();
-
+*/
/*
// Keep window name and region defined
String[] windowNames = ((String[])actionParams.get("windowName"));
@@ -473,7 +474,7 @@
}
}
*/
- }
+// }
}
/** Return the <Region>List on the selected object which must be a page. */
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editWindow.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editWindow.xhtml 2008-06-27 10:57:35 UTC (rev 11167)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editWindow.xhtml 2008-06-27 12:08:04 UTC (rev 11168)
@@ -20,7 +20,8 @@
supportedModes="edit_content"
supportedWindowStates="normal"
initialMode="edit_content"
- initialWindowState="normal"/>
+ initialWindowState="normal"
+ />
</div>
</ui:define>
Modified: branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java 2008-06-27 10:57:35 UTC (rev 11167)
+++ branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java 2008-06-27 12:08:04 UTC (rev 11168)
@@ -554,85 +554,81 @@
writer.write(fragment.getContent());
writer.endElement("div");
- //
- if (getOnClick() != null)
- {
- writer.startElement("script", this);
- writer.write(
+ writer.startElement("script", this);
+ writer.write(
"var isIE = /msie/i.test(navigator.userAgent);\n" +
- "function attachEvent(elm, eventName, eventHandler) {\n" +
- " if (isIE) {\n" +
- " elm.attachEvent(\"on\" + eventName, eventHandler);\n" +
- " } else {\n" +
- " elm.addEventListener(eventName, eventHandler, false);\n" +
- " }\n" +
- "}\n" +
+ "function attachEvent(elm, eventName, eventHandler) {\n" +
+ " if (isIE) {\n" +
+ " elm.attachEvent(\"on\" + eventName, eventHandler);\n" +
+ " } else {\n" +
+ " elm.addEventListener(eventName, eventHandler, false);\n" +
+ " }\n" +
+ "}\n" +
- "function getEventTarget(event) {\n" +
- " var targetElement = isIE ? event.srcElement : event.target;\n" +
- " while (targetElement.nodeType == 3 && targetElement.parentNode != null) {\n" +
- " targetElement = targetElement.parentNode;\n" +
- " }\n" +
- " return targetElement;\n" +
- "}\n" +
+ "function getEventTarget(event) {\n" +
+ " var targetElement = isIE ? event.srcElement : event.target;\n" +
+ " while (targetElement.nodeType == 3 && targetElement.parentNode != null) {\n" +
+ " targetElement = targetElement.parentNode;\n" +
+ " }\n" +
+ " return targetElement;\n" +
+ "}\n" +
- "\n" +
+ "\n" +
- "function PortletURL(url) {\n" +
- " this.params = new Object();\n" +
- " this.url = url;\n" +
- " this.setParameter = function(name, value) {;\n" +
- " this.params[name] = value;\n" +
- " return this;\n" +
- " }\n" +
- " this.renderURL = function() {;\n" +
- " var tmp = this.url;\n" +
- " for (var i in this.params) {\n" +
- " tmp = tmp + ('&' + i + '=' + this.params[i]);\n" +
- " };\n" +
- " return tmp;\n" +
- " }\n" +
+ "function PortletURL(url) {\n" +
+ " this.params = new Object();\n" +
+ " this.url = url;\n" +
+ " this.setParameter = function(name, value) {;\n" +
+ " this.params[name] = value;\n" +
+ " return this;\n" +
+ " }\n" +
+ " this.renderURL = function() {;\n" +
+ " var tmp = this.url;\n" +
+ " for (var i in this.params) {\n" +
+ " tmp = tmp + ('&' + i + '=' + this.params[i]);\n" +
+ " };\n" +
+ " return tmp;\n" +
+ " }\n" +
- // Temporary hack for Sun RI which encodes contextual state on the page
- " var viewStateId = document.getElementById('javax.faces.ViewState')\n" +
- " if (viewStateId != null) {\n" +
- " this.params['javax.faces.ViewState'] = viewStateId.value\n" +
- " }\n" +
+ // Temporary hack for Sun RI which encodes contextual state on the page
+ " var viewStateId = document.getElementById('javax.faces.ViewState')\n" +
+ " if (viewStateId != null) {\n" +
+ " this.params['javax.faces.ViewState'] = viewStateId.value\n" +
+ " }\n" +
- "}\n" +
+ "}\n" +
- "function fx(event) {\n" +
- " var target = getEventTarget(event);\n" +
- " if (target.nodeName == 'INPUT' && target.type == 'submit') {\n" +
- " var current = target.parentNode;\n" +
- " while (current.nodeName != 'FORM' && current.nodeName != 'BODY') {\n" +
- " current = current.parentNode;\n" +
- " }\n" +
- " if (current.nodeName == 'FORM') {\n" +
- " var action = current.action;\n" +
- " var portletURL = new PortletURL(action);\n" +
- " (function(url){" + onClick + "})(portletURL);\n" +
- " current.action = portletURL.renderURL();\n" +
- " } else {\n" +
- " // Really can't do nothing for now\n" +
- " }\n" +
- " }\n" +
- " else if (target.nodeName == 'A') {\n" +
- " var href = target.href;\n" +
- " var portletURL = new PortletURL(href);\n" +
- " (function(url){" + onClick + "})(portletURL);\n" +
- " target.href = portletURL.renderURL();\n" +
- " }\n" +
- " \n" +
- "}\n" +
+ "function fx(event) {\n" +
+ " var target = getEventTarget(event);\n" +
+ " if (target.nodeName == 'INPUT' && target.type == 'submit') {\n" +
+ " var current = target.parentNode;\n" +
+ " while (current.nodeName != 'FORM' && current.nodeName != 'BODY') {\n" +
+ " current = current.parentNode;\n" +
+ " }\n" +
+ " if (current.nodeName == 'FORM') {\n" +
+ " var action = current.action;\n" +
+ " var portletURL = new PortletURL(action);\n" +
+ " (function(url){" + onClick + "})(portletURL);\n" +
+ " current.action = portletURL.renderURL();\n" +
+ " } else {\n" +
+ " // Really can't do nothing for now\n" +
+ " }\n" +
+ " }\n" +
+ " else if (target.nodeName == 'A') {\n" +
+ " var href = target.href;\n" +
+ " var portletURL = new PortletURL(href);\n" +
+ " (function(url){" + onClick + "})(portletURL);\n" +
+ " target.href = portletURL.renderURL();\n" +
+ " }\n" +
+ " \n" +
+ "}\n" +
- "var elt = document.getElementById('bilto');\n" +
- "attachEvent(elt, 'click', fx);\n"
- );
- writer.endElement("script");
- }
+ "var elt = document.getElementById('bilto');\n" +
+ "attachEvent(elt, 'click', fx);\n"
+ );
+ writer.endElement("script");
writer.flush();
}
else if (pir instanceof InsufficientPrivilegesResponse){
17 years, 10 months