Author: chris.laprun(a)jboss.com
Date: 2008-02-05 01:12:30 -0500 (Tue, 05 Feb 2008)
New Revision: 9764
Removed:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PageUpdate.java
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller2/ControllerResponseRendererFactory.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/SimplePortalServlet.java
modules/portlet/trunk/test/src/test/build.xml
Log:
- Removed extra PageUpdate class.
- Fixed deployment of simple portal.
Deleted:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PageUpdate.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PageUpdate.java 2008-02-05
04:28:33 UTC (rev 9763)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PageUpdate.java 2008-02-05
06:12:30 UTC (rev 9764)
@@ -1,56 +0,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. *
- ******************************************************************************/
-package org.jboss.portal.portlet.test.controller;
-
-import org.jboss.portal.portlet.invocation.response.ResponseProperties;
-import org.jboss.portal.portlet.test.controller.response.ControllerResponse;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class PageUpdate extends ControllerResponse
-{
-
- /** . */
- private ResponseProperties properties;
-
- /** . */
- private PageNavigationalState pageState;
-
- public PageUpdate(ResponseProperties properties, PageNavigationalState pageState)
- {
- this.properties = properties;
- this.pageState = pageState;
- }
-
- public ResponseProperties getProperties()
- {
- return properties;
- }
-
- public PageNavigationalState getPageState()
- {
- return pageState;
- }
-}
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller2/ControllerResponseRendererFactory.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller2/ControllerResponseRendererFactory.java 2008-02-05
04:28:33 UTC (rev 9763)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller2/ControllerResponseRendererFactory.java 2008-02-05
06:12:30 UTC (rev 9764)
@@ -23,9 +23,9 @@
package org.jboss.portal.portlet.test.controller2;
import org.jboss.portal.portlet.test.controller.response.ControllerResponse;
+import org.jboss.portal.portlet.test.controller.response.ErrorControllerResponse;
import org.jboss.portal.portlet.test.controller.response.PageUpdate;
import org.jboss.portal.portlet.test.controller.response.RedirectControllerResponse;
-import org.jboss.portal.portlet.test.controller.response.ErrorControllerResponse;
import org.jboss.portal.portlet.test.controller.response.ResourceControllerResponse;
/**
@@ -54,6 +54,6 @@
}
//
- return null;
+ throw new IllegalArgumentException("Unknown response type: " +
response);
}
}
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/SimplePortalServlet.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/SimplePortalServlet.java 2008-02-05
04:28:33 UTC (rev 9763)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/SimplePortalServlet.java 2008-02-05
06:12:30 UTC (rev 9764)
@@ -22,11 +22,14 @@
******************************************************************************/
package org.jboss.portal.simple;
+import org.jboss.portal.portlet.invocation.response.ResponseProperties;
+import org.jboss.portal.portlet.test.controller.PageNavigationalState;
+import org.jboss.portal.portlet.test.controller.PortletController;
import org.jboss.portal.portlet.test.controller.response.ControllerResponse;
-import org.jboss.portal.portlet.test.controller.PortletController;
-import org.jboss.portal.portlet.test.controller2.PortletControllerContextImpl;
+import org.jboss.portal.portlet.test.controller.response.PageUpdate;
import org.jboss.portal.portlet.test.controller2.ControllerResponseRenderer;
import org.jboss.portal.portlet.test.controller2.ControllerResponseRendererFactory;
+import org.jboss.portal.portlet.test.controller2.PortletControllerContextImpl;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
@@ -72,13 +75,26 @@
//
PortletController controller = new PortletController();
- //
- ControllerResponse response = controller.process(context.getRequest());
+ if (context.getRequest() != null)
+ {
+ //
+ ControllerResponse response = controller.process(context.getRequest());
- //
- ControllerResponseRenderer renderer =
ControllerResponseRendererFactory.getRenderer(response);
+ //
+ ControllerResponseRenderer renderer =
ControllerResponseRendererFactory.getRenderer(response);
- //
- renderer.render(context);
+ //
+ renderer.render(context);
+ }
+ else
+ {
+ PageUpdate pageUpdate = new PageUpdate(new ResponseProperties(), new
PageNavigationalState());
+
+ //
+ ControllerResponseRenderer renderer =
ControllerResponseRendererFactory.getRenderer(pageUpdate);
+
+ //
+ renderer.render(context);
+ }
}
}
\ No newline at end of file
Modified: modules/portlet/trunk/test/src/test/build.xml
===================================================================
--- modules/portlet/trunk/test/src/test/build.xml 2008-02-05 04:28:33 UTC (rev 9763)
+++ modules/portlet/trunk/test/src/test/build.xml 2008-02-05 06:12:30 UTC (rev 9764)
@@ -626,8 +626,7 @@
home="${test.tomcat-6.home}"
log="${cargo.log.dir}/cargo.${test.id}.shutdown.log"
action="stop">
- <configuration>
- </configuration>
+ <configuration/>
</cargo>
</target>
@@ -639,8 +638,7 @@
<antcall target="tests.remote">
<param name="test.server.name"
value="RemoteTomcat_6_0"/>
</antcall>
- <antcall target="cargo.tomcat-6.stop">
- </antcall>
+ <antcall target="cargo.tomcat-6.stop"/>
</target>
<target name="tests.tomcat-6">
@@ -653,8 +651,7 @@
</target>
<target name="tests.tomcat">
- <antcall target="tests.tomcat-6">
- </antcall>
+ <antcall target="tests.tomcat-6"/>
</target>
<target name="tests.remote">
@@ -687,11 +684,17 @@
<target name="package-simple-portal" depends="prepare_env">
+ <delete dir="${target}/simple-portal"/>
+
<jar jarfile="${target}/portlet-test-lib.jar">
<!--<fileset dir="${target}/test-classes"/>-->
<fileset dir="${target}/classes"/>
</jar>
+ <copy todir="${test.temp.dir}/simple-portal-war">
+ <fileset dir="src/test/resources/simple-portal-war"/>
+ </copy>
+
<!-- simple-portal.war -->
<copy todir="${test.temp.dir}/simple-portal-war/WEB-INF/lib"
flatten="true">
@@ -730,12 +733,26 @@
</copy>
- <jar jarfile="${target}/simple-portal.war">
+ <mkdir dir="${target}/simple-portal"/>
+
+ <jar jarfile="${target}/simple-portal/simple-portal.war">
<fileset dir="${test.temp.dir}/simple-portal-war"/>
- </jar>
+ </jar>
+ <copy todir="${target}/simple-portal" flatten="true">
+ <path>
+ <pathelement path="${dependency.portal-common.jar}"/>
+ <pathelement path="${dependency.portal-web.jar}"/>
+ <pathelement path="${dependency.jsr168api.jar}"/>
+ </path>
+ </copy>
+
<delete file="${target}/portlet-test-lib.jar"/>
</target>
+ <!--<target name="package-demo-portlets"
depends="prepare_env">
+ <copy
+ </target>-->
+
</project>
\ No newline at end of file