portals-pluto-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r752107 - in /portals/pluto/trunk: pluto-container-api/src/main/java/org/apache/pluto/container/ pluto-container-api/src/main/java/org/apache/pluto/container/driver/ pluto-container/src/main/java/org/apache/pluto/core/ pluto-container/src/t...
Date Tue, 10 Mar 2009 13:28:04 GMT
Author: ate
Date: Tue Mar 10 13:27:57 2009
New Revision: 752107

URL: http://svn.apache.org/viewvc?rev=752107&view=rev
Log:
PLUTO-537: Cleaning up Pluto packages
See: https://issues.apache.org/jira/browse/PLUTO-537
- removal of no longer used/needed PortletContainerinvocationService and PortletInfoService

Removed:
    portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/ContainerInvocation.java
    portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/ContainerInvocationService.java
    portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/PortletInfoService.java
    portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/ContainerInvocationImpl.java
    portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/ContainerInvocationServiceImpl.java
    portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletInfoService.java
Modified:
    portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/OptionalContainerServices.java
    portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/PortletContainer.java
    portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/RequiredContainerServices.java
    portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/driver/PlutoServices.java
    portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/DefaultOptionalContainerServices.java
    portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/PlutoContainerServices.java
    portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/PortletContainerImpl.java
    portals/pluto/trunk/pluto-container/src/test/java/org/apache/pluto/internal/impl/ResourceBundleFactoryTest.java
    portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/ContainerServicesImpl.java
    portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/PortalDriverServlet.java

Modified: portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/OptionalContainerServices.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/OptionalContainerServices.java?rev=752107&r1=752106&r2=752107&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/OptionalContainerServices.java
(original)
+++ portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/OptionalContainerServices.java
Tue Mar 10 13:27:57 2009
@@ -61,14 +61,6 @@
     PortletInvokerService getPortletInvokerService();
 
     /**
-     * Returns the portlet info service implementation used
-     * by the container.
-     *
-     * @return portlet info service implementation.
-     */
-    PortletInfoService getPortletInfoService();
-
-    /**
      * Returns the user info service implementation used
      * by the container.
      *

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=752107&r1=752106&r2=752107&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
Tue Mar 10 13:27:57 2009
@@ -48,8 +48,6 @@
  */
 public interface PortletContainer {
 
-    public enum Method { LOAD, ACTION, EVENT, RENDER, RESOURCE, ADMIN };
-
     /**
      * Initializes the container
      * @throws PortletContainerException if an error occurs.

Modified: portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/RequiredContainerServices.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/RequiredContainerServices.java?rev=752107&r1=752106&r2=752107&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/RequiredContainerServices.java
(original)
+++ portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/RequiredContainerServices.java
Tue Mar 10 13:27:57 2009
@@ -46,7 +46,5 @@
      */
     CCPPProfileService getCCPPProfileService();
     
-    ContainerInvocationService getContainerInvocationService();
-    
     EventCoordinationService getEventCoordinationService();
 }

Modified: portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/driver/PlutoServices.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/driver/PlutoServices.java?rev=752107&r1=752106&r2=752107&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/driver/PlutoServices.java
(original)
+++ portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/driver/PlutoServices.java
Tue Mar 10 13:27:57 2009
@@ -19,13 +19,11 @@
 import javax.portlet.PortalContext;
 
 import org.apache.pluto.container.CCPPProfileService;
-import org.apache.pluto.container.ContainerInvocationService;
 import org.apache.pluto.container.ContainerServices;
 import org.apache.pluto.container.EventCoordinationService;
 import org.apache.pluto.container.NamespaceMapper;
 import org.apache.pluto.container.PortalCallbackService;
 import org.apache.pluto.container.PortletEnvironmentService;
-import org.apache.pluto.container.PortletInfoService;
 import org.apache.pluto.container.PortletInvokerService;
 import org.apache.pluto.container.PortletPreferencesService;
 import org.apache.pluto.container.PortletRequestContextService;
@@ -56,11 +54,6 @@
         return containerServices.getCCPPProfileService();
     }
 
-    public ContainerInvocationService getContainerInvocationService()
-    {
-        return containerServices.getContainerInvocationService();
-    }
-
     public PortalCallbackService getPortalCallbackService()
     {
         return containerServices.getPortalCallbackService();
@@ -86,11 +79,6 @@
         return containerServices.getPortletEnvironmentService();
     }
 
