portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r755263 [2/4] - in /portals/jetspeed-2/portal/trunk: components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/ components/jetspeed-portal/src/main/java/org/apache/jetspeed/ components/jetspeed-portal/src/main/java/org...
Date Tue, 17 Mar 2009 14:23:55 GMT
Added: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletStateAwareResponseContextImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletStateAwareResponseContextImpl.java?rev=755263&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletStateAwareResponseContextImpl.java (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletStateAwareResponseContextImpl.java Tue Mar 17 14:23:52 2009
@@ -0,0 +1,126 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jetspeed.container.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import javax.portlet.Event;
+import javax.portlet.PortletMode;
+import javax.portlet.WindowState;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.pluto.container.EventProvider;
+import org.apache.pluto.container.PortletContainer;
+import org.apache.pluto.container.PortletStateAwareResponseContext;
+import org.apache.jetspeed.container.PortletWindow;
+import org.apache.jetspeed.events.JetspeedEventCoordinationService;
+
+/**
+ * @version $Id$
+ *
+ */
+public abstract class PortletStateAwareResponseContextImpl extends PortletResponseContextImpl implements
+                PortletStateAwareResponseContext
+{
+    private List<Event> events;
+    
+    public PortletStateAwareResponseContextImpl(PortletContainer container, HttpServletRequest containerRequest,
+                                                HttpServletResponse containerResponse, PortletWindow window)
+    {
+        super(container, containerRequest, containerResponse, window);
+    }
+    
+    @Override
+    public void close()
+    {
+        if (!isClosed())
+        {
+            super.close();
+            // TODO
+        }
+    }
+    
+    @Override
+    public void release()
+    {
+        events = null;
+        // TODO
+        super.release();
+    }
+    
+    public List<Event> getEvents()
+    {
+        if (isReleased())
+        {
+            return null;
+        }
+        if (events == null)
+        {
+            events = new ArrayList<Event>();
+        }
+        return events;
+    }
+
+    public PortletMode getPortletMode()
+    {
+        return isClosed() ? null : null; //TODO
+    }
+
+    public Map<String, String[]> getPublicRenderParameters()
+    {
+        return isClosed() ? null : null; //TODO
+    }
+
+    public Map<String, String[]> getRenderParameters()
+    {
+        return isClosed() ? null : null; //TODO
+    }
+
+    public WindowState getWindowState()
+    {
+        return isClosed() ? null : null; //TODO
+    }
+
+    public void setPortletMode(PortletMode portletMode)
+    {
+        if (!isClosed())
+        {
+            //TODO
+        }
+    }
+
+    public void setWindowState(WindowState windowState)
+    {
+        if (!isClosed())
+        {
+            //TODO
+        }
+    }
+
+    public EventProvider getEventProvider()
+    {
+        if (!isClosed())
+        {
+            ((JetspeedEventCoordinationService)getContainer().getRequiredContainerServices().getEventCoordinationService()).createEventProvider(getServletRequest(), getPortletWindow());
+        }
+        return null;
+    }
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletStateAwareResponseContextImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletStateAwareResponseContextImpl.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletStateAwareResponseContextImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/JetspeedPortletInvoker.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/JetspeedPortletInvoker.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/JetspeedPortletInvoker.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/JetspeedPortletInvoker.java Tue Mar 17 14:23:52 2009
@@ -25,7 +25,7 @@
 
 import org.apache.jetspeed.factory.PortletFactory;
 import org.apache.jetspeed.om.portlet.PortletDefinition;
-import org.apache.pluto.spi.FilterManager;
+import org.apache.pluto.container.FilterManager;
 
 /**
  * JetspeedPortletInvoker extends Pluto's portlet invoker model and extends it

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/JetspeedPortletInvokerService.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/JetspeedPortletInvokerService.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/JetspeedPortletInvokerService.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/JetspeedPortletInvokerService.java Tue Mar 17 14:23:52 2009
@@ -36,9 +36,11 @@
 import org.apache.jetspeed.factory.PortletFactory;
 import org.apache.jetspeed.om.portlet.PortletApplication;
 import org.apache.jetspeed.om.portlet.PortletDefinition;
-import org.apache.pluto.PortletWindow;
-import org.apache.pluto.spi.FilterManager;
-import org.apache.pluto.spi.optional.PortletInvokerService;
+import org.apache.pluto.container.PortletContainerException;
+import org.apache.pluto.container.PortletRequestContext;
+import org.apache.pluto.container.PortletWindow;
+import org.apache.pluto.container.FilterManager;
+import org.apache.pluto.container.PortletInvokerService;
 
 /**
  * <p>
@@ -80,7 +82,43 @@
         this.unwrapper = unwrapper;
         this.servletMappingName = portalContext.getConfigurationProperty(INVOKER_SERVLET_MAPPING_NAME, DEFAULT_MAPPING_NAME);                                
     }
-   
+    
+    public void action(PortletRequestContext ctx, ActionRequest req, ActionResponse res, FilterManager filterManager)
+    throws IOException, PortletException, PortletContainerException
+    {
+        // TODO Auto-generated method stub
+    }
+
+    public void admin(PortletRequestContext ctx, PortletRequest req, PortletResponse res)
+    throws IOException, PortletException, PortletContainerException
+    {
+        // TODO Auto-generated method stub
+    }
+
+    public void event(PortletRequestContext ctx, EventRequest request, EventResponse response, FilterManager filterManager)
+    throws IOException, PortletException, PortletContainerException
+    {
+        // TODO Auto-generated method stub
+    }
+
+    public void load(PortletRequestContext ctx, PortletRequest req, PortletResponse res)
+    throws IOException, PortletException, PortletContainerException
+    {
+        // TODO Auto-generated method stub
+    }
+
+    public void render(PortletRequestContext ctx, RenderRequest req, RenderResponse res, FilterManager filterManager)
+    throws IOException, PortletException, PortletContainerException
+    {
+        // TODO Auto-generated method stub
+    }
+
+    public void serveResource(PortletRequestContext ctx, ResourceRequest req, ResourceResponse res, FilterManager filterManager)
+    throws IOException, PortletException, PortletContainerException
+    {
+        // TODO Auto-generated method stub
+    }
+
     public void action(ActionRequest request,
             ActionResponse response, PortletWindow window, FilterManager filter)
             throws IOException, PortletException

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/LocalPortletInvoker.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/LocalPortletInvoker.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/LocalPortletInvoker.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/LocalPortletInvoker.java Tue Mar 17 14:23:52 2009
@@ -39,8 +39,7 @@
 import org.apache.jetspeed.om.portlet.PortletApplication;
 import org.apache.jetspeed.request.RequestContext;
 import org.apache.jetspeed.om.portlet.PortletDefinition;
-import org.apache.pluto.internal.InternalPortletRequest;
-import org.apache.pluto.spi.FilterManager;
+import org.apache.pluto.container.FilterManager;
 
 /**
  * LocalPortletInvoker invokes local (internal) portlet applications.
@@ -66,7 +65,7 @@
     protected boolean activated = false;
     
     /* (non-Javadoc)
-     * @see org.apache.jetspeed.container.invoker.JetspeedPortletInvoker#activate(PortletFactory,org.apache.pluto.om.portlet.PortletDefinition, javax.servlet.ServletConfig)
+     * @see org.apache.jetspeed.container.invoker.JetspeedPortletInvoker#activate(PortletFactory,org.apache.pluto.container.om.portlet.PortletDefinition, javax.servlet.ServletConfig)
      */
     public void activate(PortletFactory portletFactory, PortletDefinition portletDefinition, ServletConfig servletConfig)
     {
@@ -135,7 +134,8 @@
 
             Thread.currentThread().setContextClassLoader(paClassLoader);
             
-            ((InternalPortletRequest)portletRequest).init(portletInstance.getConfig().getPortletContext(), servletRequest);
+//TODO            
+//            ((InternalPortletRequest)portletRequest).init(portletInstance.getConfig().getPortletContext(), servletRequest);
 
             if (method == ContainerConstants.METHOD_ACTION)
             {
@@ -192,7 +192,7 @@
     }
 
     /* (non-Javadoc)
-     * @see org.apache.jetspeed.container.invoker.JetspeedPortletInvoker#activate(PortletFactory,org.apache.pluto.om.portlet.PortletDefinition, javax.servlet.ServletConfig, java.lang.String)
+     * @see org.apache.jetspeed.container.invoker.JetspeedPortletInvoker#activate(PortletFactory,org.apache.pluto.container.om.portlet.PortletDefinition, javax.servlet.ServletConfig, java.lang.String)
      */
     public void activate(PortletFactory portletFactory, PortletDefinition portletDefinition, ServletConfig servletConfig, String servletMappingName)
     {

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/ServletPortletInvoker.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/ServletPortletInvoker.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/ServletPortletInvoker.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/ServletPortletInvoker.java Tue Mar 17 14:23:52 2009
@@ -39,7 +39,7 @@
 import org.apache.jetspeed.om.portlet.PortletApplication;
 import org.apache.jetspeed.request.RequestContext;
 import org.apache.jetspeed.om.portlet.PortletDefinition;
-import org.apache.pluto.spi.FilterManager;
+import org.apache.pluto.container.FilterManager;
 
 /**
  * ServletPortletInvoker invokes portlets in another web application, calling a 
@@ -101,7 +101,7 @@
     }
 
     /* (non-Javadoc)
-     * @see org.apache.jetspeed.container.invoker.JetspeedPortletInvoker#activate(PortletFactory,org.apache.pluto.om.portlet.PortletDefinition, javax.servlet.ServletConfig)
+     * @see org.apache.jetspeed.container.invoker.JetspeedPortletInvoker#activate(PortletFactory,org.apache.pluto.container.om.portlet.PortletDefinition, javax.servlet.ServletConfig)
      */
     public void activate(PortletFactory portletFactory, PortletDefinition portletDefinition, ServletConfig servletConfig)
     {
@@ -144,14 +144,14 @@
             portletDefinition = this.portletDefinition;
         }
         
-        PortletApplication app = (PortletApplication)portletDefinition.getApplication();
+        PortletApplication app = portletDefinition.getApplication();
 
-        String portletApplicationName = app.getContextRoot();
+        String appContextPath = app.getContextPath();
 
-        ServletContext appContext = jetspeedContext.getContext(portletApplicationName);
+        ServletContext appContext = jetspeedContext.getContext(appContextPath);
         if (null == appContext)
         {
-            String message = "Failed to find Servlet context for Portlet Application: " + portletApplicationName;
+            String message = "Failed to find Servlet context for Portlet Application: " + appContextPath;
             log.error(message);
             throw new PortletException(message);
         }
@@ -161,7 +161,7 @@
         {
             String message =
                 "Failed to get Request Dispatcher for Portlet Application: "
-                    + portletApplicationName
+                    + appContextPath
                     + ", servlet: "
                     + servletMappingName;
             log.error(message);
@@ -227,7 +227,7 @@
         catch (Exception e)
         {
             String message =
-                "Failed to dispatch."+(useForward?"forward":"include")+" for Portlet Application: " + portletApplicationName + ", servlet: " + servletMappingName;
+                "Failed to dispatch."+(useForward?"forward":"include")+" for Portlet Application: " + appContextPath + ", servlet: " + servletMappingName;
             log.error(message, e);
             throw new PortletException(message, e);
         }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/namespace/JetspeedNamespaceMapper.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/namespace/JetspeedNamespaceMapper.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/namespace/JetspeedNamespaceMapper.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/namespace/JetspeedNamespaceMapper.java Tue Mar 17 14:23:52 2009
@@ -16,7 +16,7 @@
  */
 package org.apache.jetspeed.container.namespace;
 
-import org.apache.pluto.NamespaceMapper;
+import org.apache.pluto.container.NamespaceMapper;
 
 /**
  * Jetspeed NamespaceMapper interface extension

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/namespace/JetspeedNamespaceMapperImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/namespace/JetspeedNamespaceMapperImpl.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/namespace/JetspeedNamespaceMapperImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/namespace/JetspeedNamespaceMapperImpl.java Tue Mar 17 14:23:52 2009
@@ -16,7 +16,7 @@
  */
 package org.apache.jetspeed.container.namespace;
 
-import org.apache.pluto.PortletWindowID;
+import org.apache.pluto.container.PortletWindowID;
 
 
 /**

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/EventProviderImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/EventProviderImpl.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/EventProviderImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/EventProviderImpl.java Tue Mar 17 14:23:52 2009
@@ -18,13 +18,13 @@
 
 import java.io.Serializable;
 
+import javax.portlet.Event;
 import javax.servlet.http.HttpServletRequest;
 import javax.xml.namespace.QName;
 
 import org.apache.jetspeed.container.PortletWindow;
-import org.apache.jetspeed.events.EventCoordinationService;
-import org.apache.pluto.EventContainer;
-import org.apache.pluto.spi.EventProvider;
+import org.apache.jetspeed.events.JetspeedEventCoordinationService;
+import org.apache.pluto.container.EventProvider;
 
 /**
  * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
@@ -34,29 +34,18 @@
 {
     private final PortletWindow portletWindow;    
     private final HttpServletRequest request;
-    private final EventCoordinationService eventCoordinator;
+    private final JetspeedEventCoordinationService eventCoordinator;
     
-    public EventProviderImpl(final HttpServletRequest request, final org.apache.pluto.PortletWindow window, final EventCoordinationService eventCoordinator)
+    public EventProviderImpl(final HttpServletRequest request, final PortletWindow window, final JetspeedEventCoordinationService eventCoordinator)
     {
         this.request = request;
-        this.portletWindow = (PortletWindow)window;
+        this.portletWindow = window;
         this.eventCoordinator = eventCoordinator;
     }
     
-    // FOR ATE's REFACTORING:
-    //public Event createEvent(QName name, Serializable value)
-   // throws IllegalArgumentException;
-    
-    
-    public void registerToFireEvent(QName qname, Serializable value)
+    public Event createEvent(QName qname, Serializable value)
             throws IllegalArgumentException
     {
-        eventCoordinator.registerToFireEvent(qname, value, portletWindow);
-    }
-
-    public void fireEvents(EventContainer eventContainer)
-    {
-        eventCoordinator.fireEvents(eventContainer, portletWindow, request);
+        return eventCoordinator.createEvent(request, portletWindow, qname, value);
     }
-        
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/FilterManagerImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/FilterManagerImpl.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/FilterManagerImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/FilterManagerImpl.java Tue Mar 17 14:23:52 2009
@@ -26,7 +26,7 @@
 import javax.portlet.PortletResponse;
 import javax.portlet.ResourceServingPortlet;
 
-import org.apache.pluto.spi.FilterManager;
+import org.apache.pluto.container.FilterManager;
 
 /**
  * TODO: 2.2 implement 

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/PortletURLProviderImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/PortletURLProviderImpl.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/PortletURLProviderImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/PortletURLProviderImpl.java Tue Mar 17 14:23:52 2009
@@ -16,18 +16,21 @@
  */
 package org.apache.jetspeed.container.providers;
 
+import java.io.IOException;
+import java.io.Writer;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
 import javax.portlet.PortletMode;
+import javax.portlet.PortletSecurityException;
 import javax.portlet.WindowState;
 import javax.servlet.http.HttpServletRequest;
 
 import org.apache.jetspeed.container.PortletWindow;
 import org.apache.jetspeed.container.url.PortalURL;
 import org.apache.jetspeed.request.RequestContext;
-import org.apache.pluto.spi.PortletURLProvider;
+import org.apache.pluto.container.PortletURLProvider;
 
 /**
  * Provides access to the Portal URL manipulation 
@@ -149,4 +152,76 @@
     public void setProperties(Map<String, List<String>> properties)
     {
     }
+
+    public String getCacheability()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public PortletMode getPortletMode()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Map<String, String[]> getPublicRenderParameters()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public String getResourceID()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public TYPE getType()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public WindowState getWindowState()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public boolean isSecure()
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    public void setCacheability(String cacheLevel)
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    public void setResourceID(String resourceID)
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    public void setSecure(boolean secure) throws PortletSecurityException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    public String toURL(boolean absolute)
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public void write(Writer out, boolean escapeXML) throws IOException
+    {
+        // TODO Auto-generated method stub
+        
+    }    
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/ResourceURLProviderImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/ResourceURLProviderImpl.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/ResourceURLProviderImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/ResourceURLProviderImpl.java Tue Mar 17 14:23:52 2009
@@ -20,8 +20,8 @@
 import java.net.URL;
 
 import org.apache.jetspeed.request.RequestContext;
-import org.apache.pluto.PortletWindow;
-import org.apache.pluto.spi.ResourceURLProvider;
+import org.apache.jetspeed.container.PortletWindow;
+import org.apache.pluto.container.ResourceURLProvider;
 
 /**
  * <p>

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedOptionalPlutoServices.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedOptionalPlutoServices.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedOptionalPlutoServices.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedOptionalPlutoServices.java Tue Mar 17 14:23:52 2009
@@ -16,17 +16,13 @@
  */
 package org.apache.jetspeed.container.services;
 
-import org.apache.pluto.NamespaceMapper;
-import org.apache.pluto.OptionalContainerServices;
-import org.apache.pluto.spi.optional.PortalAdministrationService;
-import org.apache.pluto.spi.optional.PortletContextService;
-import org.apache.pluto.spi.optional.PortletEnvironmentService;
-import org.apache.pluto.spi.optional.PortletInfoService;
-import org.apache.pluto.spi.optional.PortletInvokerService;
-import org.apache.pluto.spi.optional.PortletPreferencesService;
-import org.apache.pluto.spi.optional.PortletRegistryService;
-import org.apache.pluto.spi.optional.RequestAttributeService;
-import org.apache.pluto.spi.optional.UserInfoService;
+import org.apache.pluto.container.CCPPProfileService;
+import org.apache.pluto.container.NamespaceMapper;
+import org.apache.pluto.container.OptionalContainerServices;
+import org.apache.pluto.container.PortletEnvironmentService;
+import org.apache.pluto.container.PortletInvokerService;
+import org.apache.pluto.container.PortletPreferencesService;
+import org.apache.pluto.container.UserInfoService;
 
 /**
  * Service accessor for all Pluto *optional* container services
@@ -37,39 +33,32 @@
 public class JetspeedOptionalPlutoServices implements OptionalContainerServices
 {
     protected NamespaceMapper namespaceMapper;
-    protected PortalAdministrationService adminService;
     protected PortletEnvironmentService environmentService;
-    protected PortletInfoService portletInfoService;    
     protected UserInfoService userInfoService;
-    protected RequestAttributeService requestAttributeService;
     protected PortletInvokerService invokerService;
     protected PortletPreferencesService preferencesService;
-    protected PortletRegistryService registryService;
+    private CCPPProfileService profileService;
     
-    public JetspeedOptionalPlutoServices(NamespaceMapper namespaceMapper, PortalAdministrationService adminService,
-            PortletEnvironmentService environmentService, PortletInfoService portletInfoService,
-            UserInfoService userInfoService, RequestAttributeService requestAttributeService,
-            PortletInvokerService invokerService, PortletRegistryService registryService, PortletPreferencesService preferencesService)
+    public JetspeedOptionalPlutoServices(NamespaceMapper namespaceMapper,
+            PortletEnvironmentService environmentService,
+            UserInfoService userInfoService,
+            PortletInvokerService invokerService, PortletPreferencesService preferencesService)
     {
         this.namespaceMapper = namespaceMapper;
-        this.adminService = adminService;
         this.environmentService = environmentService;
-        this.portletInfoService = portletInfoService;
         this.userInfoService = userInfoService;
-        this.requestAttributeService = requestAttributeService;
         this.invokerService = invokerService;
-        this.registryService = registryService;
         this.preferencesService = preferencesService;
     }
     
-    public NamespaceMapper getNamespaceMapper()
+    public CCPPProfileService getCCPPProfileService()
     {
-        return namespaceMapper;
+        return this.profileService;
     }
 
-    public PortalAdministrationService getPortalAdministrationService()
+    public NamespaceMapper getNamespaceMapper()
     {
-        return adminService;
+        return namespaceMapper;
     }
 
     public PortletEnvironmentService getPortletEnvironmentService()
@@ -77,11 +66,6 @@
         return environmentService;
     }
 
-    public PortletInfoService getPortletInfoService()
-    {
-        return portletInfoService;
-    }
-
     public PortletInvokerService getPortletInvokerService()
     {
         return invokerService;
@@ -92,24 +76,8 @@
         return preferencesService;
     }
 
-    public PortletRegistryService getPortletRegistryService()
-    {
-        return registryService;
-    }
-
-    public PortletContextService getPortletContextService()
-    {
-        return null;
-    }
-
-    public RequestAttributeService getRequestAttributeService()
-    {
-        return this.requestAttributeService;
-    }
-
     public UserInfoService getUserInfoService()
     {
         return userInfoService;
     }
-
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedPortletEnvironmentService.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedPortletEnvironmentService.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedPortletEnvironmentService.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedPortletEnvironmentService.java Tue Mar 17 14:23:52 2009
@@ -17,17 +17,7 @@
 
 package org.apache.jetspeed.container.services;
 
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.jetspeed.PortalReservedParameters;
-import org.apache.jetspeed.request.RequestContext;
-import org.apache.jetspeed.resource.ResourceRenderResponseImpl;
-import org.apache.pluto.PortletContainer;
-import org.apache.pluto.PortletWindow;
-import org.apache.pluto.core.DefaultPortletEnvironmentService;
-import org.apache.pluto.internal.InternalRenderResponse;
-import org.apache.pluto.internal.impl.RenderResponseImpl;
+import org.apache.pluto.container.impl.PortletEnvironmentServiceImpl;
 
 /**
  * Extension of the Pluto DefaultPortletEnvironment
@@ -37,8 +27,9 @@
  * @version $Id$
  *
  */
-public class JetspeedPortletEnvironmentService extends DefaultPortletEnvironmentService
+public class JetspeedPortletEnvironmentService extends PortletEnvironmentServiceImpl
 {
+/* TODO    
     public InternalRenderResponse createRenderResponse(PortletContainer container,
                                                        HttpServletRequest request,
                                                        HttpServletResponse response,
@@ -57,5 +48,5 @@
         }
         return new RenderResponseImpl(container, portletWindow, request, response);
     }
-
+*/
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedRequiredPlutoServices.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedRequiredPlutoServices.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedRequiredPlutoServices.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedRequiredPlutoServices.java Tue Mar 17 14:23:52 2009
@@ -18,10 +18,11 @@
 
 import javax.portlet.PortalContext;
 
-import org.apache.pluto.RequiredContainerServices;
-import org.apache.pluto.spi.CCPPProfileService;
-import org.apache.pluto.spi.ContainerInvocationService;
-import org.apache.pluto.spi.PortalCallbackService;
+import org.apache.pluto.container.EventCoordinationService;
+import org.apache.pluto.container.FilterManagerService;
+import org.apache.pluto.container.PortletRequestContextService;
+import org.apache.pluto.container.PortletURLListenerService;
+import org.apache.pluto.container.RequiredContainerServices;
 
 /**
  * Service accessor for all Pluto *required* container services and callbacks
@@ -31,38 +32,39 @@
  */
 public class JetspeedRequiredPlutoServices implements RequiredContainerServices
 {
-    private CCPPProfileService profileService;
-    private ContainerInvocationService invocationService;
-    private PortalCallbackService callbackService;
     private PortalContext portalContext;
     
-    public JetspeedRequiredPlutoServices(CCPPProfileService profileService, ContainerInvocationService invocationService,
-            PortalCallbackService callbackService, PortalContext portalContext)
+    public JetspeedRequiredPlutoServices(PortalContext portalContext)
     {
-        this.profileService = profileService;
-        this.invocationService = invocationService;
-        this.callbackService = callbackService;
         this.portalContext = portalContext;
     }
 
-    public CCPPProfileService getCCPPProfileService()
+    public PortalContext getPortalContext()
     {
-        return this.profileService;
+        return this.portalContext;
     }
 
-    public ContainerInvocationService getContainerInvocationService()
+    public EventCoordinationService getEventCoordinationService()
     {
-        return this.invocationService;
+        // TODO Auto-generated method stub
+        return null;
     }
 
-    public PortalCallbackService getPortalCallbackService()
+    public FilterManagerService getFilterManagerService()
     {
-        return this.callbackService;
+        // TODO Auto-generated method stub
+        return null;
     }
 
-    public PortalContext getPortalContext()
+    public PortletRequestContextService getPortletRequestContextService()
     {
-        return this.portalContext;
+        // TODO Auto-generated method stub
+        return null;
     }
 
+    public PortletURLListenerService getPortletURLListenerService()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/JetspeedEngine.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/JetspeedEngine.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/JetspeedEngine.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/JetspeedEngine.java Tue Mar 17 14:23:52 2009
@@ -38,8 +38,8 @@
 import org.apache.jetspeed.request.RequestContextComponent;
 import org.apache.jetspeed.statistics.PortalStatistics;
 import org.apache.ojb.broker.util.ClassHelper;
-import org.apache.pluto.PortletContainer;
-import org.apache.pluto.PortletContainerException;
+import org.apache.pluto.container.PortletContainer;
+import org.apache.pluto.container.PortletContainerException;
 
 
 /**

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/JetspeedServlet.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/JetspeedServlet.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/JetspeedServlet.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/JetspeedServlet.java Tue Mar 17 14:23:52 2009
@@ -276,9 +276,16 @@
                 res.setHeader("Expires", "0");                               // HTTP/1.0 browser/proxy
 
                 // send request through pipeline
-                RequestContext context = contextComponent.create(req, res, getServletConfig());
-                engine.service(context);
-                contextComponent.release(context);
+                RequestContext context = null;
+                try
+                {
+                    context = contextComponent.create(req, res, getServletConfig());
+                    engine.service(context);
+                }
+                finally
+                {
+                    contextComponent.release(context);
+                }
             }
 
         }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/servlet/ServletRequestImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/servlet/ServletRequestImpl.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/servlet/ServletRequestImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/servlet/ServletRequestImpl.java Tue Mar 17 14:23:52 2009
@@ -40,7 +40,6 @@
 import org.apache.jetspeed.Jetspeed;
 import org.apache.jetspeed.PortalReservedParameters;
 import org.apache.jetspeed.aggregator.CurrentWorkerContext;
-import org.apache.jetspeed.container.PortletDispatcherIncludeAware;
 import org.apache.jetspeed.container.PortletEntity;
 import org.apache.jetspeed.container.PortletWindow;
 import org.apache.jetspeed.container.namespace.JetspeedNamespaceMapper;
@@ -50,8 +49,7 @@
 import org.apache.jetspeed.om.portlet.PortletDefinition;
 import org.apache.jetspeed.request.JetspeedRequestContext;
 import org.apache.jetspeed.request.RequestContext;
-import org.apache.pluto.om.portlet.PortletApplicationDefinition;
-import org.apache.pluto.util.Enumerator;
+import org.apache.pluto.container.om.portlet.PortletApplicationDefinition;
 
 /**
  * This request wrappers the servlet request and is used within the container to
@@ -60,7 +58,7 @@
  * @author <a href="mailto:taylor@apache.org">David Sean Taylor </a>
  * @version $Id$
  */
-public class ServletRequestImpl extends HttpServletRequestWrapper implements PortletDispatcherIncludeAware
+public class ServletRequestImpl extends HttpServletRequestWrapper
 {
     public static final String ACCEPT_LANGUAGE = "Accept-Language";
     /** Logger */
@@ -68,101 +66,21 @@
 
     PortletWindow portletWindow = null;
     private JetspeedNamespaceMapper nameSpaceMapper = null;
-    private ServletRequest currentRequest = null;
 
-    private Map portletParameters;
+    private Map<String, String[]> portletParameters;
     
-    private boolean included;
-
     private static Boolean mergePortalParametersWithPortletParameters;
     private static Boolean mergePortalParametersBeforePortletParameters;
     
-    private boolean portletMergePortalParametersWithPortletParameters;
-    private boolean portletMergePortalParametersBeforePortletParameters;
-    
-    private Map portalParameters;
-    
-    private String currentIncludeQueryString;    
-    private String currentForwardQueryString;    
-    
     // request attributes map which is cached for each paralleled worker.
     // this should be re-created when it is called for the first time or when some attributes are added/modified/removed.
-    private Map cachedAttributes;
+    private Map<String, Object> cachedAttributes;
 
     public ServletRequestImpl(HttpServletRequest servletRequest, PortletWindow window, JetspeedNamespaceMapper namespaceMapper)
     {
         super(servletRequest);
         this.nameSpaceMapper = namespaceMapper;
         this.portletWindow = window;        
-        String encoding = (String) servletRequest.getAttribute(PortalReservedParameters.PREFERED_CHARACTERENCODING_ATTRIBUTE);
-        boolean decode = servletRequest.getAttribute(PortalReservedParameters.PARAMETER_ALREADY_DECODED_ATTRIBUTE) == null
-                && encoding != null;
-        if (decode)
-        {
-            servletRequest.setAttribute(PortalReservedParameters.PARAMETER_ALREADY_DECODED_ATTRIBUTE,
-                    new Boolean(true));
-        }
-
-        //get portal servlet params
-        portalParameters = new HashMap();
-        for (Enumeration parameters = servletRequest.getParameterNames(); parameters.hasMoreElements();)
-        {
-            String paramName = (String) parameters.nextElement();
-            String[] paramValues = servletRequest.getParameterValues(paramName);
-
-            if (decode)
-            {
-                for (int i = 0; i < paramValues.length; i++)
-                {
-                    try
-                    {
-                        paramValues[i] = new String(paramValues[i].getBytes("ISO-8859-1"), encoding);
-                    }
-                    catch (UnsupportedEncodingException e)
-                    {
-                        ;
-                    }
-                }
-            }
-            portalParameters.put(paramName, paramValues);
-        }
-        
-        if (mergePortalParametersWithPortletParameters == null )
-        {
-            mergePortalParametersWithPortletParameters = 
-                new Boolean(Jetspeed.getContext().getConfiguration().getBoolean("merge.portal.parameters.with.portlet.parameters", false));
-        }
-        
-        if (mergePortalParametersBeforePortletParameters == null)
-        {
-            mergePortalParametersBeforePortletParameters = 
-                new Boolean(Jetspeed.getContext().getConfiguration().getBoolean("merge.portal.parameters.before.portlet.parameters", false));
-        }
-                
-        
-        PortletDefinition portletDef = (PortletDefinition)portletWindow.getPortletEntity().getPortletDefinition();
-        if(portletDef != null)
-        {
-            GenericMetadata metaData = portletDef.getMetadata();
-
-            portletMergePortalParametersWithPortletParameters = 
-                getMetaDataBooleanValue(
-                    metaData,
-                    PortalReservedParameters.PORTLET_EXTENDED_DESCRIPTOR_MERGE_PORTAL_PARAMETERS_WITH_PORTLET_PARAMETERS,
-                    mergePortalParametersWithPortletParameters.booleanValue());
-            portletMergePortalParametersBeforePortletParameters = 
-                getMetaDataBooleanValue(
-                    metaData,
-                    PortalReservedParameters.PORTLET_EXTENDED_DESCRIPTOR_MERGE_PORTAL_PARAMETERS_BEFORE_PORTLET_PARAMETERS,
-                    mergePortalParametersBeforePortletParameters.booleanValue());
-            
-        }
-        else
-        {
-            // This happens when an entity is referencing a non-existent portlet
-            portletMergePortalParametersWithPortletParameters = mergePortalParametersWithPortletParameters.booleanValue();
-            portletMergePortalParametersBeforePortletParameters = mergePortalParametersBeforePortletParameters.booleanValue();
-        }
     }
     
     private boolean getMetaDataBooleanValue(GenericMetadata metaData, String fieldName, boolean defaultValue )
@@ -170,10 +88,10 @@
         String value = null;
         if ( metaData != null )
         {
-            Collection fields = metaData.getFields(fieldName);
+            Collection<LocalizedField> fields = metaData.getFields(fieldName);
             if ( fields != null && !fields.isEmpty() )
             {
-                value = ((LocalizedField)fields.iterator().next()).getValue();
+                value = fields.iterator().next().getValue();
             }
         }
         if ( value != null )
@@ -188,224 +106,159 @@
         return (HttpServletRequest) super.getRequest();
     }
 
-    //  ServletRequestWrapper overlay
-
-    public String getParameter( String name )
-    {
-        Object value = this.getParameterMap().get(name);
-        if (value == null)
-        {
-            return (null);
-        }
-        else if (value instanceof String[])
-        {
-            return (((String[]) value)[0]);
-        }
-        else if (value instanceof String)
-        {
-            return ((String) value);
-        }
-        else
-        {
-            return (value.toString());
-        }
-    }
-    
-    private boolean isEqual(String one, String two)
-    {
-        return (one == null && two == null) || (one != null && two != null && one.equals(two));
-    }
-    
-    private boolean checkQueryStringChanged()
+    @SuppressWarnings("unchecked")
+    public Map<String, String[]> getParameterMap()
     {
-        boolean changed = false;
-        ServletRequest request = getRequest();
-        String includeQueryString = (String)request.getAttribute("javax.servlet.include.query_string");        
-        String forwardQueryString = (String)request.getAttribute("javax.servlet.forward.query_string");
-        
-        if (!isEqual(currentIncludeQueryString,includeQueryString))
-        {
-            currentIncludeQueryString = includeQueryString;
-            changed = true;
-        }
-        if (!isEqual(currentForwardQueryString,forwardQueryString))
+        if (portletParameters == null)
         {
-            currentForwardQueryString = forwardQueryString;
-            changed = true;
-        }        
-        return changed;
-    }
+            HttpServletRequest servletRequest = this._getHttpServletRequest();
 
-    public Map getParameterMap()
-    {
-        // if included or forwarded with a query string, parameterMap might have changed
-        // this is/should be the only check needed, and the other "tricky" check below probably
-        // can be removed.
-        // I'll keep it in for now though as it hasn't been tested enough on other app servers
-        boolean queryStringChanged = checkQueryStringChanged();
-        
-        if (queryStringChanged || currentRequest == null || currentRequest != getRequest() )
-        {
-            // Cache the parameters for as long as the wrapped request stays the same.
-            // According to Servlet 2.3 SRV.6.2.2 the passed on ServletRequest object
-            // to an dispatched Servlet must remain the same (this one).
-            // Tomcat solves this by injecting a new ServletRequest of its own above
-            // this one (the getRequest() object).
-            // So, when that one has changed since the last time the parameters have 
-            // been accessed, flush the cache and rebuild the map.
-            currentRequest = getRequest();
 
-            boolean postAllowed = false;
-            
-            // determine the possible additional query string parameters provided on the RequestDispatcher include path
-            // per the specs, these are prepended to existing parameters or altogether new parameters
-            // as we save the original "portal" parameters, we can find those query string parameters by comparing against those
-            HashMap queryParameters = new HashMap();
-            for ( Iterator iter = getRequest().getParameterMap().entrySet().iterator(); iter.hasNext(); )
-            {
-                Map.Entry entry = (Map.Entry)iter.next();
-                String[] values = (String[])entry.getValue();
-                String[] original = (String[])portalParameters.get(entry.getKey());
-                String[] diff = null;
-                if ( original == null )
-                {
-                    // a new parameter
-                    diff = new String[values.length];
-                    System.arraycopy(values,0,diff,0,values.length);
-                }
-                else if ( values.length > original.length )
-                {
-                    // we've got some additional query string parameter value(s)
-                    diff = new String[values.length - original.length];
-                    System.arraycopy(values,0,diff,0,values.length-original.length);
-                }
-                if ( diff != null )
-                {
-                    queryParameters.put(entry.getKey(), diff);
-                }
+            if (mergePortalParametersWithPortletParameters == null )
+            {
+                mergePortalParametersWithPortletParameters = 
+                    new Boolean(Jetspeed.getContext().getConfiguration().getBoolean("merge.portal.parameters.with.portlet.parameters", false));
+                mergePortalParametersBeforePortletParameters = 
+                    new Boolean(Jetspeed.getContext().getConfiguration().getBoolean("merge.portal.parameters.before.portlet.parameters", false));
             }
-
-            // get portlet navigational params
-            HashMap navParameters = new HashMap();
+            
+            boolean mergeRequestParameters = false;
+            boolean mergeRequestParametersBefore = false;
+            
+            // get portlet *private* navigational params
+            portletParameters = new HashMap<String, String[]>();
             JetspeedRequestContext context = (JetspeedRequestContext) getAttribute("org.apache.jetspeed.request.RequestContext");
             if (context != null)
             {
                 NavigationalState ns = context.getPortalURL().getNavigationalState();
-                postAllowed = ns.getPortletWindowOfAction() != null || ns.getPortletWindowOfResource() != null;
-                Iterator iter = ns.getParameterNames(portletWindow);
+                mergeRequestParameters = ns.getPortletWindowOfAction() != null || ns.getPortletWindowOfResource() != null;
+                Iterator<String> iter = ns.getParameterNames(portletWindow);
                 while (iter.hasNext())
                 {
-                    String name = (String) iter.next();
+                    String name = iter.next();
                     String[] values = ns.getParameterValues(portletWindow, name);
-                    navParameters.put(name, values);
+                    portletParameters.put(name, values);
                 }
             }
             
-            // now first merge the keys we have into one unique set
-            HashSet keys = new HashSet();
-            keys.addAll(portalParameters.keySet());
-            keys.addAll(queryParameters.keySet());
-            keys.addAll(navParameters.keySet());
-            
-            // now "merge" the parameters
-            // there are three different options:
-            // 1) query parameters + nav parameters:
-            //        portletMergePortalParametersWithPortletParameters == false && !actionRequest
-            // 2) query parameters + nav parameters + portal parameters
-            //           portletMergePortalParametersWithPortletParameters == true || actionRequest
-            //        && portletMergePortalParametersBeforePortletParameters == false
-            // 3) query parameters + portal parameters + nav parameters (odd use-case but provided because this was the "old" pre-2.1 behavior
-            //           portletMergePortalParametersWithPortletParameters == true || actionRequest
-            //        && portletMergePortalParametersBeforePortletParameters == true
-            portletParameters = new HashMap();
-            for ( Iterator iter = keys.iterator(); iter.hasNext(); )
-            {
-                String key = (String)iter.next();
-                String[] first = (String[])queryParameters.get(key);
-                String[] next = null, last = null, result = null;
-                
-                if ( portletMergePortalParametersWithPortletParameters == false && !postAllowed )
-                {
-                    next = (String[])navParameters.get(key);
-                }
-                else if ( portletMergePortalParametersBeforePortletParameters )
+            PortletDefinition portletDef = portletWindow.getPortletEntity().getPortletDefinition();
+            if(portletDef != null)
+            {
+                GenericMetadata metaData = portletDef.getMetadata();
+                if (!mergeRequestParameters)
                 {
-                    next = (String[])portalParameters.get(key);
-                    last = (String[])navParameters.get(key);
-                }
-                else
+                    mergeRequestParameters = 
+                        getMetaDataBooleanValue(
+                            metaData,
+                            PortalReservedParameters.PORTLET_EXTENDED_DESCRIPTOR_MERGE_PORTAL_PARAMETERS_WITH_PORTLET_PARAMETERS,
+                            mergePortalParametersWithPortletParameters.booleanValue());
+                }
+                mergeRequestParametersBefore = 
+                    getMetaDataBooleanValue(
+                        metaData,
+                        PortalReservedParameters.PORTLET_EXTENDED_DESCRIPTOR_MERGE_PORTAL_PARAMETERS_BEFORE_PORTLET_PARAMETERS,
+                        mergePortalParametersBeforePortletParameters.booleanValue());
+                
+            }
+            else
+            {
+                // This happens when an entity is referencing a non-existent portlet
+            }
+            
+            //get request params
+            if (mergeRequestParameters)
+            {
+                String encoding = (String) servletRequest.getAttribute(PortalReservedParameters.PREFERED_CHARACTERENCODING_ATTRIBUTE);
+                boolean decode = servletRequest.getAttribute(PortalReservedParameters.PARAMETER_ALREADY_DECODED_ATTRIBUTE) == null
+                        && encoding != null;
+                if (decode)
                 {
-                    next = (String[])navParameters.get(key);
-                    last = (String[])portalParameters.get(key);
+                    servletRequest.setAttribute(PortalReservedParameters.PARAMETER_ALREADY_DECODED_ATTRIBUTE,
+                            new Boolean(true));
                 }
-                if ( first == null )
+                for (Enumeration parameters = servletRequest.getParameterNames(); parameters.hasMoreElements();)
                 {
-                    if ( next == null )
+                    String paramName = (String) parameters.nextElement();
+                    String[] paramValues = servletRequest.getParameterValues(paramName);
+
+                    if (decode)
                     {
-                        first = last;
-                        last = null;
+                        for (int i = 0; i < paramValues.length; i++)
+                        {
+                            try
+                            {
+                                paramValues[i] = new String(paramValues[i].getBytes("ISO-8859-1"), encoding);
+                            }
+                            catch (UnsupportedEncodingException e)
+                            {
+                                ;
+                            }
+                        }
                     }
-                    else
+                    String[] navValues = portletParameters.get(paramName);
+                    if (navValues == null)
                     {
-                        first = next;
-                        next = last;
-                        last = null;
+                        portletParameters.put(paramName, paramValues);
                     }
-                }
-                else if ( next == null )
-                {
-                    next = last;
-                    last = null;
-                }
-                
-                if ( last == null )
-                {
-                    if ( next == null && first != null )
-                    {
-                        result = new String[first.length];
-                        System.arraycopy(first,0,result,0,first.length);
-                    }
-                    else if (next != null )
+                    else
                     {
-                        result = new String[first.length + next.length];
-                        System.arraycopy(first,0,result,0,first.length);
-                        System.arraycopy(next,0,result,first.length,next.length);
+                        String[] combined = new String[navValues.length+paramValues.length];
+                        if (mergeRequestParametersBefore)
+                        {
+                            System.arraycopy(paramValues,0,combined,0,paramValues.length);
+                            System.arraycopy(navValues,0,combined,paramValues.length,navValues.length);
+                        }
+                        else
+                        {
+                            System.arraycopy(navValues,0,combined,0,navValues.length);
+                            System.arraycopy(paramValues,0,combined,navValues.length,paramValues.length);
+                        }
+                        portletParameters.put(paramName, combined);
                     }
                 }
-                else
-                {
-                    result = new String[first.length + next.length + last.length];
-                    System.arraycopy(first,0,result,0,first.length);
-                    System.arraycopy(next,0,result,first.length,next.length);
-                    System.arraycopy(last,0,result,first.length+next.length,last.length);
-                    
-                }
-                if ( result != null )
+            }
+        }
+        if (!portletParameters.isEmpty())
+        {
+            Map<String, String[]> result = new HashMap<String, String[]>(portletParameters.size());
+            for (Map.Entry<String,String[]> entry : portletParameters.entrySet())
+            {
+                if (entry.getValue() != null)
                 {
-                    portletParameters.put(key, result);
+                    result.put(entry.getKey(), entry.getValue().clone());
                 }
             }
+            return Collections.unmodifiableMap(result);
+        }
+        else
+        {
+            return Collections.emptyMap();
         }
-        return Collections.unmodifiableMap(portletParameters);
-
     }
 
-    public Enumeration getParameterNames()
+    public Enumeration<String> getParameterNames()
     {
-        return Collections.enumeration(this.getParameterMap().keySet());
+        return Collections.enumeration(getParameterMap().keySet());
     }
 
+    public String getParameter( String name )
+    {
+        String[] values = getParameterMap().get(name);
+        return values == null ? null : values[0];
+    }
+    
     public String[] getParameterValues( String name )
     {
-        return (String[]) this.getParameterMap().get(name);
+        return getParameterMap().get(name);
     }
 
     /**
      * @see javax.servlet.http.HttpServletRequest#getAttributeNames()
      */
-    public Enumeration getAttributeNames()
+    @SuppressWarnings("unchecked")
+    public Enumeration<String> getAttributeNames()
     {
-        Enumeration attrNames = super.getAttributeNames();
+        Enumeration<String> attrNames = super.getAttributeNames();
         
         // In parallel mode, adjust attributes by the values of the current thread
 
@@ -415,27 +268,27 @@
             
             if (cachedAttributes == null)
             {
-                HashMap adjustedAttrMap = new HashMap();
+                HashMap<String,Object> adjustedAttrMap = new HashMap<String, Object>();
                 
                 // first, add all attributes of original request.
                 
                 while (attrNames.hasMoreElements())
                 {
-                    String key = (String) attrNames.nextElement();
+                    String key = attrNames.nextElement();
                     adjustedAttrMap.put(key, super.getAttribute(key));
                 }
                 
                 // second, add or override all attributes by the current worker context.
                 
-                Enumeration cwAttrNames = CurrentWorkerContext.getAttributeNames();
+                Enumeration<String> cwAttrNames = CurrentWorkerContext.getAttributeNames();
                 
                 while (cwAttrNames.hasMoreElements())
                 {
-                    String key = (String) cwAttrNames.nextElement();
+                    String key = cwAttrNames.nextElement();
                     adjustedAttrMap.put(key, CurrentWorkerContext.getAttribute(key));
                 }
                 
-                cachedAttributes = Collections.unmodifiableMap(adjustedAttrMap);
+                cachedAttributes = adjustedAttrMap;
             }
             
             attrNames = Collections.enumeration(cachedAttributes.keySet());
@@ -456,69 +309,18 @@
         if (CurrentWorkerContext.getParallelRenderingMode())
         {            
             value = CurrentWorkerContext.getAttribute(name);
-
-            // Because PortletRequestImpl class of pluto encodes the name of attribute before calling setAttribute(), 
-            // we have to check the encoded name also.
-            if (null == value)
-            {
-                // Extra code (2 lines) from Nicolas... not clear to me why this is needed, as "pr" is not used. Commenting out for now...
-                //PortletRequest pr = (PortletRequest) super.getAttribute("javax.portlet.request");
-                //if (pr != null)
-                value = CurrentWorkerContext.getAttribute(nameSpaceMapper.encode(portletWindow.getId(), name));
-            }
         }
-
+        
         // If no attribute found, then look up from the request
         if (null == value) 
         {
-            value = getAttributeInternal(name);
+            value = super.getAttribute(name);
         }
-
-        return value;
-    }
-
-    private Object getAttributeInternal( String name )
-    {
-        Object value = super.getAttribute(name);
-        if (name.equals(PortletRequest.USER_INFO))
+        if (value == value)
         {
-            JetspeedRequestContext context = (JetspeedRequestContext) getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
-            if (null != context)
-            {
-                String entityID = "--NULL--";
-                PortletEntity entity = portletWindow.getPortletEntity();
-                if (entity != null)
-                {
-                    entityID = entity.getId().toString();
-                }
-                PortletApplicationDefinition portletAppDef = entity.getPortletDefinition()
-                        .getApplication();
-
-                if (null != portletAppDef)
-                {
-                    value = context.getUserInfoMap(portletAppDef.getName());
-                    if (log.isDebugEnabled() && (null != value))
-                        log.debug(PortletRequest.USER_INFO + " map size: " + ((Map) value).size());
-                }
-                else
-                {
-                    log.error("Entity is null:" + entityID);
-                }
-
-            }
-        }
-        else
-        {
-            if (null == value)
-            {
-                PortletRequest pr = (PortletRequest) super.getAttribute("javax.portlet.request");
-                if (pr != null)
-                {
-                    value = super.getAttribute(nameSpaceMapper.encode(portletWindow.getId(),
-                            name));
-                }
-            }
+            value = super.getAttribute(nameSpaceMapper.encode(portletWindow.getId(),name));
         }
+
         return value;
     }
 
@@ -527,7 +329,6 @@
      */
     public Locale getLocale()
     {
-        //Locale preferedLocale = (Locale) getSession().getAttribute(RequestContext.PREFERED_LOCALE_SESSION_KEY);
         RequestContext requestContext = (RequestContext) _getHttpServletRequest().getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
         Locale preferedLocale = requestContext.getLocale();
         if (preferedLocale != null)
@@ -539,72 +340,6 @@
     }
 
     /**
-     * @see javax.servlet.ServletRequest#getLocales()
-     */
-    public Enumeration getLocales()
-    {
-        RequestContext requestContext = (RequestContext) _getHttpServletRequest().getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
-        Locale preferedLocale = requestContext.getLocale();
-        if (preferedLocale != null)
-        {
-            return getLocaleEnum(preferedLocale);
-        }
-
-        return super.getLocales();
-    }
-
-    /**
-     * <p>
-     * getLocaleEnum
-     * </p>
-     *
-     * @param preferedLocale
-     * @return
-     */
-    protected Enumeration getLocaleEnum( Locale preferedLocale )
-    {
-        ArrayList locales = new ArrayList();
-        locales.add(preferedLocale);
-        Enumeration localeEnums = super.getLocales();
-        while (localeEnums.hasMoreElements())
-        {
-            locales.add(localeEnums.nextElement());
-        }
-        return new Enumerator(locales);
-    }
-
-    /**
-     * @see javax.servlet.http.HttpServletRequest#getHeader(java.lang.String)
-     */
-    public String getHeader( String name )
-    {
-        if(name.equals(ACCEPT_LANGUAGE))
-        {
-            return getLocale().getLanguage();   
-        }
-        else
-        {
-            return super.getHeader(name);
-        }
-    }
-
-    /**
-     * @see javax.servlet.http.HttpServletRequest#getHeaders(java.lang.String)
-     */
-    public Enumeration getHeaders( String name )
-    {
-        if(name.equals(ACCEPT_LANGUAGE))
-        {      
-            return getLocaleEnum(getLocale());         
-        }
-        else
-        {
-            return super.getHeaders(name);
-        }        
-
-    }
-
-    /**
      * <p>
      * setAttribute
      * </p>
@@ -693,7 +428,8 @@
             
             CurrentWorkerContext.removeAttribute(name);
             
-            if (name.startsWith("org.apache.jetspeed")) {
+            if (name.startsWith("org.apache.jetspeed"))
+            {
                 super.removeAttribute(name);
             }
         }
@@ -703,164 +439,4 @@
             super.removeAttribute(name);
         }        
     }
-
-    /**
-     * <p>
-     * getHeaderNames
-     * </p>
-     *
-     * @see javax.servlet.http.HttpServletRequest#getHeaderNames()
-     * @return
-     */
-    public Enumeration getHeaderNames()
-    {
-        return super.getHeaderNames();
-    }
-    
-    /**
-     * @param included when true, JSR-168 PLT.16.3.3 rules need to be enforced
-     */
-    public void setPortletDispatcherIncluded(boolean included)
-    {
-        this.included = included;
-    }
-    
-    /*
-     * JSR-168 PLT.16.3.3 cxxix
-     */
-  	public String getProtocol()
-  	{
-        return (included ? null : super.getProtocol() );
-  	}
-
-    /*
-     * JSR-168 PLT.16.3.3 cxxix
-     */
-  	public String getRemoteAddr()
-  	{
-        return (included ? null : super.getRemoteAddr() );
-  	}
-
-    /*
-     * JSR-168 PLT.16.3.3 cxxix
-     */
-  	public String getRemoteHost()
-  	{
-        return (included ? null : super.getRemoteHost() );
-  	}
-
-    /*
-     * JSR-168 PLT.16.3.3 cxxix
-     */
-  	public StringBuffer getRequestURL()
-  	{
-        return (included ? null : super.getRequestURL());
-  	}
-
-    /*
-     * JSR-168 PLT.16.3.3 cxxx
-     */
-    public String getPathInfo()
-  	{
-        return (included ? (String)super.getAttribute("javax.servlet.include.path_info") : super.getPathInfo());
-  	}
-
-    /*
-     * JSR-168 PLT.16.3.3 cxxx
-     */
-  	public String getPathTranslated()
-  	{
-        return (included ? null : super.getPathTranslated());
-  	}
-
-    /*
-     * JSR-168 PLT.16.3.3 cxxx
-     */
-  	public String getQueryString()
-  	{
-        return (included ? (String)super.getAttribute("javax.servlet.include.query_string") : super.getQueryString());
-  	}
-
-    /*
-     * JSR-168 PLT.16.3.3 cxxx
-     */
-  	public String getRequestURI()
-  	{
-        return (included ? (String)super.getAttribute("javax.servlet.include.request_uri") : super.getRequestURI());
-  	}
-
-    /*
-     * JSR-168 PLT.16.3.3 cxxx
-     */
-  	public String getServletPath()
-  	{
-        return (included ? (String)super.getAttribute("javax.servlet.include.servlet_path") : super.getServletPath());
-  	}
-
-    /*
-     * JSR-168 PLT.16.3.3 cxxxi
-     */
-  	public String getContextPath() 
-  	{
-        return (included ? (String)super.getAttribute("javax.servlet.include.context_path") : super.getContextPath());
-  	}
-
-    /*
-     * JSR-168 PLT.16.3.3 cxxxiv
-     */
-    public int getContentLength()
-    {
-        return (included ? 0 : super.getContentLength());
-    }
-
-    /*
-     * JSR-168 PLT.16.3.3 cxxix
-     */
-    public String getRealPath(String arg0)
-    {
-        return (included ? null : super.getRealPath(arg0));
-    }
-
-    /*
-     * JSR-168 PLT.16.3.3 cxxxii
-     */
-    public BufferedReader getReader() throws IOException
-    {
-        return (included ? null : super.getReader());
-    }
-
-    /*
-     * JSR-168 PLT.16.3.3 cxxxii
-     */
-    public String getCharacterEncoding()
-    {
-        return (included ? null : super.getCharacterEncoding());
-    }
-
-    /*
-     * JSR-168 PLT.16.3.3 cxxxii
-     */
-    public String getContentType()
-    {
-        return (included ? null : super.getContentType());
-    }
-
-    /*
-     * JSR-168 PLT.16.3.3 cxxxii
-     */
-    public ServletInputStream getInputStream() throws IOException
-    {
-        return (included ? null : super.getInputStream());
-    }
-
-    /*
-     * JSR-168 PLT.16.3.3 cxxxii
-     */
-    public void setCharacterEncoding(String arg0) throws UnsupportedEncodingException
-    {
-        if ( !included )
-        {
-            super.setCharacterEncoding(arg0);
-        }
-    }
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/servlet/ServletResponseImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/servlet/ServletResponseImpl.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/servlet/ServletResponseImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/servlet/ServletResponseImpl.java Tue Mar 17 14:23:52 2009
@@ -23,15 +23,13 @@
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpServletResponseWrapper;
 
-import org.apache.jetspeed.container.PortletDispatcherIncludeAware;
-
 /**
  * Factory implementation for creating HTTP Response Wrappers
  *
  * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  * @version $Id$
  */
-public class ServletResponseImpl extends HttpServletResponseWrapper implements PortletDispatcherIncludeAware
+public class ServletResponseImpl extends HttpServletResponseWrapper
 {
     private boolean included;
     
@@ -40,19 +38,6 @@
         super(response);
     }
 
-    public void setResponse(HttpServletResponse response) 
-    {
-        super.setResponse(response);
-    }   
-
-    /**
-     * @param included when true, JSR-168 PLT.16.3.3 rules need to be enforced
-     */
-    public void setPortletDispatcherIncluded(boolean included)
-    {
-        this.included = included;
-    }
-    
     /*
      * JSR-168 PLT.16.3.3 .cxxxviii
      * @deprecated use encodeRedirectURL instead

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/events/EventCoordinationServiceImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/events/EventCoordinationServiceImpl.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/events/EventCoordinationServiceImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/events/EventCoordinationServiceImpl.java Tue Mar 17 14:23:52 2009
@@ -20,21 +20,19 @@
 import java.io.StringReader;
 import java.io.StringWriter;
 import java.io.Writer;
-import java.net.URLClassLoader;
 import java.util.LinkedList;
 import java.util.List;
 
 import javax.portlet.Event;
 import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.JAXBElement;
 import javax.xml.bind.JAXBException;
 import javax.xml.bind.Marshaller;
 import javax.xml.bind.Unmarshaller;
 import javax.xml.namespace.QName;
-import javax.xml.stream.FactoryConfigurationError;
 import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
 
 import org.apache.commons.logging.Log;
@@ -50,11 +48,11 @@
 import org.apache.jetspeed.request.RequestContext;
 import org.apache.jetspeed.security.SecurityAccessController;
 import org.apache.jetspeed.statistics.PortalStatistics;
-import org.apache.pluto.EventContainer;
-import org.apache.pluto.om.portlet.EventDefinition;
-import org.apache.pluto.om.portlet.EventDefinitionReference;
-import org.apache.pluto.om.portlet.PortletApplicationDefinition;
-import org.apache.pluto.spi.EventProvider;
+import org.apache.pluto.container.EventProvider;
+import org.apache.pluto.container.PortletContainer;
+import org.apache.pluto.container.om.portlet.EventDefinition;
+import org.apache.pluto.container.om.portlet.EventDefinitionReference;
+import org.apache.pluto.container.om.portlet.PortletApplicationDefinition;
 
 /**
  * Event Coordination service default implementation. Uses JAXB to serialize/deserialize events.
@@ -69,12 +67,11 @@
  * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  * @version $Id$
  */
-public class EventCoordinationServiceImpl implements EventCoordinationService
+public class EventCoordinationServiceImpl implements JetspeedEventCoordinationService
 {
     private static Log log = LogFactory.getLog(EventProviderImpl.class);
 
     private final PortletWindowAccessor windowAccessor;
-    private final PortletEventQueue eventQueue;
     private final PortalStatistics statistics;
     private final PortletTrackingManager portletTracking;
     private final SecurityAccessController accessController;
@@ -85,21 +82,19 @@
             boolean checkSecurityConstraints)
     {
         this.windowAccessor = windowAccessor;
-        this.eventQueue = eventQueue;
         this.statistics = statistics;
         this.portletTracking = portletTracking;
         this.accessController = accessController;
         this.checkSecurityConstraints = checkSecurityConstraints;
     }
 
-    public EventProvider createEventProvider(HttpServletRequest request, org.apache.pluto.PortletWindow portletWindow)
+    public EventProvider createEventProvider(HttpServletRequest request, org.apache.pluto.container.PortletWindow portletWindow)
     {
-        return new EventProviderImpl(request, portletWindow, this);
+        return new EventProviderImpl(request, (PortletWindow)portletWindow, this);
     }
 
-    public void registerToFireEvent(QName qname, Serializable value, org.apache.pluto.PortletWindow wnd) throws IllegalArgumentException
+    public Event createEvent(HttpServletRequest request, PortletWindow portletWindow, QName qname, Serializable value ) throws IllegalArgumentException
     {
-        PortletWindow portletWindow = (PortletWindow)wnd;
         if (isDeclaredAsPublishingEvent(portletWindow, qname))
         {
             if (value != null && !isValueInstanceOfDefinedClass(portletWindow, qname, value)) 
@@ -111,10 +106,6 @@
             {
                 throw new IllegalArgumentException("Object payload must be not null");
             }
-            else if (!(value instanceof Serializable))
-            {
-                throw new IllegalArgumentException("Object payload must implement Serializable");
-            }
             else
             {
                 String result = null;
@@ -125,26 +116,30 @@
                 }
                 if (result != null)
                 {
-                    eventQueue.publishEvent(new ProcessEventImpl(portletWindow, qname, value.getClass().getName(), (Serializable) result, this));
+                    return new ProcessEventImpl(portletWindow, qname, value.getClass().getName(), (Serializable) result, this);
                 }
                 else
                 {
-                    eventQueue.publishEvent(new ProcessEventImpl(portletWindow, qname, value.getClass().getName(), value, this));
+                    return new ProcessEventImpl(portletWindow, qname, value.getClass().getName(), value, this);
                 }
             }
         }
+        return null;
     }
 
-    public void fireEvents(EventContainer eventContainer, org.apache.pluto.PortletWindow wnd, HttpServletRequest servletRequest)
+    
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.events.JetspeedEventCoordinationService#processEvents(org.apache.pluto.container.PortletContainer, org.apache.pluto.container.PortletWindow, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.util.List)
+     */
+    public void processEvents(PortletContainer container, org.apache.pluto.container.PortletWindow wnd,
+                              HttpServletRequest servletRequest, HttpServletResponse response, List<Event> events)
     {
         PortletWindow portletWindow = (PortletWindow)wnd;
         RequestContext rc = (RequestContext) servletRequest.getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
-        List<ProcessEvent> events = eventQueue.dequeueEvents(portletWindow);
-        if (events == null)
-            return;
         long start = System.currentTimeMillis();        
-        for (ProcessEvent event : events)
+        for (Event portletEvent : events)
         {
+            ProcessEvent event = (ProcessEvent)portletEvent;
             if (event.isProcessed())
                 continue;
             event.setProcessed(true);
@@ -157,7 +152,7 @@
                 request.setAttribute(PortalReservedParameters.REQUEST_CONTEXT_OBJECTS, rc.getObjects());
                 try
                 {
-                    eventContainer.fireEvent(request, rc.getResponseForWindow(window), window, event);
+                    container.doEvent(window, request, rc.getResponseForWindow(window), event);
                 }
                 catch (Exception e)
                 {
@@ -174,7 +169,7 @@
 
     private boolean isDeclaredAsPublishingEvent(PortletWindow portletWindow, QName qname)
     {
-        PortletDefinition pd = (PortletDefinition) portletWindow.getPortletEntity().getPortletDefinition();
+        PortletDefinition pd = portletWindow.getPortletEntity().getPortletDefinition();
         List<? extends EventDefinitionReference> events = pd.getSupportedPublishingEvents();
         if (events != null)
         {
@@ -235,14 +230,14 @@
         if (portletWindow == null)
             return eventTargets;
 
-        PortletDefinition portlet = (PortletDefinition) portletWindow.getPortletEntity().getPortletDefinition();
+        PortletDefinition portlet = portletWindow.getPortletEntity().getPortletDefinition();
 
         if (checkSecurityConstraints && !checkSecurityConstraint(portlet, fragment)) 
         {
             return eventTargets;
         }
 
-        if (portletTracking.isOutOfService((org.apache.jetspeed.container.PortletWindow)portletWindow))
+        if (portletTracking.isOutOfService(portletWindow))
         {
             return eventTargets;
         }
@@ -280,12 +275,6 @@
         return false;
     }
 
-    // TODO: implement after Ate's refactoring completed
-    public void processEvents(org.apache.pluto.PortletWindow portletWindow, List<Event> events)
-    {
-
-    }
-
     public Serializable serialize(Serializable value, QName eventQName) 
     {
         Serializable xmlData = null;
@@ -315,9 +304,6 @@
         return xmlData;
     }    
     
-    
- 
-    
     public Serializable deserialize(Event event)  
     {
         ProcessEvent processEvent = (ProcessEvent)event;
@@ -370,5 +356,4 @@
         }
         return deserializedValue;
     }
-    
 }

Copied: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/events/JetspeedEventCoordinationService.java (from r754582, portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/events/EventCoordinationService.java)
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/events/JetspeedEventCoordinationService.java?p2=portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/events/JetspeedEventCoordinationService.java&p1=portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/events/EventCoordinationService.java&r1=754582&r2=755263&rev=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/events/EventCoordinationService.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/events/JetspeedEventCoordinationService.java Tue Mar 17 14:23:52 2009
@@ -21,11 +21,13 @@
 
 import javax.portlet.Event;
 import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 import javax.xml.namespace.QName;
 
-import org.apache.pluto.PortletWindow;
-import org.apache.pluto.EventContainer;
-import org.apache.pluto.spi.EventProvider;
+import org.apache.jetspeed.container.PortletWindow;
+import org.apache.pluto.container.EventCoordinationService;
+import org.apache.pluto.container.EventProvider;
+import org.apache.pluto.container.PortletContainer;
 
 /**
  * TODO: Extend from Pluto's service when checked in and building 
@@ -34,22 +36,14 @@
  * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  * @version $Id$
  */
-public interface EventCoordinationService
+public interface JetspeedEventCoordinationService extends EventCoordinationService
 {
     /**
      * Process all events for a given portlet window and given list of events. 
      * @param portletWindow The window to processs events for
      * @param events The list of one or more events
      */
-    void processEvents(PortletWindow portletWindow, List<Event> events);
-    
-    /**
-     * 
-     * @param eventContainer
-     * @param window
-     * @param request
-     */
-    public void fireEvents(EventContainer eventContainer, PortletWindow window, HttpServletRequest request);
+    void processEvents(PortletContainer container, org.apache.pluto.container.PortletWindow portletWindow, HttpServletRequest request, HttpServletResponse response, List<Event> events);
     
     /**
      * 
@@ -57,7 +51,7 @@
      * @param value
      * @param window
      */
-    public void registerToFireEvent(QName qname, Serializable value, PortletWindow window);
+    public Event createEvent(HttpServletRequest request, PortletWindow window, QName qname, Serializable value);
     
     /**
      * 
@@ -65,8 +59,7 @@
      * @param portletWindow
      * @return
      */
-    public EventProvider createEventProvider(HttpServletRequest request, 
-            org.apache.pluto.PortletWindow portletWindow);
+    public EventProvider createEventProvider(HttpServletRequest request, org.apache.pluto.container.PortletWindow portletWindow);
     
     /**
      * Serialize an event value class representation into a Jetspeed-specific seriaizable form, such as String or XML.

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/events/JetspeedEventCoordinationService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/events/JetspeedEventCoordinationService.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/events/PortletEventQueueImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/events/PortletEventQueueImpl.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/events/PortletEventQueueImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/events/PortletEventQueueImpl.java Tue Mar 17 14:23:52 2009
@@ -22,8 +22,7 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.pluto.PortletWindow;
-
+import org.apache.jetspeed.container.PortletWindow;
 
 /**
  * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/events/ProcessEventImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/events/ProcessEventImpl.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/events/ProcessEventImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/events/ProcessEventImpl.java Tue Mar 17 14:23:52 2009
@@ -22,7 +22,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.pluto.PortletWindow;
+import org.apache.jetspeed.container.PortletWindow;
 
 /**
  * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
@@ -34,12 +34,12 @@
     private QName qname;
     private java.io.Serializable value;
     private String className;
-    private EventCoordinationService eventService;
+    private JetspeedEventCoordinationService eventService;
     private boolean processed = false;
     private static Log log = LogFactory.getLog(ProcessEventImpl.class);
     
 
-    public ProcessEventImpl(PortletWindow window, QName qname, String className, java.io.Serializable value, EventCoordinationService eventService)
+    public ProcessEventImpl(PortletWindow window, QName qname, String className, java.io.Serializable value, JetspeedEventCoordinationService eventService)
     {
         this.window = window;
         this.qname = qname;



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