portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r707509 - /portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/
Date Thu, 23 Oct 2008 23:40:43 GMT
Author: ate
Date: Thu Oct 23 16:40:42 2008
New Revision: 707509

URL: http://svn.apache.org/viewvc?rev=707509&view=rev
Log:
JS2-871 - Upgrade Pluto container to version 2.0
See:  http://issues.apache.org/jira/browse/JS2-871
- fixing most (not all yet) API alignment issues with the aggregator/impl package

Modified:
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/HeaderAggregatorImpl.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletHeaderRequestImpl.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/RenderingJobImpl.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/WorkerMonitorImpl.java

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/HeaderAggregatorImpl.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/aggregator/impl/HeaderAggregatorImpl.java?rev=707509&r1=707508&r2=707509&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/HeaderAggregatorImpl.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/HeaderAggregatorImpl.java
Thu Oct 23 16:40:42 2008
@@ -48,7 +48,7 @@
 import org.apache.jetspeed.portlet.SupportsHeaderPhase;
 import org.apache.jetspeed.request.RequestContext;
 import org.apache.jetspeed.PortalReservedParameters;
-import org.apache.pluto.om.portlet.PortletDefinition;
+import org.apache.jetspeed.om.portlet.PortletDefinition;
 import org.apache.jetspeed.container.PortletWindow;
 
 /**
@@ -1113,9 +1113,9 @@
             {
                 PortletWindow portletWindow = getPortletWindowAccessor().getPortletWindow(
fragment );
                 PortletDefinition pd = portletWindow.getPortletEntity().getPortletDefinition();
-                if ( pd != null && getPortletFactory().isPortletApplicationRegistered((PortletApplication)pd.getPortletApplicationDefinition()
) )
+                if ( pd != null && getPortletFactory().isPortletApplicationRegistered((PortletApplication)pd.getApplication()
) )
                 {
-                    String portletApplicationContextPath = pd.getPortletApplicationDefinition().getWebApplicationDefinition().getContextRoot();
+                    String portletApplicationContextPath = pd.getApplication().getWebApplicationDefinition().getContextRoot();
                     Portlet portlet = getPortletFactory().getPortletInstance( context.getConfig().getServletContext().getContext(
portletApplicationContextPath ), pd ).getRealPortlet();            
                     if ( portlet != null && portlet instanceof SupportsHeaderPhase
)
                     {

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletHeaderRequestImpl.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/aggregator/impl/PortletHeaderRequestImpl.java?rev=707509&r1=707508&r2=707509&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletHeaderRequestImpl.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletHeaderRequestImpl.java
Thu Oct 23 16:40:42 2008
@@ -18,11 +18,11 @@
 
 import javax.portlet.PortletPreferences;
 
+import org.apache.jetspeed.om.portlet.InitParam;
+import org.apache.jetspeed.om.portlet.PortletDefinition;
 import org.apache.jetspeed.portlet.PortletHeaderRequest;
 import org.apache.jetspeed.request.RequestContext;
 import org.apache.pluto.core.impl.PortletPreferencesImpl;
-import org.apache.pluto.om.portlet.ParameterSet;
-import org.apache.pluto.om.portlet.Parameter;
 import org.apache.jetspeed.container.PortletWindow;
 
 
@@ -31,7 +31,7 @@
     private RequestContext requestContext;
     private String portletApplicationContextPath;
     private PortletWindow portletWindow;
-    private ParameterSet initParamSet;
+    private PortletDefinition pd;
     
     public PortletHeaderRequestImpl( RequestContext requestContext, PortletWindow portletWindow,
String portletApplicationContextPath )
     {
@@ -52,21 +52,12 @@
     
     public String getInitParameter( String name )
     {
-        ParameterSet iParamSet = this.initParamSet;
-        if ( iParamSet == null )
+        if (pd == null)
         {
-            iParamSet = this.portletWindow.getPortletEntity().getPortletDefinition().getInitParameterSet();
-            this.initParamSet = iParamSet;
+            pd = portletWindow.getPortletEntity().getPortletDefinition();
         }
-        if ( iParamSet != null )
-        {
-            Parameter initParam = iParamSet.get( name );
-            if ( initParam != null )
-            {
-                return initParam.getValue();
-            }
-        }
-        return null;
+        InitParam param = pd.getInitParam(name);
+        return param != null ? param.getParamValue() : null;
     }
     
     /**

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/RenderingJobImpl.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/aggregator/impl/RenderingJobImpl.java?rev=707509&r1=707508&r2=707509&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/RenderingJobImpl.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/RenderingJobImpl.java
Thu Oct 23 16:40:42 2008
@@ -44,7 +44,7 @@
 import org.apache.jetspeed.request.RequestContext;
 import org.apache.jetspeed.statistics.PortalStatistics;
 import org.apache.pluto.PortletContainer;
-import org.apache.pluto.om.portlet.PortletDefinition;
+import org.apache.jetspeed.om.portlet.PortletDefinition;
 import org.apache.jetspeed.container.PortletWindow;
 
 /**
@@ -239,7 +239,7 @@
                     PortletDefinition curPortletDefinition = (PortletDefinition)
                         CurrentWorkerContext.getAttribute(PortalReservedParameters.PORTLET_DEFINITION_ATTRIBUTE);
                     
-                    if (!oldPortletDefinition.getId().equals(curPortletDefinition.getId()))
{
+                    if (!oldPortletDefinition.isSameIdentity(curPortletDefinition)) {
                         curEntity.setPortletDefinition(curPortletDefinition);
                     }
                 }

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/WorkerMonitorImpl.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/aggregator/impl/WorkerMonitorImpl.java?rev=707509&r1=707508&r2=707509&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/WorkerMonitorImpl.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/WorkerMonitorImpl.java
Thu Oct 23 16:40:42 2008
@@ -36,7 +36,7 @@
 import org.apache.jetspeed.util.FIFOQueue;
 
 import org.apache.jetspeed.container.PortletWindow;
-import org.apache.pluto.om.portlet.ObjectID;
+import org.apache.jetspeed.container.PortletWindowID;
 
 /**
  * The WorkerMonitor is responsible for dispatching jobs to workers
@@ -389,8 +389,8 @@
             try {
                 if (log.isWarnEnabled()) {
                     PortletWindow window = job.getWindow();
-                    ObjectID windowId = (null != window ? window.getId() : null);
-                    log.warn("Portlet Rendering job to be interrupted by timeout (" + job.getTimeout()
+ "ms): " + windowId);
+                    PortletWindowID windowId = (null != window ? window.getId() : null);
+                    log.warn("Portlet Rendering job to be interrupted by timeout (" + job.getTimeout()
+ "ms): " + windowId.getStringId());
                 }
 
                 PortletContent content = job.getPortletContent();



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