Author: thomas.heute(a)jboss.com
Date: 2008-02-22 11:28:22 -0500 (Fri, 22 Feb 2008)
New Revision: 10090
Removed:
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/tck/
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/test/
Modified:
branches/JBoss_Portal_Branch_2_7/build/build-thirdparty.xml
branches/JBoss_Portal_Branch_2_7/core-cms/.classpath
branches/JBoss_Portal_Branch_2_7/core-cms/src/main/org/jboss/portal/core/cms/CMSObjectCommandFactoryService.java
branches/JBoss_Portal_Branch_2_7/core-identity/.classpath
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/impl/IdentityCommandFactoryService.java
branches/JBoss_Portal_Branch_2_7/core-samples/.classpath
branches/JBoss_Portal_Branch_2_7/core-search/src/main/org/jboss/portal/core/search/service/SearchResultCommandFactoryService.java
branches/JBoss_Portal_Branch_2_7/core/.classpath
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/controller/node/EventBroadcasterInterceptor.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/HeaderInterceptor.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerResponseFactory.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/deployment/jboss/PortletAppDeployment.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/api/node/AbstractPortalNodeURL.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/instance/InstanceSecurityInterceptor.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/instance/command/action/InvokePortletInstanceActionCommand.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowActionCommand.java
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFInvocation.java
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFRenderContext.java
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletActionEvent.java
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletRenderEvent.java
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/framework/support/TestPortletInvocationContext.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/MarkupTestCase.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/ActionContextRequestContext.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/ActionHandler.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/RenderHandler.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/RequestPrecursor.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/WSRPConsumerImpl.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/ActionRequestProcessor.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/MarkupHandler.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPActionContext.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPRequestContext.java
Log:
Started to move to the new API.
Build is *broken* it is expected
Modified: branches/JBoss_Portal_Branch_2_7/build/build-thirdparty.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/build/build-thirdparty.xml 2008-02-22 15:19:14 UTC
(rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/build/build-thirdparty.xml 2008-02-22 16:28:22 UTC
(rev 10090)
@@ -47,10 +47,10 @@
are pushed to the
http://repository.jboss.com site.
-->
- <componentref name="jboss-portal/modules/common"
version="1.1.0"/>
- <componentref name="jboss-portal/modules/web"
version="1.1.0"/>
+ <componentref name="jboss-portal/modules/common"
version="trunk-SNAPSHOT"/>
+ <componentref name="jboss-portal/modules/web"
version="trunk-SNAPSHOT"/>
<componentref name="jboss-portal/modules/test"
version="1.0.1"/>
- <componentref name="jboss-portal/modules/portlet"
version="1.0.1"/>
+ <componentref name="jboss-portal/modules/portlet"
version="trunk-SNAPSHOT"/>
<componentref name="jboss-portal/modules/identity"
version="1.0.1"/>
<componentref name="antlr" version="2.7.6.ga"/>
<componentref name="apache-ant" version="1.6.5"/>
@@ -120,6 +120,7 @@
<componentref name="wutka-dtdparser" version="1.2.1"/>
<componentref name="portals-bridges" version="1.0.3"/>
<componentref name="tagsoup" version="1.2"/>
+ <componentref name="portlet" version="2.0-Draft32"/>
<!-- For the presentation branch only, not the mainstream branch -->
Modified: branches/JBoss_Portal_Branch_2_7/core/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/.classpath 2008-02-22 15:19:14 UTC (rev 10089)
+++ branches/JBoss_Portal_Branch_2_7/core/.classpath 2008-02-22 16:28:22 UTC (rev 10090)
@@ -44,7 +44,7 @@
<classpathentry combineaccessrules="false" kind="src"
path="/portlet-server"/>
<classpathentry kind="lib"
path="/thirdparty/apache-xerces/lib/xml-apis.jar"/>
<classpathentry kind="lib"
path="/thirdparty/freemarker/lib/freemarker.jar"/>
- <classpathentry kind="lib"
path="/thirdparty/jboss-portal/modules/common/lib/portal-common-lib.jar"/>
+ <classpathentry kind="lib"
path="/thirdparty/jboss-portal/modules/common/lib/portal-common-lib.jar"
sourcepath="/module-common"/>
<classpathentry kind="lib"
path="/thirdparty/jboss-portal/modules/web/lib/portal-web-lib.jar"/>
<classpathentry kind="lib"
path="/thirdparty/jboss-portal/modules/common/lib/portal-common-portal-lib.jar"/>
<classpathentry kind="lib"
path="/thirdparty/jboss-portal/modules/identity/lib/portal-identity-lib.jar"/>
@@ -55,6 +55,7 @@
<classpathentry kind="lib"
path="/thirdparty/jboss-portal/modules/test/lib/portal-test-lib.jar"/>
<classpathentry kind="lib"
path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-federation-lib.jar"/>
<classpathentry kind="lib"
path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-jsr168api-lib.jar"/>
- <classpathentry kind="lib"
path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar"/>
+ <classpathentry kind="lib"
path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar"
sourcepath="/module-portlet"/>
+ <classpathentry kind="lib"
path="/thirdparty/portlet/lib/portlet-api.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java 2008-02-22
15:19:14 UTC (rev 10089)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java 2008-02-22
16:28:22 UTC (rev 10090)
@@ -53,7 +53,7 @@
import org.jboss.portal.core.model.portal.command.view.ViewPortalCommand;
import org.jboss.portal.core.theme.PageRendition;
import org.jboss.portal.identity.User;
-import org.jboss.portal.portlet.PortletParametersStateString;
+import org.jboss.portal.portlet.ParametersStateString;
import org.jboss.portal.security.PortalSecurityException;
import org.jboss.portal.security.spi.auth.PortalAuthorizationManager;
import org.jboss.portal.security.spi.auth.PortalAuthorizationManagerFactory;
@@ -235,7 +235,7 @@
if (isDashboard)
{
// Edit page
- PortletParametersStateString navState = new
PortletParametersStateString();
+ ParametersStateString navState = ParametersStateString.create();
navState.setValue("editPageSelect", pageName);
InvokePortletInstanceRenderCommand command = new
InvokePortletInstanceRenderCommand("DashboardConfigPortletInstance", navState);
rd.setAttribute("org.jboss.portal.header.EDIT_DASHBOARD_URL",
new PortalURLImpl(command, controllerCtx, null, null));
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/controller/node/EventBroadcasterInterceptor.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/controller/node/EventBroadcasterInterceptor.java 2008-02-22
15:19:14 UTC (rev 10089)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/controller/node/EventBroadcasterInterceptor.java 2008-02-22
16:28:22 UTC (rev 10090)
@@ -35,6 +35,7 @@
import org.jboss.portal.api.node.event.WindowRenderEvent;
import org.jboss.portal.common.invocation.InvocationException;
import org.jboss.portal.common.util.LazyMap;
+import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.core.controller.CommandRedirectionException;
import org.jboss.portal.core.controller.ControllerCommand;
import org.jboss.portal.core.controller.ControllerInterceptor;
@@ -50,8 +51,7 @@
import org.jboss.portal.core.model.portal.command.render.RenderWindowCommand;
import org.jboss.portal.core.model.portal.navstate.WindowNavigationalState;
import org.jboss.portal.core.navstate.NavigationalStateKey;
-import org.jboss.portal.portlet.PortletParameters;
-import org.jboss.portal.portlet.PortletParametersStateString;
+import org.jboss.portal.portlet.ParametersStateString;
import org.jboss.portal.portlet.StateString;
import java.util.Map;
@@ -146,10 +146,10 @@
Map params = wae.getParameters();
//
- PortletParameters interactionParams;
+ ParameterMap interactionParams;
if (params instanceof ActionParameterMap)
{
- interactionParams =
(PortletParameters)((ActionParameterMap)params).createDelegate();
+ interactionParams =
(ParameterMap)((ActionParameterMap)params).createDelegate();
}
else
{
@@ -164,7 +164,7 @@
mode,
windowState,
null,
- new PortletParametersStateString(interactionParams),
+ ParametersStateString.create(interactionParams),
null);
}
}
@@ -174,8 +174,8 @@
//
Map params = wne.getParameters();
- PortletParameters navigationalParams = asParameters(params);
- StateString state = navigationalParams != null ? new
PortletParametersStateString(navigationalParams) : null;
+ ParameterMap navigationalParams = asParameters(params);
+ StateString state = navigationalParams != null ?
ParametersStateString.create(navigationalParams) : null;
//
return new InvokePortletWindowRenderCommand(nodeRef, mode, windowState,
state);
@@ -205,13 +205,13 @@
InvokePortletWindowActionCommand iwac =
(InvokePortletWindowActionCommand)wc;
// Get form parameters
- PortletParameters formParameters = iwac.getFormParameters();
+ ParameterMap formParameters = iwac.getFormParameters();
// Get interaction parameters
- PortletParameters interactionParameters = null;
- if (iwac.getInteractionState() instanceof PortletParametersStateString)
+ ParameterMap interactionParameters = null;
+ if (iwac.getInteractionState() instanceof ParametersStateString)
{
- interactionParameters =
((PortletParametersStateString)iwac.getInteractionState()).getParameters();
+ interactionParameters =
((ParametersStateString)iwac.getInteractionState()).getParameters();
}
// Build a map that represents the parameters of the action
@@ -235,7 +235,7 @@
}
else
{
- actionParameters = new PortletParameters();
+ actionParameters = new ParameterMap();
}
}
@@ -257,9 +257,9 @@
//
StateString navigationalState = iwrc.getNavigationalState();
- if (navigationalState instanceof PortletParametersStateString)
+ if (navigationalState instanceof ParametersStateString)
{
- Map params =
((PortletParametersStateString)navigationalState).getParameters();
+ Map params = ((ParametersStateString)navigationalState).getParameters();
event.setParameters(params);
}
@@ -280,9 +280,9 @@
event.setWindowState(navstate.getWindowState());
StateString parametersState = navstate.getContentState();
- if (parametersState instanceof PortletParametersStateString)
+ if (parametersState instanceof ParametersStateString)
{
- Map params =
((PortletParametersStateString)parametersState).getParameters();
+ Map params = ((ParametersStateString)parametersState).getParameters();
event.setParameters(params);
}
}
@@ -304,21 +304,21 @@
* @param map
* @return
*/
- private PortletParameters asParameters(Map map)
+ private ParameterMap asParameters(Map map)
{
if (map == null)
{
return null;
}
- else if (map instanceof PortletParameters)
+ else if (map instanceof ParameterMap)
{
- return (PortletParameters)map;
+ return (ParameterMap)map;
}
else
{
try
{
- return new PortletParameters(map);
+ return new ParameterMap(map);
}
catch (IllegalArgumentException e)
{
@@ -336,15 +336,15 @@
private static class ActionParameterMap extends LazyMap
{
/** . */
- private PortletParameters formParams;
+ private ParameterMap formParams;
/** . */
- private PortletParameters interactionParams;
+ private ParameterMap interactionParams;
/** . */
- private PortletParameters params;
+ private ParameterMap params;
- public ActionParameterMap(PortletParameters interactionParams, PortletParameters
formParams)
+ public ActionParameterMap(ParameterMap interactionParams, ParameterMap formParams)
{
this.formParams = formParams;
this.interactionParams = interactionParams;
@@ -355,7 +355,7 @@
{
if (params == null)
{
- params = new PortletParameters(interactionParams);
+ params = new ParameterMap(interactionParams);
params.append(formParams);
}
return params;
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/HeaderInterceptor.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/HeaderInterceptor.java 2008-02-22
15:19:14 UTC (rev 10089)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/HeaderInterceptor.java 2008-02-22
16:28:22 UTC (rev 10090)
@@ -58,6 +58,7 @@
StringWriter buffer = null;
// Get existing header which may be null
+
String headerChars = fragment.getHeader();
// Add declaratively injected header content here (get it via the component)
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerResponseFactory.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerResponseFactory.java 2008-02-22
15:19:14 UTC (rev 10089)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerResponseFactory.java 2008-02-22
16:28:22 UTC (rev 10090)
@@ -37,8 +37,7 @@
import org.jboss.portal.portlet.NoSuchPortletException;
import org.jboss.portal.portlet.PortletInvokerException;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
-import org.jboss.portal.portlet.invocation.response.RenderResponse;
-import org.jboss.portal.portlet.spi.ActionContext;
+import org.jboss.portal.portlet.invocation.response.UpdateNavigationalStateResponse;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -59,11 +58,11 @@
}
}
- public static ControllerResponse createActionResponse(PortalObjectId targetId,
ActionContext actionContext, PortletInvocationResponse response)
+ public static ControllerResponse createActionResponse(PortalObjectId targetId,
RequestContext reqContext, PortletInvocationResponse response)
{
- if (response instanceof RenderResponse)
+ if (response instanceof UpdateNavigationalStateResponse)
{
- RenderResponse renderResult = (RenderResponse)response;
+ UpdateNavigationalStateResponse renderResult =
(UpdateNavigationalStateResponse)response;
//
Mode mode = renderResult.getMode();
@@ -90,9 +89,9 @@
public static ControllerResponse createActionResponse(String instanceId,
PortletInvocationResponse response)
{
- if (response instanceof
org.jboss.portal.portlet.invocation.response.RenderResponse)
+ if (response instanceof UpdateNavigationalStateResponse)
{
- RenderResponse renderResult = (RenderResponse)response;
+ UpdateNavigationalStateResponse renderResult =
(UpdateNavigationalStateResponse)response;
//
return new PortletInstanceActionResponse(instanceId, null, null,
renderResult.getNavigationalState());
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java 2008-02-22
15:19:14 UTC (rev 10089)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java 2008-02-22
16:28:22 UTC (rev 10090)
@@ -34,7 +34,6 @@
import
org.jboss.portal.core.model.portal.command.action.InvokePortletWindowActionCommand;
import
org.jboss.portal.core.model.portal.command.action.InvokePortletWindowRenderCommand;
import org.jboss.portal.portlet.ActionURL;
-import org.jboss.portal.portlet.PortletParameters;
import org.jboss.portal.portlet.PortletURL;
import org.jboss.portal.portlet.RenderURL;
import org.jboss.portal.portlet.StateString;
@@ -78,7 +77,7 @@
WindowState windowState,
StateString navigationalState,
StateString interactionState,
- PortletParameters form,
+ ParameterMap form,
Window window,
Portal portal)
{
@@ -93,7 +92,7 @@
WindowState windowState,
StateString navigationalState,
StateString interactionState,
- PortletParameters form,
+ ParameterMap form,
PortletContextFactory cf,
InvokePortletCommandFactory cpc)
{
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/deployment/jboss/PortletAppDeployment.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/deployment/jboss/PortletAppDeployment.java 2008-02-22
15:19:14 UTC (rev 10089)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/deployment/jboss/PortletAppDeployment.java 2008-02-22
16:28:22 UTC (rev 10090)
@@ -51,7 +51,6 @@
import org.jboss.portal.portlet.InvalidPortletIdException;
import org.jboss.portal.portlet.NoSuchPortletException;
import org.jboss.portal.portlet.PortletInvokerException;
-import org.jboss.portal.portlet.impl.jsr168.metadata.PreferenceMetaData;
import org.jboss.portal.portlet.state.PropertyChange;
import org.jboss.portal.portlet.state.PropertyMap;
import org.jboss.portal.security.RoleSecurityBinding;
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/api/node/AbstractPortalNodeURL.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/api/node/AbstractPortalNodeURL.java 2008-02-22
15:19:14 UTC (rev 10089)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/api/node/AbstractPortalNodeURL.java 2008-02-22
16:28:22 UTC (rev 10090)
@@ -25,7 +25,7 @@
import org.jboss.portal.api.node.PortalNodeURL;
import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.core.model.portal.PortalObjectId;
-import org.jboss.portal.portlet.PortletParametersStateString;
+import org.jboss.portal.portlet.ParametersStateString;
import org.jboss.portal.server.request.URLContext;
/**
@@ -42,7 +42,7 @@
protected ControllerContext controllerContext;
/** . */
- protected PortletParametersStateString parameters;
+ protected ParametersStateString parameters;
/** . */
protected Boolean wantSecure;
@@ -61,7 +61,7 @@
this.id = id;
this.controllerContext = controllerContext;
this.relative = true;
- this.parameters = new PortletParametersStateString();
+ this.parameters = ParametersStateString.create();
}
public void setParameter(String name, String value)
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java 2008-02-22
15:19:14 UTC (rev 10089)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java 2008-02-22
16:28:22 UTC (rev 10090)
@@ -39,7 +39,7 @@
import org.jboss.portal.core.model.portal.content.WindowRendition;
import org.jboss.portal.core.model.portal.content.ContentRendererContext;
import org.jboss.portal.core.model.portal.navstate.WindowNavigationalState;
-import org.jboss.portal.portlet.PortletParametersStateString;
+import org.jboss.portal.portlet.ParametersStateString;
import java.util.Iterator;
import java.util.Map;
@@ -180,7 +180,7 @@
//
if (navigationalState == null)
{
- PortletParametersStateString state = new PortletParametersStateString();
+ ParametersStateString state = ParametersStateString.create();
//
for (Iterator i = content.getParameterNames(); i.hasNext();)
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/instance/InstanceSecurityInterceptor.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/instance/InstanceSecurityInterceptor.java 2008-02-22
15:19:14 UTC (rev 10089)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/instance/InstanceSecurityInterceptor.java 2008-02-22
16:28:22 UTC (rev 10090)
@@ -64,7 +64,7 @@
{
// Compute the security mask
int mask = InstancePermission.VIEW_MASK;
- Mode mode = invocation.getPortletContext().getMode();
+ Mode mode = invocation.getMode();
if (Mode.ADMIN.equals(mode))
{
mask |= InstancePermission.ADMIN_MASK;
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/instance/command/action/InvokePortletInstanceActionCommand.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/instance/command/action/InvokePortletInstanceActionCommand.java 2008-02-22
15:19:14 UTC (rev 10089)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/instance/command/action/InvokePortletInstanceActionCommand.java 2008-02-22
16:28:22 UTC (rev 10090)
@@ -24,6 +24,7 @@
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
+import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.core.controller.ControllerException;
import org.jboss.portal.core.controller.ControllerResponse;
import org.jboss.portal.core.controller.command.info.CommandInfo;
@@ -34,7 +35,6 @@
import org.jboss.portal.core.model.instance.InvokePortletInstanceCommandFactory;
import org.jboss.portal.core.model.instance.command.PortletInstanceCommand;
import org.jboss.portal.portlet.PortletInvokerException;
-import org.jboss.portal.portlet.PortletParameters;
import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.invocation.ActionInvocation;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
@@ -50,13 +50,13 @@
private StateString interactionState;
/** The nform. */
- private PortletParameters form;
+ private ParameterMap form;
public InvokePortletInstanceActionCommand(
String instanceId,
StateString navigationalState,
StateString interactionState,
- PortletParameters form)
+ ParameterMap form)
{
super(instanceId, navigationalState);
@@ -70,7 +70,7 @@
return interactionState;
}
- public PortletParameters getForm()
+ public ParameterMap getForm()
{
return form;
}
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowActionCommand.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowActionCommand.java 2008-02-22
15:19:14 UTC (rev 10089)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowActionCommand.java 2008-02-22
16:28:22 UTC (rev 10090)
@@ -25,6 +25,7 @@
import org.jboss.logging.Logger;
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
+import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.core.controller.ControllerException;
import org.jboss.portal.core.controller.ControllerResponse;
import org.jboss.portal.core.controller.NoSuchResourceException;
@@ -37,11 +38,10 @@
import org.jboss.portal.core.model.portal.PortalObjectId;
import org.jboss.portal.identity.User;
import org.jboss.portal.portlet.PortletInvokerException;
-import org.jboss.portal.portlet.PortletParameters;
import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.invocation.PortletInvocation;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
-import org.jboss.portal.portlet.spi.ActionContext;
+import org.jboss.portal.portlet.spi.RequestContext;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -63,7 +63,7 @@
private StateString interactionState;
/** . */
- private PortletParameters formParameters;
+ private ParameterMap formParameters;
/** The instance. */
protected Instance instance;
@@ -74,7 +74,7 @@
WindowState windowState,
StateString navigationalState,
StateString interactionState,
- PortletParameters formParameters)
+ ParameterMap formParameters)
throws IllegalArgumentException
{
super(windowId, mode, windowState);
@@ -100,12 +100,12 @@
this.interactionState = interactionState;
}
- public PortletParameters getFormParameters()
+ public ParameterMap getFormParameters()
{
return formParameters;
}
- public void setFormParameters(PortletParameters formParameters)
+ public void setFormParameters(ParameterMap formParameters)
{
this.formParameters = formParameters;
}
@@ -174,7 +174,7 @@
PortletInvocationResponse response = instance.invoke(invocation);
//
- return ControllerResponseFactory.createActionResponse(targetId,
(ActionContext)invocation.getContext(), response);
+ return ControllerResponseFactory.createActionResponse(targetId,
(RequestContext)invocation.getContext(), response);
}
catch (PortletInvokerException e)
{
Modified: branches/JBoss_Portal_Branch_2_7/core-cms/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-cms/.classpath 2008-02-22 15:19:14 UTC (rev
10089)
+++ branches/JBoss_Portal_Branch_2_7/core-cms/.classpath 2008-02-22 16:28:22 UTC (rev
10090)
@@ -27,5 +27,6 @@
<classpathentry kind="lib"
path="/thirdparty/jboss-portal/modules/common/lib/portal-common-portal-lib.jar"/>
<classpathentry kind="lib"
path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-jsr168api-lib.jar"/>
<classpathentry kind="lib"
path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar"/>
+ <classpathentry kind="lib"
path="/thirdparty/portlet/lib/portlet-api.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified:
branches/JBoss_Portal_Branch_2_7/core-cms/src/main/org/jboss/portal/core/cms/CMSObjectCommandFactoryService.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-cms/src/main/org/jboss/portal/core/cms/CMSObjectCommandFactoryService.java 2008-02-22
15:19:14 UTC (rev 10089)
+++
branches/JBoss_Portal_Branch_2_7/core-cms/src/main/org/jboss/portal/core/cms/CMSObjectCommandFactoryService.java 2008-02-22
16:28:22 UTC (rev 10090)
@@ -36,7 +36,7 @@
import org.jboss.portal.core.model.portal.PortalObjectId;
import org.jboss.portal.core.model.portal.PortalObjectPath;
import
org.jboss.portal.core.model.portal.command.action.InvokePortletWindowRenderCommand;
-import org.jboss.portal.portlet.PortletParametersStateString;
+import org.jboss.portal.portlet.ParametersStateString;
import org.jboss.portal.server.ServerInvocation;
import org.jboss.portal.server.config.ServerConfig;
@@ -154,7 +154,7 @@
else
{
// Set the content as a render parameter
- PortletParametersStateString parameters = new
PortletParametersStateString();
+ ParametersStateString parameters = ParametersStateString.create();
parameters.setValue(CMSPortlet.RENDER_PARAMETER_PATH, path);
// Perform a render URL on the target window
@@ -167,7 +167,7 @@
{
if (e.toString().indexOf("Access to this resource is denied") != -1)
{
- PortletParametersStateString parameters = new
PortletParametersStateString();
+ ParametersStateString parameters = ParametersStateString.create();
parameters.setValue("path", requestPath);
return new InvokePortletWindowRenderCommand(targetWindowId, Mode.VIEW, null,
parameters);
}
Modified: branches/JBoss_Portal_Branch_2_7/core-identity/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-identity/.classpath 2008-02-22 15:19:14 UTC (rev
10089)
+++ branches/JBoss_Portal_Branch_2_7/core-identity/.classpath 2008-02-22 16:28:22 UTC (rev
10090)
@@ -48,6 +48,6 @@
<classpathentry kind="lib"
path="/thirdparty/jboss/jbossxb/lib/jboss-xml-binding.jar"/>
<classpathentry combineaccessrules="false" kind="src"
path="/theme"/>
<classpathentry kind="lib"
path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar"/>
- <classpathentry kind="lib"
path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-jsr168api-lib.jar"/>
+ <classpathentry kind="lib"
path="/thirdparty/portlet/lib/portlet-api.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/impl/IdentityCommandFactoryService.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/impl/IdentityCommandFactoryService.java 2008-02-22
15:19:14 UTC (rev 10089)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/impl/IdentityCommandFactoryService.java 2008-02-22
16:28:22 UTC (rev 10090)
@@ -30,7 +30,7 @@
import
org.jboss.portal.core.identity.services.metadata.CoreIdentityConfigurationException;
import org.jboss.portal.core.identity.services.workflow.ValidateEmailService;
import
org.jboss.portal.core.model.instance.command.action.InvokePortletInstanceRenderCommand;
-import org.jboss.portal.portlet.PortletParametersStateString;
+import org.jboss.portal.portlet.ParametersStateString;
import org.jboss.portal.server.ServerInvocation;
/**
@@ -58,7 +58,7 @@
public ControllerCommand doMapping(ControllerContext controllerContext,
ServerInvocation invocation, String host,
String contextPath, String requestPath)
{
- PortletParametersStateString renderParameters = new PortletParametersStateString();
+ ParametersStateString renderParameters = ParametersStateString.create();
String operation = IdentityConstants.VALIDATION_FAILED;
if (requestPath != null && requestPath.length() > 1)
Modified: branches/JBoss_Portal_Branch_2_7/core-samples/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-samples/.classpath 2008-02-22 15:19:14 UTC (rev
10089)
+++ branches/JBoss_Portal_Branch_2_7/core-samples/.classpath 2008-02-22 16:28:22 UTC (rev
10090)
@@ -14,8 +14,8 @@
<classpathentry kind="lib"
path="/thirdparty/jboss-portal/modules/identity/lib/portal-identity-lib.jar"/>
<classpathentry kind="lib"
path="/thirdparty/jboss-portal/modules/common/lib/portal-common-portal-lib.jar"/>
<classpathentry kind="lib"
path="/thirdparty/jbossas/core-libs/lib/jboss-jmx.jar"
sourcepath="/JBoss_AS_4.0.5/jmx/src/main"/>
- <classpathentry kind="lib"
path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-jsr168api-lib.jar"/>
<classpathentry kind="lib"
path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar"/>
<classpathentry kind="lib"
path="/thirdparty/sun-servlet/lib/servlet-api.jar"/>
+ <classpathentry kind="lib"
path="/thirdparty/portlet/lib/portlet-api.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified:
branches/JBoss_Portal_Branch_2_7/core-search/src/main/org/jboss/portal/core/search/service/SearchResultCommandFactoryService.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-search/src/main/org/jboss/portal/core/search/service/SearchResultCommandFactoryService.java 2008-02-22
15:19:14 UTC (rev 10089)
+++
branches/JBoss_Portal_Branch_2_7/core-search/src/main/org/jboss/portal/core/search/service/SearchResultCommandFactoryService.java 2008-02-22
16:28:22 UTC (rev 10090)
@@ -33,7 +33,7 @@
import org.jboss.portal.core.model.portal.PortalObjectId;
import org.jboss.portal.core.model.portal.PortalObjectPath;
import
org.jboss.portal.core.model.portal.command.action.InvokePortletWindowRenderCommand;
-import org.jboss.portal.portlet.PortletParametersStateString;
+import org.jboss.portal.portlet.ParametersStateString;
import org.jboss.portal.server.ServerInvocation;
/**
@@ -48,7 +48,7 @@
{
Map parameters = invocation.getServerContext().getQueryParameterMap();
- PortletParametersStateString renderParameters = new
PortletParametersStateString();
+ ParametersStateString renderParameters = ParametersStateString.create();
String targetWindowRef = null;
Iterator it = parameters.keySet().iterator();
Modified:
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFInvocation.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFInvocation.java 2008-02-22
15:19:14 UTC (rev 10089)
+++
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFInvocation.java 2008-02-22
16:28:22 UTC (rev 10090)
@@ -27,10 +27,10 @@
import org.jboss.portal.common.text.FastURLEncoder;
import org.jboss.portal.common.util.MarkupInfo;
import org.jboss.portal.common.util.MediaType;
+import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.portlet.Portlet;
import org.jboss.portal.portlet.PortletInvoker;
import org.jboss.portal.portlet.PortletInvokerException;
-import org.jboss.portal.portlet.PortletParameters;
import org.jboss.portal.portlet.PortletURL;
import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.bridge.JBossServletContextProvider;
@@ -162,7 +162,7 @@
Portlet portlet,
Mode mode,
WindowState windowState,
- PortletParameters navState) throws PortletInvokerException
+ ParameterMap navState) throws PortletInvokerException
{
//
RenderContext renderContext = new JSFRenderContext(
Modified:
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFRenderContext.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFRenderContext.java 2008-02-22
15:19:14 UTC (rev 10089)
+++
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFRenderContext.java 2008-02-22
16:28:22 UTC (rev 10090)
@@ -29,8 +29,8 @@
import org.jboss.portal.common.invocation.resolver.PrincipalAttributeResolver;
import org.jboss.portal.common.invocation.resolver.RequestAttributeResolver;
import org.jboss.portal.common.util.MarkupInfo;
-import org.jboss.portal.portlet.PortletParameters;
-import org.jboss.portal.portlet.PortletParametersStateString;
+import org.jboss.portal.common.util.ParameterMap;
+import org.jboss.portal.portlet.ParametersStateString;
import org.jboss.portal.portlet.PortletURL;
import org.jboss.portal.portlet.impl.spi.AbstractRenderContext;
import org.jboss.portal.portlet.invocation.PortletInvocation;
@@ -51,11 +51,11 @@
public JSFRenderContext(
Mode mode, WindowState
windowState,
- PortletParameters navState,
+ ParameterMap navState,
MarkupInfo markupInfo,
JSFInvocation invocation)
{
- super(mode, windowState, navState != null ? new
PortletParametersStateString(navState) : null, markupInfo);
+ super(mode, windowState, navState != null ? ParametersStateString.create(navState)
: null, markupInfo);
//
this.invocation = invocation;
Modified:
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletActionEvent.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletActionEvent.java 2008-02-22
15:19:14 UTC (rev 10089)
+++
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletActionEvent.java 2008-02-22
16:28:22 UTC (rev 10090)
@@ -24,12 +24,12 @@
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
+import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.portlet.Portlet;
import org.jboss.portal.portlet.PortletInvokerException;
-import org.jboss.portal.portlet.PortletParameters;
-import org.jboss.portal.portlet.PortletParametersStateString;
+import org.jboss.portal.portlet.ParametersStateString;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
-import org.jboss.portal.portlet.invocation.response.RenderResponse;
+import org.jboss.portal.portlet.invocation.response.UpdateNavigationalStateResponse;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
@@ -43,7 +43,7 @@
{
/** . */
- private final PortletParameters interactionState;
+ private final ParameterMap interactionState;
/** . */
private Mode mode;
@@ -51,7 +51,7 @@
/** . */
private WindowState windowState;
- PortletActionEvent(UIComponent uiComponent, PortletParameters interactionState, Mode
mode, WindowState windowState)
+ PortletActionEvent(UIComponent uiComponent, ParameterMap interactionState, Mode mode,
WindowState windowState)
{
super(uiComponent);
@@ -117,13 +117,13 @@
//
try
{
- PortletInvocationResponse pir = invocation.action(portlet, mode, windowState,
new PortletParametersStateString(interactionState));
- if (pir instanceof RenderResponse)
+ PortletInvocationResponse pir = invocation.action(portlet, mode, windowState,
ParametersStateString.create(interactionState));
+ if (pir instanceof UpdateNavigationalStateResponse)
{
- RenderResponse render = (RenderResponse)pir;
+ UpdateNavigationalStateResponse render = (UpdateNavigationalStateResponse)pir;
//
-
uiportlet.setInternalNavState(((PortletParametersStateString)render.getNavigationalState()).getParameters());
+
uiportlet.setInternalNavState(((ParametersStateString)render.getNavigationalState()).getParameters());
//
if (render.getWindowState() != null)
Modified:
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletRenderEvent.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletRenderEvent.java 2008-02-22
15:19:14 UTC (rev 10089)
+++
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletRenderEvent.java 2008-02-22
16:28:22 UTC (rev 10090)
@@ -24,7 +24,7 @@
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
-import org.jboss.portal.portlet.PortletParameters;
+import org.jboss.portal.common.util.ParameterMap;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
@@ -38,7 +38,7 @@
{
/** . */
- private final PortletParameters navState;
+ private final ParameterMap navState;
/** . */
private Mode mode;
@@ -46,7 +46,7 @@
/** . */
private WindowState windowState;
- public PortletRenderEvent(UIComponent uiComponent, PortletParameters navState, Mode
mode, WindowState windowState)
+ public PortletRenderEvent(UIComponent uiComponent, ParameterMap navState, Mode mode,
WindowState windowState)
{
super(uiComponent);
Modified:
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java 2008-02-22
15:19:14 UTC (rev 10089)
+++
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java 2008-02-22
16:28:22 UTC (rev 10090)
@@ -24,13 +24,13 @@
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
+import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.faces.util.ActionEventDispatcher;
import org.jboss.portal.portlet.Portlet;
import org.jboss.portal.portlet.PortletContext;
import org.jboss.portal.portlet.PortletInvoker;
import org.jboss.portal.portlet.PortletInvokerException;
-import org.jboss.portal.portlet.PortletParameters;
-import org.jboss.portal.portlet.PortletParametersStateString;
+import org.jboss.portal.portlet.ParametersStateString;
import org.jboss.portal.portlet.impl.PortletRequestDecoder;
import org.jboss.portal.portlet.invocation.response.FragmentResponse;
import org.jboss.portal.portlet.invocation.response.InsufficientPrivilegesResponse;
@@ -90,7 +90,7 @@
private String onClick;
/** The internal nav state. */
- private PortletParameters internalNavState;
+ private ParameterMap internalNavState;
/** The internal window state value. */
private WindowState internalWindowState;
@@ -303,7 +303,7 @@
this.internalMode = mode;
}
- void setInternalNavState(PortletParameters navState)
+ void setInternalNavState(ParameterMap navState)
{
ValueBinding vb = getValueBinding("renderParameters");
if (vb != null)
@@ -318,13 +318,13 @@
}
}
- PortletParameters getInternalNavState()
+ ParameterMap getInternalNavState()
{
ValueBinding vb = getValueBinding("renderParameters");
if (vb != null)
{
Map renderParameters = (Map)vb.getValue(getFacesContext());
- return PortletParameters.wrap(renderParameters);
+ return ParameterMap.wrap(renderParameters);
}
else
{
@@ -385,7 +385,7 @@
String opaqueValue = null;
if (internalNavState != null)
{
- opaqueValue = new
PortletParametersStateString(internalNavState).getStringValue();
+ opaqueValue = ParametersStateString.create(internalNavState).getStringValue();
}
//
@@ -412,13 +412,13 @@
//
portletId = (String)values[1];
- internalNavState = serializedNavState != null ? new
PortletParametersStateString(serializedNavState).getParameters() : null;
+ internalNavState = serializedNavState != null ?
ParametersStateString.create(serializedNavState).getParameters() : null;
portletListener = (MethodBinding)restoreAttachedState(faces, values[3]);
supportedWindowStates = (Set)values[4];
supportedModes = (Set)values[5];
initialWindowState = (String)values[6];
initialMode = (String)values[7];
- internalNavState = (PortletParameters)values[8];
+ internalNavState = (ParameterMap)values[8];
internalMode = (Mode)values[9];
onClick = (String)values[10];
}
@@ -460,7 +460,7 @@
case PortletRequestDecoder.RENDER_TYPE:
PortletRenderEvent prevent = new PortletRenderEvent(
this,
-
((PortletParametersStateString)decoder.getNavigationalState()).getParameters(),
+
((ParametersStateString)decoder.getNavigationalState()).getParameters(),
mode,
windowState);
prevent.setPhaseId(PhaseId.INVOKE_APPLICATION);
@@ -477,7 +477,7 @@
}
PortletActionEvent paevent = new PortletActionEvent(
this,
-
((PortletParametersStateString)decoder.getInteractionState()).getParameters(),
+
((ParametersStateString)decoder.getInteractionState()).getParameters(),
mode,
windowState);
paevent.setPhaseId(PhaseId.INVOKE_APPLICATION);
Modified:
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/framework/support/TestPortletInvocationContext.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/framework/support/TestPortletInvocationContext.java 2008-02-22
15:19:14 UTC (rev 10089)
+++
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/framework/support/TestPortletInvocationContext.java 2008-02-22
16:28:22 UTC (rev 10090)
@@ -28,7 +28,7 @@
import org.jboss.portal.common.invocation.resolver.RequestAttributeResolver;
import org.jboss.portal.common.util.MarkupInfo;
import org.jboss.portal.common.util.MediaType;
-import org.jboss.portal.portlet.PortletParameters;
+import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.portlet.PortletURL;
import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.impl.spi.AbstractPortletInvocationContext;
@@ -145,7 +145,7 @@
return null;
}
- public PortletParameters getForm()
+ public ParameterMap getForm()
{
return null;
}
Modified:
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/MarkupTestCase.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/MarkupTestCase.java 2008-02-22
15:19:14 UTC (rev 10089)
+++
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/MarkupTestCase.java 2008-02-22
16:28:22 UTC (rev 10090)
@@ -33,7 +33,7 @@
import org.jboss.portal.portlet.invocation.response.ErrorResponse;
import org.jboss.portal.portlet.invocation.response.FragmentResponse;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
-import org.jboss.portal.portlet.invocation.response.RenderResponse;
+import org.jboss.portal.portlet.invocation.response.UpdateNavigationalStateResponse;
import org.jboss.portal.portlet.spi.WindowContext;
import org.jboss.portal.test.wsrp.framework.support.BasicInstanceContext;
import org.jboss.portal.test.wsrp.framework.support.BasicSecurityContext;
@@ -107,8 +107,8 @@
PortletInvocationResponse response = consumer.invoke(action);
ExtendedAssert.assertNotNull(response);
- ExtendedAssert.assertTrue("Was expecting a RenderResponse. Got: " +
response, response instanceof RenderResponse);
- RenderResponse render = (RenderResponse)response;
+ ExtendedAssert.assertTrue("Was expecting a RenderResponse. Got: " +
response, response instanceof UpdateNavigationalStateResponse);
+ UpdateNavigationalStateResponse render =
(UpdateNavigationalStateResponse)response;
ExtendedAssert.assertEquals(BasicMarkupBehavior.NS,
render.getNavigationalState().getStringValue());
}
Modified:
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/ActionContextRequestContext.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/ActionContextRequestContext.java 2008-02-22
15:19:14 UTC (rev 10089)
+++
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/ActionContextRequestContext.java 2008-02-22
16:28:22 UTC (rev 10090)
@@ -23,9 +23,9 @@
package org.jboss.portal.wsrp.consumer;
-import org.apache.commons.fileupload.RequestContext;
-import org.jboss.portal.portlet.spi.ActionContext;
+import org.jboss.portal.portlet.spi.RequestContext;
+import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
@@ -36,9 +36,9 @@
*/
public class ActionContextRequestContext implements RequestContext
{
- private ActionContext actionContext;
+ private RequestContext actionContext;
- public ActionContextRequestContext(ActionContext actionContext)
+ public ActionContextRequestContext(RequestContext actionContext)
{
this.actionContext = actionContext;
}
@@ -62,4 +62,8 @@
{
return actionContext.getInputStream();
}
+
+ public BufferedReader getReader() throws IOException {
+ return actionContext.getReader();
+ }
}
Modified:
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/ActionHandler.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/ActionHandler.java 2008-02-22
15:19:14 UTC (rev 10089)
+++
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/ActionHandler.java 2008-02-22
16:28:22 UTC (rev 10090)
@@ -27,18 +27,18 @@
import org.apache.commons.fileupload.FileItemStream;
import org.apache.commons.fileupload.FileUpload;
import org.apache.commons.fileupload.util.Streams;
+import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.common.util.ParameterValidation;
import org.jboss.portal.portlet.PortletInvokerException;
-import org.jboss.portal.portlet.PortletParameters;
-import org.jboss.portal.portlet.PortletParametersStateString;
+import org.jboss.portal.portlet.ParametersStateString;
import org.jboss.portal.portlet.StateEvent;
import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.invocation.PortletInvocation;
import org.jboss.portal.portlet.invocation.response.ErrorResponse;
import org.jboss.portal.portlet.invocation.response.HTTPRedirectionResponse;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
-import org.jboss.portal.portlet.invocation.response.RenderResponse;
-import org.jboss.portal.portlet.spi.ActionContext;
+import org.jboss.portal.portlet.invocation.response.UpdateNavigationalStateResponse;
+import org.jboss.portal.portlet.spi.RequestContext;
import org.jboss.portal.portlet.spi.InstanceContext;
import org.jboss.portal.portlet.state.AccessMode;
import org.jboss.portal.wsrp.WSRPTypeFactory;
@@ -96,7 +96,7 @@
if (interactionState != null)
{
String state = interactionState.getStringValue();
- if (!PortletParametersStateString.JBPNS_PREFIX.equals(state)) // fix-me: see
JBPORTAL-900
+ if (!ParametersStateString.JBPNS_PREFIX.equals(state)) // fix-me: see
JBPORTAL-900
{
interactionParams.setInteractionState(state);
}
@@ -167,7 +167,7 @@
else
{
// if the content is not multipart, then check for form parameters
- PortletParameters params = actionContext.getForm();
+ ParameterMap params = actionContext.getForm();
if (params != null && !params.isEmpty())
{
int capacity = params.size();
Modified:
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/RenderHandler.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/RenderHandler.java 2008-02-22
15:19:14 UTC (rev 10089)
+++
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/RenderHandler.java 2008-02-22
16:28:22 UTC (rev 10090)
@@ -190,7 +190,7 @@
if (rewriteURLs)
{
WSRPURLRewriter rewriter = (WSRPURLRewriter)wsrpURLRewriterLocal.get();
- rewriter.setContext(invocation.getPortletContext());
+ rewriter.setContext(invocation.getContext());
rewriter.setSecure(invocation.getSecurityContext().isSecure());
String userId = invocation.getUserContext().getId();
rewriter.setAuthenticated(userId != null); // is this correct?
Modified:
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/RequestPrecursor.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/RequestPrecursor.java 2008-02-22
15:19:14 UTC (rev 10089)
+++
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/RequestPrecursor.java 2008-02-22
16:28:22 UTC (rev 10090)
@@ -26,8 +26,8 @@
import org.jboss.logging.Logger;
import org.jboss.portal.common.util.ContentInfo;
import org.jboss.portal.common.util.ParameterValidation;
+import org.jboss.portal.portlet.ParametersStateString;
import org.jboss.portal.portlet.PortletInvokerException;
-import org.jboss.portal.portlet.PortletParametersStateString;
import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.invocation.PortletInvocation;
import org.jboss.portal.portlet.spi.PortletInvocationContext;
@@ -82,7 +82,7 @@
// create markup params
UserContext userContext = invocation.getUserContext();
ParameterValidation.throwIllegalArgExceptionIfNull(userContext, USER_CONTEXT);
- PortletInvocationContext context = invocation.getPortletContext();
+ PortletInvocationContext context = invocation.getContext();
ParameterValidation.throwIllegalArgExceptionIfNull(context, INVOCATION_CONTEXT);
ContentInfo streamInfo = context.getMarkupInfo();
ParameterValidation.throwIllegalArgExceptionIfNull(streamInfo, STREAM_INFO);
@@ -118,7 +118,7 @@
if (navigationalState != null)
{
String state = navigationalState.getStringValue();
- if (!PortletParametersStateString.JBPNS_PREFIX.equals(state)) // fix-me: see
JBPORTAL-900
+ if (!ParametersStateString.JBPNS_PREFIX.equals(state)) // fix-me: see
JBPORTAL-900
{
markupParams.setNavigationalState(state);
}
Modified:
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/WSRPConsumerImpl.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/WSRPConsumerImpl.java 2008-02-22
15:19:14 UTC (rev 10089)
+++
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/WSRPConsumerImpl.java 2008-02-22
16:28:22 UTC (rev 10090)
@@ -642,7 +642,7 @@
{
// we need to supply the templates since the portlet does URL processing and
either doesn't store
// templates in the session or no session has been established yet
-
runtimeContext.setTemplates(WSRPTypeFactory.createTemplates(invocation.getPortletContext()));
+
runtimeContext.setTemplates(WSRPTypeFactory.createTemplates(invocation.getContext()));
}
}
Modified:
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/ActionRequestProcessor.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/ActionRequestProcessor.java 2008-02-22
15:19:14 UTC (rev 10089)
+++
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/ActionRequestProcessor.java 2008-02-22
16:28:22 UTC (rev 10090)
@@ -28,7 +28,7 @@
import org.jboss.portal.portlet.invocation.ActionInvocation;
import org.jboss.portal.portlet.invocation.response.HTTPRedirectionResponse;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
-import org.jboss.portal.portlet.invocation.response.RenderResponse;
+import org.jboss.portal.portlet.invocation.response.UpdateNavigationalStateResponse;
import org.jboss.portal.portlet.spi.PortalContext;
import org.jboss.portal.portlet.spi.SecurityContext;
import org.jboss.portal.portlet.spi.UserContext;
@@ -129,9 +129,9 @@
Object processResponse(PortletInvocationResponse response)
{
- if (response instanceof RenderResponse)
+ if (response instanceof UpdateNavigationalStateResponse)
{
- RenderResponse renderResult = (RenderResponse)response;
+ UpdateNavigationalStateResponse renderResult =
(UpdateNavigationalStateResponse)response;
UpdateResponse updateResponse = WSRPTypeFactory.createUpdateResponse();
updateResponse.setNewMode(WSRPUtils.convertJSR168PortletModeNameToWSRPName(getNewStateOrNull(renderResult,
true)));
updateResponse.setNewWindowState(WSRPUtils.convertJSR168WindowStateNameToWSRPName(getNewStateOrNull(renderResult,
false)));
@@ -155,7 +155,7 @@
}
}
- private String getNewStateOrNull(RenderResponse renderResult, boolean forMode)
+ private String getNewStateOrNull(UpdateNavigationalStateResponse renderResult, boolean
forMode)
{
Object state = forMode ? renderResult.getMode() : renderResult.getWindowState();
return state != null ? state.toString() : null;
Modified:
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/MarkupHandler.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/MarkupHandler.java 2008-02-22
15:19:14 UTC (rev 10089)
+++
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/MarkupHandler.java 2008-02-22
16:28:22 UTC (rev 10090)
@@ -28,7 +28,7 @@
import org.jboss.portal.portlet.invocation.response.FragmentResponse;
import org.jboss.portal.portlet.invocation.response.HTTPRedirectionResponse;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
-import org.jboss.portal.portlet.invocation.response.RenderResponse;
+import org.jboss.portal.portlet.invocation.response.UpdateNavigationalStateResponse;
import org.jboss.portal.portlet.state.producer.PortletStateChangeRequiredException;
import org.jboss.portal.wsrp.WSRPExceptionFactory;
import org.jboss.portal.wsrp.core.AccessDeniedFault;
@@ -196,7 +196,7 @@
}
else
- if (!(response instanceof HTTPRedirectionResponse || response instanceof
FragmentResponse || response instanceof RenderResponse))
+ if (!(response instanceof HTTPRedirectionResponse || response instanceof
FragmentResponse || response instanceof UpdateNavigationalStateResponse))
{
throw
WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.OPERATION_FAILED,
"Unsupported result type: " + response.getClass().getName(),
null);
Modified:
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPActionContext.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPActionContext.java 2008-02-22
15:19:14 UTC (rev 10089)
+++
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPActionContext.java 2008-02-22
16:28:22 UTC (rev 10090)
@@ -27,11 +27,11 @@
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
import org.jboss.portal.common.util.MarkupInfo;
-import org.jboss.portal.portlet.PortletParameters;
+import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.portlet.StateString;
-import org.jboss.portal.portlet.spi.ActionContext;
import org.jboss.portal.portlet.spi.InstanceContext;
import org.jboss.portal.portlet.spi.PortalContext;
+import org.jboss.portal.portlet.spi.RequestContext;
import org.jboss.portal.portlet.spi.SecurityContext;
import org.jboss.portal.portlet.spi.UserContext;
import org.jboss.portal.portlet.spi.WindowContext;
@@ -58,7 +58,7 @@
* @version $Revision$
* @since 2.4
*/
-abstract class WSRPActionContext extends WSRPPortletInvocationContext implements
ActionContext
+abstract class WSRPActionContext extends WSRPPortletInvocationContext implements
RequestContext
{
protected String characterEncoding;
protected StateString interactionState;
@@ -103,7 +103,7 @@
static class WSRPSimpleActionContext extends WSRPActionContext
{
- private PortletParameters formParameters;
+ private ParameterMap formParameters;
private String contentType;
protected WSRPSimpleActionContext(StateString navigationalState,
@@ -140,16 +140,16 @@
params.put(paramName, new String[]{paramValue});
}
}
- formParameters = new PortletParameters(params);
+ formParameters = new ParameterMap(params);
}
else
{
- formParameters = new PortletParameters();
+ formParameters = new ParameterMap();
}
}
- public PortletParameters getForm()
+ public ParameterMap getForm()
{
return formParameters;
}
@@ -312,9 +312,9 @@
baos.write(BOUNDARY1);
}
- public PortletParameters getForm()
+ public ParameterMap getForm()
{
- return new PortletParameters();
+ return new ParameterMap();
}
public String getContentType()
Modified:
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPRequestContext.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPRequestContext.java 2008-02-22
15:19:14 UTC (rev 10089)
+++
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPRequestContext.java 2008-02-22
16:28:22 UTC (rev 10090)
@@ -34,6 +34,6 @@
{
public WSRPRequestContext()
{
- super(ServletAccess.getRequest(), ServletAccess.getResponse());
+ super(ServletAccess.getRequest());
}
}