[jboss-svn-commits] JBoss Portal SVN: r5659 - in trunk: cms/src/main/org/jboss/portal/test/cms/clustering core/src/main/org/jboss/portal/core/aspects/controller core/src/main/org/jboss/portal/core/aspects/controller/node core/src/main/org/jboss/portal/core/controller core/src/main/org/jboss/portal/core/controller/command core/src/main/org/jboss/portal/core/controller/portlet core/src/main/org/jboss/portal/core/portlet/cms core/src/main/org/jboss/portal/core/portlet/cms/admin portlet/src/main/org/jboss/portal/portlet/impl/jsr168 portlet/src/main/org/jboss/portal/portlet/impl/spi portlet/src/main/org/jboss/portal/portlet/spi portlet/src/main/org/jboss/portal/portlet/support/spi portlet/src/main/org/jboss/portal/portlet/test server/src/main/org/jboss/portal/server server/src/main/org/jboss/portal/test/server/charset server/src/main/org/jboss/portal/test/server/parameters wsrp/src/main/org/jboss/portal/test/wsrp/framework/support wsrp/src/main/org/jboss/portal/wsrp wsrp/src/main/org/jboss! /portal/wsrp/consumer wsrp/src/main/org/jboss/portal/wsrp/invocation

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Nov 15 10:10:21 EST 2006


Author: julien at jboss.com
Date: 2006-11-15 10:09:33 -0500 (Wed, 15 Nov 2006)
New Revision: 5659

Modified:
   trunk/cms/src/main/org/jboss/portal/test/cms/clustering/FileDeleteTest.java
   trunk/cms/src/main/org/jboss/portal/test/cms/clustering/FileUpdateTest.java
   trunk/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java
   trunk/core/src/main/org/jboss/portal/core/aspects/controller/node/PortalNodeURLFactory.java
   trunk/core/src/main/org/jboss/portal/core/controller/ControllerContext.java
   trunk/core/src/main/org/jboss/portal/core/controller/CoreController.java
   trunk/core/src/main/org/jboss/portal/core/controller/command/RenderPageCommand.java
   trunk/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java
   trunk/core/src/main/org/jboss/portal/core/portlet/cms/CMSPortlet.java
   trunk/core/src/main/org/jboss/portal/core/portlet/cms/admin/CMSAdminPortlet.java
   trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletResponseImpl.java
   trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletURLImpl.java
   trunk/portlet/src/main/org/jboss/portal/portlet/impl/spi/AbstractPortletInvocationContext.java
   trunk/portlet/src/main/org/jboss/portal/portlet/spi/PortletInvocationContext.java
   trunk/portlet/src/main/org/jboss/portal/portlet/support/spi/PortletInvocationContextSupport.java
   trunk/portlet/src/main/org/jboss/portal/portlet/test/PortletController.java
   trunk/server/src/main/org/jboss/portal/server/ServerResponse.java
   trunk/server/src/main/org/jboss/portal/test/server/charset/GetTest.java
   trunk/server/src/main/org/jboss/portal/test/server/charset/PostMultipartFormDataNoCharsetTest.java
   trunk/server/src/main/org/jboss/portal/test/server/charset/PostMultipartFormDataUTF8Test.java
   trunk/server/src/main/org/jboss/portal/test/server/charset/PostTest.java
   trunk/server/src/main/org/jboss/portal/test/server/charset/PostXWWWFormURLEncodedNoCharsetTest.java
   trunk/server/src/main/org/jboss/portal/test/server/charset/PostXWWWFormURLEncodedUTF8Test.java
   trunk/server/src/main/org/jboss/portal/test/server/parameters/GetTest.java
   trunk/server/src/main/org/jboss/portal/test/server/parameters/PostApplicationXWWWFormURLEncodedTest.java
   trunk/server/src/main/org/jboss/portal/test/server/parameters/PostMultipartFormDataTest.java
   trunk/wsrp/src/main/org/jboss/portal/test/wsrp/framework/support/TestPortletInvocationContext.java
   trunk/wsrp/src/main/org/jboss/portal/wsrp/WSRPTypeFactory.java
   trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/RenderHandler.java
   trunk/wsrp/src/main/org/jboss/portal/wsrp/invocation/WSRPPortletInvocationContext.java
Log:
renamed encoderURL to renderURL where it makes sense

Modified: trunk/cms/src/main/org/jboss/portal/test/cms/clustering/FileDeleteTest.java
===================================================================
--- trunk/cms/src/main/org/jboss/portal/test/cms/clustering/FileDeleteTest.java	2006-11-15 15:02:57 UTC (rev 5658)
+++ trunk/cms/src/main/org/jboss/portal/test/cms/clustering/FileDeleteTest.java	2006-11-15 15:09:33 UTC (rev 5659)
@@ -106,7 +106,7 @@
 
             AbstractServerURL url = new AbstractServerURL();
             url.setPortalRequestPath("/index.html");
