portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r332176 - /portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/services/information/ResourceURLProviderImpl.java
Date Wed, 09 Nov 2005 23:41:39 GMT
Author: ate
Date: Wed Nov  9 15:41:35 2005
New Revision: 332176

URL: http://svn.apache.org/viewcvs?rev=332176&view=rev
Log:
PLT.16.3.4 cxxxix fix.
According to this requirement, an included HttpServletResponse.encodeURL(resourceURL) should
be
equivalent to PortletResponse.encodeURL(resourceURL).
Our included HttpServletResponse wrapper (HttpBufferedResponse) simply delegates to the
underlying HttpServletResponse, so our PortletResponse should do the same.
Pluto uses the ResourceURLProvider to allow additional encoding before it delegates the 
real encoding to the underlying HttpServletResponse. 
Hence, we shouldn't do anything anymore in our ResourceURLProviderImpl.

Note: our implementation now is the same (again) as the one provided by the Pluto Portal Driver.

Modified:
    portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/services/information/ResourceURLProviderImpl.java

Modified: portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/services/information/ResourceURLProviderImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/services/information/ResourceURLProviderImpl.java?rev=332176&r1=332175&r2=332176&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/services/information/ResourceURLProviderImpl.java
(original)
+++ portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/services/information/ResourceURLProviderImpl.java
Wed Nov  9 15:41:35 2005
@@ -15,9 +15,6 @@
  */
 package org.apache.jetspeed.services.information;
 
-import java.net.MalformedURLException;
-import java.net.URL;
-
 import org.apache.jetspeed.request.RequestContext;
 import org.apache.pluto.om.window.PortletWindow;
 import org.apache.pluto.services.information.ResourceURLProvider;
@@ -35,20 +32,12 @@
  */
 public class ResourceURLProviderImpl implements ResourceURLProvider
 {
-    private PortletWindow portletWindow = null;
     private String stringUrl = "";
-    private String base = "";
-    private RequestContext context;
 
     public ResourceURLProviderImpl(RequestContext context, PortletWindow portletWindow)
     {
-        this.portletWindow = portletWindow;
-        this.context = context;                
-        this.base = context.getPortalURL().getBaseURL();
     }
 
-    // ResourceURLProvider implementation.
-
     public void setAbsoluteURL(String path)
     {
         stringUrl = path;
@@ -56,27 +45,12 @@
 
     public void setFullPath(String path)
     {
-        stringUrl = base + path;
+        stringUrl = path;
     }
 
     public String toString()
     {
-        URL url = null;
-
-        if (!"".equals(stringUrl))
-        {
-            try
-            {
-                url = new URL(stringUrl);
-            }
-            catch (MalformedURLException e)
-            {
-                throw new java.lang.IllegalArgumentException("A malformed URL has occured");
-            }
-        }
-
-        return ((url == null) ? "" : url.toString());
-
+        return stringUrl;
     }
 
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message