Author: julien(a)jboss.com
Date: 2007-04-23 18:32:52 -0400 (Mon, 23 Apr 2007)
New Revision: 7035
Modified:
trunk/core-cms/src/main/org/jboss/portal/core/cms/CMSObjectURLFactory.java
trunk/core/src/main/org/jboss/portal/core/controller/ControllerContext.java
trunk/core/src/main/org/jboss/portal/core/controller/classic/ThrowableResponseHandler.java
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/DelegatingURLFactoryService.java
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/SimpleURLFactory.java
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/URLFactory.java
trunk/core/src/main/org/jboss/portal/core/model/instance/InstanceURLFactory.java
trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectURLFactory.java
Log:
added ControllerContext in the signature of the doMapping(...) of URLFactory
Modified: trunk/core/src/main/org/jboss/portal/core/controller/ControllerContext.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/controller/ControllerContext.java 2007-04-23
22:29:26 UTC (rev 7034)
+++ trunk/core/src/main/org/jboss/portal/core/controller/ControllerContext.java 2007-04-23
22:32:52 UTC (rev 7035)
@@ -155,7 +155,7 @@
*/
public String renderURL(ControllerCommand cmd, URLContext urlContext, URLFormat
urlFormat)
{
- ServerURL serverURL = controller.getURLFactory().doMapping(serverInvocation, cmd);
+ ServerURL serverURL = controller.getURLFactory().doMapping(this, serverInvocation,
cmd);
//
if (serverURL == null)
Modified:
trunk/core/src/main/org/jboss/portal/core/controller/classic/ThrowableResponseHandler.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/controller/classic/ThrowableResponseHandler.java 2007-04-23
22:29:26 UTC (rev 7034)
+++
trunk/core/src/main/org/jboss/portal/core/controller/classic/ThrowableResponseHandler.java 2007-04-23
22:32:52 UTC (rev 7035)
@@ -62,7 +62,7 @@
else
{
urlContext = URLContext.newInstance(urlContext.isSecure(), true);
- ServerURL serverURL =
controllerContext.getController().getURLFactory().doMapping(controllerContext.getServerInvocation(),
command);
+ ServerURL serverURL =
controllerContext.getController().getURLFactory().doMapping(controllerContext,
controllerContext.getServerInvocation(), command);
String url =
controllerContext.getServerInvocation().getResponse().renderURL(serverURL, urlContext,
null);
return new HTTPResponse.SendRedirect(url);
}
Modified:
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/DelegatingURLFactoryService.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/DelegatingURLFactoryService.java 2007-04-23
22:29:26 UTC (rev 7034)
+++
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/DelegatingURLFactoryService.java 2007-04-23
22:32:52 UTC (rev 7035)
@@ -23,6 +23,7 @@
package org.jboss.portal.core.controller.command.mapper;
import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.server.ServerInvocation;
import org.jboss.portal.server.ServerURL;
@@ -51,7 +52,7 @@
this.nextFactory = nextFactory;
}
- public ServerURL doMapping(ServerInvocation invocation, ControllerCommand cmd)
+ public ServerURL doMapping(ControllerContext controllerContext, ServerInvocation
invocation, ControllerCommand cmd)
{
if (cmd == null)
{
@@ -64,7 +65,7 @@
for (int i = 0;i < delegates.size();i++)
{
URLFactory delegate = (URLFactory)delegates.get(i);
- ServerURL url = delegate.doMapping(invocation, cmd);
+ ServerURL url = delegate.doMapping(controllerContext, invocation, cmd);
if (url != null)
{
return url;
@@ -75,7 +76,7 @@
//
if (nextFactory != null)
{
- return nextFactory.doMapping(invocation, cmd);
+ return nextFactory.doMapping(controllerContext, invocation, cmd);
}
//
Modified:
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/SimpleURLFactory.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/SimpleURLFactory.java 2007-04-23
22:29:26 UTC (rev 7034)
+++
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/SimpleURLFactory.java 2007-04-23
22:32:52 UTC (rev 7035)
@@ -23,6 +23,7 @@
package org.jboss.portal.core.controller.command.mapper;
import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.server.AbstractServerURL;
import org.jboss.portal.server.ServerInvocation;
import org.jboss.portal.server.ServerURL;
@@ -60,7 +61,7 @@
this.classNames = classNames;
}
- public ServerURL doMapping(ServerInvocation invocation, ControllerCommand cmd)
+ public ServerURL doMapping(ControllerContext controllerContext, ServerInvocation
invocation, ControllerCommand cmd)
{
if (cmd == null)
{
Modified:
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/URLFactory.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/URLFactory.java 2007-04-23
22:29:26 UTC (rev 7034)
+++
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/URLFactory.java 2007-04-23
22:32:52 UTC (rev 7035)
@@ -23,6 +23,7 @@
package org.jboss.portal.core.controller.command.mapper;
import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.server.ServerInvocation;
import org.jboss.portal.server.ServerURL;
@@ -35,9 +36,12 @@
/**
* Create an url for the command.
*
+ * @param controllerContext
* @param invocation the invocation
- * @param cmd the command to encode
- * @return the server url or null if this mapper cannot peform this operation
+ * @param cmd the command to encode @return the server url or null if this
mapper cannot peform this operation
*/
- ServerURL doMapping(ServerInvocation invocation, ControllerCommand cmd);
+ ServerURL doMapping(
+ ControllerContext controllerContext,
+ ServerInvocation invocation,
+ ControllerCommand cmd);
}
Modified:
trunk/core/src/main/org/jboss/portal/core/model/instance/InstanceURLFactory.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/model/instance/InstanceURLFactory.java 2007-04-23
22:29:26 UTC (rev 7034)
+++
trunk/core/src/main/org/jboss/portal/core/model/instance/InstanceURLFactory.java 2007-04-23
22:32:52 UTC (rev 7035)
@@ -24,6 +24,7 @@
import org.jboss.portal.core.controller.command.mapper.URLFactoryDelegate;
import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.core.controller.ControllerContext;
import
org.jboss.portal.core.model.instance.command.action.InvokePortletInstanceRenderCommand;
import
org.jboss.portal.core.model.instance.command.action.InvokePortletInstanceActionCommand;
import org.jboss.portal.core.model.instance.command.PortletInstanceCommand;
@@ -65,7 +66,7 @@
this.instanceId = instanceId;
}
- public ServerURL doMapping(ServerInvocation invocation, ControllerCommand cmd)
+ public ServerURL doMapping(ControllerContext controllerContext, ServerInvocation
invocation, ControllerCommand cmd)
{
if (cmd == null)
{
Modified:
trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectURLFactory.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectURLFactory.java 2007-04-23
22:29:26 UTC (rev 7034)
+++
trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectURLFactory.java 2007-04-23
22:32:52 UTC (rev 7035)
@@ -26,6 +26,7 @@
import org.jboss.portal.WindowState;
import org.jboss.portal.common.text.FastURLEncoder;
import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.core.controller.ControllerContext;
import
org.jboss.portal.core.model.portal.command.action.InvokePortletWindowActionCommand;
import org.jboss.portal.core.model.portal.command.action.InvokeWindowCommand;
import
org.jboss.portal.core.model.portal.command.action.InvokePortletWindowRenderCommand;
@@ -64,7 +65,7 @@
this.path = path;
}
- public ServerURL doMapping(ServerInvocation invocation, ControllerCommand cmd)
+ public ServerURL doMapping(ControllerContext controllerContext, ServerInvocation
invocation, ControllerCommand cmd)
{
if (cmd == null)
{
Modified: trunk/core-cms/src/main/org/jboss/portal/core/cms/CMSObjectURLFactory.java
===================================================================
--- trunk/core-cms/src/main/org/jboss/portal/core/cms/CMSObjectURLFactory.java 2007-04-23
22:29:26 UTC (rev 7034)
+++ trunk/core-cms/src/main/org/jboss/portal/core/cms/CMSObjectURLFactory.java 2007-04-23
22:32:52 UTC (rev 7035)
@@ -23,6 +23,7 @@
package org.jboss.portal.core.cms;
import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.core.controller.command.mapper.URLFactoryDelegate;
import org.jboss.portal.core.cms.command.StreamContentCommand;
import org.jboss.portal.server.AbstractServerURL;
@@ -49,7 +50,7 @@
this.path = path;
}
- public ServerURL doMapping(ServerInvocation invocation, ControllerCommand cmd)
+ public ServerURL doMapping(ControllerContext controllerContext, ServerInvocation
invocation, ControllerCommand cmd)
{
if (cmd == null)
{