-            String s = invocation.getResponse().encodeURL(url);
+            String s = invocation.getResponse().renderURL(url);
             s = HttpTestContext.getCurrentContext().rewriteURLForNode(s, NodeId.PORTS_02);
             return new InvokeGetResponse(s);
          }
@@ -132,7 +132,7 @@
 
             AbstractServerURL url = new AbstractServerURL();
             url.setPortalRequestPath("/index.html");
-            String s = invocation.getResponse().encodeURL(url);
+            String s = invocation.getResponse().renderURL(url);
             s = HttpTestContext.getCurrentContext().rewriteURLForNode(s, NodeId.PORTS_01);
             return new InvokeGetResponse(s);
          }
@@ -172,7 +172,7 @@
 
             AbstractServerURL url = new AbstractServerURL();
             url.setPortalRequestPath("/index.html");
-            String s = invocation.getResponse().encodeURL(url);
+            String s = invocation.getResponse().renderURL(url);
             s = HttpTestContext.getCurrentContext().rewriteURLForNode(s, NodeId.PORTS_02);
             return new InvokeGetResponse(s);
          }

Modified: trunk/cms/src/main/org/jboss/portal/test/cms/clustering/FileUpdateTest.java
===================================================================
--- trunk/cms/src/main/org/jboss/portal/test/cms/clustering/FileUpdateTest.java	2006-11-15 15:02:57 UTC (rev 5658)
+++ trunk/cms/src/main/org/jboss/portal/test/cms/clustering/FileUpdateTest.java	2006-11-15 15:09:33 UTC (rev 5659)
@@ -114,7 +114,7 @@
 
             AbstractServerURL url = new AbstractServerURL();
             url.setPortalRequestPath("/index.html");
-            String s = invocation.getResponse().encodeURL(url);
+            String s = invocation.getResponse().renderURL(url);
             s = HttpTestContext.getCurrentContext().rewriteURLForNode(s, NodeId.PORTS_02);
             return new InvokeGetResponse(s);
          }
@@ -153,7 +153,7 @@
 
             AbstractServerURL url = new AbstractServerURL();
             url.setPortalRequestPath("/index.html");
-            String s = invocation.getResponse().encodeURL(url);
+            String s = invocation.getResponse().renderURL(url);
             s = HttpTestContext.getCurrentContext().rewriteURLForNode(s, NodeId.PORTS_01);
             return new InvokeGetResponse(s);
          }
@@ -206,7 +206,7 @@
 
             AbstractServerURL url = new AbstractServerURL();
             url.setPortalRequestPath("/index.html");
-            String s = invocation.getResponse().encodeURL(url);
+            String s = invocation.getResponse().renderURL(url);
             s = HttpTestContext.getCurrentContext().rewriteURLForNode(s, NodeId.PORTS_02);
             return new InvokeGetResponse(s);
          }

Modified: trunk/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java	2006-11-15 15:02:57 UTC (rev 5658)
+++ trunk/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java	2006-11-15 15:09:33 UTC (rev 5659)
@@ -145,7 +145,7 @@
       {
          URLContext ctx = cc.getControllerContext().getServerInvocation().getServerContext().getURLContext();
          ctx = URLContext.newInstance(ctx.getSecure(), true);
-         String loginURL = cc.getControllerContext().encodeURL(cc, ctx, null);
+         String loginURL = cc.getControllerContext().renderURL(cc, ctx, null);
          sb.append("<a href=\"").append(loginURL).append("\">Login</a>");
       }
       else
@@ -161,13 +161,13 @@
          if (dashboard)
          {
             RenderPageCommand _rpc = new RenderPageCommand("default.default");
-            pageURL = cc.getControllerContext().encodeURL(_rpc, null, null);
+            pageURL = cc.getControllerContext().renderURL(_rpc, null, null);
             label = "Pages";
          }
          else
          {
             ViewDashboardCommand vdc = new ViewDashboardCommand("dashboard");
-            pageURL = cc.getControllerContext().encodeURL(vdc, null, null);
+            pageURL = cc.getControllerContext().renderURL(vdc, null, null);
             label = "My Dashboard";
          }
 
@@ -187,7 +187,7 @@
          if (admin)
          {
             RenderPageCommand showDefault = new RenderPageCommand("default");
-            showDefaultURL = cc.getControllerContext().encodeURL(showDefault, null, null);
+            showDefaultURL = cc.getControllerContext().renderURL(showDefault, null, null);
          }
          else
          {
@@ -197,7 +197,7 @@
                if (cc.getControllerContext().getController().getPortalAuthorizationManagerFactory().getManager().checkPermission(perm))
                {
                   RenderPageCommand showadmin = new RenderPageCommand("admin");
-                  showadminURL = cc.getControllerContext().encodeURL(showadmin, null, null);
+                  showadminURL = cc.getControllerContext().renderURL(showadmin, null, null);
                }
             }
             catch (PortalSecurityException e)
