portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r718841 - in /portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade: components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/ components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/...
Date Wed, 19 Nov 2008 02:06:49 GMT
Author: taylor
Date: Tue Nov 18 18:06:49 2008
New Revision: 718841

URL: http://svn.apache.org/viewvc?rev=718841&view=rev
Log:
https://issues.apache.org/jira/browse/JS2-871
Synchronizing with https://issues.apache.org/jira/browse/PLUTO-523, see committed Pluto revision
718839 from earlier today
These changes should go a long way in getting the portal usable with Pluto 2.0, as post and
portlet request parameters now seem to be functional


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
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/RequestPropertyProviderImpl.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/AbstractNavigationalState.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/PortletWindowExtendedNavigationalState.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletpreferences/TestPortletPreferencesProvider.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-api/src/main/java/org/apache/jetspeed/container/state/NavigationalState.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-commons/src/main/java/org/apache/jetspeed/container/JetspeedContainerServlet.java

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=718841&r1=718840&r2=718841&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
Tue Nov 18 18:06:49 2008
@@ -16,6 +16,7 @@
  */
 package org.apache.jetspeed.container.providers;
 
+import java.util.HashMap;
 import java.util.Map;
 
 import javax.portlet.PortletMode;
@@ -52,6 +53,7 @@
         this.portletWindow = portletWindow;
         
         url = context.getPortalURL();
+        privateParameters = url.getNavigationalState().getParameterMap(portletWindow);
     }
 
     public void setPortletMode(PortletMode mode)
@@ -127,4 +129,17 @@
     {
         resource = isResourceServing;
     }
+
+    public Map<String, String[]> getRenderParameters()
+    {
+        if (this.privateParameters == null)
+            this.privateParameters = new HashMap<String, String[]>();
+        return this.privateParameters;
+    }
+
+    public Map<String, String[]> parseRenderParameters(Map<String, String[]>
parentMap, String queryString)
+    {
+        return this.privateParameters;
+    }
+    
 }

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/RequestPropertyProviderImpl.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/RequestPropertyProviderImpl.java?rev=718841&r1=718840&r2=718841&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/RequestPropertyProviderImpl.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/RequestPropertyProviderImpl.java
Tue Nov 18 18:06:49 2008
@@ -37,10 +37,9 @@
     public RequestPropertyProviderImpl() 
     {}
     
-    public Map getProperties(HttpServletRequest request,
+    public Map<String, String[]> getProperties(HttpServletRequest request,
             org.apache.pluto.PortletWindow portletWindow)
     {
-        // TODO: currently this method returns an empty map.
         return Collections.EMPTY_MAP;
     }
 

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/AbstractNavigationalState.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/state/impl/AbstractNavigationalState.java?rev=718841&r1=718840&r2=718841&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/AbstractNavigationalState.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/AbstractNavigationalState.java
Tue Nov 18 18:06:49 2008
@@ -222,6 +222,17 @@
         }
     }
 
+    public Map<String, String[]> getParameterMap(PortletWindow window)
+    {
+        PortletWindowRequestNavigationalState state = requestStates.getPortletWindowNavigationalState(window.getId().toString());
+        if ( state != null && state.getParametersMap() != null )
+        {
+            return state.getParametersMap();
+        }
+        else
+            return null;
+    }
+    
     public PortletWindow getPortletWindowOfAction()
     {
         return requestStates.getActionWindow();

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/PortletWindowExtendedNavigationalState.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/state/impl/PortletWindowExtendedNavigationalState.java?rev=718841&r1=718840&r2=718841&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/PortletWindowExtendedNavigationalState.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/PortletWindowExtendedNavigationalState.java
Tue Nov 18 18:06:49 2008
@@ -60,11 +60,11 @@
         }
     }
     
-    private Map parametersMap;
+    private Map<String, String[]> parametersMap;
     
     private Map decoratorActionEncodings;
         
-    public Map getParametersMap()
+    public Map<String, String[]> getParametersMap()
     {
         return parametersMap;
     }
@@ -73,12 +73,12 @@
     {
         if ( parametersMap == null )
         {
-            parametersMap = new HashMap();
+            parametersMap = new HashMap<String, String[]>();
         }
         parametersMap.put(name, values);
     }    
     
-    public void setParametersMap(Map parametersMap)
+    public void setParametersMap(Map<String, String[]> parametersMap)
     {
         this.parametersMap = parametersMap;
     }

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletpreferences/TestPortletPreferencesProvider.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletpreferences/TestPortletPreferencesProvider.java?rev=718841&r1=718840&r2=718841&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletpreferences/TestPortletPreferencesProvider.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletpreferences/TestPortletPreferencesProvider.java
Tue Nov 18 18:06:49 2008
@@ -27,10 +27,11 @@
     private static MockJetspeedEngine mockEngine = new MockJetspeedEngine();
 	private PortletPreferencesProvider prefs;
 	
+	
 	@Override
 	protected String[] getConfigurations() {
 	    return new String[]
-           { "transaction.xml", "registry-test.xml", "cache.xml" };
+           { "transaction.xml", "registry.xml", "cache.xml" };
 	}
 
     protected void setUp() throws Exception

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-api/src/main/java/org/apache/jetspeed/container/state/NavigationalState.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-api/src/main/java/org/apache/jetspeed/container/state/NavigationalState.java?rev=718841&r1=718840&r2=718841&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-api/src/main/java/org/apache/jetspeed/container/state/NavigationalState.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-api/src/main/java/org/apache/jetspeed/container/state/NavigationalState.java
Tue Nov 18 18:06:49 2008
@@ -138,6 +138,8 @@
     
     String[] getParameterValues(PortletWindow window, String parameterName);
 
+    Map<String, String[]> getParameterMap(PortletWindow window);
+    
     PortletWindow getPortletWindowOfAction();
     
     PortletWindow getPortletWindowOfResource();

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-commons/src/main/java/org/apache/jetspeed/container/JetspeedContainerServlet.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-commons/src/main/java/org/apache/jetspeed/container/JetspeedContainerServlet.java?rev=718841&r1=718840&r2=718841&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-commons/src/main/java/org/apache/jetspeed/container/JetspeedContainerServlet.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-commons/src/main/java/org/apache/jetspeed/container/JetspeedContainerServlet.java
Tue Nov 18 18:06:49 2008
@@ -253,6 +253,7 @@
                 ActionRequest actionRequest = (ActionRequest) request.getAttribute(ContainerConstants.PORTLET_REQUEST);
                 ActionResponse actionResponse = (ActionResponse) request.getAttribute(ContainerConstants.PORTLET_RESPONSE);
                 ((InternalPortletRequest)actionRequest).init(portlet.getConfig().getPortletContext(),
request);
+                ((InternalPortletRequest)actionRequest).setIncluded(true);              
     
                 // inject the current request into the actionRequest handler (o.a.j.engine.servlet.ServletRequestImpl)
 //                ((HttpServletRequestWrapper)((HttpServletRequestWrapper)actionRequest).getRequest()).setRequest(request);
                 portlet.processAction(actionRequest, actionResponse);



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