You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-scm@portals.apache.org by at...@apache.org on 2009/03/11 15:50:18 UTC

svn commit: r752460 - in /portals/pluto/trunk: pluto-container/src/main/java/org/apache/pluto/container/impl/PortletContainerImpl.java pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/EventCoordinationServiceImpl.java

Author: ate
Date: Wed Mar 11 14:50:17 2009
New Revision: 752460

URL: http://svn.apache.org/viewvc?rev=752460&view=rev
Log:
PLUTO-538: New EventCoordinationService and merging EventContainer with PortletContainer
See: https://issues.apache.org/jira/browse/PLUTO-538
- merging EventContainer with PortletContainer
- alligning the fireEvent method name with the other container methods to doEvent
- dropping EventContainer
- expanding on the initial EventCoordinationService: for implentation the container itself, request and response also need to be provided.

Removed:
    portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/EventCoordinationServiceImpl.java
Modified:
    portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletContainerImpl.java

Modified: portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletContainerImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletContainerImpl.java?rev=752460&r1=752459&r2=752460&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletContainerImpl.java (original)
+++ portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletContainerImpl.java Wed Mar 11 14:50:17 2009
@@ -36,7 +36,6 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.pluto.container.Constants;
-import org.apache.pluto.container.EventContainer;
 import org.apache.pluto.container.FilterManager;
 import org.apache.pluto.container.OptionalContainerServices;
 import org.apache.pluto.container.PortletActionResponseContext;
@@ -61,8 +60,8 @@
  * @version 1.0
  * @since Sep 18, 2004
  */
-public class PortletContainerImpl implements PortletContainer,
-	EventContainer {
+public class PortletContainerImpl implements PortletContainer
+{
 
     /** Internal logger. */
     private static final Log LOG = LogFactory.getLog(PortletContainerImpl.class);
@@ -273,7 +272,7 @@
                 List<Event> events = responseContext.getEvents();
                 if (!events.isEmpty())
                 {
-                    requiredContainerServices.getEventCoordinationService().processEvents(portletWindow, events);
+                    requiredContainerServices.getEventCoordinationService().processEvents(this, portletWindow, request, response, events);
                 }
             }
 
@@ -406,9 +405,11 @@
      * 
      * @see {@link javax.portlet.EventPortlet#processEvent(javax.portlet.EventRequest, javax.portlet.EventResponse)
      */
-    public void fireEvent(HttpServletRequest request, HttpServletResponse response,
-    		PortletWindow portletWindow, Event event) 
-    		throws PortletException, IOException, PortletContainerException
+    public void doEvent(PortletWindow portletWindow,
+                        HttpServletRequest request,
+                        HttpServletResponse response,
+                        Event event) 
+    throws PortletException, IOException, PortletContainerException
     {
     	ensureInitialized();
 
@@ -445,7 +446,7 @@
 
         if (events != null && !events.isEmpty())
         {
-            requiredContainerServices.getEventCoordinationService().processEvents(portletWindow, events);
+            requiredContainerServices.getEventCoordinationService().processEvents(this, portletWindow, request, response, events);
         }
 
         debugWithName("Portlet event: "+ event.getName() +" fired for: " + portletWindow.getPortletEntity().getPortletDefinition().getPortletName());
@@ -484,16 +485,6 @@
     	}
     }
     
-    /**
-     * Prints a message at ERROR level with the container name prefix.
-     * @param message  log message.
-     */
-    private void errorWithName(String message) {
-        if (LOG.isErrorEnabled()) {
-            LOG.info("Portlet Container [" + name + "]: " + message);
-        }
-    }
-
 	/**
 	 * Checks if render parameter are already cleared,
 	 * bye storing/reading an ID in the request