portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r755263 [1/4] - in /portals/jetspeed-2/portal/trunk: components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/ components/jetspeed-portal/src/main/java/org/apache/jetspeed/ components/jetspeed-portal/src/main/java/org...
Date Tue, 17 Mar 2009 14:23:55 GMT
Author: ate
Date: Tue Mar 17 14:23:52 2009
New Revision: 755263

URL: http://svn.apache.org/viewvc?rev=755263&view=rev
Log:
JS2-871: Upgrade Pluto container
See: http://issues.apache.org/jira/browse/JS2-871

- updating and correcting the new Pluto API packaging
- first (skeleton) go at implementing or reimplementing the new API services
- at least, everything now compiles again

Note: this is an ungoing process

Added:
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletActionResponseContextImpl.java   (with props)
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletEventResponseContextImpl.java   (with props)
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletMimeResponseContextImpl.java   (with props)
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletRenderResponseContextImpl.java   (with props)
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletRequestContextImpl.java   (with props)
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletRequestContextServiceImpl.java   (with props)
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletResourceRequestContextImpl.java   (with props)
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletResourceResponseContextImpl.java   (with props)
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletResponseContextImpl.java   (with props)
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletStateAwareResponseContextImpl.java   (with props)
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/events/JetspeedEventCoordinationService.java   (contents, props changed)
      - copied, changed from r754582, portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/events/EventCoordinationService.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/container/JetspeedPortletConfigImpl.java   (contents, props changed)
      - copied, changed from r754582, portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/container/JetspeedPortletConfig.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/container/JetspeedPortletContextImpl.java   (contents, props changed)
      - copied, changed from r754582, portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/container/JetspeedPortletContext.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/container/JetspeedPortletConfig.java   (contents, props changed)
      - copied, changed from r754582, portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/container/InternalPortletConfig.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/container/JetspeedPortletContext.java   (contents, props changed)
      - copied, changed from r754582, portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/container/InternalPortletContext.java
    portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/container/PortletWindowRequestContext.java   (with props)