@@ -208,7 +208,7 @@
 
          // TODO: add checks for shared/private pages
          SignOutCommand cmd = new SignOutCommand();
-         String logoutURL = cc.getControllerContext().encodeURL(cmd, null, null);
+         String logoutURL = cc.getControllerContext().renderURL(cmd, null, null);
 
          //sb.append("<a href=\"#\" class=\"addcontent\">Add Content</a>");
 
@@ -303,7 +303,7 @@
             if (portalAuthorizationManagerFactory.getManager().checkPermission(perm))
             {
                RenderPageCommand cmd = new RenderPageCommand(navElement.getId());
-               String childURL = rpc.getControllerContext().encodeURL(cmd, null, null);
+               String childURL = rpc.getControllerContext().renderURL(cmd, null, null);
                html.append("<li");
                // if we were able to detect the selected node in the hierarchie level of the nav elements,
                // then flag the node so the css can style it as the selected one
@@ -323,7 +323,7 @@
                      if (child.getType() == PortalObject.TYPE_PAGE)
                      {
                         RenderPageCommand renderCmd = new RenderPageCommand(child.getId());
-                        String subChildURL = rpc.getControllerContext().encodeURL(renderCmd, null, null);
+                        String subChildURL = rpc.getControllerContext().renderURL(renderCmd, null, null);
 
                         html.append("<li>").append("<a href='").append(subChildURL).append("'>").append(child.getName()).append("</a></li>");
                      }

Modified: trunk/core/src/main/org/jboss/portal/core/aspects/controller/node/PortalNodeURLFactory.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/aspects/controller/node/PortalNodeURLFactory.java	2006-11-15 15:02:57 UTC (rev 5658)
+++ trunk/core/src/main/org/jboss/portal/core/aspects/controller/node/PortalNodeURLFactory.java	2006-11-15 15:09:33 UTC (rev 5659)
@@ -130,7 +130,7 @@
       {
          InvokeWindowRenderCommand cmd = new InvokeWindowRenderCommand(handle, null, null, parameters);
          URLContext urlContext = getURLContext();
-         return controllerContext.encodeURL(cmd, urlContext, URLFormat.newInstance(relative, true));
+         return controllerContext.renderURL(cmd, urlContext, URLFormat.newInstance(relative, true));
       }
    }
 
@@ -146,7 +146,7 @@
       {
          RenderPageCommand cmd = new RenderPageCommand(handle);
          URLContext urlContext = getURLContext();
-         return controllerContext.encodeURL(cmd, urlContext, URLFormat.newInstance(relative, true));
+         return controllerContext.renderURL(cmd, urlContext, URLFormat.newInstance(relative, true));
       }
    }
 

Modified: trunk/core/src/main/org/jboss/portal/core/controller/ControllerContext.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/controller/ControllerContext.java	2006-11-15 15:02:57 UTC (rev 5658)
+++ trunk/core/src/main/org/jboss/portal/core/controller/ControllerContext.java	2006-11-15 15:09:33 UTC (rev 5659)
@@ -96,10 +96,10 @@
       }
    }
 
-   public String encodeURL(ControllerCommand cmd, URLContext urlContext, URLFormat format)
+   public String renderURL(ControllerCommand cmd, URLContext urlContext, URLFormat format)
    {
       ServerURL serverURL = controller.getURLFactory().doMapping(serverInvocation, cmd);
-      return serverInvocation.getResponse().encodeURL(serverURL, urlContext, format);
+      return serverInvocation.getResponse().renderURL(serverURL, urlContext, format);
    }
 
    public ServerInvocation getServerInvocation()

