portals-pluto-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r750954 [5/5] - in /portals/pluto/trunk: pluto-container/src/main/java/org/apache/pluto/core/ pluto-container/src/main/java/org/apache/pluto/descriptors/portlet/ pluto-container/src/main/java/org/apache/pluto/descriptors/services/jaxb/ plut...
Date Fri, 06 Mar 2009 16:11:52 GMT
Modified: portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/util/DummyServletOutputStream.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/util/DummyServletOutputStream.java?rev=750954&r1=750953&r2=750954&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/util/DummyServletOutputStream.java
(original)
+++ portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/util/DummyServletOutputStream.java
Fri Mar  6 16:11:51 2009
@@ -20,8 +20,19 @@
 
 import javax.servlet.ServletOutputStream;
 
-public class DummyServletOutputStream extends ServletOutputStream{
+public final class DummyServletOutputStream extends ServletOutputStream{
 
+    private static final ServletOutputStream instance = new DummyServletOutputStream();
+    
+    public static ServletOutputStream getInstance()
+    {
+        return instance;
+    }
+    
+    private DummyServletOutputStream()
+    {
+    }
+    
 	@Override
 	public void write(int b) throws IOException {
 	}

Modified: portals/pluto/trunk/pluto-container/src/test/java/org/apache/pluto/internal/impl/PortletRequestImplTest.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container/src/test/java/org/apache/pluto/internal/impl/PortletRequestImplTest.java?rev=750954&r1=750953&r2=750954&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container/src/test/java/org/apache/pluto/internal/impl/PortletRequestImplTest.java
(original)
+++ portals/pluto/trunk/pluto-container/src/test/java/org/apache/pluto/internal/impl/PortletRequestImplTest.java
Fri Mar  6 16:11:51 2009
@@ -17,25 +17,20 @@
 package org.apache.pluto.internal.impl;
 
 import javax.portlet.PortalContext;
-import javax.portlet.PortletPreferences;
 import javax.portlet.PortletSession;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpSession;
 
-import org.apache.pluto.Constants;
 import org.apache.pluto.OptionalContainerServices;
 import org.apache.pluto.PortletContainer;
 import org.apache.pluto.PortletWindow;
 import org.apache.pluto.RequiredContainerServices;
 import org.apache.pluto.core.PortletContainerImpl;
 import org.apache.pluto.internal.InternalPortletContext;
-import org.apache.pluto.internal.InternalPortletRequest;
-import org.apache.pluto.internal.InternalPortletSession;
 import org.apache.pluto.spi.CCPPProfileService;
 import org.apache.pluto.spi.PortalCallbackService;
 import org.apache.pluto.spi.PortletURLProvider;
 import org.apache.pluto.spi.optional.PortletEnvironmentService;
-import org.apache.pluto.spi.optional.RequestAttributeService;
 import org.jmock.Mock;
 import org.jmock.cglib.MockObjectTestCase;
 
@@ -56,7 +51,6 @@
     private Mock mockPortalContext = null;
     private Mock mockPortletContext = null;
     private Mock mockHttpServletRequest = null;
-    private Mock mockRequestAttributeService = null;
     private Mock mockPortalCallbackService = null;
     private Mock mockPortletURLProvider = null;
     private PortletWindow window = null;
@@ -80,7 +74,6 @@
                 new Object[] { "Mock Pluto Container", (RequiredContainerServices) mockServices.proxy(),
(OptionalContainerServices) mockOptionalServices.proxy() } );
         window = (PortletWindow) mock( PortletWindow.class ).proxy();
         mockHttpServletRequest = mock( HttpServletRequest.class );
-        mockRequestAttributeService = mock (RequestAttributeService.class);
         mockPortalCallbackService = mock (PortalCallbackService.class);
 
         // Constructor expectations for RenderRequestImpl
@@ -115,10 +108,6 @@
         mockContainer.expects(once()).method("getRequiredContainerServices").will(returnValue(
mockServices.proxy() ));
         mockContainer.expects(atLeastOnce()).method("getOptionalContainerServices").will(returnValue(
mockOptionalServices.proxy() ));
         
-        mockOptionalServices.expects(atLeastOnce()).method("getRequestAttributeService").will(returnValue(this.mockRequestAttributeService.proxy()));
-        
-        mockRequestAttributeService.expects(atLeastOnce()).method("setAttribute");
-
         // Create the render request that is under test, and initialize its state
         RenderRequestImpl request = new RenderRequestImpl( (PortletContainer)mockContainer.proxy(),
window, (HttpServletRequest)mockHttpServletRequest.proxy() );
         request.init( (InternalPortletContext)mockPortletContext.proxy(), ( HttpServletRequest)mockHttpServletRequest.proxy()
);
@@ -147,24 +136,4 @@
 
         PortletSession s = request.getPortletSession( true );
     }
