portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r713327 - in /portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers: PortletURLListenerImpl.java PortletURLProviderImpl.java
Date Wed, 12 Nov 2008 09:15:46 GMT
Author: ate
Date: Wed Nov 12 01:15:43 2008
New Revision: 713327

URL: http://svn.apache.org/viewvc?rev=713327&view=rev
Log:
Partly implementation of PortletURLProvider.
Incomplete but this already gets things going a little further now.

Modified:
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/PortletURLListenerImpl.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/PortletURLProviderImpl.java

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/PortletURLListenerImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/PortletURLListenerImpl.java?rev=713327&r1=713326&r2=713327&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/PortletURLListenerImpl.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/PortletURLListenerImpl.java
Wed Nov 12 01:15:43 2008
@@ -34,7 +34,8 @@
     
     public void callListener(PortletApplicationDefinition portletApp, BaseURL baseURL, boolean
isAction, boolean isResource)
     {
-        throw new UnsupportedOperationException();        
+        // TODO
+        //throw new UnsupportedOperationException();        
     }
 
 }

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/PortletURLProviderImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/PortletURLProviderImpl.java?rev=713327&r1=713326&r2=713327&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/PortletURLProviderImpl.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/PortletURLProviderImpl.java
Wed Nov 12 01:15:43 2008
@@ -41,7 +41,9 @@
     private WindowState state = null;
     private boolean action = false;
     private boolean secure = false;
-    private Map parameters = null;
+    private Map<String, String[]> privateParameters = null;
+    private Map<String, String[]> publicParameters = null;
+    private boolean resource = false;
 
     private PortalURL url;
     
@@ -62,11 +64,6 @@
         this.state = state;
     }
 
-    public void setAction()
-    {
-        action = true;
-    }
-
     public void setSecure()
     {
         secure = true;
@@ -74,56 +71,60 @@
 
     public void clearParameters()
     {
-        // not used, handled by JetspeedNavigationalStateCodec itself
+        // TODO: old comment "not used, handled by JetspeedNavigationalStateCodec itself"
???
+        privateParameters = null;
     }
 
-    public void setParameters(Map parameters)
+    public String toString()
     {
-        this.parameters = parameters;
+        // TODO: handle publicParameters, resource url, resourceID, cacheability (last two
needs to be added to the PortletURLPRovider interface)
+        return url.createPortletURL(portletWindow,privateParameters,mode,state,action,secure);
     }
-
-    public String toString()
+    
+    public void setParameters(Map parameters)
     {
-        return url.createPortletURL(portletWindow,parameters,mode,state,action,secure);
+        this.privateParameters = parameters;
     }
 
     public String[] getPrivateRenderParameters(String name)
     {
-        throw new UnsupportedOperationException();
+        return privateParameters != null ? privateParameters.get(name) : null;
     }
 
     public String[] getPublicRenderParameters(String name)
     {
-        throw new UnsupportedOperationException();
+        // TODO
+        return null;
     }
 
     public boolean isResourceServing()
     {
-        throw new UnsupportedOperationException();
+        return resource;
     }
 
     public boolean isSecureSupported()
     {
-        throw new UnsupportedOperationException();
+        // TODO: review logic in Pluto PortletURLProviderImpl and PortletContainerImpl usage
of this method (seems wrong...).
+        return false;
     }
 
     public void savePortalURL(HttpServletRequest request)
     {
-        throw new UnsupportedOperationException();
+        // TODO: what should be done here?
     }
 
     public void setAction(boolean isAction)
     {
-        throw new UnsupportedOperationException();
+        action = isAction;
     }
 
     public void setPublicRenderParameters(Map parameters)
     {
-        throw new UnsupportedOperationException();
+        // TODO        
     }
 
     public void setResourceServing(boolean isResourceServing)
     {
-        throw new UnsupportedOperationException();
+        resource = isResourceServing;
     }
 }



---------------------------------------------------------------------
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