You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrp4j-dev@portals.apache.org by dl...@apache.org on 2007/01/05 20:40:26 UTC

svn commit: r493158 - in /portals/wsrp4j/trunk/consumer-proxyportlet/src/java/org/apache/wsrp4j/consumer/proxyportlet/template: ./ jetspeed/ pluto/

Author: dlouzan
Date: Fri Jan  5 11:40:25 2007
New Revision: 493158

URL: http://svn.apache.org/viewvc?view=rev&rev=493158
Log:
Modified template processing parameters generation to avoid conflicts with form parameters names.

Modified:
    portals/wsrp4j/trunk/consumer-proxyportlet/src/java/org/apache/wsrp4j/consumer/proxyportlet/template/PortalTemplateComposer.java
    portals/wsrp4j/trunk/consumer-proxyportlet/src/java/org/apache/wsrp4j/consumer/proxyportlet/template/TemplateConstants.java
    portals/wsrp4j/trunk/consumer-proxyportlet/src/java/org/apache/wsrp4j/consumer/proxyportlet/template/TemplateProcessor.java
    portals/wsrp4j/trunk/consumer-proxyportlet/src/java/org/apache/wsrp4j/consumer/proxyportlet/template/jetspeed/JetspeedPortalTemplateComposer.java
    portals/wsrp4j/trunk/consumer-proxyportlet/src/java/org/apache/wsrp4j/consumer/proxyportlet/template/pluto/PlutoPortalTemplateComposer.java

Modified: portals/wsrp4j/trunk/consumer-proxyportlet/src/java/org/apache/wsrp4j/consumer/proxyportlet/template/PortalTemplateComposer.java
URL: http://svn.apache.org/viewvc/portals/wsrp4j/trunk/consumer-proxyportlet/src/java/org/apache/wsrp4j/consumer/proxyportlet/template/PortalTemplateComposer.java?view=diff&rev=493158&r1=493157&r2=493158
==============================================================================
--- portals/wsrp4j/trunk/consumer-proxyportlet/src/java/org/apache/wsrp4j/consumer/proxyportlet/template/PortalTemplateComposer.java (original)
+++ portals/wsrp4j/trunk/consumer-proxyportlet/src/java/org/apache/wsrp4j/consumer/proxyportlet/template/PortalTemplateComposer.java Fri Jan  5 11:40:25 2007
@@ -15,6 +15,8 @@
  */
 package org.apache.wsrp4j.consumer.proxyportlet.template;
 
+import java.util.Map;
+
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
@@ -64,7 +66,7 @@
                 TemplateConstants.TEMPLATE_PROCESSOR_SERVLET);
         
         return templateProxy + Constants.PARAMS_START +
-                TemplateConstants.PORTAL_URL + Constants.EQUALS + 
+                TemplateConstants.TP_PORTAL_URL + Constants.EQUALS + 
                 getPortalUrl(request, response) +
                 Constants.NEXT_PARAM_AMP +
                 TemplateConstants.DEFAULT_TEMPLATE;
@@ -79,7 +81,7 @@
                 TemplateConstants.TEMPLATE_PROCESSOR_SERVLET);
         
         return templateProxy + Constants.PARAMS_START +
-                TemplateConstants.PORTAL_URL + Constants.EQUALS + 
+                TemplateConstants.TP_PORTAL_URL + Constants.EQUALS + 
                 getPortalUrl(request, response) +
                 Constants.NEXT_PARAM_AMP +
                 TemplateConstants.DEFAULT_SECURE_TEMPLATE;
@@ -96,7 +98,8 @@
             String portletInstanceKey, String sessionId,
             String navigationalState, String interactionState,
             String mode, String windowState, String url,
