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:44:45 UTC

svn commit: r752459 - in /portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container: EventContainer.java EventCoordinationService.java PortletContainer.java

Author: ate
Date: Wed Mar 11 14:44:44 2009
New Revision: 752459

URL: http://svn.apache.org/viewvc?rev=752459&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-container-api/src/main/java/org/apache/pluto/container/EventContainer.java
Modified:
    portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/EventCoordinationService.java
    portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/PortletContainer.java

Modified: portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/EventCoordinationService.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/EventCoordinationService.java?rev=752459&r1=752458&r2=752459&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/EventCoordinationService.java (original)
+++ portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/EventCoordinationService.java Wed Mar 11 14:44:44 2009
@@ -20,6 +20,8 @@
 import java.util.List;
 
 import javax.portlet.Event;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 
 
 /**
@@ -28,5 +30,5 @@
  */
 public interface EventCoordinationService
 {
-    void processEvents(PortletWindow portletWindow, List<Event> events);
+    void processEvents(PortletContainer container, PortletWindow portletWindow, HttpServletRequest request, HttpServletResponse response, List<Event> events);
 }

Modified: portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/PortletContainer.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/PortletContainer.java?rev=752459&r1=752458&r2=752459&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/PortletContainer.java (original)
+++ portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/PortletContainer.java Wed Mar 11 14:44:44 2009
@@ -18,6 +18,7 @@
 
 import java.io.IOException;
 
+import javax.portlet.Event;
 import javax.portlet.PortletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -133,7 +134,10 @@
      * @param portletWindow   the portlet window
      * @param servletRequest  the servlet request
      * @param servletResponse the servlet response
-     * @throws PortletContainerException if the request can not be fullfilled.
+     * @throws PortletException          if one portlet has trouble fulfilling
+     *                                   the request
+     * @throws PortletContainerException if the portlet container implementation
+     *                                   has trouble fulfilling the request
      */
     void doAdmin(PortletWindow portletWindow,
                  HttpServletRequest servletRequest,
@@ -141,6 +145,24 @@
     throws PortletException, IOException, PortletContainerException;
 
     /**
+     * Indicates that an event should be fired in the current request and calls
+     * the processEvent method of this portlet.
+     * @param portletWindow   the portlet Window
+     * @param request         the servlet request
+     * @param response        the servlet response
+     * @param event The event.
+     * @throws PortletException          if one portlet has trouble fulfilling
+     *                                   the request
+     * @throws PortletContainerException if the portlet container implementation
+     *                                   has trouble fulfilling the request
+     */
+    public void doEvent(PortletWindow portletWindow, 
+                        HttpServletRequest request,
+                        HttpServletResponse response,
+                        Event event)
+    throws PortletException, IOException, PortletContainerException;
+
+    /**
      * Returns whether the container is already initialized or not.
      * @return <code>true</code> if the container is initialized
      */