Modified: trunk/core/src/main/org/jboss/portal/core/controller/CoreController.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/controller/CoreController.java	2006-11-15 15:02:57 UTC (rev 5658)
+++ trunk/core/src/main/org/jboss/portal/core/controller/CoreController.java	2006-11-15 15:09:33 UTC (rev 5659)
@@ -209,7 +209,7 @@
             // Find out if we can execute in the same server invocation
             if (requiresRedirect(urlContext, cmd, invocation))
             {
-               String url = controllerContext.encodeURL(forward.getCommand(), forward.getURLContext(), null);
+               String url = controllerContext.renderURL(forward.getCommand(), forward.getURLContext(), null);
                if (url == null)
                {
                   throw new ControllerException();
@@ -227,7 +227,7 @@
       {
          urlContext = URLContext.newInstance(true, urlContext.isAuthenticated());
          ServerURL serverURL = getURLFactory().doMapping(invocation, cmd);
-         String url = invocation.getResponse().encodeURL(serverURL, urlContext, null);
+         String url = invocation.getResponse().renderURL(serverURL, urlContext, null);
          sendRedirect(invocation, url);
       }
       catch (ControllerSecurityException e)
@@ -240,7 +240,7 @@
          {
             urlContext = URLContext.newInstance(urlContext.getSecure(), true);
             ServerURL serverURL = getURLFactory().doMapping(invocation, cmd);
-            String url = invocation.getResponse().encodeURL(serverURL, urlContext, null);
+            String url = invocation.getResponse().renderURL(serverURL, urlContext, null);
             sendRedirect(invocation, url);
          }
       }

Modified: trunk/core/src/main/org/jboss/portal/core/controller/command/RenderPageCommand.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/controller/command/RenderPageCommand.java	2006-11-15 15:02:57 UTC (rev 5658)
+++ trunk/core/src/main/org/jboss/portal/core/controller/command/RenderPageCommand.java	2006-11-15 15:09:33 UTC (rev 5659)
@@ -76,8 +76,6 @@
 import org.jboss.portal.theme.render.MarkupResult;
 
 import javax.servlet.http.HttpServletRequest;
-import java.text.CharacterIterator;
-import java.text.StringCharacterIterator;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
@@ -640,6 +638,6 @@
       boolean secure = serverContext.getURLContext().getSecure();
       boolean authenticated = serverContext.getURLContext().isAuthenticated();
       URLContext urlContext = URLContext.newInstance(secure, authenticated);
-      return controllerContext.encodeURL(cmd, urlContext, URLFormat.newInstance(true, true));
+      return controllerContext.renderURL(cmd, urlContext, URLFormat.newInstance(true, true));
    }
 }

Modified: trunk/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java	2006-11-15 15:02:57 UTC (rev 5658)
+++ trunk/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java	2006-11-15 15:09:33 UTC (rev 5659)
@@ -188,9 +188,9 @@
       {
          return controllerContext.getServerInvocation().getServerContext().getClientResponse();
       }
-      public String encodeURL(PortletURL portletURL, Boolean wantSecure, Boolean wantAuthenticated, boolean relative)
+      public String renderURL(PortletURL portletURL, Boolean wantSecure, Boolean wantAuthenticated, boolean relative)
       {
-         return PortletInvocationFactory.encodeURL(controllerContext, cmdFactory, portletURL, wantSecure, wantAuthenticated, relative);
+         return PortletInvocationFactory.renderURL(controllerContext, cmdFactory, portletURL, wantSecure, wantAuthenticated, relative);
       }
    }
 
@@ -220,13 +220,13 @@
       {
          return controllerContext.getServerInvocation().getServerContext().getClientResponse();
       }
-      public String encodeURL(PortletURL portletURL, Boolean wantSecure, Boolean wantAuthenticated, boolean relative)
+      public String renderURL(PortletURL portletURL, Boolean wantSecure, Boolean wantAuthenticated, boolean relative)
       {
-         return PortletInvocationFactory.encodeURL(controllerContext, cmdFactory, portletURL, wantSecure, wantAuthenticated, relative);
+         return PortletInvocationFactory.renderURL(controllerContext, cmdFactory, portletURL, wantSecure, wantAuthenticated, relative);
       }
    }
 
-   public static String encodeURL(
+   public static String renderURL(
       ControllerContext controllerContext,
       PortletCommandFactory factory,
       PortletURL portletURL,
@@ -259,7 +259,7 @@
       }
 
       URLContext info = URLContext.newInstance(secure, authenticated);
-      return controllerContext.encodeURL(cmd, info, URLFormat.newInstance(relative, true));
+      return controllerContext.renderURL(cmd, info, URLFormat.newInstance(relative, true));
    }
 
    private static class InternalPortletCommandFactory implements PortletCommandFactory

Modified: trunk/core/src/main/org/jboss/portal/core/portlet/cms/CMSPortlet.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/portlet/cms/CMSPortlet.java	2006-11-15 15:02:57 UTC (rev 5658)
+++ trunk/core/src/main/org/jboss/portal/core/portlet/cms/CMSPortlet.java	2006-11-15 15:09:33 UTC (rev 5659)
@@ -257,7 +257,7 @@
    {
       StreamContentCommand cmd = new StreamContentCommand(path);
       ControllerContext cc = req.getControllerContext();
-      return cc.encodeURL(cmd, URLContext.newInstance(false, false), RELATIVE_SERVLET_ENCODED_URL_FORMAT);
+      return cc.renderURL(cmd, URLContext.newInstance(false, false), RELATIVE_SERVLET_ENCODED_URL_FORMAT);
    }
 
    public void doHelp(RenderRequest req, RenderResponse resp) throws IOException, PortletException