-            String fragmentId, boolean requiresRewrite);
+            String fragmentId, boolean requiresRewrite,
+            Map formParams);
     
     public abstract String processDefaultSecureTemplate(
             HttpServletRequest request, HttpServletResponse response,
@@ -105,7 +108,8 @@
             String portletInstanceKey, String sessionId,
             String navigationalState, String interactionState,
             String mode, String windowState, String url,
-            String fragmentId, boolean requiresRewrite);
+            String fragmentId, boolean requiresRewrite,
+            Map formParams);
     
     public abstract String processRenderTemplate(
             String portalUrl, String portletHandle, 
@@ -127,7 +131,8 @@
             String sessionId, String navigationalState, 
             String interactionState,
             String mode, String windowState, 
-            String fragmentId, boolean requiresRewrite);
+            String fragmentId, boolean requiresRewrite,
+            Map formParams);
     
     public abstract String processSecureBlockingActionTemplate(
             String portalUrl, String portletHandle, 
@@ -135,7 +140,8 @@
             String sessionId, String navigationalState, 
             String interactionState,
             String mode, String windowState, 
-            String fragmentId, boolean requiresRewrite);
+            String fragmentId, boolean requiresRewrite,
+            Map formParams);
     
     public abstract String processResourceTemplate(
             HttpServletRequest request, HttpServletResponse response,

Modified: portals/wsrp4j/trunk/consumer-proxyportlet/src/java/org/apache/wsrp4j/consumer/proxyportlet/template/TemplateConstants.java
URL: http://svn.apache.org/viewvc/portals/wsrp4j/trunk/consumer-proxyportlet/src/java/org/apache/wsrp4j/consumer/proxyportlet/template/TemplateConstants.java?view=diff&rev=493158&r1=493157&r2=493158
==============================================================================
--- portals/wsrp4j/trunk/consumer-proxyportlet/src/java/org/apache/wsrp4j/consumer/proxyportlet/template/TemplateConstants.java (original)
+++ portals/wsrp4j/trunk/consumer-proxyportlet/src/java/org/apache/wsrp4j/consumer/proxyportlet/template/TemplateConstants.java Fri Jan  5 11:40:25 2007
@@ -31,45 +31,106 @@
     public static final String TEMPLATE_PROCESSOR_SERVLET = 
             "/WSRP4JTemplateProcessor";
     
+    /* A prefix used for all producer template processing parameters */
+    private static final String TP_PREFIX = "org_apache_wsrp4j_template_";
+    
+    /* Template processing parameters */
+    public static final String TP_URL_TYPE = 
+            TP_PREFIX + Constants.URL_TYPE;
+    public static final String TP_PORTLET_HANDLE =
+            TP_PREFIX + Constants.PORTLET_HANDLE;
+    public static final String TP_USER_CONTEXT_KEY =
+            TP_PREFIX + Constants.USER_CONTEXT_KEY;
+    public static final String TP_PORTLET_INSTANCE_KEY =
+            TP_PREFIX + Constants.PORTLET_INSTANCE_KEY;
+    public static final String TP_SESSION_ID =
+            TP_PREFIX + Constants.SESSION_ID;
+    public static final String TP_NAVIGATIONAL_STATE =
+            TP_PREFIX + Constants.NAVIGATIONAL_STATE;
+    public static final String TP_INTERACTION_STATE =
+            TP_PREFIX + Constants.INTERACTION_STATE;
+    public static final String TP_PORTLET_MODE =
+            TP_PREFIX + Constants.PORTLET_MODE;
+    public static final String TP_WINDOW_STATE =
+            TP_PREFIX + Constants.WINDOW_STATE;
+    public static final String TP_URL =
+            TP_PREFIX + Constants.URL;
+    public static final String TP_FRAGMENT_ID =
+            TP_PREFIX + Constants.FRAGMENT_ID;
+    public static final String TP_REWRITE_RESOURCE =
+            TP_PREFIX + Constants.REWRITE_RESOURCE;
+    public static final String TP_SECURE_URL =
+            TP_PREFIX + Constants.SECURE_URL;
+    
     /* The parameter used to inject the portal provided url for templates */
-    public static final String PORTAL_URL = "proxyportlet-portalUrl";
+    public static final String TP_PORTAL_URL = TP_PREFIX + "proxyportlet-portalUrl";
     
     /* A base template for default templates */
     public static final String DEFAULT_TEMPLATE_BASE =
-            Constants.URL_TYPE + Constants.EQUALS + Constants.URL_TYPE_TEMPLATE +
+            TP_URL_TYPE + Constants.EQUALS + Constants.URL_TYPE_TEMPLATE +
             Constants.NEXT_PARAM_AMP +
-            Constants.PORTLET_HANDLE + Constants.EQUALS + Constants.PORTLET_HANDLE_TEMPLATE +
+            TP_PORTLET_HANDLE + Constants.EQUALS + Constants.PORTLET_HANDLE_TEMPLATE +
             Constants.NEXT_PARAM_AMP +
-            Constants.USER_CONTEXT_KEY + Constants.EQUALS + Constants.USER_CONTEXT_KEY_TEMPLATE +
+            TP_USER_CONTEXT_KEY + Constants.EQUALS + Constants.USER_CONTEXT_KEY_TEMPLATE +
             Constants.NEXT_PARAM_AMP +
-            Constants.PORTLET_INSTANCE_KEY + Constants.EQUALS + Constants.PORTLET_INSTANCE_KEY_TEMPLATE +
+            TP_PORTLET_INSTANCE_KEY + Constants.EQUALS + Constants.PORTLET_INSTANCE_KEY_TEMPLATE +
             Constants.NEXT_PARAM_AMP +
-            Constants.SESSION_ID + Constants.EQUALS + Constants.SESSION_ID_TEMPLATE +
+            TP_SESSION_ID + Constants.EQUALS + Constants.SESSION_ID_TEMPLATE +
             Constants.NEXT_PARAM_AMP +
-            Constants.NAVIGATIONAL_STATE + Constants.EQUALS + Constants.NAVIGATIONAL_STATE_TEMPLATE +
+            TP_NAVIGATIONAL_STATE + Constants.EQUALS + Constants.NAVIGATIONAL_STATE_TEMPLATE +
             Constants.NEXT_PARAM_AMP +
-            Constants.INTERACTION_STATE + Constants.EQUALS + Constants.INTERACTION_STATE_TEMPLATE +
+            TP_INTERACTION_STATE + Constants.EQUALS + Constants.INTERACTION_STATE_TEMPLATE +
             Constants.NEXT_PARAM_AMP +
-            Constants.PORTLET_MODE + Constants.EQUALS + Constants.PORTLET_MODE_TEMPLATE +
+            TP_PORTLET_MODE + Constants.EQUALS + Constants.PORTLET_MODE_TEMPLATE +
             Constants.NEXT_PARAM_AMP +
-            Constants.WINDOW_STATE + Constants.EQUALS + Constants.WINDOW_STATE_TEMPLATE +
+            TP_WINDOW_STATE + Constants.EQUALS + Constants.WINDOW_STATE_TEMPLATE +
             Constants.NEXT_PARAM_AMP +
-            Constants.URL + Constants.EQUALS + Constants.URL_TEMPLATE +
+            TP_URL + Constants.EQUALS + Constants.URL_TEMPLATE +
             Constants.NEXT_PARAM_AMP +
-            Constants.FRAGMENT_ID + Constants.EQUALS + Constants.FRAGMENT_ID_TEMPLATE +
+            TP_FRAGMENT_ID + Constants.EQUALS + Constants.FRAGMENT_ID_TEMPLATE +
             Constants.NEXT_PARAM_AMP +
-            Constants.REWRITE_RESOURCE + Constants.EQUALS + Constants.REWRITE_RESOURCE_TEMPLATE;
+            TP_REWRITE_RESOURCE + Constants.EQUALS + Constants.REWRITE_RESOURCE_TEMPLATE;
     
     /* The template used for default template */
     public static final String DEFAULT_TEMPLATE =
             DEFAULT_TEMPLATE_BASE +
             Constants.NEXT_PARAM_AMP +
-            Constants.SECURE_URL + Constants.EQUALS + Constants.FALSE;
+            TP_SECURE_URL + Constants.EQUALS + Constants.FALSE;
     
     /* The template used for default secure template */
     public static final String DEFAULT_SECURE_TEMPLATE =
             DEFAULT_TEMPLATE_BASE +
             Constants.NEXT_PARAM_AMP +
-            Constants.SECURE_URL + Constants.EQUALS + Constants.TRUE;
+            TP_SECURE_URL + Constants.EQUALS + Constants.TRUE;
+    
+    /* A list of all parameters used with template processing */
+    private static String[] templateProcessingParameters = new String[] {
+        TP_URL_TYPE, 
+        TP_PORTLET_HANDLE, 
+        TP_USER_CONTEXT_KEY,
+        TP_PORTLET_INSTANCE_KEY, 
+        TP_SESSION_ID, 
+        TP_NAVIGATIONAL_STATE,
+        TP_INTERACTION_STATE,
+        TP_PORTLET_MODE,
+        TP_WINDOW_STATE,
+        TP_URL,
+        TP_FRAGMENT_ID,
+        TP_REWRITE_RESOURCE,
+        TP_SECURE_URL,
+        TP_PORTAL_URL
+    };
+    
+    /**
+     * A static method for checking if a given parameter name is a template 
+     * processing parameter.
+     *
+     * @param paramName The parameter name to be checked
+     * @return boolean true if the parameter is a template processing parameter;
+     *         false otherwise
+     */
+    public static boolean isTemplateProcessingParameter(String paramName) {
+        return paramName.startsWith(TP_PREFIX);
+    }
     
 }

