Author: julien(a)jboss.com
Date: 2008-02-04 18:36:42 -0500 (Mon, 04 Feb 2008)
New Revision: 9753
Added:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/ContainerRequest.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/ControllerRequest.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/FullScopedCacheablePortletResourceRequest.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/PageScopedFullPortletResourceRequest.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/PortletActionRequest.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/PortletRenderRequest.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/PortletRequest.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/PortletResourceRequest.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/PortletScopedPortletResourceRequest.java
Removed:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/ContainerRequest.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/ControllerRequest.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/FullScopedCacheablePortletResourceRequest.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PageScopedFullPortletResourceRequest.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletActionRequest.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletRenderRequest.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletRequest.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletResourceRequest.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletScopedPortletResourceRequest.java
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletController.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletRequestHandler.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletResourceRequestHandler.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/RequestHandler.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller2/PortletControllerContextImpl.java
Log:
move all request to a request package for more readability
Deleted:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/ContainerRequest.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/ContainerRequest.java 2008-02-04
22:59:50 UTC (rev 9752)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/ContainerRequest.java 2008-02-04
23:36:42 UTC (rev 9753)
@@ -1,42 +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;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class ContainerRequest extends ControllerRequest
-{
-
- /** . */
- final String portletId;
-
- ContainerRequest(PortletControllerContext controllerContext, String portletId)
- {
- super(controllerContext);
-
- //
- this.portletId = portletId;
- }
-}
Deleted:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/ControllerRequest.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/ControllerRequest.java 2008-02-04
22:59:50 UTC (rev 9752)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/ControllerRequest.java 2008-02-04
23:36:42 UTC (rev 9753)
@@ -1,38 +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;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class ControllerRequest
-{
- /** . */
- final PortletControllerContext controllerContext;
-
- ControllerRequest(PortletControllerContext controllerContext)
- {
- this.controllerContext = controllerContext;
- }
-}
Deleted:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/FullScopedCacheablePortletResourceRequest.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/FullScopedCacheablePortletResourceRequest.java 2008-02-04
22:59:50 UTC (rev 9752)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/FullScopedCacheablePortletResourceRequest.java 2008-02-04
23:36:42 UTC (rev 9753)
@@ -1,44 +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.StateString;
-import org.jboss.portal.common.util.ParameterMap;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class FullScopedCacheablePortletResourceRequest extends PortletResourceRequest
-{
-
- public FullScopedCacheablePortletResourceRequest(
- PortletControllerContext controllerContext,
- String portletId,
- String resourceId,
- StateString resourceState,
- ParameterMap bodyParameters)
- {
- super(controllerContext, portletId, resourceId, resourceState, bodyParameters);
- }
-}
Deleted:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PageScopedFullPortletResourceRequest.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PageScopedFullPortletResourceRequest.java 2008-02-04
22:59:50 UTC (rev 9752)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PageScopedFullPortletResourceRequest.java 2008-02-04
23:36:42 UTC (rev 9753)
@@ -1,58 +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.StateString;
-import org.jboss.portal.portlet.test.WindowNavigationalState;
-import org.jboss.portal.common.util.ParameterMap;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class PageScopedFullPortletResourceRequest extends
PortletScopedPortletResourceRequest
-{
-
- /** . */
- private final PageNavigationalState pageState;
-
- public PageScopedFullPortletResourceRequest(
- PortletControllerContext controllerContext,
- String portletId,
- String resourceId,
- StateString resourceState,
- ParameterMap bodyParameters,
- PageNavigationalState pageState,
- WindowNavigationalState windowNavigationalState)
- {
- super(controllerContext, portletId, resourceId, resourceState, bodyParameters,
windowNavigationalState);
-
- //
- this.pageState = pageState;
- }
-
- PageNavigationalState getPageState()
- {
- return pageState;
- }
-}
Deleted:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletActionRequest.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletActionRequest.java 2008-02-04
22:59:50 UTC (rev 9752)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletActionRequest.java 2008-02-04
23:36:42 UTC (rev 9753)
@@ -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.StateString;
-import org.jboss.portal.portlet.test.WindowNavigationalState;
-import org.jboss.portal.common.util.ParameterMap;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class PortletActionRequest extends PortletRequest
-{
-
- /** . */
- final StateString interactionState;
-
- /** . */
- final ParameterMap bodyParameters;
-
- public PortletActionRequest(
- PortletControllerContext controllerContext,
- String portletId,
- StateString interactionState,
- ParameterMap bodyParameters,
- WindowNavigationalState windowNavigationalState,
- PageNavigationalState pageState)
- {
- super(controllerContext, portletId, windowNavigationalState, pageState);
-
- //
- this.interactionState = interactionState;
- this.bodyParameters = bodyParameters;
- }
-}
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletController.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletController.java 2008-02-04
22:59:50 UTC (rev 9752)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletController.java 2008-02-04
23:36:42 UTC (rev 9753)
@@ -25,6 +25,9 @@
import org.jboss.portal.common.util.MarkupInfo;
import org.jboss.portal.common.util.MediaType;
import org.jboss.portal.portlet.PortletInvokerException;
+import org.jboss.portal.portlet.test.controller.request.ControllerRequest;
+import org.jboss.portal.portlet.test.controller.request.PortletRequest;
+import org.jboss.portal.portlet.test.controller.request.PortletResourceRequest;
import java.io.IOException;
Deleted:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletRenderRequest.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletRenderRequest.java 2008-02-04
22:59:50 UTC (rev 9752)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletRenderRequest.java 2008-02-04
23:36:42 UTC (rev 9753)
@@ -1,51 +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.test.WindowNavigationalState;
-
-import java.util.Map;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class PortletRenderRequest extends PortletRequest
-{
-
- /** . */
- final Map<String, String[]> publicNavigationalStateChanges;
-
- public PortletRenderRequest(
- PortletControllerContext controllerContext,
- String portletId,
- WindowNavigationalState windowNavigationalState,
- Map<String, String[]> publicNavigationalStateChanges,
- PageNavigationalState pageState)
- {
- super(controllerContext, portletId, windowNavigationalState, pageState);
-
- //
- this.publicNavigationalStateChanges = publicNavigationalStateChanges;
- }
-}
Deleted:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletRequest.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletRequest.java 2008-02-04
22:59:50 UTC (rev 9752)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletRequest.java 2008-02-04
23:36:42 UTC (rev 9753)
@@ -1,52 +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.test.WindowNavigationalState;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class PortletRequest extends ContainerRequest
-{
-
- /** . */
- final PageNavigationalState pageState;
-
- /** . */
- final WindowNavigationalState windowNavigationalState;
-
- PortletRequest(
- PortletControllerContext controllerContext,
- String portletId,
- WindowNavigationalState windowNavigationalState,
- PageNavigationalState pageState)
- {
- super(controllerContext, portletId);
-
- //
- this.windowNavigationalState = windowNavigationalState;
- this.pageState = pageState;
- }
-}
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletRequestHandler.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletRequestHandler.java 2008-02-04
22:59:50 UTC (rev 9752)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletRequestHandler.java 2008-02-04
23:36:42 UTC (rev 9753)
@@ -34,6 +34,10 @@
import static org.jboss.portal.portlet.test.controller.PortletController.*;
import org.jboss.portal.portlet.test.controller.event.Event;
import org.jboss.portal.portlet.test.controller.event.EventControllerContext;
+import org.jboss.portal.portlet.test.controller.request.ControllerRequest;
+import org.jboss.portal.portlet.test.controller.request.PortletActionRequest;
+import org.jboss.portal.portlet.test.controller.request.PortletRenderRequest;
+import org.jboss.portal.portlet.test.controller.request.PortletRequest;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
@@ -68,15 +72,15 @@
ControllerResponse processResponse(PortletRequest portletRequest,
PortletInvocationResponse response) throws IOException, PortletInvokerException
{
- PortletControllerContext context = portletRequest.controllerContext;
+ PortletControllerContext context = portletRequest.getControllerContext();
// The page navigational state we will operate on during the request
// Either we have nothing in the request so we create a new one
// Or we have one but we copy it as we should not modify the input state provided
- MutablePageNavigationalState pageState = portletRequest.pageState == null ? new
MutablePageNavigationalState() : new
MutablePageNavigationalState(portletRequest.pageState);
+ MutablePageNavigationalState pageState = portletRequest.getPageState() == null ?
new MutablePageNavigationalState() : new
MutablePageNavigationalState(portletRequest.getPageState());
//
- PortletContext portletContext =
portletRequest.controllerContext.getPortlet(portletRequest.portletId).getContext();
+ PortletContext portletContext =
portletRequest.getControllerContext().getPortlet(portletRequest.getPortletId()).getContext();
//
ResponseProperties requestProperties = new ResponseProperties();
@@ -90,7 +94,7 @@
{
// Update portlet NS
UpdateNavigationalStateResponse updateResponse =
(UpdateNavigationalStateResponse)response;
- updateNavigationalState(context, portletRequest.portletId, updateResponse,
pageState);
+ updateNavigationalState(context, portletRequest.getPortletId(), updateResponse,
pageState);
//
ResponseProperties update = updateResponse.getProperties();
@@ -168,8 +172,8 @@
PortletInvocationResponse invoke(PortletRequest portletRequest) throws
PortletInvokerException
{
- PortletControllerContext context = portletRequest.controllerContext;
- Portlet portlet = context.getPortlet(portletRequest.portletId);
+ PortletControllerContext context = portletRequest.getControllerContext();
+ Portlet portlet = context.getPortlet(portletRequest.getPortletId());
HttpServletRequest req = context.getClientRequest();
HttpServletResponse resp = context.getClientResponse();
@@ -180,10 +184,10 @@
//
UpdateNavigationalStateResponse updateNavigationalState = new
UpdateNavigationalStateResponse();
-
updateNavigationalState.setMode(portletRenderRequest.windowNavigationalState.getMode());
-
updateNavigationalState.setWindowState(portletRenderRequest.windowNavigationalState.getWindowState());
-
updateNavigationalState.setNavigationalState(portletRenderRequest.windowNavigationalState.getPortletNavigationalState());
-
updateNavigationalState.setPublicNavigationalStateUpdates(portletRenderRequest.publicNavigationalStateChanges);
+
updateNavigationalState.setMode(portletRenderRequest.getWindowNavigationalState().getMode());
+
updateNavigationalState.setWindowState(portletRenderRequest.getWindowNavigationalState().getWindowState());
+
updateNavigationalState.setNavigationalState(portletRenderRequest.getWindowNavigationalState().getPortletNavigationalState());
+
updateNavigationalState.setPublicNavigationalStateUpdates(portletRenderRequest.getPublicNavigationalStateChanges());
//
return updateNavigationalState;
@@ -193,17 +197,17 @@
PortletActionRequest portletActionRequest =
(PortletActionRequest)portletRequest;
//
- PageNavigationalState pageNS = portletActionRequest.pageState;
+ PageNavigationalState pageNS = portletActionRequest.getPageState();
//
- Mode mode = portletActionRequest.windowNavigationalState.getMode();
+ Mode mode = portletActionRequest.getWindowNavigationalState().getMode();
if (mode == null)
{
mode = Mode.VIEW;
}
//
- WindowState windowState =
portletActionRequest.windowNavigationalState.getWindowState();
+ WindowState windowState =
portletActionRequest.getWindowNavigationalState().getWindowState();
if (windowState == null)
{
windowState = WindowState.NORMAL;
@@ -213,7 +217,7 @@
ParameterMap publicNS = pageNS.getPublicNavigationalState(portlet);
//
- PortletURLRenderer renderer = new PortletURLRenderer(pageNS,
portletActionRequest.windowNavigationalState, portlet, req, resp);
+ PortletURLRenderer renderer = new PortletURLRenderer(pageNS,
portletActionRequest.getWindowNavigationalState(), portlet, req, resp);
//
TestInstanceContext instanceContext = new TestInstanceContext(req,
portlet.getContext(), true);
@@ -223,10 +227,10 @@
//
actionInvocation.setMode(mode);
actionInvocation.setWindowState(windowState);
-
actionInvocation.setNavigationalState(portletActionRequest.windowNavigationalState.getPortletNavigationalState());
+
actionInvocation.setNavigationalState(portletActionRequest.getWindowNavigationalState().getPortletNavigationalState());
actionInvocation.setPublicNavigationalState(publicNS);
- actionInvocation.setInteractionState(portletActionRequest.interactionState);
- actionInvocation.setForm(portletActionRequest.bodyParameters != null ?
ParameterMap.clone(portletActionRequest.bodyParameters) : null);
+
actionInvocation.setInteractionState(portletActionRequest.getInteractionState());
+ actionInvocation.setForm(portletActionRequest.getBodyParameters() != null ?
ParameterMap.clone(portletActionRequest.getBodyParameters()) : null);
//
actionInvocation.setClientContext(new AbstractClientContext(req));
Deleted:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletResourceRequest.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletResourceRequest.java 2008-02-04
22:59:50 UTC (rev 9752)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletResourceRequest.java 2008-02-04
23:36:42 UTC (rev 9753)
@@ -1,78 +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.cache.CacheLevel;
-import org.jboss.portal.portlet.StateString;
-import org.jboss.portal.common.util.ParameterMap;
-
-import java.util.Map;
-import java.util.HashMap;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class PortletResourceRequest extends ContainerRequest
-{
-
- /** . */
- private static final Map<Class, CacheLevel> cacheability = new HashMap<Class,
CacheLevel>();
-
- static
- {
- cacheability.put(FullScopedCacheablePortletResourceRequest.class,
CacheLevel.FULL);
- cacheability.put(PortletScopedPortletResourceRequest.class, CacheLevel.PORTLET);
- cacheability.put(PageScopedFullPortletResourceRequest.class, CacheLevel.PAGE);
- }
-
- /** . */
- final String resourceId;
-
- /** . */
- final StateString resourceState;
-
- /** . */
- final ParameterMap bodyParameters;
-
- PortletResourceRequest(
- PortletControllerContext controllerContext,
- String portletId,
- String resourceId,
- StateString resourceState,
- ParameterMap bodyParameters
- )
- {
- super(controllerContext, portletId);
-
- //
- this.resourceId = resourceId;
- this.resourceState = resourceState;
- this.bodyParameters = bodyParameters;
- }
-
- public CacheLevel getCacheabilityType()
- {
- return cacheability.get(getClass());
- }
-}
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletResourceRequestHandler.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletResourceRequestHandler.java 2008-02-04
22:59:50 UTC (rev 9752)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletResourceRequestHandler.java 2008-02-04
23:36:42 UTC (rev 9753)
@@ -46,6 +46,10 @@
import org.jboss.portal.portlet.test.TestPortalContext;
import org.jboss.portal.portlet.test.TestPortletInvocationContext;
import static org.jboss.portal.portlet.test.controller.PortletController.*;
+import org.jboss.portal.portlet.test.controller.request.ControllerRequest;
+import
org.jboss.portal.portlet.test.controller.request.PageScopedFullPortletResourceRequest;
+import org.jboss.portal.portlet.test.controller.request.PortletResourceRequest;
+import
org.jboss.portal.portlet.test.controller.request.PortletScopedPortletResourceRequest;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -90,8 +94,8 @@
StateString portletNS = null;
CacheLevel cacheability;
- PortletControllerContext context = portletResourceRequest.controllerContext;
- Portlet portlet = context.getPortlet(portletResourceRequest.portletId);
+ PortletControllerContext context = portletResourceRequest.getControllerContext();
+ Portlet portlet = context.getPortlet(portletResourceRequest.getPortletId());
HttpServletRequest req = context.getClientRequest();
HttpServletResponse resp = context.getClientResponse();
@@ -99,9 +103,9 @@
if (portletResourceRequest instanceof PortletScopedPortletResourceRequest)
{
PortletScopedPortletResourceRequest portletScopedRequest =
(PortletScopedPortletResourceRequest)portletResourceRequest;
- mode = portletScopedRequest.windowNavigationalState.getMode();
- windowState = portletScopedRequest.windowNavigationalState.getWindowState();
- portletNS =
portletScopedRequest.windowNavigationalState.getPortletNavigationalState();
+ mode = portletScopedRequest.getWindowNavigationalState().getMode();
+ windowState =
portletScopedRequest.getWindowNavigationalState().getWindowState();
+ portletNS =
portletScopedRequest.getWindowNavigationalState().getPortletNavigationalState();
//
if (portletResourceRequest instanceof PageScopedFullPortletResourceRequest)
@@ -148,14 +152,14 @@
ResourceInvocation resourceInvocation = new
ResourceInvocation(resourceInvocationContext);
//
- resourceInvocation.setResourceId(portletResourceRequest.resourceId);
+ resourceInvocation.setResourceId(portletResourceRequest.getResourceId());
resourceInvocation.setCacheLevel(cacheability);
resourceInvocation.setMode(mode);
resourceInvocation.setWindowState(windowState);
resourceInvocation.setNavigationalState(portletNS);
resourceInvocation.setPublicNavigationalState(publicNS);
- resourceInvocation.setResourceState(portletResourceRequest.resourceState);
- resourceInvocation.setForm(portletResourceRequest.bodyParameters != null ?
ParameterMap.clone(portletResourceRequest.bodyParameters) : null);
+ resourceInvocation.setResourceState(portletResourceRequest.getResourceState());
+ resourceInvocation.setForm(portletResourceRequest.getBodyParameters() != null ?
ParameterMap.clone(portletResourceRequest.getBodyParameters()) : null);
//
resourceInvocation.setClientContext(new AbstractClientContext(req));
Deleted:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletScopedPortletResourceRequest.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletScopedPortletResourceRequest.java 2008-02-04
22:59:50 UTC (rev 9752)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletScopedPortletResourceRequest.java 2008-02-04
23:36:42 UTC (rev 9753)
@@ -1,52 +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.test.WindowNavigationalState;
-import org.jboss.portal.portlet.StateString;
-import org.jboss.portal.common.util.ParameterMap;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class PortletScopedPortletResourceRequest extends
FullScopedCacheablePortletResourceRequest
-{
-
- /** . */
- final WindowNavigationalState windowNavigationalState;
-
- public PortletScopedPortletResourceRequest(
- PortletControllerContext controllerContext,
- String portletId,
- String resourceId,
- StateString resourceState,
- ParameterMap bodyParameters,
- WindowNavigationalState windowNavigationalState)
- {
- super(controllerContext, portletId, resourceId, resourceState, bodyParameters);
-
- //
- this.windowNavigationalState = windowNavigationalState;
- }
-}
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/RequestHandler.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/RequestHandler.java 2008-02-04
22:59:50 UTC (rev 9752)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/RequestHandler.java 2008-02-04
23:36:42 UTC (rev 9753)
@@ -6,6 +6,7 @@
import org.apache.log4j.Logger;
import org.jboss.portal.portlet.PortletInvokerException;
+import org.jboss.portal.portlet.test.controller.request.ControllerRequest;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
import java.io.IOException;
Copied:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/ContainerRequest.java
(from rev 9750,
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/ContainerRequest.java)
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/ContainerRequest.java
(rev 0)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/ContainerRequest.java 2008-02-04
23:36:42 UTC (rev 9753)
@@ -0,0 +1,49 @@
+/******************************************************************************
+ * 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.request;
+
+import org.jboss.portal.portlet.test.controller.PortletControllerContext;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class ContainerRequest extends ControllerRequest
+{
+
+ /** . */
+ private final String portletId;
+
+ ContainerRequest(PortletControllerContext controllerContext, String portletId)
+ {
+ super(controllerContext);
+
+ //
+ this.portletId = portletId;
+ }
+
+ public String getPortletId()
+ {
+ return portletId;
+ }
+}
Copied:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/ControllerRequest.java
(from rev 9750,
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/ControllerRequest.java)
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/ControllerRequest.java
(rev 0)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/ControllerRequest.java 2008-02-04
23:36:42 UTC (rev 9753)
@@ -0,0 +1,46 @@
+/******************************************************************************
+ * 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.request;
+
+import org.jboss.portal.portlet.test.controller.PortletControllerContext;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class ControllerRequest
+{
+
+ /** . */
+ private final PortletControllerContext controllerContext;
+
+ ControllerRequest(PortletControllerContext controllerContext)
+ {
+ this.controllerContext = controllerContext;
+ }
+
+ public PortletControllerContext getControllerContext()
+ {
+ return controllerContext;
+ }
+}
Copied:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/FullScopedCacheablePortletResourceRequest.java
(from rev 9750,
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/FullScopedCacheablePortletResourceRequest.java)
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/FullScopedCacheablePortletResourceRequest.java
(rev 0)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/FullScopedCacheablePortletResourceRequest.java 2008-02-04
23:36:42 UTC (rev 9753)
@@ -0,0 +1,45 @@
+/******************************************************************************
+ * 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.request;
+
+import org.jboss.portal.portlet.StateString;
+import org.jboss.portal.portlet.test.controller.PortletControllerContext;
+import org.jboss.portal.common.util.ParameterMap;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class FullScopedCacheablePortletResourceRequest extends PortletResourceRequest
+{
+
+ public FullScopedCacheablePortletResourceRequest(
+ PortletControllerContext controllerContext,
+ String portletId,
+ String resourceId,
+ StateString resourceState,
+ ParameterMap bodyParameters)
+ {
+ super(controllerContext, portletId, resourceId, resourceState, bodyParameters);
+ }
+}
Copied:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/PageScopedFullPortletResourceRequest.java
(from rev 9750,
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PageScopedFullPortletResourceRequest.java)
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/PageScopedFullPortletResourceRequest.java
(rev 0)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/PageScopedFullPortletResourceRequest.java 2008-02-04
23:36:42 UTC (rev 9753)
@@ -0,0 +1,60 @@
+/******************************************************************************
+ * 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.request;
+
+import org.jboss.portal.portlet.StateString;
+import org.jboss.portal.portlet.test.WindowNavigationalState;
+import org.jboss.portal.portlet.test.controller.PageNavigationalState;
+import org.jboss.portal.portlet.test.controller.PortletControllerContext;
+import org.jboss.portal.common.util.ParameterMap;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class PageScopedFullPortletResourceRequest extends
PortletScopedPortletResourceRequest
+{
+
+ /** . */
+ private final PageNavigationalState pageState;
+
+ public PageScopedFullPortletResourceRequest(
+ PortletControllerContext controllerContext,
+ String portletId,
+ String resourceId,
+ StateString resourceState,
+ ParameterMap bodyParameters,
+ PageNavigationalState pageState,
+ WindowNavigationalState windowNavigationalState)
+ {
+ super(controllerContext, portletId, resourceId, resourceState, bodyParameters,
windowNavigationalState);
+
+ //
+ this.pageState = pageState;
+ }
+
+ public PageNavigationalState getPageState()
+ {
+ return pageState;
+ }
+}
Copied:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/PortletActionRequest.java
(from rev 9750,
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletActionRequest.java)
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/PortletActionRequest.java
(rev 0)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/PortletActionRequest.java 2008-02-04
23:36:42 UTC (rev 9753)
@@ -0,0 +1,68 @@
+/******************************************************************************
+ * 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.request;
+
+import org.jboss.portal.portlet.StateString;
+import org.jboss.portal.portlet.test.WindowNavigationalState;
+import org.jboss.portal.portlet.test.controller.PortletControllerContext;
+import org.jboss.portal.portlet.test.controller.PageNavigationalState;
+import org.jboss.portal.common.util.ParameterMap;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class PortletActionRequest extends PortletRequest
+{
+
+ /** . */
+ private final StateString interactionState;
+
+ /** . */
+ private final ParameterMap bodyParameters;
+
+ public PortletActionRequest(
+ PortletControllerContext controllerContext,
+ String portletId,
+ StateString interactionState,
+ ParameterMap bodyParameters,
+ WindowNavigationalState windowNavigationalState,
+ PageNavigationalState pageState)
+ {
+ super(controllerContext, portletId, windowNavigationalState, pageState);
+
+ //
+ this.interactionState = interactionState;
+ this.bodyParameters = bodyParameters;
+ }
+
+ public StateString getInteractionState()
+ {
+ return interactionState;
+ }
+
+ public ParameterMap getBodyParameters()
+ {
+ return bodyParameters;
+ }
+}
Copied:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/PortletRenderRequest.java
(from rev 9750,
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletRenderRequest.java)
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/PortletRenderRequest.java
(rev 0)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/PortletRenderRequest.java 2008-02-04
23:36:42 UTC (rev 9753)
@@ -0,0 +1,58 @@
+/******************************************************************************
+ * 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.request;
+
+import org.jboss.portal.portlet.test.WindowNavigationalState;
+import org.jboss.portal.portlet.test.controller.PortletControllerContext;
+import org.jboss.portal.portlet.test.controller.PageNavigationalState;
+
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class PortletRenderRequest extends PortletRequest
+{
+
+ /** . */
+ private final Map<String, String[]> publicNavigationalStateChanges;
+
+ public PortletRenderRequest(
+ PortletControllerContext controllerContext,
+ String portletId,
+ WindowNavigationalState windowNavigationalState,
+ Map<String, String[]> publicNavigationalStateChanges,
+ PageNavigationalState pageState)
+ {
+ super(controllerContext, portletId, windowNavigationalState, pageState);
+
+ //
+ this.publicNavigationalStateChanges = publicNavigationalStateChanges;
+ }
+
+ public Map<String, String[]> getPublicNavigationalStateChanges()
+ {
+ return publicNavigationalStateChanges;
+ }
+}
Copied:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/PortletRequest.java
(from rev 9750,
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletRequest.java)
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/PortletRequest.java
(rev 0)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/PortletRequest.java 2008-02-04
23:36:42 UTC (rev 9753)
@@ -0,0 +1,64 @@
+/******************************************************************************
+ * 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.request;
+
+import org.jboss.portal.portlet.test.WindowNavigationalState;
+import org.jboss.portal.portlet.test.controller.PageNavigationalState;
+import org.jboss.portal.portlet.test.controller.PortletControllerContext;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class PortletRequest extends ContainerRequest
+{
+
+ /** . */
+ private final PageNavigationalState pageState;
+
+ /** . */
+ private final WindowNavigationalState windowNavigationalState;
+
+ PortletRequest(
+ PortletControllerContext controllerContext,
+ String portletId,
+ WindowNavigationalState windowNavigationalState,
+ PageNavigationalState pageState)
+ {
+ super(controllerContext, portletId);
+
+ //
+ this.windowNavigationalState = windowNavigationalState;
+ this.pageState = pageState;
+ }
+
+ public PageNavigationalState getPageState()
+ {
+ return pageState;
+ }
+
+ public WindowNavigationalState getWindowNavigationalState()
+ {
+ return windowNavigationalState;
+ }
+}
Copied:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/PortletResourceRequest.java
(from rev 9750,
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletResourceRequest.java)
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/PortletResourceRequest.java
(rev 0)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/PortletResourceRequest.java 2008-02-04
23:36:42 UTC (rev 9753)
@@ -0,0 +1,94 @@
+/******************************************************************************
+ * 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.request;
+
+import org.jboss.portal.portlet.cache.CacheLevel;
+import org.jboss.portal.portlet.StateString;
+import org.jboss.portal.portlet.test.controller.PortletControllerContext;
+import org.jboss.portal.common.util.ParameterMap;
+
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class PortletResourceRequest extends ContainerRequest
+{
+
+ /** . */
+ private static final Map<Class, CacheLevel> cacheability = new HashMap<Class,
CacheLevel>();
+
+ static
+ {
+ cacheability.put(FullScopedCacheablePortletResourceRequest.class,
CacheLevel.FULL);
+ cacheability.put(PortletScopedPortletResourceRequest.class, CacheLevel.PORTLET);
+ cacheability.put(PageScopedFullPortletResourceRequest.class, CacheLevel.PAGE);
+ }
+
+ /** . */
+ private final String resourceId;
+
+ /** . */
+ private final StateString resourceState;
+
+ /** . */
+ private final ParameterMap bodyParameters;
+
+ PortletResourceRequest(
+ PortletControllerContext controllerContext,
+ String portletId,
+ String resourceId,
+ StateString resourceState,
+ ParameterMap bodyParameters
+ )
+ {
+ super(controllerContext, portletId);
+
+ //
+ this.resourceId = resourceId;
+ this.resourceState = resourceState;
+ this.bodyParameters = bodyParameters;
+ }
+
+ public CacheLevel getCacheabilityType()
+ {
+ return cacheability.get(getClass());
+ }
+
+ public String getResourceId()
+ {
+ return resourceId;
+ }
+
+ public StateString getResourceState()
+ {
+ return resourceState;
+ }
+
+ public ParameterMap getBodyParameters()
+ {
+ return bodyParameters;
+ }
+}
Copied:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/PortletScopedPortletResourceRequest.java
(from rev 9750,
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletScopedPortletResourceRequest.java)
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/PortletScopedPortletResourceRequest.java
(rev 0)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/request/PortletScopedPortletResourceRequest.java 2008-02-04
23:36:42 UTC (rev 9753)
@@ -0,0 +1,58 @@
+/******************************************************************************
+ * 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.request;
+
+import org.jboss.portal.portlet.test.WindowNavigationalState;
+import org.jboss.portal.portlet.test.controller.PortletControllerContext;
+import org.jboss.portal.portlet.StateString;
+import org.jboss.portal.common.util.ParameterMap;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class PortletScopedPortletResourceRequest extends
FullScopedCacheablePortletResourceRequest
+{
+
+ /** . */
+ private final WindowNavigationalState windowNavigationalState;
+
+ public PortletScopedPortletResourceRequest(
+ PortletControllerContext controllerContext,
+ String portletId,
+ String resourceId,
+ StateString resourceState,
+ ParameterMap bodyParameters,
+ WindowNavigationalState windowNavigationalState)
+ {
+ super(controllerContext, portletId, resourceId, resourceState, bodyParameters);
+
+ //
+ this.windowNavigationalState = windowNavigationalState;
+ }
+
+ public WindowNavigationalState getWindowNavigationalState()
+ {
+ return windowNavigationalState;
+ }
+}
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller2/PortletControllerContextImpl.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller2/PortletControllerContextImpl.java 2008-02-04
22:59:50 UTC (rev 9752)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller2/PortletControllerContextImpl.java 2008-02-04
23:36:42 UTC (rev 9753)
@@ -41,12 +41,12 @@
import org.jboss.portal.portlet.test.WindowNavigationalState;
import org.jboss.portal.portlet.test.controller.PortletControllerContext;
import org.jboss.portal.portlet.test.controller.PageNavigationalState;
-import org.jboss.portal.portlet.test.controller.PortletRenderRequest;
-import org.jboss.portal.portlet.test.controller.ControllerRequest;
-import org.jboss.portal.portlet.test.controller.PortletScopedPortletResourceRequest;
-import
org.jboss.portal.portlet.test.controller.FullScopedCacheablePortletResourceRequest;
-import org.jboss.portal.portlet.test.controller.PageScopedFullPortletResourceRequest;
-import org.jboss.portal.portlet.test.controller.PortletActionRequest;
+import org.jboss.portal.portlet.test.controller.request.PortletRenderRequest;
+import org.jboss.portal.portlet.test.controller.request.ControllerRequest;
+import
org.jboss.portal.portlet.test.controller.request.PortletScopedPortletResourceRequest;
+import
org.jboss.portal.portlet.test.controller.request.FullScopedCacheablePortletResourceRequest;
+import
org.jboss.portal.portlet.test.controller.request.PageScopedFullPortletResourceRequest;
+import org.jboss.portal.portlet.test.controller.request.PortletActionRequest;
import org.jboss.portal.portlet.test.controller.event.EventControllerContext;
import org.jboss.portal.portlet.test.controller.event.EventControllerContextImpl;
import org.jboss.portal.web.Body;