Modified: trunk/core/src/main/org/jboss/portal/core/portlet/cms/admin/CMSAdminPortlet.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/portlet/cms/admin/CMSAdminPortlet.java	2006-11-15 15:02:57 UTC (rev 5658)
+++ trunk/core/src/main/org/jboss/portal/core/portlet/cms/admin/CMSAdminPortlet.java	2006-11-15 15:09:33 UTC (rev 5659)
@@ -945,7 +945,7 @@
    {
       StreamContentCommand cmd = new StreamContentCommand(path);
       ControllerContext cc = req.getControllerContext();
-      return cc.encodeURL(cmd, NON_SECURE_NON_AUTH_URL_CONTEXT, RELATIVE_SERVLET_ENCODED_URL_FORMAT);
+      return cc.renderURL(cmd, NON_SECURE_NON_AUTH_URL_CONTEXT, RELATIVE_SERVLET_ENCODED_URL_FORMAT);
    }
 
    static final URLContext NON_SECURE_NON_AUTH_URL_CONTEXT = URLContext.newInstance(false, false);

Modified: trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletResponseImpl.java
===================================================================
--- trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletResponseImpl.java	2006-11-15 15:02:57 UTC (rev 5658)
+++ trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletResponseImpl.java	2006-11-15 15:09:33 UTC (rev 5659)
@@ -54,7 +54,7 @@
       {
          throw new IllegalArgumentException("URL must not be null");
       }
-      return invocation.getPortletContext().encodeURL(url);
+      return invocation.getPortletContext().encodeResourceURL(url);
    }
 
    public void addProperty(String key, String value) throws IllegalArgumentException

Modified: trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletURLImpl.java
===================================================================
--- trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletURLImpl.java	2006-11-15 15:02:57 UTC (rev 5658)
+++ trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletURLImpl.java	2006-11-15 15:09:33 UTC (rev 5659)
@@ -124,7 +124,7 @@
    public String toString()
    {
       PortletInvocationContext responseContext = inv.getPortletContext();
-      String s = responseContext.encodeURL(url, secure, null, true);
+      String s = responseContext.renderURL(url, secure, null, true);
       return s;
    }
 

Modified: trunk/portlet/src/main/org/jboss/portal/portlet/impl/spi/AbstractPortletInvocationContext.java
===================================================================
--- trunk/portlet/src/main/org/jboss/portal/portlet/impl/spi/AbstractPortletInvocationContext.java	2006-11-15 15:02:57 UTC (rev 5658)
+++ trunk/portlet/src/main/org/jboss/portal/portlet/impl/spi/AbstractPortletInvocationContext.java	2006-11-15 15:09:33 UTC (rev 5659)
@@ -83,7 +83,7 @@
     *
     * @return the encoded url
     */
-   public String encodeURL(String url) throws IllegalArgumentException
+   public String encodeResourceURL(String url) throws IllegalArgumentException
    {
       URLTools.enforceAbsoluteURL(url);
 

Modified: trunk/portlet/src/main/org/jboss/portal/portlet/spi/PortletInvocationContext.java
===================================================================
--- trunk/portlet/src/main/org/jboss/portal/portlet/spi/PortletInvocationContext.java	2006-11-15 15:02:57 UTC (rev 5658)
+++ trunk/portlet/src/main/org/jboss/portal/portlet/spi/PortletInvocationContext.java	2006-11-15 15:09:33 UTC (rev 5659)
@@ -76,14 +76,18 @@
     * @return the encoded URL if encoding is needed, the unchanged URL otherwise
     * @throws IllegalArgumentException if the url is not valid or null
     */
-   String encodeURL(String url) throws IllegalArgumentException;
+   String encodeResourceURL(String url) throws IllegalArgumentException;
 
    /**
-    * @param portletURL        the portlet url
+    * @param portletURL the portlet url
     * @param wantSecure
     * @param wantAuthenticated
     * @param relative
     * @return the url
     */
-   String encodeURL(PortletURL portletURL, Boolean wantSecure, Boolean wantAuthenticated, boolean relative);
+   String renderURL(
+      PortletURL portletURL,
+      Boolean wantSecure,
+      Boolean wantAuthenticated,
+      boolean relative);
 }

Modified: trunk/portlet/src/main/org/jboss/portal/portlet/support/spi/PortletInvocationContextSupport.java
===================================================================
--- trunk/portlet/src/main/org/jboss/portal/portlet/support/spi/PortletInvocationContextSupport.java	2006-11-15 15:02:57 UTC (rev 5658)
+++ trunk/portlet/src/main/org/jboss/portal/portlet/support/spi/PortletInvocationContextSupport.java	2006-11-15 15:09:33 UTC (rev 5659)
@@ -57,12 +57,12 @@
       throw new UnsupportedOperationException();
    }
 
-   public String encodeURL(String url) throws IllegalArgumentException
+   public String encodeResourceURL(String url) throws IllegalArgumentException
    {
       throw new UnsupportedOperationException();
    }
 
-   public String encodeURL(PortletURL portletURL, Boolean wantSecure, Boolean wantAuthenticated, boolean relative)
+   public String renderURL(PortletURL portletURL, Boolean wantSecure, Boolean wantAuthenticated, boolean relative)
    {
       throw new UnsupportedOperationException();
    }