Modified: portals/wsrp4j/trunk/consumer-proxyportlet/src/java/org/apache/wsrp4j/consumer/proxyportlet/template/TemplateProcessor.java
URL: http://svn.apache.org/viewvc/portals/wsrp4j/trunk/consumer-proxyportlet/src/java/org/apache/wsrp4j/consumer/proxyportlet/template/TemplateProcessor.java?view=diff&rev=493158&r1=493157&r2=493158
==============================================================================
--- portals/wsrp4j/trunk/consumer-proxyportlet/src/java/org/apache/wsrp4j/consumer/proxyportlet/template/TemplateProcessor.java (original)
+++ portals/wsrp4j/trunk/consumer-proxyportlet/src/java/org/apache/wsrp4j/consumer/proxyportlet/template/TemplateProcessor.java Fri Jan  5 11:40:25 2007
@@ -18,6 +18,8 @@
 import java.io.IOException;
 
 import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Map;
 
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
@@ -49,35 +51,44 @@
             HttpServletResponse response) {
         
         /* The template url to process */
-        String portalUrl = request.getParameter(TemplateConstants.PORTAL_URL);
+        String portalUrl = request.getParameter(TemplateConstants.TP_PORTAL_URL);
         
         /* The standard wsrp template properties */
-        String url = request.getParameter(Constants.URL) == null ?
-            "" : request.getParameter(Constants.URL);
-        String urlType = request.getParameter(Constants.URL_TYPE) == null ?
-            "" : request.getParameter(Constants.URL_TYPE);
-        String mode = request.getParameter(Constants.PORTLET_MODE) == null ?
-            "" : request.getParameter(Constants.PORTLET_MODE);
-        String windowState = request.getParameter(Constants.WINDOW_STATE) == null ?
-            "" : request.getParameter(Constants.WINDOW_STATE);
-        String navigationalState = request.getParameter(Constants.NAVIGATIONAL_STATE) == null ?
-            "" : request.getParameter(Constants.NAVIGATIONAL_STATE);
-        String interactionState = request.getParameter(Constants.INTERACTION_STATE) == null ?
-            "" : request.getParameter(Constants.INTERACTION_STATE);
-        boolean secureURL = request.getParameter(Constants.SECURE_URL) == null ?
-            false : Boolean.parseBoolean(request.getParameter(Constants.SECURE_URL));
-        String fragmentId = request.getParameter(Constants.FRAGMENT_ID) == null ?
-            "" : request.getParameter(Constants.FRAGMENT_ID);
-        String portletHandle = request.getParameter(Constants.PORTLET_HANDLE) == null ?
-            "" : request.getParameter(Constants.PORTLET_HANDLE);
-        String userContextKey = request.getParameter(Constants.USER_CONTEXT_KEY) == null ?
-            "" : request.getParameter(Constants.USER_CONTEXT_KEY);
-        String portletInstanceKey = request.getParameter(Constants.PORTLET_INSTANCE_KEY) == null ?
-            "" : request.getParameter(Constants.PORTLET_INSTANCE_KEY);
-        String sessionId = request.getParameter(Constants.SESSION_ID) == null ?
-            "" : request.getParameter(Constants.SESSION_ID);
-        boolean requiresRewrite = request.getParameter(Constants.REWRITE_RESOURCE) == null ?
-            false : Boolean.parseBoolean(request.getParameter(Constants.REWRITE_RESOURCE));
+        String url = request.getParameter(TemplateConstants.TP_URL) == null ?
+            "" : request.getParameter(TemplateConstants.TP_URL);
+        String urlType = request.getParameter(TemplateConstants.TP_URL_TYPE) == null ?
+            "" : request.getParameter(TemplateConstants.TP_URL_TYPE);
+        String mode = request.getParameter(TemplateConstants.TP_PORTLET_MODE) == null ?
+            "" : request.getParameter(TemplateConstants.TP_PORTLET_MODE);
+        String windowState = request.getParameter(TemplateConstants.TP_WINDOW_STATE) == null ?
+            "" : request.getParameter(TemplateConstants.TP_WINDOW_STATE);
+        String navigationalState = request.getParameter(TemplateConstants.TP_NAVIGATIONAL_STATE) == null ?
+            "" : request.getParameter(TemplateConstants.TP_NAVIGATIONAL_STATE);
+        String interactionState = request.getParameter(TemplateConstants.TP_INTERACTION_STATE) == null ?
+            "" : request.getParameter(TemplateConstants.TP_INTERACTION_STATE);
+        boolean secureURL = request.getParameter(TemplateConstants.TP_SECURE_URL) == null ?
+            false : Boolean.parseBoolean(request.getParameter(TemplateConstants.TP_SECURE_URL));
+        String fragmentId = request.getParameter(TemplateConstants.TP_FRAGMENT_ID) == null ?
+            "" : request.getParameter(TemplateConstants.TP_FRAGMENT_ID);
+        String portletHandle = request.getParameter(TemplateConstants.TP_PORTLET_HANDLE) == null ?
+            "" : request.getParameter(TemplateConstants.TP_PORTLET_HANDLE);
+        String userContextKey = request.getParameter(TemplateConstants.TP_USER_CONTEXT_KEY) == null ?
+            "" : request.getParameter(TemplateConstants.TP_USER_CONTEXT_KEY);
+        String portletInstanceKey = request.getParameter(TemplateConstants.TP_PORTLET_INSTANCE_KEY) == null ?
+            "" : request.getParameter(TemplateConstants.TP_PORTLET_INSTANCE_KEY);
+        String sessionId = request.getParameter(TemplateConstants.TP_SESSION_ID) == null ?
+            "" : request.getParameter(TemplateConstants.TP_SESSION_ID);
+        boolean requiresRewrite = request.getParameter(TemplateConstants.TP_REWRITE_RESOURCE) == null ?
+            false : Boolean.parseBoolean(request.getParameter(TemplateConstants.TP_REWRITE_RESOURCE));
+        
+        /* Parse all the other params and add them to the formParams map */
+        Map formParams = new Hashtable();
+        for (Enumeration e = request.getParameterNames(); e.hasMoreElements(); ) {
+            String paramName = (String) e.nextElement();
+            if (!TemplateConstants.isTemplateProcessingParameter(paramName)) {
+                formParams.put(paramName, (String) request.getParameter(paramName));
+            }
+        }
         
         if (log.isDebugEnabled()) {
             log.debug("Parameters supplied: \n" + logParams(request));
@@ -93,13 +104,15 @@
                         request, response, portalUrl, urlType,
                         portletHandle, userContextKey, portletInstanceKey,
                         sessionId, navigationalState, interactionState,
-                        mode, windowState, url, fragmentId, requiresRewrite);
+                        mode, windowState, url, fragmentId, requiresRewrite,
+                        formParams);
             } else {
                 finalUrl = templateComposer.processDefaultSecureTemplate(
                         request, response, portalUrl, urlType,
                         portletHandle, userContextKey, portletInstanceKey,
                         sessionId, navigationalState, interactionState,
-                        mode, windowState, url, fragmentId, requiresRewrite);
+                        mode, windowState, url, fragmentId, requiresRewrite,
+                        formParams);
             }
             
             if (log.isDebugEnabled()) {

Modified: portals/wsrp4j/trunk/consumer-proxyportlet/src/java/org/apache/wsrp4j/consumer/proxyportlet/template/jetspeed/JetspeedPortalTemplateComposer.java
URL: http://svn.apache.org/viewvc/portals/wsrp4j/trunk/consumer-proxyportlet/src/java/org/apache/wsrp4j/consumer/proxyportlet/template/jetspeed/JetspeedPortalTemplateComposer.java?view=diff&rev=493158&r1=493157&r2=493158
==============================================================================
--- portals/wsrp4j/trunk/consumer-proxyportlet/src/java/org/apache/wsrp4j/consumer/proxyportlet/template/jetspeed/JetspeedPortalTemplateComposer.java (original)
+++ portals/wsrp4j/trunk/consumer-proxyportlet/src/java/org/apache/wsrp4j/consumer/proxyportlet/template/jetspeed/JetspeedPortalTemplateComposer.java Fri Jan  5 11:40:25 2007
@@ -15,6 +15,8 @@
  */
 package org.apache.wsrp4j.consumer.proxyportlet.template.jetspeed;
 
+import java.util.Map;
+
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
@@ -44,7 +46,7 @@
             String portletInstanceKey, String sessionId,
             String navigationalState, String interactionState,
             String mode, String windowState, String url,
-            String fragmentId, boolean requiresRewrite) {
+            String fragmentId, boolean requiresRewrite, Map formParams) {
         
         return null;
         
@@ -57,7 +59,7 @@
             String portletInstanceKey, String sessionId,
             String navigationalState, String interactionState,
             String mode, String windowState, String url,
-            String fragmentId, boolean requiresRewrite) {
+            String fragmentId, boolean requiresRewrite, Map formParams) {
         
         return null;
         
@@ -91,7 +93,7 @@
             String sessionId, String navigationalState, 
             String interactionState,
             String mode, String windowState, 
-            String fragmentId, boolean requiresRewrite) {
+            String fragmentId, boolean requiresRewrite, Map formParams) {
         
         return null;
         
@@ -103,7 +105,7 @@
             String sessionId, String navigationalState, 
             String interactionState,
             String mode, String windowState, 
-            String fragmentId, boolean requiresRewrite) {
+            String fragmentId, boolean requiresRewrite, Map formParams) {
         
         return null;
         

Modified: portals/wsrp4j/trunk/consumer-proxyportlet/src/java/org/apache/wsrp4j/consumer/proxyportlet/template/pluto/PlutoPortalTemplateComposer.java
URL: http://svn.apache.org/viewvc/portals/wsrp4j/trunk/consumer-proxyportlet/src/java/org/apache/wsrp4j/consumer/proxyportlet/template/pluto/PlutoPortalTemplateComposer.java?view=diff&rev=493158&r1=493157&r2=493158
==============================================================================
--- portals/wsrp4j/trunk/consumer-proxyportlet/src/java/org/apache/wsrp4j/consumer/proxyportlet/template/pluto/PlutoPortalTemplateComposer.java (original)
+++ portals/wsrp4j/trunk/consumer-proxyportlet/src/java/org/apache/wsrp4j/consumer/proxyportlet/template/pluto/PlutoPortalTemplateComposer.java Fri Jan  5 11:40:25 2007
@@ -15,6 +15,9 @@
  */
 package org.apache.wsrp4j.consumer.proxyportlet.template.pluto;
 
+import java.util.Iterator;
+import java.util.Map;
+
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
@@ -73,7 +76,8 @@
             String portletInstanceKey, String sessionId,
             String navigationalState, String interactionState,
             String mode, String windowState, String url,
-            String fragmentId, boolean requiresRewrite) {
+            String fragmentId, boolean requiresRewrite,
+            Map formParams) {
         
         /* This variable will contain the processed final url */
         String processedUrl = null;
@@ -92,7 +96,7 @@
             processedUrl = processBlockingActionTemplate(portalUrl,
                     portletHandle, userContextKey, portletInstanceKey,
                     sessionId, navigationalState, interactionState,
-                    mode, windowState, fragmentId, requiresRewrite);
+                    mode, windowState, fragmentId, requiresRewrite, formParams);
             
         } else if (urlType.equals(Constants.URL_TYPE_RESOURCE)) {
             
@@ -116,7 +120,8 @@
             String portletInstanceKey, String sessionId,
             String navigationalState, String interactionState,
             String mode, String windowState, String url,
-            String fragmentId, boolean requiresRewrite) {
+            String fragmentId, boolean requiresRewrite,
+            Map formParams) {
         
         /* This variable will contain the processed final url */
         String processedUrl = null;
@@ -136,7 +141,7 @@
             processedUrl = processSecureBlockingActionTemplate(portalUrl,
                     portletHandle, userContextKey, portletInstanceKey,
                     sessionId, navigationalState, interactionState,
-                    mode, windowState, fragmentId, requiresRewrite);
+                    mode, windowState, fragmentId, requiresRewrite, formParams);
             
         } else if (urlType.equals(Constants.URL_TYPE_RESOURCE)) {
             
@@ -208,7 +213,8 @@
             String sessionId, String navigationalState, 
             String interactionState,
             String mode, String windowState, 
-            String fragmentId, boolean requiresRewrite) {
+            String fragmentId, boolean requiresRewrite,
+            Map formParams) {
         
         PlutoPortalURL plutoUrl =
                 new PlutoPortalURL(portalUrl, portletInstanceKey);
@@ -237,6 +243,13 @@
         controlParam.setRequestParam(Constants.INTERACTION_STATE,
                 new String[] {interactionState});
         
+        /* Add all form params */
+        for (Iterator iter = formParams.keySet().iterator(); iter.hasNext(); ) {
+            String key = (String) iter.next();
+            controlParam.setRequestParam(key, 
+                    new String[] {(String) formParams.get(key)});
+        }
+        
         plutoUrl.analyzeControlInformation(controlParam);
         
         String finalUrl = plutoUrl.toString(controlParam);
@@ -251,7 +264,8 @@
             String sessionId, String navigationalState, 
             String interactionState,
             String mode, String windowState, 
-            String fragmentId, boolean requiresRewrite) {
+            String fragmentId, boolean requiresRewrite,
+            Map formParams) {
         
         return null;