-    public PortletInfoService getPortletInfoService()
-    {
-        return containerServices.getPortletInfoService();
-    }
-
     public PortletInvokerService getPortletInvokerService()
     {
         return containerServices.getPortletInvokerService();

Modified: portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/DefaultOptionalContainerServices.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/DefaultOptionalContainerServices.java?rev=752107&r1=752106&r2=752107&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/DefaultOptionalContainerServices.java
(original)
+++ portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/DefaultOptionalContainerServices.java
Tue Mar 10 13:27:57 2009
@@ -20,7 +20,6 @@
 import org.apache.pluto.container.OptionalContainerServices;
 import org.apache.pluto.container.PortletAppDescriptorService;
 import org.apache.pluto.container.PortletEnvironmentService;
-import org.apache.pluto.container.PortletInfoService;
 import org.apache.pluto.container.PortletInvokerService;
 import org.apache.pluto.container.PortletPreferencesService;
 import org.apache.pluto.container.PortletRequestContextService;
@@ -45,7 +44,6 @@
     private PortletInvokerService portletInvokerService;
     private PortletRequestContextService portletRequestContextService;
     private PortletEnvironmentService portletEnvironmentService;
-    private PortletInfoService portletInfoService;
     private PortalAdministrationService portalAdministrationService;
     private UserInfoService userInfoService;
     private NamespaceMapper namespaceMapper;
@@ -62,7 +60,6 @@
         portletInvokerService = new DefaultPortletInvokerService(portletContextService);
         portletRequestContextService = new DefaultPortletRequestContextService();
         portletEnvironmentService = new DefaultPortletEnvironmentService();
-        portletInfoService = new DefaultPortletInfoService();
         portalAdministrationService = new DefaultPortalAdministrationService();
         userInfoService = new DefaultUserInfoService();
         namespaceMapper = new DefaultNamespaceMapper();
@@ -105,10 +102,6 @@
             portletEnvironmentService = root.getPortletEnvironmentService();
         }
 
-        if(root.getPortletInfoService() != null) {
-            portletInfoService = root.getPortletInfoService();
-        }
-
         if(driverServices.getPortalAdministrationService() != null) {
             portalAdministrationService = driverServices.getPortalAdministrationService();
         }
@@ -155,10 +148,6 @@
         return portletInvokerService;
     }
 
-    public PortletInfoService getPortletInfoService() {
-        return portletInfoService;
-    }
-
     public PortalAdministrationService getPortalAdministrationService() {
         return portalAdministrationService;
     }

Modified: portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/PlutoContainerServices.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/PlutoContainerServices.java?rev=752107&r1=752106&r2=752107&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/PlutoContainerServices.java
(original)
+++ portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/PlutoContainerServices.java
Tue Mar 10 13:27:57 2009
@@ -19,14 +19,12 @@
 import javax.portlet.PortalContext;
 
 import org.apache.pluto.container.CCPPProfileService;
-import org.apache.pluto.container.ContainerInvocationService;
 import org.apache.pluto.container.ContainerServices;
 import org.apache.pluto.container.EventCoordinationService;
 import org.apache.pluto.container.NamespaceMapper;
 import org.apache.pluto.container.OptionalContainerServices;
 import org.apache.pluto.container.PortalCallbackService;
 import org.apache.pluto.container.PortletEnvironmentService;
-import org.apache.pluto.container.PortletInfoService;
 import org.apache.pluto.container.PortletInvokerService;
 import org.apache.pluto.container.PortletPreferencesService;
 import org.apache.pluto.container.PortletRequestContextService;
@@ -46,7 +44,6 @@
     private PortalContext context;
     private CCPPProfileService ccppProfileService;
     private PortalCallbackService callbackService;