Modified: trunk/portlet/src/main/org/jboss/portal/portlet/test/PortletController.java
===================================================================
--- trunk/portlet/src/main/org/jboss/portal/portlet/test/PortletController.java	2006-11-15 15:02:57 UTC (rev 5658)
+++ trunk/portlet/src/main/org/jboss/portal/portlet/test/PortletController.java	2006-11-15 15:09:33 UTC (rev 5659)
@@ -184,7 +184,7 @@
                               return _windowState;
                            }
                         };
-                        String url = actionContext.encodeURL(portletURL, null, null, false);
+                        String url = actionContext.renderURL(portletURL, null, null, false);
                         invocation.getServerContext().getClientResponse().sendRedirect(url);
                         return;
                      }
@@ -608,13 +608,13 @@
          return invocation.getServerContext().getClientRequest();
       }
 
-      public String encodeURL(String url)
+      public String encodeResourceURL(String url)
       {
          URLTools.enforceAbsoluteURL(url);
          return invocation.getServerContext().getClientResponse().encodeURL(url);
       }
 
-      public String encodeURL(PortletURL portletURL, Boolean wantSecure, Boolean wantAuthenticated, boolean relative)
+      public String renderURL(PortletURL portletURL, Boolean wantSecure, Boolean wantAuthenticated, boolean relative)
       {
          AbstractServerURL serverURL = new AbstractServerURL();
 
@@ -678,7 +678,7 @@
          }
 
          //
-         return invocation.getResponse().encodeURL(serverURL, URLFormat.newInstance(relative, true));
+         return invocation.getResponse().renderURL(serverURL, URLFormat.newInstance(relative, true));
       }
    }
 }

Modified: trunk/server/src/main/org/jboss/portal/server/ServerResponse.java
===================================================================
--- trunk/server/src/main/org/jboss/portal/server/ServerResponse.java	2006-11-15 15:02:57 UTC (rev 5658)
+++ trunk/server/src/main/org/jboss/portal/server/ServerResponse.java	2006-11-15 15:09:33 UTC (rev 5659)
@@ -74,12 +74,12 @@
       this.wantSignOut = wantSignOut;
    }
 
-   public String encodeURL(ServerURL url)
+   public String renderURL(ServerURL url)
    {
       return invocationCtx.renderURL(url, invocationCtx.getURLContext(), DEFAULT_FORMAT);
    }
 
