portals-pluto-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r652758 [1/2] - in /portals/pluto/branches/2.0-spi-refactoring: pluto-container-api/src/main/java/org/apache/pluto/om/portlet/ pluto-container/src/main/java/org/apache/pluto/ pluto-container/src/main/java/org/apache/pluto/core/ pluto-contai...
Date Fri, 02 May 2008 04:13:51 GMT
Author: ate
Date: Thu May  1 21:13:47 2008
New Revision: 652758

URL: http://svn.apache.org/viewvc?rev=652758&view=rev
Log:
Big bang commit:
- dropping InternalPortletWindow and InternalPortletWindowImpl
- bringing back PortletEntity as PortletWindow member
- adding "parent" PortletApp reference to Portlet definition (set by JAXB)
- adding contextPath to PortletApp (to be set by PortletDescriptorRegistry)
- dropping PortletWindow.portletName as it is accessible from its PortletEntity member
- dropping usage of PortletWindow contextPath/ServletContext by delegating to PortletEntity->PortletDefinition->Application.contextPath
- dropping many no longer needed PortletContextManager usages for looking up Portlet/PortletApp model beans as these are directly accessible from PortletWindow->PortletEntity 

Removed:
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletWindow.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/InternalPortletWindowImpl.java
Modified:
    portals/pluto/branches/2.0-spi-refactoring/pluto-container-api/src/main/java/org/apache/pluto/om/portlet/Portlet.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container-api/src/main/java/org/apache/pluto/om/portlet/PortletApp.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/EventContainer.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/PortletContainer.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/PortletWindow.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletEnvironmentService.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletInfoService.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletInvokerService.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletPreferencesService.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/core/PortletContainerImpl.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/core/PortletContextManager.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletRequest.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletResponse.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/PortletEntity.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/ActionRequestImpl.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/ActionResponseImpl.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/BaseURLImpl.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/ClientDataRequestImpl.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/EventRequestImpl.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/EventResponseImpl.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/MimeResponseImpl.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletEntityImpl.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletPreferencesImpl.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletRequestImpl.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletResponseImpl.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletSessionImpl.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletURLImpl.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/RenderRequestImpl.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/RenderResponseImpl.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/ResourceRequestImpl.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/ResourceResponseImpl.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/ResourceURLImpl.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/StateAwareResponseImpl.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/spi/optional/PortletEnvironmentService.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/spi/optional/PortletInvokerService.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/test/java/org/apache/pluto/core/ContainerInvocationTest.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/test/java/org/apache/pluto/internal/impl/PortletRequestImplTest.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet/PortletAppDD.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet/PortletDD.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/EventProviderImpl.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLListenerImpl.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLProviderImpl.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletWindowThread.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/ResourceURLProviderImpl.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-portal-driver/src/main/java/org/apache/pluto/driver/PortalDriverFilter.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-portal-driver/src/main/java/org/apache/pluto/driver/PortalDriverServlet.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-portal-driver/src/main/java/org/apache/pluto/driver/core/PortletWindowImpl.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-portal-driver/src/main/java/org/apache/pluto/driver/core/ResourceURLProviderImpl.java
    portals/pluto/branches/2.0-spi-refactoring/pluto-portal-driver/src/main/java/org/apache/pluto/driver/tags/PortletTag.java

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container-api/src/main/java/org/apache/pluto/om/portlet/Portlet.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container-api/src/main/java/org/apache/pluto/om/portlet/Portlet.java?rev=652758&r1=652757&r2=652758&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container-api/src/main/java/org/apache/pluto/om/portlet/Portlet.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container-api/src/main/java/org/apache/pluto/om/portlet/Portlet.java Thu May  1 21:13:47 2008
@@ -45,6 +45,8 @@
 	 * @return the hash code for this instance.
 	 */
 	public abstract int hashCode();
