Author: julien(a)jboss.com
Date: 2008-01-23 16:02:31 -0500 (Wed, 23 Jan 2008)
New Revision: 9586
Added:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/spi/AbstractClientContext.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/spi/ClientContext.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/support/spi/ClientContextSupport.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/resourceserving/HTTPMethodTestCase.java
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/ClientDataRequestImpl.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/invocation/PortletInvocation.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/ext/portletrequests/ResourceRequestParametersTestCase.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletrequests/PublicRenderParameterAvailableInLifeCycleMethodTestCase.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/resourceserving/DowngradeCacheabilityTestCase.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/resourceserving/ResourceIDTestCase.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/actions/PortletResourceTestAction.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortletController.java
modules/portlet/trunk/test/src/test/resources/test/remote-jboss-unit.xml
Log:
- introduced ClientContext to expose client data (like HTTP method for now)
- improved PortletResourceTestAction to send a response if no response has been sent
during the resource action
- update jboss unit xml test def
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/ClientDataRequestImpl.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/ClientDataRequestImpl.java 2008-01-23
20:07:37 UTC (rev 9585)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/ClientDataRequestImpl.java 2008-01-23
21:02:31 UTC (rev 9586)
@@ -25,6 +25,7 @@
import org.jboss.portal.portlet.invocation.ActionInvocation;
import org.jboss.portal.portlet.invocation.ResourceInvocation;
import org.jboss.portal.portlet.spi.RequestContext;
+import org.jboss.portal.portlet.spi.ClientContext;
import org.jboss.portal.common.NotYetImplemented;
import javax.portlet.ClientDataRequest;
@@ -43,12 +44,16 @@
/** . */
protected final RequestContext requestContext;
+ /** . */
+ protected final ClientContext clientContext;
+
public ClientDataRequestImpl(ActionInvocation invocation)
{
super(invocation);
//
this.requestContext = invocation.getRequestContext();
+ this.clientContext = invocation.getClientContext();
}
public ClientDataRequestImpl(ResourceInvocation invocation)
@@ -57,6 +62,7 @@
//
this.requestContext = invocation.getRequestContext();
+ this.clientContext = invocation.getClientContext();
}
public InputStream getPortletInputStream() throws IOException
@@ -101,6 +107,6 @@
public String getMethod()
{
- throw new NotYetImplemented();
+ return clientContext.getMethod();
}
}
Added:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/spi/AbstractClientContext.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/spi/AbstractClientContext.java
(rev 0)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/spi/AbstractClientContext.java 2008-01-23
21:02:31 UTC (rev 9586)
@@ -0,0 +1,48 @@
+/******************************************************************************
+ * 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.impl.spi;
+
+import org.jboss.portal.portlet.spi.ClientContext;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class AbstractClientContext implements ClientContext
+{
+
+ /** . */
+ private final String method;
+
+ public AbstractClientContext(HttpServletRequest request)
+ {
+ this.method = request.getMethod();
+ }
+
+ public String getMethod()
+ {
+ return method;
+ }
+}
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/invocation/PortletInvocation.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/invocation/PortletInvocation.java 2008-01-23
20:07:37 UTC (rev 9585)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/invocation/PortletInvocation.java 2008-01-23
21:02:31 UTC (rev 9586)
@@ -31,6 +31,7 @@
import org.jboss.portal.portlet.spi.SecurityContext;
import org.jboss.portal.portlet.spi.UserContext;
import org.jboss.portal.portlet.spi.WindowContext;
+import org.jboss.portal.portlet.spi.ClientContext;
import org.jboss.portal.portlet.PortletContext;
import javax.servlet.http.HttpServletRequest;
@@ -66,6 +67,9 @@
/** The portal context. */
protected PortalContext portalContext;
+ /** The client context. */
+ protected ClientContext clientContext;
+
/** The server context. */
protected ServerContext serverContext;
@@ -198,6 +202,16 @@
this.portalContext = portalContext;
}
+ public ClientContext getClientContext()
+ {
+ return clientContext;
+ }
+
+ public void setClientContext(ClientContext clientContext)
+ {
+ this.clientContext = clientContext;
+ }
+
public ServerContext getServerContext()
{
return serverContext;
Added:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/spi/ClientContext.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/spi/ClientContext.java
(rev 0)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/spi/ClientContext.java 2008-01-23
21:02:31 UTC (rev 9586)
@@ -0,0 +1,34 @@
+/******************************************************************************
+ * 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.spi;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public interface ClientContext
+{
+
+ String getMethod();
+
+}
Added:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/support/spi/ClientContextSupport.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/support/spi/ClientContextSupport.java
(rev 0)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/support/spi/ClientContextSupport.java 2008-01-23
21:02:31 UTC (rev 9586)
@@ -0,0 +1,37 @@
+/******************************************************************************
+ * 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.support.spi;
+
+import org.jboss.portal.portlet.spi.ClientContext;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class ClientContextSupport implements ClientContext
+{
+ public String getMethod()
+ {
+ throw new UnsupportedOperationException();
+ }
+}
Modified:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/ext/portletrequests/ResourceRequestParametersTestCase.java
===================================================================
---
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/ext/portletrequests/ResourceRequestParametersTestCase.java 2008-01-23
20:07:37 UTC (rev 9585)
+++
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/ext/portletrequests/ResourceRequestParametersTestCase.java 2008-01-23
21:02:31 UTC (rev 9586)
@@ -89,11 +89,6 @@
assertParameterMap(expectedPageParameters, request);
//
- response.setContentType("text/html");
- Writer writer = response.getWriter();
- writer.close();
-
- //
ResourceURL resourceURL = response.createResourceURL();
resourceURL.setCacheability(ResourceURL.PORTLET);
resourceURL.setParameter("foo", new
String[]{"resource_foo_value3","resource_foo_value4"});
@@ -109,11 +104,6 @@
assertParameterMap(expectedPageParameters, request);
//
- response.setContentType("text/html");
- Writer writer = response.getWriter();
- writer.close();
-
- //
return new EndTestResponse();
}
});
Modified:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletrequests/PublicRenderParameterAvailableInLifeCycleMethodTestCase.java
===================================================================
---
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletrequests/PublicRenderParameterAvailableInLifeCycleMethodTestCase.java 2008-01-23
20:07:37 UTC (rev 9585)
+++
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletrequests/PublicRenderParameterAvailableInLifeCycleMethodTestCase.java 2008-01-23
21:02:31 UTC (rev 9586)
@@ -200,12 +200,6 @@
assertEquals(expectedPublicMap, request.getPublicParameterMap());
//
- response.setContentType("text/html");
- PrintWriter writer = response.getWriter();
- writer.print("foo");
- writer.close();
-
- //
return new EndTestResponse();
}
});
Modified:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/resourceserving/DowngradeCacheabilityTestCase.java
===================================================================
---
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/resourceserving/DowngradeCacheabilityTestCase.java 2008-01-23
20:07:37 UTC (rev 9585)
+++
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/resourceserving/DowngradeCacheabilityTestCase.java 2008-01-23
21:02:31 UTC (rev 9586)
@@ -83,9 +83,6 @@
{
protected DriverResponse run(Portlet portlet, ResourceRequest request,
ResourceResponse response, PortletTestContext context) throws PortletException,
IOException
{
- sendEmptyResponse(response);
-
- //
assertEquals(ResourceURL.PORTLET, request.getCacheability());
//
@@ -135,9 +132,6 @@
{
protected DriverResponse run(Portlet portlet, ResourceRequest request,
ResourceResponse response, PortletTestContext context) throws PortletException,
IOException
{
- sendEmptyResponse(response);
-
- //
assertEquals(ResourceURL.PORTLET, request.getCacheability());
ResourceURL resourceURL = response.createResourceURL();
assertEquals(ResourceURL.PORTLET, resourceURL.getCacheability());
@@ -150,9 +144,6 @@
{
protected DriverResponse run(Portlet portlet, ResourceRequest request,
ResourceResponse response, PortletTestContext context) throws PortletException,
IOException
{
- sendEmptyResponse(response);
-
- //
assertEquals(ResourceURL.FULL, request.getCacheability());
//
@@ -213,9 +204,6 @@
{
protected DriverResponse run(Portlet portlet, ResourceRequest request,
ResourceResponse response, PortletTestContext context) throws PortletException,
IOException
{
- sendEmptyResponse(response);
-
- //
assertEquals(ResourceURL.FULL, request.getCacheability());
ResourceURL resourceURL = response.createResourceURL();
assertEquals(ResourceURL.FULL, resourceURL.getCacheability());
Added:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/resourceserving/HTTPMethodTestCase.java
===================================================================
---
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/resourceserving/HTTPMethodTestCase.java
(rev 0)
+++
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/resourceserving/HTTPMethodTestCase.java 2008-01-23
21:02:31 UTC (rev 9586)
@@ -0,0 +1,55 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.test.portlet.jsr286.tck.resourceserving;
+
+import org.jboss.portal.unit.PortletTestCase;
+import org.jboss.portal.unit.PortletTestContext;
+import org.jboss.portal.unit.actions.PortletRenderTestAction;
+import org.jboss.portal.test.portlet.framework.UTP4;
+import org.jboss.unit.driver.DriverResponse;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletException;
+import javax.portlet.ResourceURL;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class HTTPMethodTestCase
+{
+ public HTTPMethodTestCase(PortletTestCase seq)
+ {
+ seq.bindAction(0, UTP4.RENDER_JOIN_POINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request,
RenderResponse response, PortletTestContext context) throws PortletException, IOException
+ {
+// ResourceURL resourceURL = response.createResourceURL();
+ return null;
+ }
+ });
+ }
+}
Modified:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/resourceserving/ResourceIDTestCase.java
===================================================================
---
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/resourceserving/ResourceIDTestCase.java 2008-01-23
20:07:37 UTC (rev 9585)
+++
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/resourceserving/ResourceIDTestCase.java 2008-01-23
21:02:31 UTC (rev 9586)
@@ -68,9 +68,8 @@
});
seq.bindAction(1, UTP3.RESOURCE_JOIN_POINT, new PortletResourceTestAction()
{
- public DriverResponse execute(Portlet portlet, ResourceRequest request,
ResourceResponse response, PortletTestContext context) throws PortletException,
IOException
+ protected DriverResponse run(Portlet portlet, ResourceRequest request,
ResourceResponse response, PortletTestContext context) throws PortletException,
IOException
{
- sendEmptyResponse(response);
assertNull(request.getResourceID());
ResourceURL resourceURL = response.createResourceURL();
resourceURL.setResourceID("foo_resource_id");
@@ -79,9 +78,8 @@
});
seq.bindAction(2, UTP3.RESOURCE_JOIN_POINT, new PortletResourceTestAction()
{
- public DriverResponse execute(Portlet portlet, ResourceRequest request,
ResourceResponse response, PortletTestContext context) throws PortletException,
IOException
+ protected DriverResponse run(Portlet portlet, ResourceRequest request,
ResourceResponse response, PortletTestContext context) throws PortletException,
IOException
{
- sendEmptyResponse(response);
assertEquals("foo_resource_id", request.getResourceID());
return new EndTestResponse();
}
Modified:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/actions/PortletResourceTestAction.java
===================================================================
---
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/actions/PortletResourceTestAction.java 2008-01-23
20:07:37 UTC (rev 9585)
+++
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/actions/PortletResourceTestAction.java 2008-01-23
21:02:31 UTC (rev 9586)
@@ -25,6 +25,7 @@
import org.jboss.portal.unit.TestAction;
import org.jboss.portal.unit.PortletTestContext;
import org.jboss.portal.common.NotYetImplemented;
+import org.jboss.portal.common.io.IOTools;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.FailureResponse;
import org.jboss.unit.Failure;
@@ -36,6 +37,8 @@
import javax.portlet.ResourceResponse;
import java.io.IOException;
import java.io.PrintWriter;
+import java.io.Writer;
+import java.io.OutputStream;
/**
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
@@ -44,19 +47,59 @@
public abstract class PortletResourceTestAction extends TestAction
{
+ /**
+ * This field is used to determine if the action will attempt to send a response after
the action has been executed.
+ * The attempt to send a response will be done if:
+ * <ul>
+ * <li>this field has a value equals to true</li>
+ * <li>no content type has been set on the response during the execution of the
action</li>
+ * <li>the execution of the action is succesfull or is a failure (i.e it will
not be done on Errors other than
+ * <code>java.lang.AssertionError</code></li>
+ * </ul>
+ */
+ private final boolean attemptToSendResponse;
+
+ protected PortletResourceTestAction(boolean attemptToSendResponse)
+ {
+ this.attemptToSendResponse = attemptToSendResponse;
+ }
+
+ protected PortletResourceTestAction()
+ {
+ this(true);
+ }
+
public DriverResponse execute(Portlet portlet, ResourceRequest request,
ResourceResponse response, PortletTestContext context) throws PortletException,
IOException
{
+ // We attempty to do it
+ boolean sendResponse = false;
+
+ //
try
{
- return runWithRuntimeException(portlet, request, response, context);
+ DriverResponse driverResponse = runWithRuntimeException(portlet, request,
response, context);
+ sendResponse = attemptToSendResponse;
+ return driverResponse;
}
catch (AssertionError t)
{
getLogger().error("The test case failed", t);
+ // We will send a response
+ sendResponse = attemptToSendResponse;
+
//
return new FailureResponse(Failure.createFailure(t));
}
+ finally
+ {
+ if (sendResponse && response.getContentType() == null)
+ {
+ response.setContentType("text/html");
+ Writer writer = response.getWriter();
+ IOTools.safeClose(writer);
+ }
+ }
}
protected DriverResponse runWithRuntimeException(Portlet portlet, ResourceRequest
request, ResourceResponse response, PortletTestContext context) throws PortletException,
IOException
@@ -83,11 +126,4 @@
{
throw new NotYetImplemented();
}
-
- protected final void sendEmptyResponse(ResourceResponse response) throws IOException
- {
- response.setContentType("text/html");
- PrintWriter writer = response.getWriter();
- writer.close();
- }
}
\ No newline at end of file
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortletController.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortletController.java 2008-01-23
20:07:37 UTC (rev 9585)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortletController.java 2008-01-23
21:02:31 UTC (rev 9586)
@@ -37,6 +37,7 @@
import org.jboss.portal.portlet.impl.spi.AbstractPortalContext;
import org.jboss.portal.portlet.impl.spi.AbstractSecurityContext;
import org.jboss.portal.portlet.impl.spi.AbstractRequestContext;
+import org.jboss.portal.portlet.impl.spi.AbstractClientContext;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
import org.jboss.portal.portlet.invocation.response.UpdateNavigationalStateResponse;
import org.jboss.portal.portlet.invocation.response.HTTPRedirectionResponse;
@@ -156,6 +157,7 @@
ActionInvocation actionInvocation = new ActionInvocation(actionContext);
//
+ actionInvocation.setClientContext(new AbstractClientContext(req));
actionInvocation.setServerContext(new AbstractServerContext(req, resp));
actionInvocation.setInstanceContext(instanceContext);
actionInvocation.setUserContext(new AbstractUserContext(req));
@@ -250,6 +252,7 @@
ResourceInvocation resourceInvocation = new
ResourceInvocation(resourceInvocationContext);
//
+ resourceInvocation.setClientContext(new AbstractClientContext(req));
resourceInvocation.setServerContext(new AbstractServerContext(req, resp));
resourceInvocation.setInstanceContext(instanceContext);
resourceInvocation.setUserContext(new AbstractUserContext(req));
@@ -305,6 +308,7 @@
EventInvocation eventInvocation = new EventInvocation(actionContext);
//
+ eventInvocation.setClientContext(new AbstractClientContext(req));
eventInvocation.setServerContext(new AbstractServerContext(req, resp));
eventInvocation.setInstanceContext(instanceContext);
eventInvocation.setUserContext(new AbstractUserContext(req));
@@ -600,6 +604,7 @@
RenderInvocation render = new RenderInvocation(renderContext);
//
+ render.setClientContext(new AbstractClientContext(req));
render.setServerContext(new AbstractServerContext(req, resp));
render.setInstanceContext(instanceContext);
render.setUserContext(new AbstractUserContext(req));
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-01-23
20:07:37 UTC (rev 9585)
+++ modules/portlet/trunk/test/src/test/resources/test/remote-jboss-unit.xml 2008-01-23
21:02:31 UTC (rev 9586)
@@ -4,10 +4,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:jboss:jboss-unit:1.0 jboss-unit_1_0.xsd">
-<!--
- -->
-<!--Spec TCK Assertions tests-->
-<!--
+ <!--Spec TCK Assertions tests-->
<generic>
<class
name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
<property name="archiveId"
value="test-jsr168-tck-dispatcher.war"/>
@@ -53,9 +50,7 @@
<property name="archiveId"
value="test-jsr168-tck-windowstates.war"/>
</generic>
- -->
-<!--API Tests-->
-<!--
+ <!--API Tests-->
<generic>
<class
name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
<property name="archiveId"
value="test-jsr168-api-actionrequest.war"/>
@@ -109,9 +104,7 @@
<property name="archiveId"
value="test-jsr168-api-windowstate.war"/>
</generic>
- -->
-<!--Ext Tests-->
-<!--
+ <!--Ext Tests-->
<generic>
<class
name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
<property name="archiveId"
value="test-jsr168-ext-dispatcher.war"/>
@@ -140,7 +133,6 @@
<class
name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
<property name="archiveId"
value="test-jsr168-ext-session.war"/>
</generic>
--->
<!--
<generic>
<class
name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
@@ -155,11 +147,8 @@
<property name="archiveId"
value="test-jsr168-ext-nocache.war"/>
</generic>
-->
-<!--
- -->
-<!--Spec TCK Assertions tests-->
-<!--
+ <!--Spec TCK Assertions tests-->
<generic>
<class
name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
<property name="archiveId"
value="test-jsr286-tck-portletconfig.war"/>
@@ -180,7 +169,6 @@
<class
name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
<property name="archiveId"
value="test-jsr286-tck-stateawareresponse.war"/>
</generic>
--->
<generic>
<class
name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
<property name="archiveId"
value="test-jsr286-tck-portletrequests.war"/>
@@ -191,12 +179,10 @@
</generic>
<!--Spec API Assertions tests-->
-<!--
<generic>
<class
name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
<property name="archiveId"
value="test-jsr286-api-event.war"/>
</generic>
--->
<!--Ext Assertions tests-->
<generic>