-    
-    private static class TestPortletRequestImpl extends PortletRequestImpl {
-
-        public Integer getRequestMethod()
-        {
-            return Constants.METHOD_RENDER;
-        }
-        
-        public TestPortletRequestImpl(InternalPortletRequest internalPortletRequest) {
-            super(internalPortletRequest);
-        }
-
-        public TestPortletRequestImpl(PortletContainer container, PortletWindow portletWindow,
HttpServletRequest servletRequest) {
-            super(container, portletWindow, servletRequest);
-        }
-
-        public PortletPreferences getPreferences() {
-            return null;
-        }
-    }
 }

Modified: portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortalCallbackServiceImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortalCallbackServiceImpl.java?rev=750954&r1=750953&r2=750954&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortalCallbackServiceImpl.java
(original)
+++ portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortalCallbackServiceImpl.java
Fri Mar  6 16:11:51 2009
@@ -27,7 +27,6 @@
 import org.apache.pluto.spi.PortalCallbackService;
 import org.apache.pluto.spi.PortletURLListener;
 import org.apache.pluto.spi.PortletURLProvider;
-import org.apache.pluto.spi.PropertyManager;
 import org.apache.pluto.spi.ResourceURLProvider;
 
 /**
@@ -38,23 +37,17 @@
  */
 public class PortalCallbackServiceImpl implements PortalCallbackService 
 {
-	PropertyManager propertyManager;	
-
-	public PortalCallbackServiceImpl(PropertyManager propertyManager) 
-    {
-        this.propertyManager = propertyManager;
-    }
-	
     /**
      * Method invoked by the container when the portlet sets its title. This
      * method binds the dynamic portlet title to the servlet request for later
      * use.
      */
-    public void setTitle(HttpServletRequest request,
-                         PortletWindow portletWindow,
-                         String title) {
-        request.setAttribute(AttributeKeys.PORTLET_TITLE, title);
-    }
+//TODO: reimplement in ResponseContext.setTitle()    
+//    public void setTitle(HttpServletRequest request,
+//                         PortletWindow portletWindow,
+//                         String title) {
+//        request.setAttribute(AttributeKeys.PORTLET_TITLE, title);
+//    }
 
     public PortletURLProvider getPortletURLProvider(
     		HttpServletRequest request,
@@ -68,22 +61,11 @@
         return new ResourceURLProviderImpl(request, portletWindow);
     }
 
-    public PropertyManager getPropertyManager()
-    {
-        return propertyManager;
-    }
-    
     public EventProvider getEventProvider(
 			HttpServletRequest request, PortletWindow portletWindow) {
 		return EventProviderImpl.getEventProviderImpl(request, portletWindow);
 	}
 
-
-	public EventProvider getEventProvider() {
-		return EventProviderImpl.getEventProviderImpl();
-	}
-
-
 	/**
      * Returns the FilterManager, this is used to process the filter.
      * @return FilterManager



Mime
View raw message