+	
+	public PortletApp getApplication();
 
 	public abstract List<InitParam> getInitParams();
 

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container-api/src/main/java/org/apache/pluto/om/portlet/PortletApp.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container-api/src/main/java/org/apache/pluto/om/portlet/PortletApp.java?rev=652758&r1=652757&r2=652758&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container-api/src/main/java/org/apache/pluto/om/portlet/PortletApp.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container-api/src/main/java/org/apache/pluto/om/portlet/PortletApp.java Thu May  1 21:13:47 2008
@@ -20,6 +20,18 @@
 
 public interface PortletApp {
 
+    /**
+     * The contextPath for this Portlet (web) Application
+     * @return
+     */
+    public String getContextPath();
+    
+    /**
+     * Set the contextPath for this Portlet (web) Application
+     * @param contextPath
+     */
+    public void setContextPath(String contextPath);
+    
 	/**
 	 * Retrieve the portlets which exist within this application.
 	 * @return

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/EventContainer.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/EventContainer.java?rev=652758&r1=652757&r2=652758&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/EventContainer.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/EventContainer.java Thu May  1 21:13:47 2008
@@ -33,7 +33,7 @@
 	/**
      * Indicates that an event should be fired in the current request and calls
      * the processEvent method of this portlet.
-     * @param internalPortletWindow the portlet Window
+     * @param PortletWindow the portlet Window
      * @param request               the servlet request
      * @param response              the servlet response
 	 * @param eventNumber 

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/PortletContainer.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/PortletContainer.java?rev=652758&r1=652757&r2=652758&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/PortletContainer.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/PortletContainer.java Thu May  1 21:13:47 2008
@@ -69,7 +69,7 @@
 
     /**
      * Calls the render method of the given portlet window.
-     * @param internalPortletWindow the portlet Window
+     * @param portletWindow the portlet Window
      * @param request               the servlet request
      * @param response              the servlet response
      * @throws PortletException          if one portlet has trouble fulfilling
@@ -78,7 +78,7 @@
      * @throws PortletContainerException if the portlet container implementation
      *                                   has trouble fulfilling the request
      */
-    void doRender(PortletWindow internalPortletWindow,
+    void doRender(PortletWindow portletWindow,
                          HttpServletRequest request,
                          HttpServletResponse response)
         throws PortletException, IOException, PortletContainerException;
@@ -86,7 +86,7 @@
     /**
      * Indicates that a portlet resource Serving occured in the current request and calls
      * the processServeResource method of this portlet.
-     * @param internalPortletWindow the portlet Window
+     * @param portletWindow the portlet Window
      * @param request               the servlet request
      * @param response              the servlet response
      * @throws PortletException          if one portlet has trouble fulfilling
@@ -94,7 +94,7 @@
      * @throws PortletContainerException if the portlet container implementation
      *                                   has trouble fulfilling the request
      */
-    void doServeResource(PortletWindow internalPortletWindow,
+    void doServeResource(PortletWindow portletWindow,
                          HttpServletRequest request,
                          HttpServletResponse response)
         throws PortletException, IOException, PortletContainerException;
@@ -102,7 +102,7 @@
     /**
      * Indicates that a portlet action occured in the current request and calls
      * the processAction method of this portlet.
-     * @param internalPortletWindow the portlet Window
+     * @param portletWindow the portlet Window
      * @param request               the servlet request
      * @param response              the servlet response
      * @throws PortletException          if one portlet has trouble fulfilling
@@ -110,14 +110,14 @@
      * @throws PortletContainerException if the portlet container implementation
      *                                   has trouble fulfilling the request
      */
-    void doAction(PortletWindow internalPortletWindow,
+    void doAction(PortletWindow portletWindow,
                          HttpServletRequest request,
                          HttpServletResponse response)
         throws PortletException, IOException, PortletContainerException;
 
     /**
      * Indicates that the portlet must be initialized
-     * @param internalPortletWindow the portlet Window
+     * @param portletWindow the portlet Window
      * @param servletRequest        the servlet request
      * @param servletResponse       the servlet response
      * @throws PortletException          if one portlet has trouble fulfilling
@@ -125,7 +125,7 @@
      * @throws PortletContainerException if the portlet container implementation
      *                                   has trouble fulfilling the request
      */
-    void doLoad(PortletWindow internalPortletWindow,
+    void doLoad(PortletWindow portletWindow,
                        HttpServletRequest servletRequest,
                        HttpServletResponse servletResponse)
         throws PortletException, IOException, PortletContainerException;

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/PortletWindow.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/PortletWindow.java?rev=652758&r1=652757&r2=652758&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/PortletWindow.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/PortletWindow.java Thu May  1 21:13:47 2008
@@ -18,14 +18,14 @@
 
 import javax.portlet.PortletMode;
 import javax.portlet.WindowState;
-import org.apache.pluto.om.portlet.Portlet;
+
+import org.apache.pluto.internal.PortletEntity;
 
 /**
  * Thin representation of the portlet window for which the container
  * request should be processed.  The PortletWindow is used internally
  * to map the request to the configured Portlet Application and Portlet.
  *
- * @see org.apache.pluto.internal.impl.InternalPortletWindowImpl
  * @see org.apache.pluto.om.portlet.Portlet
  *
  * @version 1.0
@@ -41,19 +41,6 @@
     public PortletWindowID getId();
 
     /**
-     * Retrieve the context path in which the Portlet resides.
-     * @return context path
-     */
-    public String getContextPath();
-
-    /**
-     * Retrieve the name of the portlet as configured in the
-     * <code>portlet.xml</code>.
-     * @return the name of the portlet.
-     */
-    public String getPortletName();
-
-    /**
      * Retrieve the current window state for this window.
      * @return the current window state.
      */
@@ -65,4 +52,9 @@
      */
     public PortletMode getPortletMode();
 
+    /**
+     * Returns the portlet entity. The return value cannot be NULL.
+     * @return the portlet entity
+     */
+    public PortletEntity getPortletEntity();
 }

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletEnvironmentService.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletEnvironmentService.java?rev=652758&r1=652757&r2=652758&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletEnvironmentService.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletEnvironmentService.java Thu May  1 21:13:47 2008
@@ -21,9 +21,9 @@
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.pluto.PortletContainer;
+import org.apache.pluto.PortletWindow;
 import org.apache.pluto.internal.InternalActionRequest;
 import org.apache.pluto.internal.InternalActionResponse;
-import org.apache.pluto.internal.InternalPortletWindow;
 import org.apache.pluto.internal.InternalRenderRequest;
 import org.apache.pluto.internal.InternalRenderResponse;
 import org.apache.pluto.internal.InternalResourceRequest;
@@ -45,43 +45,43 @@
     public InternalActionRequest createActionRequest(PortletContainer container,
                                                      HttpServletRequest request,
                                                      HttpServletResponse response,
-                                                     InternalPortletWindow internalPortletWindow) {
-        return new ActionRequestImpl(container, internalPortletWindow, request);
+                                                     PortletWindow portletWindow) {
+        return new ActionRequestImpl(container, portletWindow, request);
     }
 
     public InternalActionResponse createActionResponse(PortletContainer container,
                                                        HttpServletRequest request,
                                                        HttpServletResponse response,
-                                                       InternalPortletWindow internalPortletWindow) {
-        return new ActionResponseImpl(container, internalPortletWindow, request, response);
+                                                       PortletWindow portletWindow) {
+        return new ActionResponseImpl(container, portletWindow, request, response);
     }
 
     public InternalRenderRequest createRenderRequest(PortletContainer container,
                                                      HttpServletRequest request,
                                                      HttpServletResponse response,
-                                                     InternalPortletWindow internalPortletWindow) {
-        return new RenderRequestImpl(container, internalPortletWindow, request);
+                                                     PortletWindow portletWindow) {
+        return new RenderRequestImpl(container, portletWindow, request);
     }
 
     public InternalRenderResponse createRenderResponse(PortletContainer container,
                                                        HttpServletRequest request,
                                                        HttpServletResponse response,
-                                                       InternalPortletWindow internalPortletWindow) {
-        return new RenderResponseImpl(container, internalPortletWindow, request, response);
+                                                       PortletWindow portletWindow) {
+        return new RenderResponseImpl(container, portletWindow, request, response);
     }
     
     public InternalResourceRequest createResourceRequest(PortletContainer container,
 											           HttpServletRequest request,
 											           HttpServletResponse response,
-											           InternalPortletWindow internalPortletWindow) {
-    	return new ResourceRequestImpl(container, internalPortletWindow, request);
+											           PortletWindow portletWindow) {
+    	return new ResourceRequestImpl(container, portletWindow, request);
 	}
 
 	public InternalResourceResponse createResourceResponse(PortletContainer container,
 										              HttpServletRequest request,
 										              HttpServletResponse response,
-										              InternalPortletWindow internalPortletWindow) {
-		return new ResourceResponseImpl(container, internalPortletWindow, request, response);
+										              PortletWindow portletWindow) {
+		return new ResourceResponseImpl(container, portletWindow, request, response);
 	}
 
 

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletInfoService.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletInfoService.java?rev=652758&r1=652757&r2=652758&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletInfoService.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletInfoService.java Thu May  1 21:13:47 2008
@@ -18,38 +18,25 @@
 package org.apache.pluto.core;
 
 import org.apache.pluto.PortletWindow;
-import org.apache.pluto.internal.InternalPortletWindow;
-import org.apache.pluto.om.portlet.Portlet;
+import org.apache.pluto.om.portlet.PortletInfo;
 import org.apache.pluto.spi.optional.PortletInfoService;
 
 
 public class DefaultPortletInfoService implements PortletInfoService {
 
     public String getTitle(PortletWindow window) {
-        if (window instanceof InternalPortletWindow) {
-            return getPortletDefinition((InternalPortletWindow) window)
-                .getPortletInfo().getTitle();
-        }
-        return null;
+        return getPortletInfo(window).getTitle();
     }
 
     public String getShortTitle(PortletWindow window) {
-        if (window instanceof InternalPortletWindow) {
-            return getPortletDefinition((InternalPortletWindow) window)
-                .getPortletInfo().getShortTitle();
-        }
-        return null;
+        return getPortletInfo(window).getShortTitle();
     }
 
     public String getKeywords(PortletWindow window) {
-        if (window instanceof InternalPortletWindow) {
-            return getPortletDefinition((InternalPortletWindow) window)
-                .getPortletInfo().getKeywords();
-        }
-        return null;
+        return getPortletInfo(window).getKeywords();
     }
 
-    private Portlet getPortletDefinition(InternalPortletWindow window) {
-        return window.getPortletEntity().getPortletDefinition();
+    private PortletInfo getPortletInfo(PortletWindow window) {
+        return window.getPortletEntity().getPortletDefinition().getPortletInfo();
     }
 }
\ No newline at end of file

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletInvokerService.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletInvokerService.java?rev=652758&r1=652757&r2=652758&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletInvokerService.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletInvokerService.java Thu May  1 21:13:47 2008
@@ -38,7 +38,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.pluto.Constants;
-import org.apache.pluto.internal.InternalPortletWindow;
+import org.apache.pluto.PortletWindow;
 import org.apache.pluto.internal.impl.PortletRequestImpl;
 import org.apache.pluto.internal.impl.PortletResponseImpl;
 import org.apache.pluto.spi.FilterManager;
@@ -65,11 +65,16 @@
 
     // Private Member Variables ------------------------------------------------
 
+    /** URI prefix of the portlet invoker servlet.
+     *  TODO: this is Pluto Portal Driver specific!
+     * */
+    private static final String PREFIX = "/PlutoInvoker/";
+    
     // Constructor -------------------------------------------------------------
 
     /**
      * Default Constructor.  Create a new invoker which
-     * is initialized for the given <code>InternalPortletWindow</code>.
+     * is initialized for the given <code>PortletWindow</code>.
      */
     public DefaultPortletInvokerService() {
     }
@@ -84,12 +89,12 @@
      * @see PortletServlet
      * @see javax.portlet.Portlet#processAction(javax.portlet.ActionRequest,javax.portlet.ActionResponse)
      */
-    public void action(ActionRequest request, ActionResponse response, InternalPortletWindow window, FilterManager filterManager)
+    public void action(ServletContext containerContext, ActionRequest request, ActionResponse response, PortletWindow window, FilterManager filterManager)
         throws IOException, PortletException {
         if (LOG.isDebugEnabled()) {
             LOG.debug("Performing Action Invocation");
         }
-        invoke(request, response, window, filterManager, Constants.METHOD_ACTION);
+        invoke(containerContext, request, response, window, filterManager, Constants.METHOD_ACTION);
     }
 
     /**
@@ -100,12 +105,12 @@
      * @see PortletServlet
      * @see javax.portlet.Portlet#render(javax.portlet.RenderRequest,javax.portlet.RenderResponse)
      */
-    public void render(RenderRequest request, RenderResponse response, InternalPortletWindow window, FilterManager filterManager)
+    public void render(ServletContext containerContext, RenderRequest request, RenderResponse response, PortletWindow window, FilterManager filterManager)
         throws IOException, PortletException {
         if (LOG.isDebugEnabled()) {
             LOG.debug("Performing Render Invocation");
         }
-        invoke(request, response, window, filterManager, Constants.METHOD_RENDER);
+        invoke(containerContext, request, response, window, filterManager, Constants.METHOD_RENDER);
     }
     
     /**
@@ -116,12 +121,12 @@
      * @see PortletServlet
      * @see javax.portlet.Portlet#render(javax.portlet.RenderRequest,javax.portlet.RenderResponse)
      */
-    public void event(EventRequest request, EventResponse response, InternalPortletWindow window, FilterManager filterManager)
+    public void event(ServletContext containerContext, EventRequest request, EventResponse response, PortletWindow window, FilterManager filterManager)
         throws IOException, PortletException {
         if (LOG.isDebugEnabled()) {
             LOG.debug("Performing Render Invocation");
         }
-        invoke((PortletRequest)request, (PortletResponse)response, window, filterManager, Constants.METHOD_EVENT);
+        invoke(containerContext, (PortletRequest)request, (PortletResponse)response, window, filterManager, Constants.METHOD_EVENT);
     }
     
     /**
@@ -132,12 +137,12 @@
      * @see PortletServlet
      * @see javax.portlet.Portlet#resource(javax.portlet.ResourceRequest,javax.portlet.ResourceResponse)
      */
-    public void serveResource(ResourceRequest request, ResourceResponse response, InternalPortletWindow window, FilterManager filterManager)
+    public void serveResource(ServletContext containerContext, ResourceRequest request, ResourceResponse response, PortletWindow window, FilterManager filterManager)
         throws IOException, PortletException {
         if (LOG.isDebugEnabled()) {
             LOG.debug("Performing Resource Invocation");
         }
-        invoke(request, response, window, filterManager, Constants.METHOD_RESOURCE);
+        invoke(containerContext, request, response, window, filterManager, Constants.METHOD_RESOURCE);
     }
 
     /**
@@ -147,32 +152,32 @@
      * @param response action response used for the invocation.
      * @see PortletServlet
      */
-    public void load(PortletRequest request, PortletResponse response, InternalPortletWindow window)
+    public void load(ServletContext containerContext, PortletRequest request, PortletResponse response, PortletWindow window)
         throws IOException, PortletException {
         if (LOG.isDebugEnabled()) {
             LOG.debug("Performing Load Invocation.");
         }
-        invoke(request, response, window, Constants.METHOD_NOOP);
+        invoke(containerContext, request, response, window, Constants.METHOD_NOOP);
     }
 
-    public void admin(PortletRequest request, PortletResponse response, InternalPortletWindow window)
+    public void admin(ServletContext containerContext, PortletRequest request, PortletResponse response, PortletWindow window)
         throws IOException, PortletException {
         if (LOG.isDebugEnabled()) {
             LOG.debug("Performing Admin Invocation.");
         }
 
-        invoke(request, response, window, Constants.METHOD_ADMIN);
+        invoke(containerContext, request, response, window, Constants.METHOD_ADMIN);
     }
 
     // Private Invoke Method ---------------------------------------------------
 
-    private final void invoke(PortletRequest request,
+    private final void invoke(ServletContext containerContext, PortletRequest request,
                                 PortletResponse response,
-                                InternalPortletWindow portletWindow,
+                                PortletWindow portletWindow,
                                 Integer methodID)
     	throws PortletException, IOException{
     	
-    	invoke(request, response, portletWindow, null, methodID);
+    	invoke(containerContext, request, response, portletWindow, null, methodID);
     }
     
     /**
@@ -185,20 +190,19 @@
      * @throws PortletException if a portlet exception occurs.
      * @throws IOException      if an error occurs writing to the response.
      */
-    protected final void invoke(PortletRequest request,
+    protected final void invoke(ServletContext containerContext, PortletRequest request,
                                 PortletResponse response,
-                                InternalPortletWindow portletWindow,
+                                PortletWindow portletWindow,
                                 FilterManager filterManager,
                                 Integer methodID)
         throws PortletException, IOException {
 
-        String uri = portletWindow.getPortletEntity().getControllerServletUri();
+        String uri =  PREFIX + portletWindow.getPortletEntity().getPortletDefinition().getPortletName();
         if (LOG.isDebugEnabled()) {
             LOG.debug("Dispatching to portlet servlet at: " + uri);
         }
 
-        ServletContext servletContext = portletWindow.getServletContext();
-        RequestDispatcher dispatcher = servletContext.getRequestDispatcher(uri);
+        RequestDispatcher dispatcher = containerContext.getRequestDispatcher(uri);
 
         if (dispatcher != null) {
             try {
@@ -251,7 +255,7 @@
         } else {
             String msg = EXCEPTIONS.getString(
                 "error.portlet.invoker.dispatcher",
-                new String[]{servletContext.getServletContextName(), uri}
+                new String[]{containerContext.getServletContextName(), uri}
             );
             if (LOG.isErrorEnabled()) {
                 LOG.error(msg);

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletPreferencesService.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletPreferencesService.java?rev=652758&r1=652757&r2=652758&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletPreferencesService.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletPreferencesService.java Thu May  1 21:13:47 2008
@@ -137,7 +137,7 @@
                                    PortletRequest request) {
     	StringBuffer buffer = new StringBuffer();
     	buffer.append("user=").append(request.getRemoteUser()).append(";");
-    	buffer.append("portletName=").append(portletWindow.getPortletName());
+    	buffer.append("portletName=").append(portletWindow.getPortletEntity().getPortletDefinition().getPortletName());
     	return buffer.toString();
     }
 

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/core/PortletContainerImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/core/PortletContainerImpl.java?rev=652758&r1=652757&r2=652758&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/core/PortletContainerImpl.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/core/PortletContainerImpl.java Thu May  1 21:13:47 2008
@@ -45,15 +45,14 @@
 import org.apache.pluto.internal.InternalActionResponse;
 import org.apache.pluto.internal.InternalPortletRequest;
 import org.apache.pluto.internal.InternalPortletResponse;
-import org.apache.pluto.internal.InternalPortletWindow;
 import org.apache.pluto.internal.InternalRenderRequest;
 import org.apache.pluto.internal.InternalRenderResponse;
 import org.apache.pluto.internal.InternalResourceRequest;
 import org.apache.pluto.internal.InternalResourceResponse;
 import org.apache.pluto.internal.PortletDescriptorRegistry;
+import org.apache.pluto.internal.PortletEntity;
 import org.apache.pluto.internal.impl.EventRequestImpl;
 import org.apache.pluto.internal.impl.EventResponseImpl;
-import org.apache.pluto.internal.impl.InternalPortletWindowImpl;
 import org.apache.pluto.internal.impl.PortletRequestImpl;
 import org.apache.pluto.internal.impl.PortletResponseImpl;
 import org.apache.pluto.internal.impl.StateAwareResponseImpl;
@@ -172,39 +171,34 @@
     	
     	ensureInitialized();
     	
-        InternalPortletWindow internalPortletWindow =
-        	new InternalPortletWindowImpl(
-		                    PortletContextManager.getPortletContext(servletContext,
-		                        portletWindow.getContextPath()),
-		                    portletWindow);
         debugWithName("Render request received for portlet: "
-        		+ portletWindow.getPortletName());
+        		+ portletWindow.getPortletEntity().getPortletDefinition().getPortletName());
         
         InternalRenderRequest renderRequest = getOptionalContainerServices().getPortletEnvironmentService()
-            .createRenderRequest(this, request, response, internalPortletWindow);
+            .createRenderRequest(this, request, response, portletWindow);
 
         InternalRenderResponse renderResponse = getOptionalContainerServices().getPortletEnvironmentService()
-            .createRenderResponse(this, request, response, internalPortletWindow);
+            .createRenderResponse(this, request, response, portletWindow);
 
         PortletInvokerService invoker = optionalContainerServices.getPortletInvokerService();
 
         try {
-            ContainerInvocation.setInvocation(this, internalPortletWindow);
+            ContainerInvocation.setInvocation(this, portletWindow);
             //Filter initialisation
-            FilterManager filterManager = filterInitialisation(internalPortletWindow,PortletRequest.RENDER_PHASE);
-            invoker.render(renderRequest, renderResponse, internalPortletWindow, filterManager);
+            FilterManager filterManager = filterInitialisation(portletWindow,PortletRequest.RENDER_PHASE);
+            invoker.render(servletContext, renderRequest, renderResponse, portletWindow, filterManager);
         } finally {
             ContainerInvocation.clearInvocation();
         }
         
         debugWithName("Portlet rendered for: "
-        		+ portletWindow.getPortletName());
+        		+ portletWindow.getPortletEntity().getPortletDefinition().getPortletName());
     }
 
     /**
      * Indicates that a portlet resource Serving occured in the current request and calls
      * the processServeResource method of this portlet.
-     * @param internalPortletWindow the portlet Window
+     * @param PortletWindow the portlet Window
      * @param request               the servlet request
      * @param response              the servlet response
      * @throws PortletException          if one portlet has trouble fulfilling
@@ -219,32 +213,27 @@
 		
     	ensureInitialized();
     	
-        InternalPortletWindow internalPortletWindow =
-        	new InternalPortletWindowImpl(
-                    PortletContextManager.getPortletContext(servletContext,
-                        portletWindow.getContextPath()),
-                    portletWindow);
         debugWithName("Resource request received for portlet: "
-        		+ portletWindow.getPortletName());
+        		+ portletWindow.getPortletEntity().getPortletDefinition().getPortletName());
         
         InternalResourceRequest resourceRequest = getOptionalContainerServices().getPortletEnvironmentService()
-            .createResourceRequest(this, request, response, internalPortletWindow);
+            .createResourceRequest(this, request, response, portletWindow);
 
         InternalResourceResponse resourceResponse = getOptionalContainerServices().getPortletEnvironmentService()
-            .createResourceResponse(this, request, response, internalPortletWindow);
+            .createResourceResponse(this, request, response, portletWindow);
 
         PortletInvokerService invoker = optionalContainerServices.getPortletInvokerService();
 
         try {
-            ContainerInvocation.setInvocation(this, internalPortletWindow);
-            FilterManager filterManager = filterInitialisation(internalPortletWindow,PortletRequest.RESOURCE_PHASE);
-            invoker.serveResource(resourceRequest, resourceResponse, internalPortletWindow, filterManager);
+            ContainerInvocation.setInvocation(this, portletWindow);
+            FilterManager filterManager = filterInitialisation(portletWindow,PortletRequest.RESOURCE_PHASE);
+            invoker.serveResource(servletContext, resourceRequest, resourceResponse, portletWindow, filterManager);
         } finally {
             ContainerInvocation.clearInvocation();
         }
         
         debugWithName("Portlet resource for: "
-        		+ portletWindow.getPortletName());
+        		+ portletWindow.getPortletEntity().getPortletDefinition().getPortletName());
 	}
     
     /**
@@ -265,35 +254,30 @@
     	
     	ensureInitialized();
     	
-        InternalPortletWindow internalPortletWindow =
-        	new InternalPortletWindowImpl(
-                    PortletContextManager.getPortletContext(servletContext,
-                        portletWindow.getContextPath()), portletWindow);
-
         debugWithName("Action request received for portlet: "
-    			+ portletWindow.getPortletName());
+    			+ portletWindow.getPortletEntity().getPortletDefinition().getPortletName());
     	
         InternalActionRequest actionRequest = getOptionalContainerServices().getPortletEnvironmentService()
-            .createActionRequest(this, request, response, internalPortletWindow);
+            .createActionRequest(this, request, response, portletWindow);
 
         InternalActionResponse actionResponse = getOptionalContainerServices().getPortletEnvironmentService()
-            .createActionResponse(this, request, response, internalPortletWindow);
+            .createActionResponse(this, request, response, portletWindow);
 
         PortletInvokerService invoker = optionalContainerServices.getPortletInvokerService();
 
         try {
-            ContainerInvocation.setInvocation(this, internalPortletWindow);
-            FilterManager filterManager = filterInitialisation(internalPortletWindow,PortletRequest.ACTION_PHASE);
-            invoker.action(actionRequest, actionResponse, internalPortletWindow, filterManager);
+            ContainerInvocation.setInvocation(this, portletWindow);
+            FilterManager filterManager = filterInitialisation(portletWindow,PortletRequest.ACTION_PHASE);
+            invoker.action(servletContext, actionRequest, actionResponse, portletWindow, filterManager);
         }
         finally {
             ContainerInvocation.clearInvocation();
         }
 
         debugWithName("Portlet action processed for: "
-        		+ portletWindow.getPortletName());
+        		+ portletWindow.getPortletEntity().getPortletDefinition().getPortletName());
         
-        PortletURLProvider portletURLProvider = requiredContainerServices.getPortalCallbackService().getPortletURLProvider(request, internalPortletWindow);
+        PortletURLProvider portletURLProvider = requiredContainerServices.getPortalCallbackService().getPortletURLProvider(request, portletWindow);
         
         portletURLProvider.savePortalURL(request);
         saveChangedParameters((PortletRequest)actionRequest, (StateAwareResponseImpl)actionResponse, portletURLProvider);
@@ -311,7 +295,7 @@
         	debugWithName("No redirect location specified.");
             PortletURLProvider redirectURL = requiredContainerServices
             		.getPortalCallbackService()
-            		.getPortletURLProvider(request, internalPortletWindow);
+            		.getPortletURLProvider(request, portletWindow);
             
             saveChangedParameters((PortletRequest)actionRequest, (StateAwareResponseImpl)actionResponse, redirectURL);
             
@@ -341,34 +325,28 @@
     	
     	ensureInitialized();
     	
-        InternalPortletWindow internalPortletWindow =
-        		new InternalPortletWindowImpl(
-                    PortletContextManager.getPortletContext(servletContext,
-                        portletWindow.getContextPath()),
-                    portletWindow);
-
         debugWithName("Load request received for portlet: "
-        		+ portletWindow.getPortletName());
+        		+ portletWindow.getPortletEntity().getPortletDefinition().getPortletName());
         
 
         InternalRenderRequest renderRequest =
             getOptionalContainerServices().getPortletEnvironmentService()
-                .createRenderRequest(this, request, response, internalPortletWindow);
+                .createRenderRequest(this, request, response, portletWindow);
 
         InternalRenderResponse renderResponse =
             getOptionalContainerServices().getPortletEnvironmentService()
-                .createRenderResponse(this, request, response, internalPortletWindow);
+                .createRenderResponse(this, request, response, portletWindow);
 
         PortletInvokerService invoker = optionalContainerServices.getPortletInvokerService();
 
         try {
-            ContainerInvocation.setInvocation(this, internalPortletWindow);
-            invoker.load(renderRequest, renderResponse, internalPortletWindow);
+            ContainerInvocation.setInvocation(this, portletWindow);
+            invoker.load(servletContext, renderRequest, renderResponse, portletWindow);
         } finally {
             ContainerInvocation.clearInvocation();
         }
 
-        debugWithName("Portlet loaded for: " + portletWindow.getPortletName());
+        debugWithName("Portlet loaded for: " + portletWindow.getPortletEntity().getPortletDefinition().getPortletName());
     }
     
 
@@ -378,26 +356,21 @@
     throws PortletException, IOException, PortletContainerException {
         ensureInitialized();
 
-        InternalPortletWindow internalPortletWindow =
-            new InternalPortletWindowImpl(
-                PortletContextManager.getPortletContext(servletContext,
-                    portletWindow.getContextPath()), portletWindow);
-
         debugWithName("Admin request received for portlet: "
-            +portletWindow.getPortletName());
+            +portletWindow.getPortletEntity().getPortletDefinition().getPortletName());
 
         InternalPortletRequest internalRequest =
-            new AdminRequest(this, internalPortletWindow, servletRequest) { };
+            new AdminRequest(this, portletWindow, servletRequest) { };
 
         InternalPortletResponse internalResponse =
-            new AdminResponse(this, internalPortletWindow, servletRequest, servletResponse);
+            new AdminResponse(this, portletWindow, servletRequest, servletResponse);
 
         PortletInvokerService invoker =
             optionalContainerServices.getPortletInvokerService();
 
         try {
-            ContainerInvocation.setInvocation(this, internalPortletWindow);
-            invoker.admin(internalRequest, internalResponse, internalPortletWindow);
+            ContainerInvocation.setInvocation(this, portletWindow);
+            invoker.admin(servletContext, internalRequest, internalResponse, portletWindow);
         } finally {
             ContainerInvocation.clearInvocation();
         }
@@ -487,35 +460,28 @@
 
     	ensureInitialized();
 
-    	InternalPortletWindow internalPortletWindow = new InternalPortletWindowImpl(
-                PortletContextManager.getPortletContext(servletContext,
-                		window.getContextPath()), window);
-//    	InternalPortletWindow internalPortletWindow =
-//    		new PortletWindowImpl(servletContext, window);
     	debugWithName("Event request received for portlet: "
-    			+ window.getPortletName());
+    			+ window.getPortletEntity().getPortletDefinition().getPortletName());
 
     	EventRequestImpl eventRequest = new EventRequestImpl(
-    			this, internalPortletWindow, request, event);
+    			this, window, request, event);
     	EventResponseImpl eventResponse = new EventResponseImpl(
-    			this, internalPortletWindow, request, response);
+    			this, window, request, response);
 
     	
     	PortletInvokerService invoker = optionalContainerServices.getPortletInvokerService();
 
         try {
-            ContainerInvocation.setInvocation(this, internalPortletWindow);
-            FilterManager filterManager = filterInitialisation(internalPortletWindow,PortletRequest.EVENT_PHASE);
-            invoker.event(eventRequest, eventResponse, internalPortletWindow, filterManager);
+            ContainerInvocation.setInvocation(this, window);
+            FilterManager filterManager = filterInitialisation(window,PortletRequest.EVENT_PHASE);
+            invoker.event(servletContext, eventRequest, eventResponse, window, filterManager);
         }
         finally {
             ContainerInvocation.clearInvocation();
         }
-//    	PortletInvoker invoker = new PortletInvoker(internalPortletWindow);
-//    	invoker.event(eventRequest, eventResponse);
 
     	debugWithName("Portlet event processed for: "
-    			+ window.getPortletName());
+    			+ window.getPortletEntity().getPortletDefinition().getPortletName());
 
     	// After processing event, change the redirect URL for rendering.
     	String location = eventResponse.getRedirectLocation();
@@ -526,7 +492,7 @@
     		debugWithName("No redirect location specified.");
     		PortletURLProvider redirectURL = requiredContainerServices
     		.getPortalCallbackService()
-    		.getPortletURLProvider(request, internalPortletWindow);
+    		.getPortletURLProvider(request, window);
 
     		saveChangedParameters(eventRequest, eventResponse, redirectURL);
 
@@ -642,24 +608,22 @@
 	
 	/**
 	 * The method initialise the FilterManager for later use in the PortletServlet
-	 * @param internalPortletWindow the InternalPortletWindow
+	 * @param PortletWindow the PortletWindow
 	 * @param lifeCycle like ACTION_PHASE, RENDER_PHASE,...
 	 * @return FilterManager
 	 * @throws PortletContainerException
 	 */
-	private FilterManager filterInitialisation(InternalPortletWindow internalPortletWindow,String lifeCycle) throws PortletContainerException{
-    	PortletApp portletAppDD = getOptionalContainerServices().getPortletRegistryService().getPortletApplicationDescriptor(internalPortletWindow.getContextPath());
-        String portletName = internalPortletWindow.getPortletName();
-        
-        return requiredContainerServices.getPortalCallbackService().getFilterManager(portletAppDD,portletName,lifeCycle);
+	private FilterManager filterInitialisation(PortletWindow portletWindow,String lifeCycle) throws PortletContainerException{
+	    PortletEntity pe = portletWindow.getPortletEntity();
+        return requiredContainerServices.getPortalCallbackService().getFilterManager(pe.getPortletDefinition().getApplication(),pe.getPortletDefinition().getPortletName(),lifeCycle);
     }
 	
 	class AdminRequest extends PortletRequestImpl {
 
         public AdminRequest(PortletContainer container,
-                            InternalPortletWindow internalPortletWindow,
+                            PortletWindow portletWindow,
                             HttpServletRequest servletRequest) {
-            super(container, internalPortletWindow, servletRequest);
+            super(container, portletWindow, servletRequest);
         }
 
         public PortletPreferences getPreferences() {
@@ -670,10 +634,10 @@
     class AdminResponse extends PortletResponseImpl {
 
         public AdminResponse(PortletContainer container,
-                             InternalPortletWindow internalPortletWindow,
+                             PortletWindow portletWindow,
                              HttpServletRequest servletRequest,
                              HttpServletResponse servletResponse) {
-            super(container, internalPortletWindow, servletRequest, servletResponse);
+            super(container, portletWindow, servletRequest, servletResponse);
         }
     }
 }

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/core/PortletContextManager.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/core/PortletContextManager.java?rev=652758&r1=652757&r2=652758&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/core/PortletContextManager.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/core/PortletContextManager.java Thu May  1 21:13:47 2008
@@ -159,6 +159,7 @@
 
             PortletApp portletAppDD = PortletDescriptorRegistry.getRegistry()
                 .getPortletAppDD(servletContext);
+            portletAppDD.setContextPath(applicationId);
 
             PortletContextImpl portletContext = new PortletContextImpl(
                 applicationId, servletContext, portletAppDD);

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletRequest.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletRequest.java?rev=652758&r1=652757&r2=652758&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletRequest.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletRequest.java Thu May  1 21:13:47 2008
@@ -21,6 +21,7 @@
 import javax.servlet.http.HttpServletRequest;
 
 import org.apache.pluto.PortletContainer;
+import org.apache.pluto.PortletWindow;
 
 /**
  * The internal portlet request interface extends PortletRequest and adds
@@ -46,7 +47,7 @@
      */
     public void release();
 
-    public InternalPortletWindow getInternalPortletWindow();
+    public PortletWindow getPortletWindow();
 
     public PortletContainer getPortletContainer();
 

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletResponse.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletResponse.java?rev=652758&r1=652757&r2=652758&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletResponse.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletResponse.java Thu May  1 21:13:47 2008
@@ -18,6 +18,8 @@
 
 import javax.portlet.PortletResponse;
 
+import org.apache.pluto.PortletWindow;
+
 /**
  * The internal portlet response interface extends PortletResponse and adds
  * some methods used by Pluto.
@@ -25,7 +27,7 @@
  */
 public interface InternalPortletResponse extends PortletResponse {
 
-    public InternalPortletWindow getInternalPortletWindow();
+    public PortletWindow getPortletWindow();
     
 
     /**

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/PortletEntity.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/PortletEntity.java?rev=652758&r1=652757&r2=652758&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/PortletEntity.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/PortletEntity.java Thu May  1 21:13:47 2008
@@ -32,18 +32,6 @@
 public interface PortletEntity {
 
     /**
-     * Returns the URI to the controller servlet that wraps this portlet.
-     * <p>
-     * Note: this method has been deprecated as of Pluto 1.1.2.  Future versions 
-     * of Pluto will use the <code>PortletInvokerService</code> for resolving
-     * the invoker url pattern.
-     * 
-     * @return the URI to the controller servlet that wraps this portlet.
-     * @deprecated
-     */
-    public String getControllerServletUri();
-
-    /**
      * Returns an array of default preferences of this portlet. The default
      * preferences are retrieved from the portlet application descriptor.
      * <p>

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/ActionRequestImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/ActionRequestImpl.java?rev=652758&r1=652757&r2=652758&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/ActionRequestImpl.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/ActionRequestImpl.java Thu May  1 21:13:47 2008
@@ -28,8 +28,8 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.pluto.Constants;
 import org.apache.pluto.PortletContainer;
+import org.apache.pluto.PortletWindow;
 import org.apache.pluto.internal.InternalActionRequest;
-import org.apache.pluto.internal.InternalPortletWindow;
 
 /**
  * Implementation of the <code>javax.portlet.ActionRequest</code> interface.
@@ -50,11 +50,11 @@
     // Constructor -------------------------------------------------------------
 
     public ActionRequestImpl(PortletContainer container,
-                             InternalPortletWindow internalPortletWindow,
+                             PortletWindow portletWindow,
                              HttpServletRequest servletRequest) {
-        super(container, internalPortletWindow, servletRequest);
+        super(container, portletWindow, servletRequest);
         if (LOG.isDebugEnabled()) {
-        	LOG.debug("Created action request for: " + internalPortletWindow);
+        	LOG.debug("Created action request for: " + portletWindow);
         }
     }
 
@@ -71,7 +71,7 @@
         if (portletPreferences == null) {
             portletPreferences = new PortletPreferencesImpl(
             		getPortletContainer(),
-            		getInternalPortletWindow(),
+            		getPortletWindow(),
             		this,
             		Constants.METHOD_ACTION);
         }
@@ -83,7 +83,7 @@
 	}
 
 	public Cookie[] getCookieProperties() {
-		return container.getRequiredContainerServices().getPortalCallbackService().getRequestPropertyCookie(getHttpServletRequest(), internalPortletWindow);
+		return container.getRequiredContainerServices().getPortalCallbackService().getRequestPropertyCookie(getHttpServletRequest(), portletWindow);
 	}
 	/////////////////////////////////////////////////////////////////////////////////////////
 	//for RequestDispatcher include and forward 

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/ActionResponseImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/ActionResponseImpl.java?rev=652758&r1=652757&r2=652758&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/ActionResponseImpl.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/ActionResponseImpl.java Thu May  1 21:13:47 2008
@@ -30,8 +30,8 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.pluto.PortletContainer;
+import org.apache.pluto.PortletWindow;
 import org.apache.pluto.internal.InternalActionResponse;
-import org.apache.pluto.internal.InternalPortletWindow;
 import org.apache.pluto.spi.ResourceURLProvider;
 
 public class ActionResponseImpl extends StateAwareResponseImpl
@@ -41,10 +41,10 @@
     private static final Log LOG = LogFactory.getLog(ActionResponseImpl.class);
 
     public ActionResponseImpl(PortletContainer container,
-                              InternalPortletWindow internalPortletWindow,
+                              PortletWindow portletWindow,
                               HttpServletRequest servletRequest,
                               HttpServletResponse servletResponse) {
-        super(container, internalPortletWindow, servletRequest,
+        super(container, portletWindow, servletRequest,
               servletResponse);
     }
 
@@ -67,7 +67,7 @@
 
             ResourceURLProvider provider = super.callback.getResourceURLProvider(
                             getHttpServletRequest(),
-                            getInternalPortletWindow()
+                            getPortletWindow()
             );
 
             if (location.indexOf("://") != -1) {

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/BaseURLImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/BaseURLImpl.java?rev=652758&r1=652757&r2=652758&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/BaseURLImpl.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/BaseURLImpl.java Thu May  1 21:13:47 2008
@@ -37,7 +37,7 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.pluto.PortletContainer;
 import org.apache.pluto.PortletContainerException;
-import org.apache.pluto.internal.InternalPortletWindow;
+import org.apache.pluto.PortletWindow;
 import org.apache.pluto.om.portlet.Portlet;
 import org.apache.pluto.om.portlet.PortletApp;
 import org.apache.pluto.om.portlet.Supports;
@@ -62,7 +62,7 @@
 	protected boolean secure;
 	protected PortletContainer container;
 	protected PortletMode mode = null;
-	protected InternalPortletWindow internalPortletWindow;
+	protected PortletWindow portletWindow;
 	protected javax.servlet.http.HttpServletRequest servletRequest;
 	protected javax.servlet.http.HttpServletResponse servletResponse;
 	protected WindowState state;
@@ -71,12 +71,12 @@
 	protected PortalContext context;
 	
 	public BaseURLImpl(PortletContainer container,
-			InternalPortletWindow internalPortletWindow,
+			PortletWindow portletWindow,
 			javax.servlet.http.HttpServletRequest servletRequest,
 			javax.servlet.http.HttpServletResponse servletResponse,
 			boolean isAction, boolean isResourceServing) {
 		this.container = container;
-		this.internalPortletWindow = internalPortletWindow;
+		this.portletWindow = portletWindow;
 		this.servletRequest = servletRequest;
 		this.servletResponse = servletResponse;
 		secure = servletRequest.isSecure();
@@ -105,7 +105,7 @@
 	        throw new IllegalArgumentException(
 	            "name and value must not be null");
 	    }
-	    List<String> publicRenderParameterNames = internalPortletWindow.getPortletEntity().getPortletDefinition().getPublicRenderParameter();
+	    List<String> publicRenderParameterNames = portletWindow.getPortletEntity().getPortletDefinition().getPublicRenderParameter();
 	    if (publicRenderParameterNames == null){
 	    	parameters.put(name, new String[]{value});
 	    }
@@ -124,7 +124,7 @@
 	        throw new IllegalArgumentException(
 	        	"name and values must not be null or values be an empty array");
 	    }
-		List<String> publicRenderParameterNames = internalPortletWindow.getPortletEntity().getPortletDefinition().getPublicRenderParameter();
+		List<String> publicRenderParameterNames = portletWindow.getPortletEntity().getPortletDefinition().getPublicRenderParameter();
 	    
 		if (publicRenderParameterNames == null){
 			parameters.put(name, StringUtils.copy(values));
@@ -160,7 +160,7 @@
         
         this.parameters.clear();
         this.publicRenderParameters.clear();
-        List<String> publicPortletRenderParameterNames = internalPortletWindow.getPortletEntity().getPortletDefinition().getPublicRenderParameter();
+        List<String> publicPortletRenderParameterNames = portletWindow.getPortletEntity().getPortletDefinition().getPublicRenderParameter();
         if (parameters.keySet()!= null){
         	for (Object key : parameters.keySet()) {
         		if (publicPortletRenderParameterNames == null)
@@ -182,7 +182,7 @@
         PortletURLProvider urlProvider = container
         		.getRequiredContainerServices()
         		.getPortalCallbackService()
-        		.getPortletURLProvider(servletRequest, internalPortletWindow);
+        		.getPortletURLProvider(servletRequest, portletWindow);
         if(urlProvider.isSecureSupported()) {
             throw new PortletSecurityException("Secure URLs not supported.");
         }
@@ -194,7 +194,7 @@
 	    PortletURLProvider urlProvider = container
 	    		.getRequiredContainerServices()
 	    		.getPortalCallbackService()
-	    		.getPortletURLProvider(servletRequest, internalPortletWindow);
+	    		.getPortletURLProvider(servletRequest, portletWindow);
 	
 	    PortletURLListener portletURLFilterListener = portletURLFilterListener = container
 			.getRequiredContainerServices()
@@ -211,16 +211,10 @@
 	    else if (isResourceServing){
 	    	urlProvider.setResourceServing(true);
 	    }
-	    try {
-	    	
-	    	PortletApp portletAppDD = container.getPortletApplicationDescriptor(internalPortletWindow.getContextPath());  
-//	    	container.getOptionalContainerServices().getPortletRegistryService().getRegisteredPortletApplications()
-//			PortletAppDD portletAppDD = container.getPortletApplicationDescriptor(  );
-			portletURLFilterListener.callListener(portletAppDD,this,isAction,isResourceServing);
-		} catch (PortletContainerException e1) {
-			e1.printStackTrace();
-		}
-        
+        PortletApp portletAppDD = portletWindow.getPortletEntity().getPortletDefinition().getApplication();  
+//      container.getOptionalContainerServices().getPortletRegistryService().getRegisteredPortletApplications()
+//      PortletAppDD portletAppDD = container.getPortletApplicationDescriptor(  );
+        portletURLFilterListener.callListener(portletAppDD,this,isAction,isResourceServing);
 	    
         if (secure && urlProvider.isSecureSupported()) {
             try {
@@ -284,7 +278,7 @@
 	        return true;
 	    }
 	
-	    Portlet dd = internalPortletWindow.getPortletEntity()
+	    Portlet dd = portletWindow.getPortletEntity()
 	        .getPortletDefinition();
 	    Iterator supports = dd.getSupports().iterator();
 	    while(supports.hasNext()) {
@@ -337,7 +331,7 @@
 	    PortletURLProvider urlProvider = container
 	    		.getRequiredContainerServices()
 	    		.getPortalCallbackService()
-	    		.getPortletURLProvider(servletRequest, internalPortletWindow);
+	    		.getPortletURLProvider(servletRequest, portletWindow);
 	
 	    PortletURLListener portletURLFilterListener = portletURLFilterListener = container
 			.getRequiredContainerServices()
@@ -354,16 +348,10 @@
 	    else if (isResourceServing){
 	    	urlProvider.setResourceServing(true);
 	    }
-	    try {
-	    	
-	    	PortletApp portletAppDD = container.getPortletApplicationDescriptor(internalPortletWindow.getContextPath());  
-//	    	container.getOptionalContainerServices().getPortletRegistryService().getRegisteredPortletApplications()
-//			PortletAppDD portletAppDD = container.getPortletApplicationDescriptor(  );
-			portletURLFilterListener.callListener(portletAppDD,this,isAction,isResourceServing);
-		} catch (PortletContainerException e1) {
-			e1.printStackTrace();
-		}
-        
+        PortletApp portletAppDD = portletWindow.getPortletEntity().getPortletDefinition().getApplication();  
+//      container.getOptionalContainerServices().getPortletRegistryService().getRegisteredPortletApplications()
+//      PortletAppDD portletAppDD = container.getPortletApplicationDescriptor(  );
+        portletURLFilterListener.callListener(portletAppDD,this,isAction,isResourceServing);
 	    
         if (secure && urlProvider.isSecureSupported()) {
             try {
@@ -393,12 +381,12 @@
 	}
 
 	public void addProperty(String key, String value) {
-		container.getRequiredContainerServices().getPortalCallbackService().addResponseProperty(servletRequest, internalPortletWindow, key, value);
+		container.getRequiredContainerServices().getPortalCallbackService().addResponseProperty(servletRequest, portletWindow, key, value);
 		
 	}
 
 	public void setProperty(String key, String value) {
-		container.getRequiredContainerServices().getPortalCallbackService().setResponseProperty(servletRequest, internalPortletWindow, key, value);
+		container.getRequiredContainerServices().getPortalCallbackService().setResponseProperty(servletRequest, portletWindow, key, value);
 		
 	}
 
@@ -408,7 +396,7 @@
 		String[] tmp1 = this.servletRequest.getParameterValues(name);
 		if (tmp1!=null)
 			lenght += tmp1.length;
-		PortletURLProvider urlProvider = container.getRequiredContainerServices().getPortalCallbackService().getPortletURLProvider(servletRequest, internalPortletWindow);
+		PortletURLProvider urlProvider = container.getRequiredContainerServices().getPortalCallbackService().getPortletURLProvider(servletRequest, portletWindow);
 		String[] tmp2 = urlProvider.getPrivateRenderParameters(name);
 		if (tmp2!=null)
 			lenght += tmp2.length;

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/ClientDataRequestImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/ClientDataRequestImpl.java?rev=652758&r1=652757&r2=652758&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/ClientDataRequestImpl.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/ClientDataRequestImpl.java Thu May  1 21:13:47 2008
@@ -31,7 +31,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.pluto.PortletContainer;
-import org.apache.pluto.internal.InternalPortletWindow;
+import org.apache.pluto.PortletWindow;
 
 /**
  * Implementation of the <code>javax.portlet.ClientDataRequest</code> interface.
@@ -42,8 +42,8 @@
 	/** Logger. */
     private static final Log LOG = LogFactory.getLog(ClientDataRequestImpl.class);
 	
-	public ClientDataRequestImpl(PortletContainer container, InternalPortletWindow internalPortletWindow, HttpServletRequest servletRequest) {
-		super(container, internalPortletWindow, servletRequest);
+	public ClientDataRequestImpl(PortletContainer container, PortletWindow portletWindow, HttpServletRequest servletRequest) {
+		super(container, portletWindow, servletRequest);
 	}
 
 	public InputStream getPortletInputStream() throws IOException {

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/EventRequestImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/EventRequestImpl.java?rev=652758&r1=652757&r2=652758&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/EventRequestImpl.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/EventRequestImpl.java Thu May  1 21:13:47 2008
@@ -32,8 +32,8 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.pluto.Constants;
 import org.apache.pluto.PortletContainer;
+import org.apache.pluto.PortletWindow;
 import org.apache.pluto.internal.InternalEventRequest;
-import org.apache.pluto.internal.InternalPortletWindow;
 
 /**
  * <code>javax.portlet.EventRequest</code> implementation.
@@ -59,12 +59,12 @@
 	//	 Constructor -------------------------------------------------------------
     
     public EventRequestImpl(PortletContainer container,
-                             InternalPortletWindow internalPortletWindow,
+                             PortletWindow portletWindow,
                              HttpServletRequest servletRequest, Event event) {
-        super(container, internalPortletWindow, servletRequest);
+        super(container, portletWindow, servletRequest);
         this.event = event;
         if (LOG.isDebugEnabled()) {
-        	LOG.debug("Created Event request for: " + internalPortletWindow);
+        	LOG.debug("Created Event request for: " + portletWindow);
         }
    
     }
@@ -85,7 +85,7 @@
        if (portletPreferences == null) {
            portletPreferences = new PortletPreferencesImpl(
            		getPortletContainer(),
-           		getInternalPortletWindow(),
+           		getPortletWindow(),
            		this,
            		Constants.METHOD_EVENT);
        }
@@ -97,7 +97,7 @@
 	}
 
 	public Cookie[] getCookieProperties() {
-		return container.getRequiredContainerServices().getPortalCallbackService().getRequestPropertyCookie(super.getHttpServletRequest(), super.getInternalPortletWindow());
+		return container.getRequiredContainerServices().getPortalCallbackService().getRequestPropertyCookie(super.getHttpServletRequest(), super.getPortletWindow());
 	}
 	
 	public String getMethod(){

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/EventResponseImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/EventResponseImpl.java?rev=652758&r1=652757&r2=652758&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/EventResponseImpl.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/EventResponseImpl.java Thu May  1 21:13:47 2008
@@ -24,8 +24,8 @@
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.pluto.PortletContainer;
+import org.apache.pluto.PortletWindow;
 import org.apache.pluto.internal.InternalEventResponse;
-import org.apache.pluto.internal.InternalPortletWindow;
 
 /**
  * Implementation of JSR-286 <code>EventResponse</code>.
@@ -37,10 +37,10 @@
 	implements EventResponse,InternalEventResponse {
 
     public EventResponseImpl(PortletContainer container,
-                              InternalPortletWindow internalPortletWindow,
+                              PortletWindow portletWindow,
                               HttpServletRequest servletRequest,
                               HttpServletResponse servletResponse) {
-        super(container, internalPortletWindow, servletRequest,
+        super(container, portletWindow, servletRequest,
               servletResponse);
     }
 

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/MimeResponseImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/MimeResponseImpl.java?rev=652758&r1=652757&r2=652758&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/MimeResponseImpl.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/MimeResponseImpl.java Thu May  1 21:13:47 2008
@@ -32,7 +32,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.pluto.PortletContainer;
-import org.apache.pluto.internal.InternalPortletWindow;
+import org.apache.pluto.PortletWindow;
 import org.apache.pluto.internal.PortletEntity;
 import org.apache.pluto.om.portlet.ExpirationCache;
 import org.apache.pluto.om.portlet.Portlet;
@@ -105,14 +105,14 @@
 	private CacheControl cacheControl;
 
 	public MimeResponseImpl(PortletContainer container,
-            InternalPortletWindow internalPortletWindow,
+            PortletWindow portletWindow,
             HttpServletRequest servletRequest,
             HttpServletResponse servletResponse) {
 		
-		super(container, internalPortletWindow, servletRequest,
+		super(container, portletWindow, servletRequest,
 				servletResponse);
 		this.cacheControl = new CacheControlImpl();
-		PortletEntity portletEntity = internalPortletWindow.getPortletEntity();
+		PortletEntity portletEntity = portletWindow.getPortletEntity();
 		Portlet portletDefinition = portletEntity.getPortletDefinition();
 		ExpirationCache expirationCacheDD = portletDefinition
 				.getExpirationCache();
@@ -362,7 +362,7 @@
     protected boolean isValidContentType(String contentType) {
     	boolean valid = false;
     	
-        Portlet portletDD = getInternalPortletWindow().getPortletEntity()
+        Portlet portletDD = getPortletWindow().getPortletEntity()
         		.getPortletDefinition();
         for (Iterator it = portletDD.getSupports().iterator();
         		!valid && it.hasNext(); ) {

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletEntityImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletEntityImpl.java?rev=652758&r1=652757&r2=652758&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletEntityImpl.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletEntityImpl.java Thu May  1 21:13:47 2008
@@ -22,17 +22,13 @@
 
 import javax.portlet.PreferencesValidator;
 import javax.portlet.ValidatorException;
-import javax.servlet.ServletContext;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.pluto.PortletContainerException;
 import org.apache.pluto.internal.InternalPortletPreference;
-import org.apache.pluto.internal.PortletDescriptorRegistry;
 import org.apache.pluto.internal.PortletEntity;
 import org.apache.pluto.internal.PreferencesValidatorRegistry;
 import org.apache.pluto.om.portlet.Portlet;
-import org.apache.pluto.om.portlet.PortletApp;
 import org.apache.pluto.om.portlet.PortletPreference;
 import org.apache.pluto.om.portlet.PortletPreferences;
 
@@ -50,18 +46,8 @@
 	/** Logger. */
     private static final Log LOG = LogFactory.getLog(PortletEntityImpl.class);
     
-    /** URI prefix of the portlet invoker servlet. */
-    private static final String PREFIX = "/PlutoInvoker/";
-    
-    
     // Private Member Variables ------------------------------------------------
     
-    /** The servlet context. */
-    private final ServletContext servletContext;
-    
-    /** The portlet window. */
-    private String portletName = null;
-
     /** The cached PortletDD retrieved from the portlet descriptor registry. */
     private Portlet portletDefinition;
     
@@ -71,28 +57,14 @@
     
     // Constructor -------------------------------------------------------------
     
-    PortletEntityImpl(ServletContext servletContext, String portletName) {
-        this.servletContext = servletContext;
-        this.portletName = portletName;
+    public PortletEntityImpl(Portlet portletDefinition) {
+        this.portletDefinition = portletDefinition;
     }
     
     
     // PortletEntity Impl ------------------------------------------------------
     
     /**
-     * Returns the URI to the controller servlet that wraps this portlet.
-     * @return the URI to the controller servlet that wraps this portlet.
-     * @deprecated
-     */
-    public String getControllerServletUri() {
-        // this method is deprecated as of pluto 1.1.2, so that
-        // we can remove it in the future.  The PortletInvokerService
-        // will be responsible for resolving the URI used to invoke
-        // the portlet.
-        return PREFIX + portletName;
-    }
-    
-    /**
      * Returns an array of default preferences of this portlet. The default
      * preferences are retrieved from the portlet application descriptor.
      * <p>
@@ -148,9 +120,6 @@
      * @return the portlet description.
      */
     public Portlet getPortletDefinition() {
-        if (portletDefinition == null) {
-            load();
-        }
         return portletDefinition;
     }
     
@@ -167,39 +136,4 @@
     			.getPreferencesValidator(getPortletDefinition());
     	return validator;
     }
-    
-    
-    // Private Methods ---------------------------------------------------------
-    
-    /**
-     * Loads the portlet definition.
-     */
-    private void load() {
-    	
-    	//Retrieve the cross servlet context for the portlet.
-        ServletContext crossContext = servletContext;
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Retrieved cross context: " + crossContext);
-        }
-
-        // Load PortletAppDD and find out the portlet definition.
-        try {
-            PortletApp appDD = PortletDescriptorRegistry.getRegistry()
-            		.getPortletAppDD(crossContext);
-            for (Iterator it = appDD.getPortlets().iterator(); it.hasNext(); ) {
-                Portlet portletDD = (Portlet) it.next();
-                if (portletDD.getPortletName().equals(portletName)) {
-                	portletDefinition = portletDD;
-                	break;
-                }
-            }
-        } catch (PortletContainerException ex) {
-        	String message = "Unable to load Portlet App Deployment Descriptor:"
-        			+ ex.getMessage();
-        	LOG.error(message, ex);
-        	// FIXME: should this be a NullPointerException?
-            throw new NullPointerException(message);
-        }
-    }
-
 }

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletPreferencesImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletPreferencesImpl.java?rev=652758&r1=652757&r2=652758&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletPreferencesImpl.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletPreferencesImpl.java Thu May  1 21:13:47 2008
@@ -35,9 +35,9 @@
 import org.apache.pluto.Constants;
 import org.apache.pluto.PortletContainer;
 import org.apache.pluto.PortletContainerException;
+import org.apache.pluto.PortletWindow;
 import org.apache.pluto.internal.InternalPortletPreference;
 import org.apache.pluto.internal.InternalPortletRequest;
-import org.apache.pluto.internal.InternalPortletWindow;
 import org.apache.pluto.internal.PortletEntity;
 import org.apache.pluto.spi.optional.PortletPreferencesService;
 import org.apache.pluto.util.StringManager;
@@ -63,7 +63,7 @@
     /** The portlet preferences service provided by the portal. */
     private PortletPreferencesService preferencesService;
 
-    private InternalPortletWindow window;
+    private PortletWindow window;
 
     private InternalPortletRequest request;
     
@@ -93,7 +93,7 @@
      * @param methodId  the request method ID: render request or action request.
      */
     public PortletPreferencesImpl(PortletContainer container,
-                                  InternalPortletWindow window,
+                                  PortletWindow window,
                                   InternalPortletRequest request,
                                   Integer methodId) {
         this.window = window;



Mime
View raw message