-   public String encodeURL(ServerURL url, URLFormat format)
+   public String renderURL(ServerURL url, URLFormat format)
    {
       if (format == null)
       {
@@ -88,7 +88,7 @@
       return invocationCtx.renderURL(url, invocationCtx.getURLContext(), format);
    }
 
-   public String encodeURL(ServerURL url, URLContext context, URLFormat format)
+   public String renderURL(ServerURL url, URLContext context, URLFormat format)
    {
       if (context == null)
       {
@@ -101,7 +101,7 @@
       return invocationCtx.renderURL(url, context, format);
    }
 
-   public String encodeURL(ServerURL url, URLContext context)
+   public String renderURL(ServerURL url, URLContext context)
    {
       if (context == null)
       {

Modified: trunk/server/src/main/org/jboss/portal/test/server/charset/GetTest.java
===================================================================
--- trunk/server/src/main/org/jboss/portal/test/server/charset/GetTest.java	2006-11-15 15:02:57 UTC (rev 5658)
+++ trunk/server/src/main/org/jboss/portal/test/server/charset/GetTest.java	2006-11-15 15:09:33 UTC (rev 5659)
@@ -52,7 +52,7 @@
       {
          AbstractServerURL url = new AbstractServerURL();
          url.setPortalRequestPath("/index.html");
-         String s = invocation.getResponse().encodeURL(url);
+         String s = invocation.getResponse().renderURL(url);
          return new InvokeGetResponse(s);
       }
       else

Modified: trunk/server/src/main/org/jboss/portal/test/server/charset/PostMultipartFormDataNoCharsetTest.java
===================================================================
--- trunk/server/src/main/org/jboss/portal/test/server/charset/PostMultipartFormDataNoCharsetTest.java	2006-11-15 15:02:57 UTC (rev 5658)
+++ trunk/server/src/main/org/jboss/portal/test/server/charset/PostMultipartFormDataNoCharsetTest.java	2006-11-15 15:09:33 UTC (rev 5659)
@@ -54,7 +54,7 @@
       {
          AbstractServerURL url = new AbstractServerURL();
          url.setPortalRequestPath("/index.html");
-         String s = invocation.getResponse().encodeURL(url);
+         String s = invocation.getResponse().renderURL(url);
          InvokePostResponse post = new InvokePostResponse();
          post.setURL(s);
          post.setContentType(PortalConstants.MULTIPART_FORM_DATA);

Modified: trunk/server/src/main/org/jboss/portal/test/server/charset/PostMultipartFormDataUTF8Test.java
===================================================================
--- trunk/server/src/main/org/jboss/portal/test/server/charset/PostMultipartFormDataUTF8Test.java	2006-11-15 15:02:57 UTC (rev 5658)
+++ trunk/server/src/main/org/jboss/portal/test/server/charset/PostMultipartFormDataUTF8Test.java	2006-11-15 15:09:33 UTC (rev 5659)
@@ -54,7 +54,7 @@
       {
          AbstractServerURL url = new AbstractServerURL();
          url.setPortalRequestPath("/index.html");
-         String s = invocation.getResponse().encodeURL(url);
+         String s = invocation.getResponse().renderURL(url);
          InvokePostResponse post = new InvokePostResponse();
          post.setURL(s);
          post.setContentType(PortalConstants.MULTIPART_FORM_DATA);

Modified: trunk/server/src/main/org/jboss/portal/test/server/charset/PostTest.java
===================================================================
--- trunk/server/src/main/org/jboss/portal/test/server/charset/PostTest.java	2006-11-15 15:02:57 UTC (rev 5658)
+++ trunk/server/src/main/org/jboss/portal/test/server/charset/PostTest.java	2006-11-15 15:09:33 UTC (rev 5659)
@@ -53,7 +53,7 @@
       {
          AbstractServerURL url = new AbstractServerURL();
          url.setPortalRequestPath("/index.html");
-         String s = invocation.getResponse().encodeURL(url);
+         String s = invocation.getResponse().renderURL(url);
          InvokePostResponse post = new InvokePostResponse();
          post.setURL(s);
          post.setBody(new HttpRequest.Form());

Modified: trunk/server/src/main/org/jboss/portal/test/server/charset/PostXWWWFormURLEncodedNoCharsetTest.java
===================================================================
--- trunk/server/src/main/org/jboss/portal/test/server/charset/PostXWWWFormURLEncodedNoCharsetTest.java	2006-11-15 15:02:57 UTC (rev 5658)
+++ trunk/server/src/main/org/jboss/portal/test/server/charset/PostXWWWFormURLEncodedNoCharsetTest.java	2006-11-15 15:09:33 UTC (rev 5659)
@@ -55,7 +55,7 @@
       {
          AbstractServerURL url = new AbstractServerURL();
          url.setPortalRequestPath("/index.html");
-         String s = invocation.getResponse().encodeURL(url);
+         String s = invocation.getResponse().renderURL(url);
          InvokePostResponse post = new InvokePostResponse();
          post.setURL(s);
          post.setContentType(PortalConstants.APPLICATION_X_WWW_FORM_URLENCODED);

Modified: trunk/server/src/main/org/jboss/portal/test/server/charset/PostXWWWFormURLEncodedUTF8Test.java
===================================================================
--- trunk/server/src/main/org/jboss/portal/test/server/charset/PostXWWWFormURLEncodedUTF8Test.java	2006-11-15 15:02:57 UTC (rev 5658)
+++ trunk/server/src/main/org/jboss/portal/test/server/charset/PostXWWWFormURLEncodedUTF8Test.java	2006-11-15 15:09:33 UTC (rev 5659)
@@ -54,7 +54,7 @@
       {
          AbstractServerURL url = new AbstractServerURL();
          url.setPortalRequestPath("/index.html");
-         String s = invocation.getResponse().encodeURL(url);
+         String s = invocation.getResponse().renderURL(url);
          InvokePostResponse post = new InvokePostResponse();
          post.setURL(s);
          post.setContentType(PortalConstants.APPLICATION_X_WWW_FORM_URLENCODED + "; charset=" + PortalConstants.UTF_8.name());

Modified: trunk/server/src/main/org/jboss/portal/test/server/parameters/GetTest.java
===================================================================
--- trunk/server/src/main/org/jboss/portal/test/server/parameters/GetTest.java	2006-11-15 15:02:57 UTC (rev 5658)
+++ trunk/server/src/main/org/jboss/portal/test/server/parameters/GetTest.java	2006-11-15 15:09:33 UTC (rev 5659)
@@ -56,7 +56,7 @@
          url.setParameterValue("a", "b");
          url.setParameterValues("c", new String[]{"d", "e"});
          url.setParameterValues("encoding", new String[]{Utils.RANGE_0_255});
-         String s = invocation.getResponse().encodeURL(url);
+         String s = invocation.getResponse().renderURL(url);
          return new InvokeGetResponse(s);
       }
       else

Modified: trunk/server/src/main/org/jboss/portal/test/server/parameters/PostApplicationXWWWFormURLEncodedTest.java
===================================================================
--- trunk/server/src/main/org/jboss/portal/test/server/parameters/PostApplicationXWWWFormURLEncodedTest.java	2006-11-15 15:02:57 UTC (rev 5658)
+++ trunk/server/src/main/org/jboss/portal/test/server/parameters/PostApplicationXWWWFormURLEncodedTest.java	2006-11-15 15:09:33 UTC (rev 5659)
@@ -76,7 +76,7 @@
          body.addParameter("m", new String[]{"n", "o"});
 
          //
-         String s = invocation.getResponse().encodeURL(url);
+         String s = invocation.getResponse().renderURL(url);
          InvokePostResponse result = new InvokePostResponse();
          result.setURL(s);
          result.setContentType(InvokePostResponse.APPLICATION_X_WWW_FORM_URLENCODED + "; charset=UTF-8");

Modified: trunk/server/src/main/org/jboss/portal/test/server/parameters/PostMultipartFormDataTest.java
===================================================================
--- trunk/server/src/main/org/jboss/portal/test/server/parameters/PostMultipartFormDataTest.java	2006-11-15 15:02:57 UTC (rev 5658)
+++ trunk/server/src/main/org/jboss/portal/test/server/parameters/PostMultipartFormDataTest.java	2006-11-15 15:09:33 UTC (rev 5659)
@@ -65,7 +65,7 @@
          url.setParameterValues("h", new String[]{"i", "j"});
          body.addParameter("h", new String[]{"_i", "_j"});
 
-         String s = invocation.getResponse().encodeURL(url);
+         String s = invocation.getResponse().renderURL(url);
          InvokePostResponse result = new InvokePostResponse();
          result.setURL(s);
          result.setContentType(InvokePostResponse.MULTIPART_FORM_DATA);

Modified: trunk/wsrp/src/main/org/jboss/portal/test/wsrp/framework/support/TestPortletInvocationContext.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/test/wsrp/framework/support/TestPortletInvocationContext.java	2006-11-15 15:02:57 UTC (rev 5658)
+++ trunk/wsrp/src/main/org/jboss/portal/test/wsrp/framework/support/TestPortletInvocationContext.java	2006-11-15 15:09:33 UTC (rev 5659)
@@ -105,12 +105,12 @@
       return mockResponse;
    }
 
-   public String encodeURL(String url)
+   public String encodeResourceURL(String url)
    {
       return null;
    }
 
-   public String encodeURL(PortletURL portletURL, Boolean wantSecure, Boolean wantAuthenticated, boolean relative)
+   public String renderURL(PortletURL portletURL, Boolean wantSecure, Boolean wantAuthenticated, boolean relative)
    {
       return null;
    }

Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/WSRPTypeFactory.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/WSRPTypeFactory.java	2006-11-15 15:02:57 UTC (rev 5658)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/WSRPTypeFactory.java	2006-11-15 15:09:33 UTC (rev 5659)
@@ -583,7 +583,7 @@
 
    private static String createTemplate(PortletInvocationContext context, PortletURL url, Boolean secure)
    {
-      String template = context.encodeURL(url, secure, null, true);
+      String template = context.renderURL(url, secure, null, true);
       template = Tools.replace(template, WSRPRewritingConstants.ENC_OPEN, WSRPRewritingConstants.REWRITE_PARAMETER_OPEN);
       template = Tools.replace(template, WSRPRewritingConstants.ENC_CLOSE, WSRPRewritingConstants.REWRITE_PARAMETER_CLOSE);
       return template;

Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/RenderHandler.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/RenderHandler.java	2006-11-15 15:02:57 UTC (rev 5658)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/RenderHandler.java	2006-11-15 15:09:33 UTC (rev 5659)
@@ -228,7 +228,7 @@
                return portletURL.toString();
             }
 
-            return context.encodeURL(portletURL, secure, authenticated, true);
+            return context.renderURL(portletURL, secure, authenticated, true);
          }
          return urlAsString;
       }

Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/invocation/WSRPPortletInvocationContext.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/invocation/WSRPPortletInvocationContext.java	2006-11-15 15:02:57 UTC (rev 5658)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/invocation/WSRPPortletInvocationContext.java	2006-11-15 15:09:33 UTC (rev 5659)
@@ -92,7 +92,7 @@
    }
 
    /** Override the default behavior in order to avoid to encode when it is producer written URL. */
-   public String encodeURL(String url)
+   public String encodeResourceURL(String url)
    {
       if (url != null && url.startsWith(WSRPRewritingConstants.BEGIN_WSRP_REWRITE))
       {
@@ -101,7 +101,7 @@
       }
       else
       {
-         return super.encodeURL(url);
+         return super.encodeResourceURL(url);
       }
    }
 
@@ -120,7 +120,7 @@
     * @param relative
     * @return the encoded url
     */
-   public String encodeURL(PortletURL portletURL, Boolean wantSecure, Boolean wantAuthenticated, boolean relative)
+   public String renderURL(PortletURL portletURL, Boolean wantSecure, Boolean wantAuthenticated, boolean relative)
    {
       if (portletURL != null)
       {




More information about the jboss-svn-commits mailing list