[jboss-svn-commits] JBoss Portal SVN: r5304 - in trunk/theme: . src/bin src/bin/test src/main/org/jboss/portal/test/theme/servlet src/resources src/resources/test/theme-test-war/WEB-INF
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Oct 2 11:30:42 EDT 2006
Author: roy.russo at jboss.com
Date: 2006-10-02 11:30:39 -0400 (Mon, 02 Oct 2006)
New Revision: 5304
Added:
trunk/theme/src/bin/test/
trunk/theme/src/bin/test/theme-test-war/
trunk/theme/src/main/org/jboss/portal/test/theme/servlet/TestThemeServlet.java
trunk/theme/src/resources/test/theme-test-war/WEB-INF/jboss-web.xml
Removed:
trunk/theme/src/resources/test-portal-ajax-war/
Modified:
trunk/theme/
trunk/theme/build.xml
trunk/theme/src/resources/test/theme-test-war/WEB-INF/portal-layouts.xml
trunk/theme/src/resources/test/theme-test-war/WEB-INF/portal-themes.xml
trunk/theme/src/resources/test/theme-test-war/WEB-INF/web.xml
Log:
JBPORTAL-1009 - adding theme test structure
Property changes on: trunk/theme
___________________________________________________________________
Name: svn:ignore
- output
+ output
tests.log
Modified: trunk/theme/build.xml
===================================================================
--- trunk/theme/build.xml 2006-09-30 20:33:16 UTC (rev 5303)
+++ trunk/theme/build.xml 2006-10-02 15:30:39 UTC (rev 5304)
@@ -201,12 +201,12 @@
<!-- ================================================================== -->
<!-- Packages all the test related artifacts. Note that compilation should have be-->
- <target name="package-tests" depends="package-ajax-test"
- description="Packages all the test-related artifacts. Does NOT compile classes so this should be done before
- calling this task.">
+ <target name="package-tests" depends="compile-test"
+ description="Packages all the test-related artifacts. Does NOT compile classes so this should be done before calling this task.">
<jar jarfile="${build.lib}/theme-test.war">
- <fileset dir="${source.bin}/portal-ajax-war" includes="js"/>
+ <fileset dir="${source.bin}/portal-ajax-war" includes="js/portal/*"/>
+ <fileset dir="${source.bin}/test/theme-test-war"/>
<fileset dir="${build.resources}/test/theme-test-war"/>
</jar>
<jar jarfile="${build.lib}/theme-test.sar">
@@ -217,28 +217,29 @@
<fileset dir="${jboss.portal-jems.root}/lib" includes="portal-jems-lib.jar"/>
<fileset dir="${jboss.portlet-api.root}/lib" includes="portal-api-lib.jar"/>
<fileset dir="${jboss.portal-theme.root}/lib" includes="portal-theme-lib.jar"/>
+ <fileset dir="${build.lib}" includes="portal-theme-test-lib.jar"/>
</jar>
</target>
- <!-- AJAX tests -->
- <target name="package-ajax-test" description="Generate the AJAX test artifacts" depends="init">
+ <target name="compile-test" description="Generate the theme test artifacts" depends="init">
<jar jarfile="${build.lib}/portal-theme-test-lib.jar">
<fileset dir="${build.classes}" includes="org/jboss/portal/test/**"/>
</jar>
- <copy todir="${build.resources}/test-portal-ajax-war/WEB-INF/lib">
- <fileset dir="${build.lib}/" includes="portal-theme-test-lib.jar"/>
- </copy>
+ <!--
+ <copy todir="${build.resources}/test-portal-ajax-war/WEB-INF/lib">
+ <fileset dir="${build.lib}/" includes="portal-theme-test-lib.jar"/>
+ </copy>
- <!-- copy reusable javascript libraries -->
- <copy todir="${build.resources}/test-portal-ajax-war/js">
- <fileset dir="${source.bin}/portal-ajax-war/js/portal"/>
- </copy>
+ <copy todir="${build.resources}/test-portal-ajax-war/js">
+ <fileset dir="${source.bin}/portal-ajax-war/js/portal"/>
+ </copy>
- <jar jarfile="${build.lib}/test-portal-ajax.war">
- <fileset dir="${build.resources}/test-portal-ajax-war"/>
- <fileset dir="${source.bin}/test-portal-ajax-war"/>
- </jar>
+ <jar jarfile="${build.lib}/test-portal-ajax.war">
+ <fileset dir="${build.resources}/test-portal-ajax-war"/>
+ <fileset dir="${source.bin}/test-portal-ajax-war"/>
+ </jar>
+ -->
</target>
<target name="tests" depends="init">
Added: trunk/theme/src/main/org/jboss/portal/test/theme/servlet/TestThemeServlet.java
===================================================================
--- trunk/theme/src/main/org/jboss/portal/test/theme/servlet/TestThemeServlet.java 2006-09-30 20:33:16 UTC (rev 5303)
+++ trunk/theme/src/main/org/jboss/portal/test/theme/servlet/TestThemeServlet.java 2006-10-02 15:30:39 UTC (rev 5304)
@@ -0,0 +1,82 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.jboss.portal.test.theme.servlet;
+
+import org.jboss.portal.theme.LayoutService;
+import org.jboss.portal.theme.ThemeService;
+import org.jboss.portal.theme.impl.LayoutServiceImpl;
+import org.jboss.portal.theme.impl.ThemeServiceImpl;
+import org.jboss.portal.theme.impl.page.PageServiceImpl;
+import org.jboss.portal.theme.page.PageService;
+import org.jboss.system.ServiceMBeanSupport;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:roy at jboss.org">Roy Russo</a>
+ */
+
+public class TestThemeServlet extends HttpServlet
+{
+ LayoutService layoutService;
+ ThemeService themeService;
+ PageService pageService;
+
+ public void init()
+ {
+ try
+ {
+ layoutService = new LayoutServiceImpl();
+ ((ServiceMBeanSupport) layoutService).create();
+ ((ServiceMBeanSupport) layoutService).start();
+
+ themeService = new ThemeServiceImpl();
+ ((ServiceMBeanSupport) themeService).create();
+ ((ServiceMBeanSupport) themeService).start();
+
+ pageService = new PageServiceImpl();
+ pageService.setLayoutService(layoutService);
+ pageService.setThemeService(themeService);
+ ((ServiceMBeanSupport) pageService).create();
+ ((ServiceMBeanSupport) pageService).start();
+ }
+ catch(Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ public void doGet(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws ServletException, IOException
+ {
+
+ }
+
+ public void doPost(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws ServletException, IOException
+ {
+ doGet(httpServletRequest, httpServletResponse);
+ }
+}
Added: trunk/theme/src/resources/test/theme-test-war/WEB-INF/jboss-web.xml
===================================================================
--- trunk/theme/src/resources/test/theme-test-war/WEB-INF/jboss-web.xml 2006-09-30 20:33:16 UTC (rev 5303)
+++ trunk/theme/src/resources/test/theme-test-war/WEB-INF/jboss-web.xml 2006-10-02 15:30:39 UTC (rev 5304)
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<jboss-web>
+</jboss-web>
\ No newline at end of file
Modified: trunk/theme/src/resources/test/theme-test-war/WEB-INF/portal-layouts.xml
===================================================================
--- trunk/theme/src/resources/test/theme-test-war/WEB-INF/portal-layouts.xml 2006-09-30 20:33:16 UTC (rev 5303)
+++ trunk/theme/src/resources/test/theme-test-war/WEB-INF/portal-layouts.xml 2006-10-02 15:30:39 UTC (rev 5304)
@@ -1,25 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<layouts>
-<!--
+ <!--
+ <layout>
+ <name>nodesk</name>
+ <uri>/nodesk/index.jsp</uri>
+ <uri state="maximized">/nodesk/index.jsp</uri>
+ <regions>
+ <region name="left"/>
+ <region name="center"/>
+ </regions>
+ </layout>
+ <layout>
+ <name>phalanx</name>
+ <uri>/phalanx/index.jsp</uri>
+ <uri state="maximized">/phalanx/index.jsp</uri>
+ <regions>
+ <region name="left"/>
+ <region name="center"/>
+ </regions>
+ </layout>
+ -->
<layout>
- <name>nodesk</name>
- <uri>/nodesk/index.jsp</uri>
- <uri state="maximized">/nodesk/index.jsp</uri>
- <regions>
- <region name="left"/>
- <region name="center"/>
- </regions>
- </layout>
- <layout>
- <name>phalanx</name>
- <uri>/phalanx/index.jsp</uri>
- <uri state="maximized">/phalanx/index.jsp</uri>
- <regions>
- <region name="left"/>
- <region name="center"/>
- </regions>
- </layout>
- <layout>
<name>generic</name>
<uri>/layouts/generic/index.jsp</uri>
<uri state="maximized">/layouts/generic/maximized.jsp</uri>
@@ -29,5 +30,4 @@
<region name="navigation"/>
</regions>
</layout>
--->
</layouts>
Modified: trunk/theme/src/resources/test/theme-test-war/WEB-INF/portal-themes.xml
===================================================================
--- trunk/theme/src/resources/test/theme-test-war/WEB-INF/portal-themes.xml 2006-09-30 20:33:16 UTC (rev 5303)
+++ trunk/theme/src/resources/test/theme-test-war/WEB-INF/portal-themes.xml 2006-10-02 15:30:39 UTC (rev 5304)
@@ -1,31 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<themes>
-<!--
+ <!--
+ <theme>
+ <name>industrial</name>
+ <link rel="stylesheet" id="main_css" href="/themes/industrial/portal_style.css" type="text/css" />
+ <link rel="shortcut icon" href="/themes/industrial/images/favicon.ico" />
+ </theme>
+ <theme>
+ <name>Nphalanx</name>
+ <link rel="stylesheet" id="main_css" href="/themes/phalanx/portal_style.css" type="text/css" />
+ <link rel="shortcut icon" href="/themes/phalanx/images/favicon.ico" />
+ </theme>
+ <theme>
+ <name>mission-critical</name>
+ <link rel="stylesheet" id="main_css" href="/themes/mission-critical/portal_style.css" type="text/css" />
+ <link rel="shortcut icon" href="/themes/mission-critical/images/favicon.ico" />
+ </theme>
+ <theme>
+ <name>Maple</name>
+ <link rel="stylesheet" id="main_css" href="/themes/maple/portal_style.css" type="text/css"/>
+ <link rel="shortcut icon" href="/themes/maple/images/favicon.ico"/>
+ </theme>
+ -->
<theme>
- <name>industrial</name>
- <link rel="stylesheet" id="main_css" href="/themes/industrial/portal_style.css" type="text/css" />
- <link rel="shortcut icon" href="/themes/industrial/images/favicon.ico" />
+ <name>renaissance</name>
+ <link rel="stylesheet" id="main_css" href="/themes/renaissance/portal_style.css" type="text/css"/>
+ <link rel="shortcut icon" href="/themes/renaissance/images/favicon.ico"/>
+ <link rel="icon" href="/themes/renaissance/images/animated_favicon1.gif" type="image/gif"/>
</theme>
- <theme>
- <name>Nphalanx</name>
- <link rel="stylesheet" id="main_css" href="/themes/phalanx/portal_style.css" type="text/css" />
- <link rel="shortcut icon" href="/themes/phalanx/images/favicon.ico" />
- </theme>
- <theme>
- <name>mission-critical</name>
- <link rel="stylesheet" id="main_css" href="/themes/mission-critical/portal_style.css" type="text/css" />
- <link rel="shortcut icon" href="/themes/mission-critical/images/favicon.ico" />
- </theme>
- <theme>
- <name>Maple</name>
- <link rel="stylesheet" id="main_css" href="/themes/maple/portal_style.css" type="text/css"/>
- <link rel="shortcut icon" href="/themes/maple/images/favicon.ico"/>
- </theme>
- <theme>
- <name>renaissance</name>
- <link rel="stylesheet" id="main_css" href="/themes/renaissance/portal_style.css" type="text/css"/>
- <link rel="shortcut icon" href="/themes/renaissance/images/favicon.ico"/>
- <link rel="icon" href="/themes/renaissance/images/animated_favicon1.gif" type="image/gif"/>
- </theme>
--->
</themes>
\ No newline at end of file
Modified: trunk/theme/src/resources/test/theme-test-war/WEB-INF/web.xml
===================================================================
--- trunk/theme/src/resources/test/theme-test-war/WEB-INF/web.xml 2006-09-30 20:33:16 UTC (rev 5303)
+++ trunk/theme/src/resources/test/theme-test-war/WEB-INF/web.xml 2006-10-02 15:30:39 UTC (rev 5304)
@@ -1,7 +1,30 @@
<?xml version="1.0"?>
<web-app
- xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
- version="2.4">
+ xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <servlet>
+ <description>Handles test xmlhttprequests and callbacks</description>
+ <servlet-name>TestAJAXServlet</servlet-name>
+ <servlet-class>org.jboss.portal.test.theme.servlet.TestAJAXServlet</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>TestAJAXServlet</servlet-name>
+ <url-pattern>/testajax/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet>
+ <description>Renders a theme for testing</description>
+ <servlet-name>TestThemeServlet</servlet-name>
+ <servlet-class>org.jboss.portal.test.theme.servlet.TestThemeServlet</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>TestThemeServlet</servlet-name>
+ <url-pattern>/themetest/*</url-pattern>
+ </servlet-mapping>
+
</web-app>
More information about the jboss-svn-commits
mailing list