Removed:
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/PortletURLListenerImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedPortalCallbackServices.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/events/EventCoordinationService.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/resource/ResourceRenderResponseImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/container/JetspeedPortletConfig.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/container/JetspeedPortletContext.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletregistry/PlutoRegistryAdaptor.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/container/InternalPortletConfig.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/container/InternalPortletContext.java
    portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/container/PortletDispatcherIncludeAware.java
    portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/dispatcher/
Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FragmentPreferenceImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/JetspeedPortalContext.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/HeaderAggregatorImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/HttpBufferedResponse.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletRendererImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/RenderingJobImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/DesktopPortletContainerImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/JetspeedPortletContainerWrapper.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/PortletContainerWrapper.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/JetspeedPortletInvoker.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/JetspeedPortletInvokerService.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/LocalPortletInvoker.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/ServletPortletInvoker.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/namespace/JetspeedNamespaceMapper.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/namespace/JetspeedNamespaceMapperImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/EventProviderImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/FilterManagerImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/PortletURLProviderImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/ResourceURLProviderImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedOptionalPlutoServices.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedPortletEnvironmentService.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedRequiredPlutoServices.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/JetspeedEngine.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/JetspeedServlet.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/servlet/ServletRequestImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/servlet/ServletResponseImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/events/EventCoordinationServiceImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/events/PortletEventQueueImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/events/ProcessEventImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/LoginServlet.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/manager/ManagerServlet.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/impl/ActionValveImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/request/JetspeedRequestContext.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/resource/ResourceValveImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/AbstractUserInfoManagerImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/descriptor/PortletApplicationWar.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/velocity/JetspeedVelocityViewServlet.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/AbstractPortalContainerTestCase.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/tools/pamanager/TestPortletDescriptorSecurityRoles.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/userinfo/MockUserInfoManager.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/userinfo/TestUserInfoManager.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/factory/JetspeedPortletFactory.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/factory/JetspeedPortletInstance.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/factory/PortletFactoryInfo.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletentity/PersistenceBrokerPortletEntityAccess.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/JetspeedPreferenceImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/JetspeedPreferencesMap.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesServiceImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/descriptor/JetspeedDescriptorServiceImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/InlinePortletResourceBundle.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletApplicationDefinitionImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletDefinitionImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletentity/TestPortletEntityDAO.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/TestPortletRegistryDAO.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/TestRegistryCache.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectAll.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectPart1a.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesProvider.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/container/PortletEntity.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/container/PortletWindow.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/container/PortletWindowID.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/descriptor/JetspeedDescriptorService.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/events/PortletEventQueue.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/events/ProcessEvent.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/factory/PortletInstance.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/mockobjects/request/MockRequestContext.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/ContainerRuntimeOption.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/CustomPortletMode.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/CustomWindowState.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/Description.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/DisplayName.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/EventDefinition.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/EventDefinitionReference.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/Filter.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/FilterMapping.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/InitParam.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/Listener.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/PortletApplication.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/PortletDefinition.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/PortletInfo.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/Preference.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/Preferences.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/PublicRenderParameter.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/SecurityConstraint.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/SecurityRoleRef.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/Supports.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/UserAttribute.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/UserDataConstraint.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/userinfo/UserInfoManager.java
    portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/container/JetspeedContainerServlet.java
    portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/container/PortletRequestContext.java
    portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/portlet/PortletObjectProxy.java
    portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/portlet/ServletContextProviderImpl.java

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FragmentPreferenceImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FragmentPreferenceImpl.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FragmentPreferenceImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FragmentPreferenceImpl.java Tue Mar 17 14:23:52 2009
@@ -55,7 +55,7 @@
 
     /* (non-Javadoc)
      * @see org.apache.jetspeed.om.preference.FragmentPreference#getName()
-     * @see org.apache.pluto.om.common.Preference#getName()
+     * @see org.apache.pluto.container.om.common.Preference#getName()
      */
     public String getName()
     {
@@ -64,7 +64,7 @@
 
     /* (non-Javadoc)
      * @see org.apache.jetspeed.om.preference.FragmentPreference#setName(java.lang.String)
-     * @see org.apache.pluto.om.common.PreferenceCtrl#setName(java.lang.String)
+     * @see org.apache.pluto.container.om.common.PreferenceCtrl#setName(java.lang.String)
      */
     public void setName(String name)
     {
@@ -73,7 +73,7 @@
 
     /* (non-Javadoc)
      * @see org.apache.jetspeed.om.preference.FragmentPreference#isReadOnly()
-     * @see org.apache.pluto.om.common.Preference#isReadOnly()
+     * @see org.apache.pluto.container.om.common.Preference#isReadOnly()
      */
     public boolean isReadOnly()
     {

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/JetspeedPortalContext.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/JetspeedPortalContext.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/JetspeedPortalContext.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/JetspeedPortalContext.java Tue Mar 17 14:23:52 2009
@@ -17,8 +17,10 @@
 package org.apache.jetspeed;
 
 import java.util.Collection;
+import java.util.Collections;
 import java.util.Enumeration;
 import java.util.HashMap;
+import java.util.Iterator;
 
 import javax.portlet.PortletMode;
 import javax.portlet.WindowState;
@@ -27,7 +29,6 @@
 import org.apache.jetspeed.container.PortletRequestContext;
 import org.apache.jetspeed.engine.Engine;
 import org.apache.jetspeed.om.portlet.PortletApplication;
-import org.apache.pluto.util.Enumerator;
 
 /**
  * Implementation of Portal Context associated with running thread of the engine
@@ -202,7 +203,19 @@
      */
     public Enumeration getPropertyNames()
     {
-        return new Enumerator(configuration.getKeys());
+        final Iterator<String> keys = configuration.getKeys(); 
+        return new Enumeration<String>()
+        {
+            public boolean hasMoreElements()
+            {
+                return keys.hasNext();
+            }
+
+            public String nextElement()
+            {
+                return keys.next();
+            }
+        };
     }
     
     private Collection getSupportedModes()
@@ -221,7 +234,7 @@
      */
     public Enumeration getSupportedPortletModes()
     {
-        return new Enumerator(getSupportedModes());
+        return Collections.enumeration(getSupportedModes());
     }
     
     public boolean isPortletModeAllowed(PortletMode mode)
@@ -245,7 +258,7 @@
      */
     public Enumeration getSupportedWindowStates()
     {
-        return new Enumerator(getSupportedStates());
+        return Collections.enumeration(getSupportedStates());
     }
     
     public boolean isWindowStateAllowed(WindowState state)

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/HeaderAggregatorImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/HeaderAggregatorImpl.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/HeaderAggregatorImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/HeaderAggregatorImpl.java Tue Mar 17 14:23:52 2009
@@ -1115,7 +1115,7 @@
                 PortletDefinition pd = portletWindow.getPortletEntity().getPortletDefinition();
                 if ( pd != null && getPortletFactory().isPortletApplicationRegistered((PortletApplication)pd.getApplication() ) )
                 {
-                    String portletApplicationContextPath = pd.getApplication().getContextRoot();
+                    String portletApplicationContextPath = pd.getApplication().getContextPath();
                     Portlet portlet = getPortletFactory().getPortletInstance( context.getConfig().getServletContext().getContext( portletApplicationContextPath ), pd ).getRealPortlet();            
                     if ( portlet != null && portlet instanceof SupportsHeaderPhase )
                     {

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/HttpBufferedResponse.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/HttpBufferedResponse.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/HttpBufferedResponse.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/HttpBufferedResponse.java Tue Mar 17 14:23:52 2009
@@ -24,7 +24,7 @@
 import org.apache.commons.logging.LogFactory;
 import javax.servlet.ServletOutputStream;
 import javax.servlet.http.HttpServletResponse;
-import org.apache.pluto.util.PrintWriterServletOutputStream;
+import org.apache.pluto.container.util.PrintWriterServletOutputStream;
 
 public class HttpBufferedResponse extends javax.servlet.http.HttpServletResponseWrapper
 {

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletRendererImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletRendererImpl.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletRendererImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletRendererImpl.java Tue Mar 17 14:23:52 2009
@@ -54,7 +54,7 @@
 import org.apache.jetspeed.security.SecurityAccessController;
 import org.apache.jetspeed.services.title.DynamicTitleService;
 import org.apache.jetspeed.statistics.PortalStatistics;
-import org.apache.pluto.PortletContainer;
+import org.apache.pluto.container.PortletContainer;
 import org.apache.jetspeed.container.PortletEntity;
 import org.apache.jetspeed.container.PortletWindow;
 

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/RenderingJobImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/RenderingJobImpl.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/RenderingJobImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/RenderingJobImpl.java Tue Mar 17 14:23:52 2009
@@ -43,7 +43,7 @@
 import org.apache.jetspeed.om.page.ContentFragment;
 import org.apache.jetspeed.request.RequestContext;
 import org.apache.jetspeed.statistics.PortalStatistics;
-import org.apache.pluto.PortletContainer;
+import org.apache.pluto.container.PortletContainer;
 import org.apache.jetspeed.om.portlet.PortletDefinition;
 import org.apache.jetspeed.container.PortletWindow;
 

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/DesktopPortletContainerImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/DesktopPortletContainerImpl.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/DesktopPortletContainerImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/DesktopPortletContainerImpl.java Tue Mar 17 14:23:52 2009
@@ -22,10 +22,10 @@
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.jetspeed.desktop.JetspeedDesktop;
-import org.apache.pluto.OptionalContainerServices;
-import org.apache.pluto.PortletContainer;
-import org.apache.pluto.RequiredContainerServices;
-import org.apache.pluto.core.PortletContainerImpl;
+import org.apache.pluto.container.OptionalContainerServices;
+import org.apache.pluto.container.PortletContainer;
+import org.apache.pluto.container.RequiredContainerServices;
+import org.apache.pluto.container.impl.PortletContainerImpl;
 
 /**
  * Desktop Portlet Container implementation. This implementation 

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/JetspeedPortletContainerWrapper.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/JetspeedPortletContainerWrapper.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/JetspeedPortletContainerWrapper.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/JetspeedPortletContainerWrapper.java Tue Mar 17 14:23:52 2009
@@ -27,12 +27,11 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.jetspeed.engine.servlet.ServletRequestFactory;
 import org.apache.jetspeed.engine.servlet.ServletResponseFactory;
-import org.apache.pluto.EventContainer;
-import org.apache.pluto.OptionalContainerServices;
-import org.apache.pluto.PortletContainer;
-import org.apache.pluto.PortletContainerException;
-import org.apache.pluto.PortletWindow;
-import org.apache.pluto.RequiredContainerServices;
+import org.apache.pluto.container.OptionalContainerServices;
+import org.apache.pluto.container.PortletContainer;
+import org.apache.pluto.container.PortletContainerException;
+import org.apache.pluto.container.PortletWindow;
+import org.apache.pluto.container.RequiredContainerServices;
 
 /**
  * Portlet Container Wrapper to secure access to portlet container.
@@ -160,11 +159,11 @@
         this.responseFactory = responseFactory;
     }
 
-    public void fireEvent(HttpServletRequest request,
-            HttpServletResponse response, PortletWindow window, Event event)
+    public void doEvent(PortletWindow window, HttpServletRequest request,
+            HttpServletResponse response, Event event)
             throws PortletException, IOException, PortletContainerException
     {
-        ((EventContainer)pluto).fireEvent(request, response, window, event);
+        pluto.doEvent(window, request, response, event);
     }
     
 

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/PortletContainerWrapper.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/PortletContainerWrapper.java?rev=755263&r1=755262&r2=755263&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/PortletContainerWrapper.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/PortletContainerWrapper.java Tue Mar 17 14:23:52 2009
@@ -16,8 +16,7 @@
  */
 package org.apache.jetspeed.container;
 
-import org.apache.pluto.EventContainer;
-import org.apache.pluto.PortletContainer;
+import org.apache.pluto.container.PortletContainer;
 
 /**
  * Portlet Container Wrapper inteface
@@ -25,6 +24,6 @@
  * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  * @version $Id$
  */
-public interface PortletContainerWrapper extends PortletContainer, EventContainer
+public interface PortletContainerWrapper extends PortletContainer
 {
 }

Added: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletActionResponseContextImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletActionResponseContextImpl.java?rev=755263&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletActionResponseContextImpl.java (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletActionResponseContextImpl.java Tue Mar 17 14:23:52 2009
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jetspeed.container.impl;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.pluto.container.PortletActionResponseContext;
+import org.apache.pluto.container.PortletContainer;
+import org.apache.jetspeed.container.PortletWindow;
+
+/**
+ * @version $Id$
+ *
+ */
+public class PortletActionResponseContextImpl extends PortletStateAwareResponseContextImpl implements
+                PortletActionResponseContext
+{
+    private boolean redirect;
+    private String redirectLocation;
+    private String renderURLParamName;
+    
+    public PortletActionResponseContextImpl(PortletContainer container, HttpServletRequest containerRequest,
+                                            HttpServletResponse containerResponse, PortletWindow window)
+    {
+        super(container, containerRequest, containerResponse, window);
+    }
+
+    public String getResponseURL()
+    {
+        if (!isReleased())
+        {
+            close();
+            if (!redirect || renderURLParamName != null)
+            {
+                // TODO
+                return null;
+            }
+            else
+            {
+                return redirectLocation;
+            }
+        }
+        return null;
+    }
+
+    public boolean isRedirect()
+    {
+        return redirect;
+    }
+
+    public void setRedirect(String location)
+    {
+        setRedirect(location, null);
+    }
+
+    public void setRedirect(String location, String renderURLParamName)
+    {
+        if (!isClosed())
+        {
+            this.redirectLocation = location;
+            this.renderURLParamName = renderURLParamName;
+            this.redirect = true;
+        }
+    }
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletActionResponseContextImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletActionResponseContextImpl.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletActionResponseContextImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletEventResponseContextImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletEventResponseContextImpl.java?rev=755263&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletEventResponseContextImpl.java (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletEventResponseContextImpl.java Tue Mar 17 14:23:52 2009
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jetspeed.container.impl;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.pluto.container.PortletContainer;
+import org.apache.pluto.container.PortletEventResponseContext;
+import org.apache.jetspeed.container.PortletWindow;
+
+/**
+ * @version $Id$
+ *
+ */
+public class PortletEventResponseContextImpl extends PortletStateAwareResponseContextImpl implements
+                PortletEventResponseContext
+{
+
+    public PortletEventResponseContextImpl(PortletContainer container, HttpServletRequest containerRequest,
+                                           HttpServletResponse containerResponse, PortletWindow window)
+    {
+        super(container, containerRequest, containerResponse, window);
+    }
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletEventResponseContextImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletEventResponseContextImpl.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletEventResponseContextImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletMimeResponseContextImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletMimeResponseContextImpl.java?rev=755263&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletMimeResponseContextImpl.java (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletMimeResponseContextImpl.java Tue Mar 17 14:23:52 2009
@@ -0,0 +1,217 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jetspeed.container.impl;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.util.Locale;
+
+import javax.portlet.CacheControl;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.pluto.container.PortletContainer;
+import org.apache.pluto.container.PortletMimeResponseContext;
+import org.apache.pluto.container.PortletURLProvider;
+import org.apache.jetspeed.PortalReservedParameters;
+import org.apache.jetspeed.container.PortletWindow;
+import org.apache.jetspeed.container.providers.PortletURLProviderImpl;
+import org.apache.jetspeed.request.RequestContext;
+import org.apache.pluto.container.PortletURLProvider.TYPE;
+
+/**
+ * @version $Id$
+ *
+ */
+public abstract class PortletMimeResponseContextImpl extends PortletResponseContextImpl implements PortletMimeResponseContext
+{
+    private static class CacheControlImpl implements CacheControl
+    {
+        private String eTag;
+        private int expirationTime;
+        private boolean publicScope;
+        private boolean cachedContent;
+        
+        public CacheControlImpl()
+        {
+        }
+
+        public boolean useCachedContent()
+        {
+            return cachedContent;
+        }
+
+        public String getETag()
+        {
+            return this.eTag;
+        }
+
+        public int getExpirationTime()
+        {
+            return expirationTime;
+        }
+
+        public boolean isPublicScope()
+        {
+            return publicScope;
+        }
+
+        public void setETag(String eTag)
+        {
+            this.eTag = eTag;
+        }
+
+        public void setExpirationTime(int expirationTime)
+        {
+            this.expirationTime = expirationTime;
+        }
+
+        public void setPublicScope(boolean publicScope)
+        {
+            this.publicScope = publicScope;
+        }
+
+        public void setUseCachedContent(boolean cachedContent)
+        {
+            this.cachedContent = cachedContent;
+        }
+    }
+    
+    private CacheControl cacheControl;
+    private OutputStream outputStream;
+    
+    public PortletMimeResponseContextImpl(PortletContainer container, HttpServletRequest containerRequest,
+                                          HttpServletResponse containerResponse, PortletWindow window)
+    {
+        super(container, containerRequest, containerResponse, window);
+    }
+    
+    public void close()
+    {
+        cacheControl = null;
+        outputStream = null;
+        super.close();
+    }
+
+    public void flushBuffer() throws IOException
+    {
+        if (!isClosed())
+        {
+            // TODO
+        }
+    }
+
+    public int getBufferSize()
+    {
+        return 0; // TODO
+    }
+
+    public CacheControl getCacheControl()
+    {
+        if (isClosed())
+        {
+            return null;
+        }        
+        if (cacheControl == null)
+        {
+            // TODO
+        }
+        return cacheControl;
+    }
+
+    public String getCharacterEncoding()
+    {
+        return isClosed() ? null : null; // TODO
+    }
+
+    public String getContentType()
+    {
+        return isClosed() ? null : null; //TODO
+    }
+
+    public Locale getLocale()
+    {
+        return isClosed() ? null : null; //TODO
+    }
+
+    public OutputStream getOutputStream() throws IOException, IllegalStateException
+    {
+        if (isClosed())
+        {
+            return null;
+        }
+        if (outputStream == null)
+        {
+            // TODO
+        }
+        return outputStream;
+    }
+
+    public PrintWriter getWriter() throws IOException, IllegalStateException
+    {
+        return isClosed() ? null : null; //TODO
+    }
+
+    public boolean isCommitted()
+    {
+        return false; //TODO
+    }
+
+    public void reset()
+    {
+        //TODO
+    }
+
+    public void resetBuffer()
+    {
+        if (!isClosed())
+        {
+            //TODO
+        }
+    }
+
+    public void setBufferSize(int size)
+    {
+        if (!isClosed())
+        {
+            //TODO
+        }
+    }
+
+    public void setContentType(String contentType)
+    {
+        if (!isClosed())
+        {
+            //TODO
+        }
+    }
+
+    public PortletURLProvider getPortletURLProvider(TYPE type)
+    {
+        if (!isClosed())
+        {
+            RequestContext rc = (RequestContext) getServletRequest().getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
+            return new PortletURLProviderImpl(rc, (org.apache.jetspeed.container.PortletWindow)getPortletWindow()
+                                              //TODO
+                                              //, type
+                                              );
+        }
+        return null;
+    }
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletMimeResponseContextImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletMimeResponseContextImpl.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletMimeResponseContextImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletRenderResponseContextImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletRenderResponseContextImpl.java?rev=755263&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletRenderResponseContextImpl.java (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletRenderResponseContextImpl.java Tue Mar 17 14:23:52 2009
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jetspeed.container.impl;
+
+import java.util.Collection;
+
+import javax.portlet.PortletMode;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.pluto.container.PortletContainer;
+import org.apache.pluto.container.PortletRenderResponseContext;
+import org.apache.jetspeed.container.PortletWindow;
+
+/**
+ * @version $Id$
+ *
+ */
+public class PortletRenderResponseContextImpl extends PortletMimeResponseContextImpl implements
+                PortletRenderResponseContext
+{
+    public PortletRenderResponseContextImpl(PortletContainer container, HttpServletRequest containerRequest,
+                                            HttpServletResponse containerResponse, PortletWindow window)
+    {
+        super(container, containerRequest, containerResponse, window);
+    }
+
+    public void setNextPossiblePortletModes(Collection<PortletMode> portletModes)
+    {
+        //TODO
+    }
+
+    public void setTitle(String title)
+    {
+        if (!isClosed())
+        {
+            //TODO
+
+            // TODO: 2.2 jetspeed uses a title service        
+//            String title = null;
+//            if (titleArg == null || titleArg.length() == 0)
+//            {
+//                title = getTitleFromPortletDefinition(portletWindow, request);
+//            }
+//            else
+//            {
+//                title = titleArg;
+//            }
+//            request.setAttribute(
+//                    PortalReservedParameters.OVERRIDE_PORTLET_TITLE_ATTR
+//                            + "::window.id::" + portletWindow.getId(), title);        
+
+        }
+    }
+    
+//    protected final String getTitleFromPortletDefinition(org.apache.pluto.PortletWindow window, HttpServletRequest request)
+//    {
+//        String title = null;
+//        RequestContext requestContext = (RequestContext) request
+//                .getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
+//        
+//        org.apache.jetspeed.container.PortletWindow  jsWindow = (org.apache.jetspeed.container.PortletWindow)window;
+//        PortletEntity entity = jsWindow.getPortletEntity();
+//        if (entity != null && entity.getPortletDefinition() != null)
+//        {
+//            title = requestContext.getPreferedLanguage(
+//                    entity.getPortletDefinition()).getTitle();
+//        }
+//
+//        if (title == null && entity.getPortletDefinition() != null)
+//        {
+//            title = entity.getPortletDefinition().getPortletName();
+//        }
+//        else if (title == null)
+//        {
+//            title = "Invalid portlet entity " + entity.getId();
+//        }
+//        
+//        return title;
+//    }
+    
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletRenderResponseContextImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletRenderResponseContextImpl.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletRenderResponseContextImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletRequestContextImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletRequestContextImpl.java?rev=755263&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletRequestContextImpl.java (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletRequestContextImpl.java Tue Mar 17 14:23:52 2009
@@ -0,0 +1,341 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jetspeed.container.impl;
+
+import java.io.UnsupportedEncodingException;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+import javax.portlet.PortletContext;
+import javax.servlet.ServletContext;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.jetspeed.Jetspeed;
+import org.apache.jetspeed.PortalReservedParameters;
+import org.apache.jetspeed.container.state.NavigationalState;
+import org.apache.jetspeed.om.portlet.GenericMetadata;
+import org.apache.jetspeed.om.portlet.LocalizedField;
+import org.apache.jetspeed.om.portlet.PortletDefinition;
+import org.apache.jetspeed.request.JetspeedRequestContext;
+import org.apache.jetspeed.request.RequestContext;
+import org.apache.pluto.container.PortletContainer;
+import org.apache.pluto.container.PortletRequestContext;
+import org.apache.jetspeed.container.PortletWindow;
+
+/**
+ * @version $Id$
+ *
+ */
+public class PortletRequestContextImpl implements PortletRequestContext
+{
+    private static Boolean mergePortalParametersWithPortletParameters;
+    private static Boolean mergePortalParametersBeforePortletParameters;
+    
+    private PortletContainer container;
+    private HttpServletRequest containerRequest;
+    private HttpServletResponse containerResponse;
+    private HttpServletRequest servletRequest;
+    private HttpServletResponse servletResponse;
+    private PortletWindow window;
+    private PortletContext portletContext;
+    private ServletContext servletContext;
+    private Cookie cookies[];
+    private boolean useRequestParameters;
+    
+    private Map<String, String[]> privateParameters;
+    
+    
+    // request attributes map which is cached for each paralleled worker.
+    // this should be re-created when it is called for the first time or when some attributes are added/modified/removed.
+    private Map<String, Object> cachedAttributes;
+
+    public PortletRequestContextImpl(PortletContainer container, HttpServletRequest containerRequest,
+                                     HttpServletResponse containerResponse, PortletWindow window, boolean useRequestParameters)
+    {
+        this.container = container;
+        this.containerRequest = containerRequest;
+        this.containerResponse = containerResponse;
+        this.window = window;
+        this.useRequestParameters = useRequestParameters;
+        //TODO
+    }
+    
+    private static boolean getMetaDataBooleanValue(GenericMetadata metaData, String fieldName, boolean defaultValue )
+    {
+        String value = null;
+        if ( metaData != null )
+        {
+            Collection<LocalizedField> fields = metaData.getFields(fieldName);
+            if ( fields != null && !fields.isEmpty() )
+            {
+                value = fields.iterator().next().getValue();
+            }
+        }
+        if ( value != null )
+        {
+            return Boolean.valueOf(value).booleanValue();
+        }
+        return defaultValue;
+    }
+    
+    protected Map<String, String[]> getPrivateRenderParameterMap()
+    {
+        return Collections.emptyMap();
+    }
+    
+    protected boolean isPublicRenderParameter(String name)
+    {
+        List<String> publicRenderParameterNames = window.getPortletEntity().getPortletDefinition().getSupportedPublicRenderParameters();
+        return publicRenderParameterNames.isEmpty() ? false : publicRenderParameterNames.contains(name);
+    }
+        
+    @SuppressWarnings("unchecked")
+    public Map<String, String[]> getPrivateParameterMap()
+    {
+        if (privateParameters == null)
+        {
+            if (mergePortalParametersWithPortletParameters == null )
+            {
+                mergePortalParametersWithPortletParameters = 
+                    new Boolean(Jetspeed.getContext().getConfiguration().getBoolean("merge.portal.parameters.with.portlet.parameters", false));
+                mergePortalParametersBeforePortletParameters = 
+                    new Boolean(Jetspeed.getContext().getConfiguration().getBoolean("merge.portal.parameters.before.portlet.parameters", false));
+            }
+            
+            boolean mergeRequestParameters = false;
+            boolean mergeRequestParametersBefore = false;
+            
+            // get portlet *private* navigational params
+            privateParameters = new HashMap<String, String[]>();
+            JetspeedRequestContext context = (JetspeedRequestContext) getAttribute("org.apache.jetspeed.request.RequestContext");
+            if (context != null)
+            {
+                NavigationalState ns = context.getPortalURL().getNavigationalState();
+                mergeRequestParameters = ns.getPortletWindowOfAction() != null || ns.getPortletWindowOfResource() != null;
+                Iterator<String> iter = ns.getParameterNames(getPortletWindow());
+                while (iter.hasNext())
+                {
+                    String name = iter.next();
+                    String[] values = ns.getParameterValues(getPortletWindow(), name);
+                    privateParameters.put(name, values);
+                }
+            }
+            
+            PortletDefinition portletDef = getPortletWindow().getPortletEntity().getPortletDefinition();
+            if(portletDef != null)
+            {
+                GenericMetadata metaData = portletDef.getMetadata();
+                if (!mergeRequestParameters)
+                {
+                    mergeRequestParameters = 
+                        getMetaDataBooleanValue(
+                            metaData,
+                            PortalReservedParameters.PORTLET_EXTENDED_DESCRIPTOR_MERGE_PORTAL_PARAMETERS_WITH_PORTLET_PARAMETERS,
+                            mergePortalParametersWithPortletParameters.booleanValue());
+                }
+                mergeRequestParametersBefore = 
+                    getMetaDataBooleanValue(
+                        metaData,
+                        PortalReservedParameters.PORTLET_EXTENDED_DESCRIPTOR_MERGE_PORTAL_PARAMETERS_BEFORE_PORTLET_PARAMETERS,
+                        mergePortalParametersBeforePortletParameters.booleanValue());
+                
+            }
+            else
+            {
+                // This happens when an entity is referencing a non-existent portlet
+            }
+            
+            //get request params
+            if (mergeRequestParameters)
+            {
+                String encoding = (String)getContainerRequest().getAttribute(PortalReservedParameters.PREFERED_CHARACTERENCODING_ATTRIBUTE);
+                boolean decode = getContainerRequest().getAttribute(PortalReservedParameters.PARAMETER_ALREADY_DECODED_ATTRIBUTE) == null
+                        && encoding != null;
+                if (decode)
+                {
+                    getContainerRequest().setAttribute(PortalReservedParameters.PARAMETER_ALREADY_DECODED_ATTRIBUTE,
+                            new Boolean(true));
+                }
+                for (Enumeration parameters = getContainerRequest().getParameterNames(); parameters.hasMoreElements();)
+                {
+                    String paramName = (String) parameters.nextElement();
+                    String[] paramValues = getContainerRequest().getParameterValues(paramName);
+
+                    if (decode)
+                    {
+                        for (int i = 0; i < paramValues.length; i++)
+                        {
+                            try
+                            {
+                                paramValues[i] = new String(paramValues[i].getBytes("ISO-8859-1"), encoding);
+                            }
+                            catch (UnsupportedEncodingException e)
+                            {
+                                ;
+                            }
+                        }
+                    }
+                    String[] navValues = privateParameters.get(paramName);
+                    if (navValues == null)
+                    {
+                        privateParameters.put(paramName, paramValues);
+                    }
+                    else
+                    {
+                        String[] combined = new String[navValues.length+paramValues.length];
+                        if (mergeRequestParametersBefore)
+                        {
+                            System.arraycopy(paramValues,0,combined,0,paramValues.length);
+                            System.arraycopy(navValues,0,combined,paramValues.length,navValues.length);
+                        }
+                        else
+                        {
+                            System.arraycopy(navValues,0,combined,0,navValues.length);
+                            System.arraycopy(paramValues,0,combined,navValues.length,paramValues.length);
+                        }
+                        privateParameters.put(paramName, combined);
+                    }
+                }
+            }
+        }
+        if (!privateParameters.isEmpty())
+        {
+            Map<String, String[]> result = new HashMap<String, String[]>(privateParameters.size());
+            for (Map.Entry<String,String[]> entry : privateParameters.entrySet())
+            {
+                if (entry.getValue() != null)
+                {
+                    result.put(entry.getKey(), entry.getValue().clone());
+                }
+            }
+            return Collections.unmodifiableMap(result);
+        }
+        else
+        {
+            return Collections.emptyMap();
+        }
+    }
+
+    public PortletContainer getContainer()
+    {
+        return container;
+    }
+
+    public Cookie[] getCookies()
+    {
+        if (cookies == null)
+        {
+            cookies = servletRequest.getCookies();
+            if (cookies == null)
+            {
+                cookies = new Cookie[0];
+            }
+        }
+        return cookies.length > 0 ? cookies.clone() : null;
+    }
+
+    public PortletContext getPortletContext()
+    {
+        return portletContext;
+    }
+
+    public ServletContext getServletContext()
+    {
+        return servletContext;
+    }
+
+    public PortletWindow getPortletWindow()
+    {
+        return window;
+    }
+
+    public HttpServletRequest getContainerRequest()
+    {
+        return containerRequest;
+    }
+
+    public HttpServletResponse getContainerResponse()
+    {
+        return containerResponse;
+    }
+
+    public HttpServletRequest getServletRequest()
+    {
+        return servletRequest;
+    }
+
+    public HttpServletResponse getServletResponse()
+    {
+        return servletResponse;
+    }
+    
+    public Locale getPreferredLocale()
+    {
+        RequestContext requestContext = (RequestContext)getContainerRequest().getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
+        Locale preferedLocale = requestContext.getLocale();
+        return preferedLocale != null ? preferedLocale : getContainerRequest().getLocale();
+    }
+
+    public void init(PortletContext portletContext, ServletContext servletContext, HttpServletRequest servletRequest, HttpServletResponse servletResponse)
+    {
+        this.portletContext = portletContext;
+        this.servletContext = servletContext;
+        this.servletRequest = servletRequest;
+        this.servletResponse = servletResponse;
+    }
+    
+    public Object getAttribute(String name)
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Enumeration<String> getAttributeNames()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.pluto.container.PortletRequestContext#setAttribute(java.lang.String, java.lang.Object)
+     */
+    public void setAttribute(String name, Object value)
+    {
+        // TODO Auto-generated method stub
+    }
+
+    public Map<String, String[]> getProperties()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Map<String, String[]> getPublicParameterMap()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletRequestContextImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletRequestContextImpl.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletRequestContextImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletRequestContextServiceImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletRequestContextServiceImpl.java?rev=755263&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletRequestContextServiceImpl.java (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletRequestContextServiceImpl.java Tue Mar 17 14:23:52 2009
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jetspeed.container.impl;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.pluto.container.PortletActionResponseContext;
+import org.apache.pluto.container.PortletContainer;
+import org.apache.pluto.container.PortletEventResponseContext;
+import org.apache.pluto.container.PortletRenderResponseContext;
+import org.apache.pluto.container.PortletRequestContext;
+import org.apache.pluto.container.PortletRequestContextService;
+import org.apache.pluto.container.PortletResourceRequestContext;
+import org.apache.pluto.container.PortletResourceResponseContext;
+import org.apache.pluto.container.PortletWindow;
+
+/**
+ * @version $Id$
+ */
+public class PortletRequestContextServiceImpl implements PortletRequestContextService
+{
+    public PortletRequestContext getPortletActionRequestContext(PortletContainer container, HttpServletRequest containerRequest,
+                                                                HttpServletResponse containerResponse, PortletWindow window)
+    {
+        return new PortletRequestContextImpl(container, containerRequest, containerResponse, (org.apache.jetspeed.container.PortletWindow)window, true);
+    }
+
+    public PortletActionResponseContext getPortletActionResponseContext(PortletContainer container,
+                                                                        HttpServletRequest containerRequest,
+                                                                        HttpServletResponse containerResponse,
+                                                                        PortletWindow window)
+    {
+        return new PortletActionResponseContextImpl(container, containerRequest, containerResponse, (org.apache.jetspeed.container.PortletWindow)window);
+    }
+
+    public PortletRequestContext getPortletEventRequestContext(PortletContainer container, HttpServletRequest containerRequest,
+                                                               HttpServletResponse containerResponse, PortletWindow window)
+    {
+        return new PortletRequestContextImpl(container, containerRequest, containerResponse, (org.apache.jetspeed.container.PortletWindow)window, false);
+    }
+
+    public PortletEventResponseContext getPortletEventResponseContext(PortletContainer container,
+                                                                      HttpServletRequest containerRequest,
+                                                                      HttpServletResponse containerResponse, PortletWindow window)
+    {
+        return new PortletEventResponseContextImpl(container, containerRequest, containerResponse, (org.apache.jetspeed.container.PortletWindow)window);
+    }
+
+    public PortletRequestContext getPortletRenderRequestContext(PortletContainer container, HttpServletRequest containerRequest,
+                                                                HttpServletResponse containerResponse, PortletWindow window)
+    {
+        return new PortletRequestContextImpl(container, containerRequest, containerResponse, (org.apache.jetspeed.container.PortletWindow)window, false);
+    }
+
+    public PortletRenderResponseContext getPortletRenderResponseContext(PortletContainer container,
+                                                                        HttpServletRequest containerRequest,
+                                                                        HttpServletResponse containerResponse,
+                                                                        PortletWindow window)
+    {
+        return new PortletRenderResponseContextImpl(container, containerRequest, containerResponse, (org.apache.jetspeed.container.PortletWindow)window);
+    }
+
+    public PortletResourceRequestContext getPortletResourceRequestContext(PortletContainer container,
+                                                                          HttpServletRequest containerRequest,
+                                                                          HttpServletResponse containerResponse,
+                                                                          PortletWindow window)
+    {
+        return new PortletResourceRequestContextImpl(container, containerRequest, containerResponse, (org.apache.jetspeed.container.PortletWindow)window);
+    }
+
+    public PortletResourceResponseContext getPortletResourceResponseContext(PortletContainer container,
+                                                                            HttpServletRequest containerRequest,
+                                                                            HttpServletResponse containerResponse,
+                                                                            PortletWindow window)
+    {
+        return new PortletResourceResponseContextImpl(container, containerRequest, containerResponse, (org.apache.jetspeed.container.PortletWindow)window);
+    }
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletRequestContextServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletRequestContextServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletRequestContextServiceImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletResourceRequestContextImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletResourceRequestContextImpl.java?rev=755263&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletResourceRequestContextImpl.java (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletResourceRequestContextImpl.java Tue Mar 17 14:23:52 2009
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jetspeed.container.impl;
+
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.pluto.container.PortletContainer;
+import org.apache.pluto.container.PortletResourceRequestContext;
+import org.apache.jetspeed.container.PortletWindow;
+
+/**
+ * @version $Id$
+ *
+ */
+public class PortletResourceRequestContextImpl extends PortletRequestContextImpl implements
+                PortletResourceRequestContext
+{
+    public PortletResourceRequestContextImpl(PortletContainer container, HttpServletRequest containerRequest,
+                                             HttpServletResponse containerResponse, PortletWindow window)
+    {
+        super(container, containerRequest, containerResponse, window, true);
+    }
+
+    public String getCacheability()
+    {
+        //TODO
+        return null;
+    }
+
+    public Map<String, String[]> getPrivateRenderParameterMap()
+    {
+        //TODO
+        return null;
+    }
+
+    public String getResourceID()
+    {
+        //TODO
+        return null;
+    }
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletResourceRequestContextImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletResourceRequestContextImpl.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletResourceRequestContextImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletResourceResponseContextImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletResourceResponseContextImpl.java?rev=755263&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletResourceResponseContextImpl.java (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletResourceResponseContextImpl.java Tue Mar 17 14:23:52 2009
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jetspeed.container.impl;
+
+import java.util.Locale;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.pluto.container.PortletContainer;
+import org.apache.pluto.container.PortletResourceResponseContext;
+import org.apache.jetspeed.container.PortletWindow;
+
+/**
+ * @version $Id$
+ *
+ */
+public class PortletResourceResponseContextImpl extends PortletMimeResponseContextImpl implements
+                PortletResourceResponseContext
+{
+    
+    public PortletResourceResponseContextImpl(PortletContainer container, HttpServletRequest containerRequest,
+                                              HttpServletResponse containerResponse, PortletWindow window)
+    {        
+        super(container, containerRequest, containerResponse, window);
+    }
+
+    public void setCharacterEncoding(String charset)
+    {
+        if (!isClosed())
+        {
+            //TODO
+        }
+    }
+
+    public void setContentLength(int len)
+    {
+        if (!isClosed())
+        {
+            //TODO
+        }
+    }
+
+    public void setLocale(Locale locale)
+    {
+        if (!isClosed())
+        {
+            //TODO
+        }
+    }
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletResourceResponseContextImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletResourceResponseContextImpl.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletResourceResponseContextImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletResponseContextImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletResponseContextImpl.java?rev=755263&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletResponseContextImpl.java (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletResponseContextImpl.java Tue Mar 17 14:23:52 2009
@@ -0,0 +1,154 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jetspeed.container.impl;
+
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.pluto.container.PortletContainer;
+import org.apache.pluto.container.PortletResponseContext;
+import org.apache.jetspeed.PortalReservedParameters;
+import org.apache.jetspeed.container.PortletWindow;
+import org.apache.jetspeed.container.providers.ResourceURLProviderImpl;
+import org.apache.jetspeed.request.RequestContext;
+import org.apache.pluto.container.ResourceURLProvider;
+import org.w3c.dom.Element;
+
+/**
+ * @version $Id$
+ *
+ */
+public abstract class PortletResponseContextImpl implements PortletResponseContext
+{
+    private PortletContainer container;
+    private HttpServletRequest containerRequest;
+    private HttpServletResponse containerResponse;
+    private HttpServletRequest servletRequest;
+    private HttpServletResponse servletResponse;
+    private PortletWindow window;
+    private boolean closed;
+    private boolean released;
+    
+    public PortletResponseContextImpl(PortletContainer container, HttpServletRequest containerRequest,
+                                      HttpServletResponse containerResponse, PortletWindow window)
+    {
+        this.container = container;
+        this.containerRequest = containerRequest;
+        this.containerResponse = containerResponse;
+        this.window = window;
+        //TODO
+    }
+    
+    protected boolean isClosed()
+    {
+        return closed;
+    }
+    
+    protected boolean isReleased()
+    {
+        return released;
+    }
+
+    public void init(HttpServletRequest servletRequest, HttpServletResponse servletResponse)
+    {
+        this.servletRequest = servletRequest;
+        this.servletResponse = servletResponse;
+    }
+    
+    public void addProperty(Cookie cookie)
+    {
+        if (!isClosed())
+        {
+            //TODO
+        }
+    }
+
+    public void addProperty(String key, Element element)
+    {
+        //TODO
+    }
+
+    public void addProperty(String key, String value)
+    {
+        //TODO
+    }
+
+    public void close()
+    {
+        //TODO
+        closed = true;
+    }
+
+    public PortletContainer getContainer()
+    {
+        return container;
+    }
+
+    public PortletWindow getPortletWindow()
+    {
+        return window;
+    }
+
+    public HttpServletRequest getContainerRequest()
+    {
+        return containerRequest;
+    }
+
+    public HttpServletResponse getContainerResponse()
+    {
+        return containerResponse;
+    }
+
+    public HttpServletRequest getServletRequest()
+    {
+        return servletRequest;
+    }
+
+    public HttpServletResponse getServletResponse()
+    {
+        return servletResponse;
+    }
+
+    public void release()
+    {
+        closed = true;
+        released = true;
+        container = null;
+        servletRequest = null;
+        servletResponse = null;
+        window = null;
+        //TODO?
+    }
+
+    public void setProperty(String key, String value)
+    {
+        //TODO
+    }
+
+    public ResourceURLProvider getResourceURLProvider()
+    {
+        if (!isReleased())
+        {
+            RequestContext rc = (RequestContext) servletRequest.getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
+            return new ResourceURLProviderImpl(rc, window);
+        }
+        return null;
+    
+    }
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletResponseContextImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletResponseContextImpl.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletResponseContextImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message