Author: bdaw
Date: 2008-02-25 18:32:26 -0500 (Mon, 25 Feb 2008)
New Revision: 10112
Added:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/tck/
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/tck/TCKPageNavigationalState.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/tck/TCKPageRenderer.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/tck/TCKServlet.java
modules/portlet/trunk/test/src/test/resources/jboss-4.2/portlet-tck-war/
modules/portlet/trunk/test/src/test/resources/jboss-4.2/portlet-tck-war/WEB-INF/
modules/portlet/trunk/test/src/test/resources/jboss-4.2/portlet-tck-war/WEB-INF/context.xml
modules/portlet/trunk/test/src/test/resources/jboss-4.2/portlet-tck-war/WEB-INF/jboss-web.xml
modules/portlet/trunk/test/src/test/resources/portlet-tck-war/
modules/portlet/trunk/test/src/test/resources/portlet-tck-war/WEB-INF/
modules/portlet/trunk/test/src/test/resources/portlet-tck-war/WEB-INF/classes/
modules/portlet/trunk/test/src/test/resources/portlet-tck-war/WEB-INF/jboss-beans.xml
modules/portlet/trunk/test/src/test/resources/portlet-tck-war/WEB-INF/web.xml
modules/portlet/trunk/test/src/test/resources/tomcat-6.0/portlet-tck-war/
modules/portlet/trunk/test/src/test/resources/tomcat-6.0/portlet-tck-war/META-INF/
modules/portlet/trunk/test/src/test/resources/tomcat-6.0/portlet-tck-war/META-INF/context.xml
modules/portlet/trunk/test/src/test/resources/tomcat-6.0/portlet-tck-war/WEB-INF/
Modified:
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/impl/state/PageNavigationalStateImpl.java
modules/portlet/trunk/test/pom.xml
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PageRenderer.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletControllerContextImpl.java
modules/portlet/trunk/test/src/test/build.xml
Log:
- TCK portal
- some minor changes to be able to reuse stuff
Modified:
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/impl/state/PageNavigationalStateImpl.java
===================================================================
---
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/impl/state/PageNavigationalStateImpl.java 2008-02-25
23:12:41 UTC (rev 10111)
+++
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/impl/state/PageNavigationalStateImpl.java 2008-02-25
23:32:26 UTC (rev 10112)
@@ -39,7 +39,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-class PageNavigationalStateImpl implements PageNavigationalState, Serializable
+public class PageNavigationalStateImpl implements PageNavigationalState, Serializable
{
/** . */
@@ -54,7 +54,7 @@
/** . */
private final boolean modifiable;
- PageNavigationalStateImpl(StateControllerContextImpl context, boolean modifiable)
+ protected PageNavigationalStateImpl(StateControllerContextImpl context, boolean
modifiable)
{
this.context = context;
this.windows = new HashMap<String, WindowNavigationalState>();
Modified: modules/portlet/trunk/test/pom.xml
===================================================================
--- modules/portlet/trunk/test/pom.xml 2008-02-25 23:12:41 UTC (rev 10111)
+++ modules/portlet/trunk/test/pom.xml 2008-02-25 23:32:26 UTC (rev 10112)
@@ -365,6 +365,7 @@
<ant antfile="${basedir}/src/test/build.xml">
<target name="tests"/>
<target name="package-simple-portal"/>
+ <target name="package-tck-portal"/>
</ant>
</tasks>
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PageRenderer.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PageRenderer.java 2008-02-25
23:12:41 UTC (rev 10111)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PageRenderer.java 2008-02-25
23:32:26 UTC (rev 10112)
@@ -62,10 +62,10 @@
public class PageRenderer extends AbstractMarkupRenderer
{
- private FragmentRenderer fragmentRenderer = new SimpleFragmentRenderer();
- private List<FragmentResponse> fragments;
- private List<ErrorResponse> errors;
- private PageNavigationalState pageState;
+ protected FragmentRenderer fragmentRenderer = new SimpleFragmentRenderer();
+ protected List<FragmentResponse> fragments;
+ protected List<ErrorResponse> errors;
+ protected PageNavigationalState pageState;
public PageRenderer(ResponseProperties properties, PageNavigationalState pageState)
{
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletControllerContextImpl.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletControllerContextImpl.java 2008-02-25
23:12:41 UTC (rev 10111)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletControllerContextImpl.java 2008-02-25
23:32:26 UTC (rev 10112)
@@ -78,7 +78,7 @@
return stateControllerContext;
}
- protected PortletInvocationResponse invoke(PortletInvocation invocation) throws
PortletInvokerException
+ public PortletInvocationResponse invoke(PortletInvocation invocation) throws
PortletInvokerException
{
return invoker.invoke(invocation);
}
Added:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/tck/TCKPageNavigationalState.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/tck/TCKPageNavigationalState.java
(rev 0)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/tck/TCKPageNavigationalState.java 2008-02-25
23:32:26 UTC (rev 10112)
@@ -0,0 +1,62 @@
+/*
+* 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.tck;
+
+import org.jboss.portal.portlet.controller.state.PageNavigationalState;
+import org.jboss.portal.portlet.controller.state.WindowNavigationalState;
+import org.jboss.portal.portlet.controller.impl.state.StateControllerContextImpl;
+import org.jboss.portal.portlet.controller.impl.state.PageNavigationalStateImpl;
+import org.jboss.portal.portlet.info.PortletInfo;
+import org.jboss.portal.portlet.info.ParameterInfo;
+import org.jboss.portal.portlet.info.NavigationInfo;
+import org.jboss.portal.portlet.Portlet;
+import org.jboss.portal.common.util.ParameterMap;
+
+import javax.xml.namespace.QName;
+import java.io.Serializable;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.List;
+import java.util.Collection;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public class TCKPageNavigationalState extends PageNavigationalStateImpl
+{
+
+ Collection<Portlet> involvedPortlets;
+
+ public TCKPageNavigationalState(StateControllerContextImpl context, boolean
modifiable, Collection<Portlet> involvedPortlets)
+ {
+ super(context, modifiable);
+ this.involvedPortlets = involvedPortlets;
+ }
+
+ public Collection<Portlet> getInvolvedPortlets()
+ {
+ return involvedPortlets;
+ }
+}
Added:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/tck/TCKPageRenderer.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/tck/TCKPageRenderer.java
(rev 0)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/tck/TCKPageRenderer.java 2008-02-25
23:32:26 UTC (rev 10112)
@@ -0,0 +1,146 @@
+/*
+* 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.tck;
+
+import org.jboss.portal.portlet.test.controller.PageRenderer;
+import org.jboss.portal.portlet.test.controller.PortletControllerContextImpl;
+import org.jboss.portal.portlet.invocation.response.ResponseProperties;
+import org.jboss.portal.portlet.invocation.response.FragmentResponse;
+import org.jboss.portal.portlet.invocation.response.ErrorResponse;
+import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
+import org.jboss.portal.portlet.invocation.RenderInvocation;
+import org.jboss.portal.portlet.controller.state.PageNavigationalState;
+import org.jboss.portal.portlet.controller.state.WindowNavigationalState;
+import org.jboss.portal.portlet.Portlet;
+import org.jboss.portal.portlet.StateString;
+import org.jboss.portal.portlet.PortletInvokerException;
+import org.jboss.portal.Mode;
+import org.jboss.portal.WindowState;
+import org.jboss.portal.common.util.ParameterMap;
+
+import java.util.Collection;
+import java.util.ArrayList;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public class TCKPageRenderer extends PageRenderer
+{
+ TCKPageNavigationalState tckPageState;
+
+ public TCKPageRenderer(ResponseProperties properties, TCKPageNavigationalState
pageState)
+ {
+ super(properties, pageState);
+ tckPageState = pageState;
+ }
+
+ protected void prepareRendering(PortletControllerContextImpl context)
+ {
+ // What we collect during the different renders
+ // we don't reuse the render properties argument since we want to avoid that
+ // a portlet rendition affects another rendition of a portlet on the same page
+ ResponseProperties renderProperties = new ResponseProperties();
+
+ //
+ try
+ {
+ Collection<Portlet> portlets = tckPageState.getInvolvedPortlets();
+
+ int capacity = portlets.size();
+ fragments = new ArrayList<FragmentResponse>(capacity);
+ errors = new ArrayList<ErrorResponse>(capacity);
+
+ for (Portlet portlet : portlets)
+ {
+ WindowNavigationalState windowNS =
pageState.getWindowNavigationalState(portlet.getContext().getId());
+
+ //
+ Mode mode = Mode.VIEW;
+ WindowState windowState = WindowState.NORMAL;
+ StateString portletNS = null;
+
+ //
+ if (windowNS != null)
+ {
+ if (windowNS.getMode() != null)
+ {
+ mode = windowNS.getMode();
+ }
+ if (windowNS.getWindowState() != null)
+ {
+ windowState = windowNS.getWindowState();
+ }
+ if (windowNS.getPortletNavigationalState() != null)
+ {
+ portletNS = windowNS.getPortletNavigationalState();
+ }
+ }
+
+ //
+ ParameterMap publicNS =
pageState.getPublicNavigationalState(portlet.getContext().getId());
+
+ RenderInvocation render = createRenderInvocation(context, properties,
pageState, portlet, windowNS, mode, windowState, portletNS, publicNS);
+
+ //
+ try
+ {
+ PortletInvocationResponse response = context.invoke(render);
+
+ if (response instanceof FragmentResponse)
+ {
+ FragmentResponse fragment = (FragmentResponse)response;
+
+ //
+ fragments.add(fragment);
+
+ //
+ ResponseProperties fragmentProperties = fragment.getProperties();
+ if (fragmentProperties != null)
+ {
+ renderProperties.append(fragmentProperties);
+ }
+ }
+ else if (response instanceof ErrorResponse)
+ {
+ ErrorResponse error = (ErrorResponse)response;
+ errors.add(error);
+ }
+
+ }
+ catch (PortletInvokerException e)
+ {
+ e.printStackTrace();
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ // todo
+ e.printStackTrace();
+ }
+
+ // Now we combine the render properties with the page properties
+ properties.append(renderProperties);
+ }
+}
Added:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/tck/TCKServlet.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/tck/TCKServlet.java
(rev 0)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/tck/TCKServlet.java 2008-02-25
23:32:26 UTC (rev 10112)
@@ -0,0 +1,149 @@
+/*
+* 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.tck;
+
+import org.jboss.portal.portlet.test.controller.PortletControllerContextImpl;
+import org.jboss.portal.portlet.test.controller.Renderer;
+import org.jboss.portal.portlet.test.controller.ControllerResponseRendererFactory;
+import org.jboss.portal.portlet.test.controller.PageRenderer;
+import org.jboss.portal.portlet.test.URLParameterConstants;
+import org.jboss.portal.portlet.controller.PortletController;
+import org.jboss.portal.portlet.controller.response.ControllerResponse;
+import org.jboss.portal.portlet.controller.request.ControllerRequest;
+import org.jboss.portal.portlet.controller.impl.request.ControllerRequestFactory;
+import org.jboss.portal.portlet.controller.impl.state.StateControllerContextImpl;
+import org.jboss.portal.portlet.invocation.response.ResponseProperties;
+import org.jboss.portal.portlet.Portlet;
+import org.jboss.portal.web.WebRequest;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.ServletException;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.List;
+import java.util.LinkedList;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public class TCKServlet extends HttpServlet
+{
+
+ public static String TCK_PORTLET_NAME = "portletName";
+
+ protected void service(HttpServletRequest req, HttpServletResponse resp) throws
ServletException, IOException
+ {
+ try
+ {
+ _service(req, resp);
+ }
+ catch (Exception e)
+ {
+ if (e instanceof ServletException)
+ {
+ throw (ServletException)e;
+ }
+ if (e instanceof IOException)
+ {
+ throw (IOException)e;
+ }
+ if (e instanceof RuntimeException)
+ {
+ throw (RuntimeException)e;
+ }
+ throw new ServletException(e);
+ }
+ }
+
+ protected void _service(HttpServletRequest req, HttpServletResponse resp) throws
Exception
+ {
+ PortletControllerContextImpl context = new PortletControllerContextImpl(req, resp,
getServletContext());
+
+ //
+ PortletController controller = new PortletController();
+
+ String type = req.getParameter(URLParameterConstants.TYPE);
+
+ //
+ if (URLParameterConstants.PORTLET_TYPE.equals(type))
+ {
+ WebRequest wr = new WebRequest(req);
+ ControllerRequestFactory factory = new
ControllerRequestFactory(context.getStateControllerContext());
+ ControllerRequest request = factory.createRequest(wr);
+
+ //
+ ControllerResponse response = controller.process(context, request);
+
+ //
+ Renderer renderer = ControllerResponseRendererFactory.getRenderer(response);
+
+ //
+ renderer.render(context);
+ }
+ else
+ {
+
+ String[] tckParamers = req.getParameterValues(TCK_PORTLET_NAME);
+
+ Collection<Portlet> portlets = context.getPortlets();
+
+ List<Portlet> involvedPortlets = new LinkedList<Portlet>();
+
+ for (int i = 0; i < tckParamers.length; i++)
+ {
+ String tckParamer = tckParamers[i];
+
+ String[] parts = tckParamer.split("/");
+
+ String portletAppName = parts[0];
+ String portletName = parts[1];
+
+ for (Portlet portlet : portlets)
+ {
+ if (portlet.getInfo().getApplicationName().equals(portletAppName)
+ && portlet.getInfo().getName().equals(portletName))
+ {
+ involvedPortlets.add(portlet);
+ }
+ }
+ }
+
+ if (tckParamers.length > 0 && involvedPortlets.isEmpty())
+ {
+ throw new IllegalStateException("Portlets requested by TCK were not
found");
+ }
+
+ TCKPageNavigationalState tckPageState = new
TCKPageNavigationalState((StateControllerContextImpl)context.getStateControllerContext(),
false, involvedPortlets);
+
+ PageRenderer renderer = new TCKPageRenderer(new ResponseProperties(),
tckPageState);
+
+ //
+ renderer.render(context);
+ }
+ }
+}
Modified: modules/portlet/trunk/test/src/test/build.xml
===================================================================
--- modules/portlet/trunk/test/src/test/build.xml 2008-02-25 23:12:41 UTC (rev 10111)
+++ modules/portlet/trunk/test/src/test/build.xml 2008-02-25 23:32:26 UTC (rev 10112)
@@ -708,6 +708,89 @@
</sequential>
</macrodef>
+ <target name="package-tck-portal" depends="prepare_env">
+
+ <property name="tck" value="${target}/tck"/>
+ <property name="tck-jboss" value="${tck}/jboss42"/>
+
+
+ <mkdir dir="${tck}"/>
+ <mkdir dir="${tck-jboss}"/>
+ <!--<mkdir dir="${tck}/jboss42"/>-->
+ <!--<mkdir dir="${tck}/tomcat6"/>-->
+
+
+ <jar jarfile="${target}/portlet-test-lib.jar">
+ <fileset dir="${target}/classes"
excludes="org/jboss/portal/portlet/portal/samples/**"/>
+ </jar>
+
+ <copy todir="${tck-jboss}/portlet-tck-war">
+ <fileset dir="${target}/test-classes/portlet-tck-war"/>
+ </copy>
+ <copy todir="${tck-jboss}/portlet-tck-war">
+ <fileset
dir="${target}/test-classes/jboss-4.2/portlet-tck-war"/>
+ </copy>
+
+ <copy todir="${tck-jboss}/portlet-tck-war/WEB-INF/lib"
flatten="true">
+
+ <!-- -->
+ <fileset dir="${target}"
includes="portlet-test-lib.jar"/>
+
+ <!-- -->
+ <path refid="mc.portal-common"/>
+
+ <path refid="mc.portal-portlet-controller"/>
+
+ <!-- Remote plugin -->
+ <path refid="mc.jboss-remoting"/>
+ <path refid="mc.portal-test-generic"/>
+
+
+ <!-- MC 2.0.0.Beta4 -->
+ <path refid="mc.trove"/>
+ <path refid="mc.javassist"/>
+ <path refid="mc.jboss_common_core"/>
+ <path refid="mc.jboss_vfs"/>
+ <path refid="mc.jboss_xb"/>
+ <path refid="mc.jboss_aop"/>
+ <path refid="mc.jboss_microcontainer"/>
+ <path refid="mc.jaxb-api"/>
+
+
+ </copy>
+
+ <mkdir dir="${tck-jboss}/tck-portal"/>
+
+ <jar jarfile="${tck-jboss}/tck-portal/portlet-tck.war">
+ <fileset dir="${tck-jboss}/portlet-tck-war"/>
+ </jar>
+
+ <copy todir="${tck-jboss}/tck-portal" flatten="true">
+
+ <!--Stuff from shared classpath-->
+ <path location="${dependency.portal-common.jar}"/>
+ <path location="${dependency.portal-common-portal.jar}"/>
+ <path location="${dependency.portal-portlet.jar}"/>
+ <path location="${dependency.portal-web.jar}"/>
+ <!--<path location="${dependency.jsr168api.jar}"/>-->
+
+ <path location="${dependency.jboss-unit.jar}"/>
+ <path location="${dependency.jboss-unit-remote.jar}"/>
+ <path location="${dependency.portal-test.jar}"/>
+
+ </copy>
+
+ <copy todir="${tck}" flatten="true">
+
+ <path location="${dependency.jsr168api.jar}"/>
+
+ </copy>
+
+
+ <delete file="${target}/portlet-test-lib.jar"/>
+
+ </target>
+
<target name="package-simple-portal" depends="prepare_env">
<property name="portal.dir" value="${target}/portal"/>
<property name="simple.tomcat.dir"
value="${portal.dir}/tomcat"/>
Added:
modules/portlet/trunk/test/src/test/resources/jboss-4.2/portlet-tck-war/WEB-INF/context.xml
===================================================================
---
modules/portlet/trunk/test/src/test/resources/jboss-4.2/portlet-tck-war/WEB-INF/context.xml
(rev 0)
+++
modules/portlet/trunk/test/src/test/resources/jboss-4.2/portlet-tck-war/WEB-INF/context.xml 2008-02-25
23:32:26 UTC (rev 10112)
@@ -0,0 +1,2 @@
+<Context privileged="true">
+</Context>
\ No newline at end of file
Added:
modules/portlet/trunk/test/src/test/resources/jboss-4.2/portlet-tck-war/WEB-INF/jboss-web.xml
===================================================================
---
modules/portlet/trunk/test/src/test/resources/jboss-4.2/portlet-tck-war/WEB-INF/jboss-web.xml
(rev 0)
+++
modules/portlet/trunk/test/src/test/resources/jboss-4.2/portlet-tck-war/WEB-INF/jboss-web.xml 2008-02-25
23:32:26 UTC (rev 10112)
@@ -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/portlet/trunk/test/src/test/resources/portlet-tck-war/WEB-INF/jboss-beans.xml
===================================================================
--- modules/portlet/trunk/test/src/test/resources/portlet-tck-war/WEB-INF/jboss-beans.xml
(rev 0)
+++
modules/portlet/trunk/test/src/test/resources/portlet-tck-war/WEB-INF/jboss-beans.xml 2008-02-25
23:32:26 UTC (rev 10112)
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="TestDriverServer"
class="org.jboss.unit.remote.driver.RemoteTestDriverServer"/>
+
+ <bean name="TestDriverServerExporter"
+
class="org.jboss.portal.test.framework.impl.generic.server.GenericServiceExporter">
+ <constructor>
+ <parameter>socket://localhost:5400</parameter>
+ <parameter><inject
bean="TestDriverServer"/></parameter>
+
<parameter>org.jboss.unit.remote.driver.RemoteTestDriver</parameter>
+ </constructor>
+ </bean>
+
+ <bean name="PortletApplicationDeployer"
class="org.jboss.portal.portlet.test.TestPortletApplicationDeployer">
+ <property name="servletContainer"><inject
bean="ServletContainer"/></property>
+ <property name="driver"><inject
bean="TestDriverServer"/></property>
+ <property name="portletContainerInvoker"><inject
bean="PortletContainerInvoker"/></property>
+ </bean>
+
+ <!-- The ServletContainerFactory -->
+ <bean name="ServletContainerFactory"
class="org.jboss.portal.web.impl.DefaultServletContainerFactory">
+ <constructor
factoryClass="org.jboss.portal.web.impl.DefaultServletContainerFactory"
factoryMethod="getInstance"/>
+ </bean>
+
+ <!-- The servlet container obtained from the ServletContainerFactory -->
+ <bean name="ServletContainer"
class="org.jboss.portal.web.ServletContainer">
+ <constructor factoryMethod="getServletContainer">
+ <factory bean="ServletContainerFactory"/>
+ </constructor>
+ </bean>
+
+ <!-- Consumer stack -->
+ <bean name="ConsumerCacheInterceptor"
class="org.jboss.portal.portlet.aspects.portlet.ConsumerCacheInterceptor">
+ </bean>
+ <bean name="ConsumerStackFactory"
class="org.jboss.portal.portlet.test.InterceptorStackFactoryImpl">
+ <property name="interceptors">
+ <array>
+ <inject bean="ConsumerCacheInterceptor"/>
+ </array>
+ </property>
+ </bean>
+
+ <!-- The consumer portlet invoker -->
+ <bean name="ConsumerPortletInvoker"
class="org.jboss.portal.portlet.test.controller.TestPortletInvoker">
+ <property name="producer"><inject
bean="ProducerPortletInvoker"/></property>
+ <property name="stackFactory"><inject
bean="ConsumerStackFactory"/></property>
+ </bean>
+
+ <!-- Container stack -->
+ <bean name="ValveInterceptor"
class="org.jboss.portal.portlet.aspects.portlet.ValveInterceptor"/>
+ <bean name="SecureTransportInterceptor"
class="org.jboss.portal.portlet.aspects.portlet.SecureTransportInterceptor"/>
+ <bean name="ContextDispatcherInterceptor"
+
class="org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor">
+ <property name="servletContainerFactory"><inject
bean="ServletContainerFactory"/></property>
+ </bean>
+ <bean name="ProducerCacheInterceptor"
class="org.jboss.portal.portlet.aspects.portlet.ProducerCacheInterceptor"/>
+ <bean name="RequestAttributeConversationInterceptor"
class="org.jboss.portal.portlet.aspects.portlet.RequestAttributeConversationInterceptor"/>
+ <bean name="ContainerStackFactory"
class="org.jboss.portal.portlet.test.InterceptorStackFactoryImpl">
+ <property name="interceptors">
+ <array>
+ <inject bean="ValveInterceptor"/>
+ <inject bean="SecureTransportInterceptor"/>
+ <inject bean="ContextDispatcherInterceptor"/>
+ <inject bean="ProducerCacheInterceptor"/>
+ <inject bean="RequestAttributeConversationInterceptor"/>
+ </array>
+ </property>
+ </bean>
+
+ <!-- The portlet container invoker -->
+ <bean name="PortletContainerInvoker"
class="org.jboss.portal.portlet.container.PortletContainerInvoker">
+ <property name="stackFactory"><inject
bean="ContainerStackFactory"/></property>
+ </bean>
+
+ <!-- The producer persistence manager -->
+ <bean name="ProducerPersistenceManager"
+
class="org.jboss.portal.portlet.impl.state.producer.PortletStatePersistenceManagerService"/>
+
+ <!-- The producer state management policy -->
+ <bean name="ProducerStateManagementPolicy"
class="org.jboss.portal.portlet.impl.state.StateManagementPolicyService">
+ <property
name="persistLocally"><value>true</value></property>
+ </bean>
+
+ <!-- The producer state converter -->
+ <bean name="ProducerStateConverter"
class="org.jboss.portal.portlet.impl.state.StateConverterV0"/>
+
+ <!-- The producer portlet invoker -->
+ <bean name="ProducerPortletInvoker"
class="org.jboss.portal.portlet.state.producer.ProducerPortletInvoker">
+ <property name="portletInvoker"><inject
bean="PortletContainerInvoker"/></property>
+ <property name="persistenceManager"><inject
bean="ProducerPersistenceManager"/></property>
+ <property name="stateManagementPolicy"><inject
bean="ProducerStateManagementPolicy"/></property>
+ <property name="stateConverter"><inject
bean="ProducerStateConverter"/></property>
+ </bean>
+
+</deployment>
Added: modules/portlet/trunk/test/src/test/resources/portlet-tck-war/WEB-INF/web.xml
===================================================================
--- modules/portlet/trunk/test/src/test/resources/portlet-tck-war/WEB-INF/web.xml
(rev 0)
+++
modules/portlet/trunk/test/src/test/resources/portlet-tck-war/WEB-INF/web.xml 2008-02-25
23:32:26 UTC (rev 10112)
@@ -0,0 +1,45 @@
+<?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.common.mc.bootstrap.WebBootstrap</listener-class>
+ </listener>
+ <servlet>
+ <servlet-name>ContainerServlet</servlet-name>
+
<servlet-class>org.jboss.portal.web.impl.tomcat.TC6ContainerServlet</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet>
+ <servlet-name>PortalServlet</servlet-name>
+
<servlet-class>org.jboss.portal.portlet.test.tck.TCKServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>PortalServlet</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>
Added:
modules/portlet/trunk/test/src/test/resources/tomcat-6.0/portlet-tck-war/META-INF/context.xml
===================================================================
---
modules/portlet/trunk/test/src/test/resources/tomcat-6.0/portlet-tck-war/META-INF/context.xml
(rev 0)
+++
modules/portlet/trunk/test/src/test/resources/tomcat-6.0/portlet-tck-war/META-INF/context.xml 2008-02-25
23:32:26 UTC (rev 10112)
@@ -0,0 +1,2 @@
+<Context privileged="true">
+</Context>