-    private ContainerInvocationService containerInvocation;
     
     /*
      * optional services
@@ -57,7 +54,6 @@
     private PortletInvokerService portletInvokerService;
     private PortletRequestContextService portletRequestContextService;
     private PortletEnvironmentService portletEnvironmentService;
-    private PortletInfoService portletInfoService;
     private PortalAdministrationService portalAdministrationService;
     private UserInfoService userInfoService;
     private NamespaceMapper namespaceMapper;
@@ -72,20 +68,18 @@
     
     public PlutoContainerServices(RequiredContainerServices required, OptionalContainerServices
optional)
     {
-        this(required.getPortalContext(), required.getCCPPProfileService(), required.getContainerInvocationService(),
+        this(required.getPortalContext(), required.getCCPPProfileService(),
              required.getPortalCallbackService(), required.getEventCoordinationService(),
optional,
              optional instanceof PortalDriverServices ? (PortalDriverServices) optional :
null);
     }
 
     public PlutoContainerServices(PortalContext context,
             CCPPProfileService ccppProfileService,
-            ContainerInvocationService containerInvocation,
             PortalCallbackService callbackService,
             EventCoordinationService eventCoordinationService)
     {
         this.context = context;
         this.ccppProfileService = ccppProfileService;
-        this.containerInvocation = containerInvocation;
         this.callbackService = callbackService;
         this.eventCoordinationService = eventCoordinationService;
         this.createDefaultPortalDriverServices();
@@ -94,7 +88,6 @@
             
     public PlutoContainerServices(PortalContext context,
             CCPPProfileService ccppProfileService,
-            ContainerInvocationService containerInvocation,
             PortalCallbackService callbackService,
             EventCoordinationService eventCoordinationService,
             OptionalContainerServices optionalServices,
@@ -102,7 +95,6 @@
     {
         this.context = context;
         this.ccppProfileService = ccppProfileService;
-        this.containerInvocation = containerInvocation;
         this.eventCoordinationService = eventCoordinationService;
         
         portletPreferencesService = optionalServices.getPortletPreferencesService();
@@ -125,9 +117,6 @@
         portletEnvironmentService = optionalServices.getPortletEnvironmentService();
         if (portletEnvironmentService == null)
             portletEnvironmentService = new DefaultPortletEnvironmentService();
-        portletInfoService = optionalServices.getPortletInfoService();
-        if (portletInfoService == null)
-            portletInfoService = new DefaultPortletInfoService();
         portalAdministrationService = portalDriverServices != null ? portalDriverServices.getPortalAdministrationService()
: null;
         if (portalAdministrationService == null)
             portalAdministrationService = new DefaultPortalAdministrationService();
@@ -152,7 +141,6 @@
         portletInvokerService = new DefaultPortletInvokerService(portletContextService);
         portletRequestContextService = new DefaultPortletRequestContextService();
         portletEnvironmentService = new DefaultPortletEnvironmentService();
-        portletInfoService = new DefaultPortletInfoService();
         userInfoService = new DefaultUserInfoService();
         namespaceMapper = new DefaultNamespaceMapper();
     }
@@ -162,7 +150,6 @@
         context = null; // TODO
         ccppProfileService = new DummyCCPPProfileServiceImpl();
         callbackService = null; // TODO
-        containerInvocation = new ContainerInvocationServiceImpl();        
         eventCoordinationService = null; // TODO
     }
     
@@ -171,11 +158,6 @@
         return context;
     }
 
-    public ContainerInvocationService getContainerInvocationService()
-    {
-        return containerInvocation;
-    }
-    
     /**
      * The PortletPreferencesService provides access to the portal's
      * PortletPreference persistence mechanism.
@@ -231,11 +213,6 @@
         return ccppProfileService;
     }
 
-    public PortletInfoService getPortletInfoService() 
-    {
-        return this.portletInfoService;
-    }
-
     public PortalAdministrationService getPortalAdministrationService() 
     {
         return this.portalAdministrationService;
@@ -261,11 +238,6 @@
         return callbackService;
     }
 
-    public ContainerInvocationService getContainerInvocation()
-    {
-        return containerInvocation;
-    }
-
     public EventCoordinationService getEventCoordinationService()
     {
         return eventCoordinationService;

Modified: portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/PortletContainerImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/PortletContainerImpl.java?rev=752107&r1=752106&r2=752107&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/PortletContainerImpl.java
(original)
+++ portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/PortletContainerImpl.java
Tue Mar 10 13:27:57 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.ContainerInvocationService;
 import org.apache.pluto.container.EventContainer;
 import org.apache.pluto.container.FilterManager;
 import org.apache.pluto.container.OptionalContainerServices;
@@ -158,35 +157,26 @@
         debugWithName("Render request received for portlet: "
         		+ portletWindow.getPortletEntity().getPortletDefinition().getPortletName());
         
+        PortletRequestContextService rcService = getOptionalContainerServices().getPortletRequestContextService();
+        PortletEnvironmentService envService = getOptionalContainerServices().getPortletEnvironmentService();
+        PortletInvokerService invoker = optionalContainerServices.getPortletInvokerService();
+
+        PortletRequestContext requestContext = rcService.getPortletRenderRequestContext(this,
request, response, portletWindow);
+        PortletRenderResponseContext responseContext = rcService.getPortletRenderResponseContext(this,
request, response, portletWindow);
+        RenderRequest portletRequest = envService.createRenderRequest(requestContext, responseContext.getCacheControl());
+        RenderResponse portletResponse = envService.createRenderResponse(responseContext);
+
+        FilterManager filterManager = filterInitialisation(portletWindow,PortletRequest.RENDER_PHASE);
+        
         try
         {
-            getInvocationService().setInvocation(this, portletWindow, Method.RENDER);
-            
-            PortletRequestContextService rcService = getOptionalContainerServices().getPortletRequestContextService();
-            PortletEnvironmentService envService = getOptionalContainerServices().getPortletEnvironmentService();
-            PortletInvokerService invoker = optionalContainerServices.getPortletInvokerService();
-
-            PortletRequestContext requestContext = rcService.getPortletRenderRequestContext(this,
request, response, portletWindow);
-            PortletRenderResponseContext responseContext = rcService.getPortletRenderResponseContext(this,
request, response, portletWindow);
-            RenderRequest portletRequest = envService.createRenderRequest(requestContext,
responseContext.getCacheControl());
-            RenderResponse portletResponse = envService.createRenderResponse(responseContext);
-
-            FilterManager filterManager = filterInitialisation(portletWindow,PortletRequest.RENDER_PHASE);
-            
-            try
-            {
-                invoker.render(requestContext, portletRequest, portletResponse, filterManager);
-                // Mark portlet interaction is completed: backend implementation can flush
response state now
-                responseContext.close();
-            }
-            finally
-            {
-                responseContext.release();
-            }
-        } 
+            invoker.render(requestContext, portletRequest, portletResponse, filterManager);
+            // Mark portlet interaction is completed: backend implementation can flush response
state now
+            responseContext.close();
+        }
         finally
         {
-            getInvocationService().clearInvocation();
+            responseContext.release();
         }
         
         debugWithName("Portlet render done for: " + portletWindow.getPortletEntity().getPortletDefinition().getPortletName());
@@ -213,35 +203,26 @@
         debugWithName("Resource request received for portlet: "
         		+ portletWindow.getPortletEntity().getPortletDefinition().getPortletName());
         
+        PortletRequestContextService rcService = getOptionalContainerServices().getPortletRequestContextService();
+        PortletEnvironmentService envService = getOptionalContainerServices().getPortletEnvironmentService();
+        PortletInvokerService invoker = optionalContainerServices.getPortletInvokerService();
+
+        PortletResourceRequestContext requestContext = rcService.getPortletResourceRequestContext(this,
request, response, portletWindow);
+        PortletResourceResponseContext responseContext = rcService.getPortletResourceResponseContext(this,
request, response, portletWindow);
+        ResourceRequest portletRequest = envService.createResourceRequest(requestContext,
responseContext.getCacheControl());
+        ResourceResponse portletResponse = envService.createResourceResponse(responseContext,
requestContext.getCacheability());
+
+        FilterManager filterManager = filterInitialisation(portletWindow,PortletRequest.RESOURCE_PHASE);
+        
         try
         {
-            getInvocationService().setInvocation(this, portletWindow, Method.RESOURCE);
-
-            PortletRequestContextService rcService = getOptionalContainerServices().getPortletRequestContextService();
-            PortletEnvironmentService envService = getOptionalContainerServices().getPortletEnvironmentService();
-            PortletInvokerService invoker = optionalContainerServices.getPortletInvokerService();
-
-            PortletResourceRequestContext requestContext = rcService.getPortletResourceRequestContext(this,
request, response, portletWindow);
-            PortletResourceResponseContext responseContext = rcService.getPortletResourceResponseContext(this,
request, response, portletWindow);
-            ResourceRequest portletRequest = envService.createResourceRequest(requestContext,
responseContext.getCacheControl());
-            ResourceResponse portletResponse = envService.createResourceResponse(responseContext,
requestContext.getCacheability());
-
-            FilterManager filterManager = filterInitialisation(portletWindow,PortletRequest.RESOURCE_PHASE);
-            
-            try
-            {
-                invoker.serveResource(requestContext, portletRequest, portletResponse, filterManager);
-                // Mark portlet interaction is completed: backend implementation can flush
response state now
-                responseContext.close();
-            }
-            finally
-            {
-                responseContext.release();
-            }
-        } 
+            invoker.serveResource(requestContext, portletRequest, portletResponse, filterManager);
+            // Mark portlet interaction is completed: backend implementation can flush response
state now
+            responseContext.close();
+        }
         finally
         {
-            getInvocationService().clearInvocation();
+            responseContext.release();
         }
         
         debugWithName("Portlet resource done for: " + portletWindow.getPortletEntity().getPortletDefinition().getPortletName());
@@ -268,65 +249,47 @@
         debugWithName("Action request received for portlet: "
     			+ portletWindow.getPortletEntity().getPortletDefinition().getPortletName());
     	
-        try 
-        {
-            getInvocationService().setInvocation(this, portletWindow, Method.ACTION);
-
-            PortletRequestContextService rcService = getOptionalContainerServices().getPortletRequestContextService();
-            PortletEnvironmentService envService = getOptionalContainerServices().getPortletEnvironmentService();
-            PortletInvokerService invoker = optionalContainerServices.getPortletInvokerService();
-
-            PortletRequestContext requestContext = rcService.getPortletActionRequestContext(this,
request, response, portletWindow);
-            PortletActionResponseContext responseContext = rcService.getPortletActionResponseContext(this,
request, response, portletWindow);
-            ActionRequest portletRequest = envService.createActionRequest(requestContext);
-            ActionResponse portletResponse = envService.createActionResponse(responseContext);
+        PortletRequestContextService rcService = getOptionalContainerServices().getPortletRequestContextService();
+        PortletEnvironmentService envService = getOptionalContainerServices().getPortletEnvironmentService();
+        PortletInvokerService invoker = optionalContainerServices.getPortletInvokerService();
+
+        PortletRequestContext requestContext = rcService.getPortletActionRequestContext(this,
request, response, portletWindow);
+        PortletActionResponseContext responseContext = rcService.getPortletActionResponseContext(this,
request, response, portletWindow);
+        ActionRequest portletRequest = envService.createActionRequest(requestContext);
+        ActionResponse portletResponse = envService.createActionResponse(responseContext);
 
-            FilterManager filterManager = filterInitialisation(portletWindow,PortletRequest.ACTION_PHASE);
+        FilterManager filterManager = filterInitialisation(portletWindow,PortletRequest.ACTION_PHASE);
 
-            String location = null;
+        String location = null;
+        
+        try
+        {
+            invoker.action(requestContext, portletRequest, portletResponse, filterManager);
+            
+            debugWithName("Portlet action processed for: "
+                          + portletWindow.getPortletEntity().getPortletDefinition().getPortletName());
             
-            try
+            // Mark portlet interaction is completed: backend implementation can flush response
state now
+            responseContext.close();
+            
+            if (!responseContext.isRedirect())
             {
-                invoker.action(requestContext, portletRequest, portletResponse, filterManager);
-                
-                debugWithName("Portlet action processed for: "
-                              + portletWindow.getPortletEntity().getPortletDefinition().getPortletName());
-                
-                // Mark portlet interaction is completed: backend implementation can flush
response state now
-                responseContext.close();
-                
-                if (!responseContext.isRedirect())
+                List<Event> events = responseContext.getEvents();
+                if (!events.isEmpty())
                 {
-                    List<Event> events = responseContext.getEvents();
-                    if (!events.isEmpty())
-                    {
-                        try
-                        {
-                            requiredContainerServices.getEventCoordinationService().processEvents(portletWindow,
events);
-                        }
-                        finally
-                        {
-                            // restore/recreate current ContainerInvocation as processEvents
can have overridden and then cleared it
-                            // TODO: investigate if nested invocations like these shouldn't
be handled differently?
-                            getInvocationService().setInvocation(this, portletWindow, Method.ACTION);
-                        }
-                    }
+                    requiredContainerServices.getEventCoordinationService().processEvents(portletWindow,
events);
                 }
-
-                // After processing action and possible event handling, retrieve the target
response URL to be redirected to
-                // This can either be a renderURL or an external URL (optionally containing
a future renderURL as query parameter
-                location = response.encodeRedirectURL(responseContext.getResponseURL());
-            }
-            finally
-            {
-                responseContext.release();
             }
-            redirect(request, response, location);
+
+            // After processing action and possible event handling, retrieve the target response
URL to be redirected to
+            // This can either be a renderURL or an external URL (optionally containing a
future renderURL as query parameter
+            location = response.encodeRedirectURL(responseContext.getResponseURL());
         }
         finally
         {
-            getInvocationService().clearInvocation();
+            responseContext.release();
         }
+        redirect(request, response, location);
 
         debugWithName("Portlet action done for: " + portletWindow.getPortletEntity().getPortletDefinition().getPortletName());
     }
@@ -358,33 +321,24 @@
         debugWithName("Load request received for portlet: "
         		+ portletWindow.getPortletEntity().getPortletDefinition().getPortletName());
         
+        PortletRequestContextService rcService = getOptionalContainerServices().getPortletRequestContextService();
+        PortletEnvironmentService envService = getOptionalContainerServices().getPortletEnvironmentService();
+        PortletInvokerService invoker = optionalContainerServices.getPortletInvokerService();
+
+        PortletRequestContext requestContext = rcService.getPortletRenderRequestContext(this,
request, response, portletWindow);
+        PortletRenderResponseContext responseContext = rcService.getPortletRenderResponseContext(this,
request, response, portletWindow);
+        RenderRequest portletRequest = envService.createRenderRequest(requestContext, responseContext.getCacheControl());
+        RenderResponse portletResponse = envService.createRenderResponse(responseContext);
+
         try
         {
-            getInvocationService().setInvocation(this, portletWindow, Method.LOAD);
-
-            PortletRequestContextService rcService = getOptionalContainerServices().getPortletRequestContextService();
-            PortletEnvironmentService envService = getOptionalContainerServices().getPortletEnvironmentService();
-            PortletInvokerService invoker = optionalContainerServices.getPortletInvokerService();
-
-            PortletRequestContext requestContext = rcService.getPortletRenderRequestContext(this,
request, response, portletWindow);
-            PortletRenderResponseContext responseContext = rcService.getPortletRenderResponseContext(this,
request, response, portletWindow);
-            RenderRequest portletRequest = envService.createRenderRequest(requestContext,
responseContext.getCacheControl());
-            RenderResponse portletResponse = envService.createRenderResponse(responseContext);
-
-            try
-            {
-                invoker.load(requestContext, portletRequest, portletResponse);
-                // Mark portlet interaction is completed: backend implementation can flush
response state now
-                responseContext.close();
-            }
-            finally
-            {
-                responseContext.release();
-            }
+            invoker.load(requestContext, portletRequest, portletResponse);
+            // Mark portlet interaction is completed: backend implementation can flush response
state now
+            responseContext.close();
         }
         finally
         {
-            getInvocationService().clearInvocation();
+            responseContext.release();
         }
 
         debugWithName("Portlet load done for: " + portletWindow.getPortletEntity().getPortletDefinition().getPortletName());
@@ -401,33 +355,24 @@
         debugWithName("Admin request received for portlet: "
             +portletWindow.getPortletEntity().getPortletDefinition().getPortletName());
 
+        PortletRequestContextService rcService = getOptionalContainerServices().getPortletRequestContextService();
+        PortletEnvironmentService envService = getOptionalContainerServices().getPortletEnvironmentService();
+        PortletInvokerService invoker = optionalContainerServices.getPortletInvokerService();
+
+        PortletRequestContext requestContext = rcService.getPortletRenderRequestContext(this,
request, response, portletWindow);
+        PortletRenderResponseContext responseContext = rcService.getPortletRenderResponseContext(this,
request, response, portletWindow);
+        RenderRequest portletRequest = envService.createRenderRequest(requestContext, responseContext.getCacheControl());
+        RenderResponse portletResponse = envService.createRenderResponse(responseContext);
+
         try
         {
-            getInvocationService().setInvocation(this, portletWindow, Method.EVENT);
-            
-            PortletRequestContextService rcService = getOptionalContainerServices().getPortletRequestContextService();
-            PortletEnvironmentService envService = getOptionalContainerServices().getPortletEnvironmentService();
-            PortletInvokerService invoker = optionalContainerServices.getPortletInvokerService();
-
-            PortletRequestContext requestContext = rcService.getPortletRenderRequestContext(this,
request, response, portletWindow);
-            PortletRenderResponseContext responseContext = rcService.getPortletRenderResponseContext(this,
request, response, portletWindow);
-            RenderRequest portletRequest = envService.createRenderRequest(requestContext,
responseContext.getCacheControl());
-            RenderResponse portletResponse = envService.createRenderResponse(responseContext);
-
-            try
-            {
-                invoker.admin(requestContext, portletRequest, portletResponse);
-                // Mark portlet interaction is completed: backend implementation can flush
response state now
-                responseContext.close();
-            }
-            finally
-            {
-                responseContext.release();
-            }
-        } 
+            invoker.admin(requestContext, portletRequest, portletResponse);
+            // Mark portlet interaction is completed: backend implementation can flush response
state now
+            responseContext.close();
+        }
         finally
         {
-            getInvocationService().clearInvocation();
+            responseContext.release();
         }
 
         debugWithName("Portlet admin request done for: " + portletWindow.getPortletEntity().getPortletDefinition().getPortletName());
@@ -474,65 +419,42 @@
     	debugWithName("Event: "+event.getName()+" received for portlet: "
     			+ portletWindow.getPortletEntity().getPortletDefinition().getPortletName());
 
+        PortletRequestContextService rcService = getOptionalContainerServices().getPortletRequestContextService();
+        PortletEnvironmentService envService = getOptionalContainerServices().getPortletEnvironmentService();
+        PortletInvokerService invoker = optionalContainerServices.getPortletInvokerService();
+
+        PortletRequestContext requestContext = rcService.getPortletEventRequestContext(this,
request, response, portletWindow);
+        PortletEventResponseContext responseContext = rcService.getPortletEventResponseContext(this,
request, response, portletWindow);
+        EventRequest portletRequest = envService.createEventRequest(requestContext, event);
+        EventResponse portletResponse = envService.createEventResponse(responseContext);
+
+        FilterManager filterManager = filterInitialisation(portletWindow,PortletRequest.EVENT_PHASE);
+
+        List<Event> events = null;
         try
         {
-            getInvocationService().setInvocation(this, portletWindow, Method.EVENT);
+            invoker.event(requestContext, portletRequest, portletResponse, filterManager);
             
-            PortletRequestContextService rcService = getOptionalContainerServices().getPortletRequestContextService();
-            PortletEnvironmentService envService = getOptionalContainerServices().getPortletEnvironmentService();
-            PortletInvokerService invoker = optionalContainerServices.getPortletInvokerService();
-
-            PortletRequestContext requestContext = rcService.getPortletEventRequestContext(this,
request, response, portletWindow);
-            PortletEventResponseContext responseContext = rcService.getPortletEventResponseContext(this,
request, response, portletWindow);
-            EventRequest portletRequest = envService.createEventRequest(requestContext, event);
-            EventResponse portletResponse = envService.createEventResponse(responseContext);
-
-            FilterManager filterManager = filterInitialisation(portletWindow,PortletRequest.EVENT_PHASE);
-
-            List<Event> events = null;
-            try
-            {
-                invoker.event(requestContext, portletRequest, portletResponse, filterManager);
-                
-                debugWithName("Portlet event processed for: "
-                              + portletWindow.getPortletEntity().getPortletDefinition().getPortletName());
-                
-                // Mark portlet interaction is completed: backend implementation can flush
response state now
-                responseContext.close();
-                events = responseContext.getEvents();
-            }
-            finally
-            {
-                responseContext.release();
-            }
-
-            if (events != null && !events.isEmpty())
-            {
-                try
-                {
-                    requiredContainerServices.getEventCoordinationService().processEvents(portletWindow,
events);
-                }
-                finally
-                {
-                    // restore/recreate current ContainerInvocation as processEvents can
have overridden and then cleared it
-                    // TODO: investigate if nested invocations like these shouldn't be handled
differently?
-                    getInvocationService().setInvocation(this, portletWindow, Method.EVENT);
-                }
-            }
+            debugWithName("Portlet event processed for: "
+                          + portletWindow.getPortletEntity().getPortletDefinition().getPortletName());
+            
+            // Mark portlet interaction is completed: backend implementation can flush response
state now
+            responseContext.close();
+            events = responseContext.getEvents();
         }
         finally
         {
-            getInvocationService().clearInvocation();
+            responseContext.release();
+        }
+
+        if (events != null && !events.isEmpty())
+        {
+            requiredContainerServices.getEventCoordinationService().processEvents(portletWindow,
events);
         }
 
         debugWithName("Portlet event: "+ event.getName() +" fired for: " + portletWindow.getPortletEntity().getPortletDefinition().getPortletName());
     }
     
-    private ContainerInvocationService getInvocationService()
-    {
-        return requiredContainerServices.getContainerInvocationService();
-    }
-    
     // Private Methods ---------------------------------------------------------
     
     /**

Modified: portals/pluto/trunk/pluto-container/src/test/java/org/apache/pluto/internal/impl/ResourceBundleFactoryTest.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container/src/test/java/org/apache/pluto/internal/impl/ResourceBundleFactoryTest.java?rev=752107&r1=752106&r2=752107&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container/src/test/java/org/apache/pluto/internal/impl/ResourceBundleFactoryTest.java
(original)
+++ portals/pluto/trunk/pluto-container/src/test/java/org/apache/pluto/internal/impl/ResourceBundleFactoryTest.java
Tue Mar 10 13:27:57 2009
@@ -53,7 +53,7 @@
     }
 
     public void testGetBundleAllSpecified() {
-        ResourceBundleFactory factory = new ResourceBundleFactory(validDD);
+        ResourceBundleFactory factory = new ResourceBundleFactory(validDD, validDD.getPortletInfo());
         ResourceBundle bundle = factory.getResourceBundle(Locale.getDefault());
 
         Assert.assertEquals("Bundle Title", bundle.getString("javax.portlet.title"));
@@ -63,7 +63,7 @@
 
     public void testGetResourceBundleNoBundle() {
         validDD.setResourceBundle(null);
-        ResourceBundleFactory factory = new ResourceBundleFactory(validDD);
+        ResourceBundleFactory factory = new ResourceBundleFactory(validDD, validDD.getPortletInfo());
         ResourceBundle bundle = factory.getResourceBundle(Locale.getDefault());
 
         Assert.assertEquals("Info Title", bundle.getString("javax.portlet.title"));
@@ -72,7 +72,7 @@
     }
 
     public void testGetResourceBundleNoInfo() {
-        ResourceBundleFactory factory = new ResourceBundleFactory(validDD);
+        ResourceBundleFactory factory = new ResourceBundleFactory(validDD, validDD.getPortletInfo());
         ResourceBundle bundle = factory.getResourceBundle(Locale.getDefault());
 
         Assert.assertEquals("Bundle Title", bundle.getString("javax.portlet.title"));
@@ -85,7 +85,7 @@
         validDD.getPortletInfo().setTitle(null);
         validDD.getPortletInfo().setShortTitle(null);
         validDD.getPortletInfo().setKeywords(null);
-        ResourceBundleFactory factory = new ResourceBundleFactory(validDD);
+        ResourceBundleFactory factory = new ResourceBundleFactory(validDD, validDD.getPortletInfo());
         ResourceBundle bundle = factory.getResourceBundle(Locale.getDefault());
 
         try {

Modified: portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/ContainerServicesImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/ContainerServicesImpl.java?rev=752107&r1=752106&r2=752107&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/ContainerServicesImpl.java
(original)
+++ portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/ContainerServicesImpl.java
Tue Mar 10 13:27:57 2009
@@ -19,10 +19,9 @@
 import javax.portlet.PortalContext;
 
 import org.apache.pluto.container.CCPPProfileService;
-import org.apache.pluto.container.ContainerInvocationService;
+import org.apache.pluto.container.EventCoordinationService;
 import org.apache.pluto.container.OptionalContainerServices;
 import org.apache.pluto.container.PortalCallbackService;
-import org.apache.pluto.container.PortletPreferencesService;
 import org.apache.pluto.container.RequiredContainerServices;
 import org.apache.pluto.core.PlutoContainerServices;
 import org.apache.pluto.driver.config.DriverConfiguration;
@@ -44,9 +43,9 @@
     public ContainerServicesImpl(PortalContext context,
                                  DriverConfiguration driverConfig,
                                  CCPPProfileService ccppProfileService,
-                                 ContainerInvocationService containerInvocation) 
+                                 EventCoordinationService  eventCoordinationService) 
     {
-        super(context, ccppProfileService, containerInvocation, driverConfig.getPortalCallbackService());
+        super(context, ccppProfileService, driverConfig.getPortalCallbackService(), eventCoordinationService);
         this.driverConfig = driverConfig;
     }
 

Modified: portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/PortalDriverServlet.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/PortalDriverServlet.java?rev=752107&r1=752106&r2=752107&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/PortalDriverServlet.java
(original)
+++ portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/PortalDriverServlet.java
Tue Mar 10 13:27:57 2009
@@ -31,6 +31,7 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.pluto.container.PortletContainer;
 import org.apache.pluto.container.PortletContainerException;
+import org.apache.pluto.container.driver.PlutoServices;
 import org.apache.pluto.container.om.portlet.PortletDefinition;
 import org.apache.pluto.driver.config.DriverConfiguration;
 import org.apache.pluto.driver.core.PortalRequestContext;
@@ -216,7 +217,7 @@
         }
 
 		String portletName = PortletWindowConfig.parsePortletName(portletID);
-		PortletDefinition portletDD = container.getOptionalContainerServices().getPortletRegistryService()
+		PortletDefinition portletDD = PlutoServices.getServices().getPortletRegistryService()
 								.getPortlet(applicationName, portletName);    		
 		Enumeration<String> parameterNames = request.getParameterNames();
 		if (parameterNames != null){



Mime
View raw message