cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r219033 - in /cocoon: blocks/portal/trunk/WEB-INF/xconf/ blocks/portal/trunk/java/org/apache/cocoon/portal/coplet/adapter/impl/ blocks/portal/trunk/java/org/apache/cocoon/portal/impl/ blocks/portal/trunk/java/org/apache/cocoon/portal/layout...
Date Thu, 14 Jul 2005 12:20:30 GMT
Author: cziegeler
Date: Thu Jul 14 05:20:27 2005
New Revision: 219033

URL: http://svn.apache.org/viewcvs?rev=219033&view=rev
Log:
Convert PortletPortalManager into portal manager aspect. Remove deprecated PortletPortalManager.

Added:
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PortletPortalManagerAspect.java
  (with props)
Removed:
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PortletPortalManager.java
Modified:
    cocoon/blocks/portal/trunk/WEB-INF/xconf/cocoon-portal.xconf
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/coplet/adapter/impl/PortletAdapter.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/PortletWindowAspect.java
    cocoon/trunk/status.xml

Modified: cocoon/blocks/portal/trunk/WEB-INF/xconf/cocoon-portal.xconf
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/WEB-INF/xconf/cocoon-portal.xconf?rev=219033&r1=219032&r2=219033&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/WEB-INF/xconf/cocoon-portal.xconf (original)
+++ cocoon/blocks/portal/trunk/WEB-INF/xconf/cocoon-portal.xconf Thu Jul 14 05:20:27 2005
@@ -40,9 +40,9 @@
        	<uri-prefix>samples/blocks/portal/</uri-prefix>
       </component-instance>
   </input-modules>
-  
- <!-- Event Aspect configuration -->
- <component class="org.apache.cocoon.core.container.DefaultServiceSelector" role="org.apache.cocoon.portal.event.aspect.EventAspectSelector">
+
+  <!-- Event Aspect configuration -->
+  <component class="org.apache.cocoon.core.container.DefaultServiceSelector" role="org.apache.cocoon.portal.event.aspect.EventAspectSelector">
     <aspect logger="portal" name="action-counter" class="org.apache.cocoon.portal.event.aspect.impl.ActionCounterEventAspect"/>
     <aspect logger="portal" name="request-parameter" class="org.apache.cocoon.portal.event.aspect.impl.RequestParameterEventAspect"/>
     <aspect logger="portal" name="frame" class="org.apache.cocoon.portal.event.aspect.impl.FrameEventAspect"/>
@@ -54,9 +54,16 @@
 
     <!-- This aspect sets headers on the response that tell the client to not cache the
response: -->
     <aspect logger="portal" name="no-client-caching" class="org.apache.cocoon.portal.event.aspect.impl.NoClientCachingEventAspect"/>
- </component>
+  </component>
 
- <component class="org.apache.cocoon.portal.event.impl.DefaultEventManager" logger="portal"
role="org.apache.cocoon.portal.event.EventManager">
+  <!-- Portal Manager Aspect Configuration -->
+  <component class="org.apache.cocoon.core.container.DefaultServiceSelector"
+             role="org.apache.cocoon.portal.PortalManagerAspectSelector">
+    <!-- This aspect activates the JSR-168 support. -->
+    <aspect logger="portal" name="portlet" class="org.apache.cocoon.portal.impl.PortletPortalManagerAspect"/>
+  </component>
+
+  <component class="org.apache.cocoon.portal.event.impl.DefaultEventManager" logger="portal"
role="org.apache.cocoon.portal.event.EventManager">
     <event-aspects>
         <!-- Uncomment this aspect when marshalling JSR168 portlet events 
         <aspect type="convertable"/>
@@ -93,9 +100,9 @@
     <receiver-roles>
         <!-- <role name="AVALON-ROLE"/> -->
     </receiver-roles>
- </component>
- 
- <!-- Event Factory configuration -->
+  </component>
+
+  <!-- Event Factory configuration -->
  <component class="org.apache.cocoon.components.ExtendedComponentSelector" role="org.apache.cocoon.portal.event.ConvertableEventFactorySelector">
    <!-- The events that can be marshalled. The name must match the Event's request parameter.
-->
    <factory logger="portal" name="cocoon-portal-fs" class="org.apache.cocoon.portal.event.impl.FullScreenCopletEventFactory"/>
@@ -103,31 +110,34 @@
  </component>
 
   <!-- This is the portal manager.
-       If you don't need the JSR-168 support uncomment the following line and comment out

-       the definition below:
-    <component class="org.apache.cocoon.portal.impl.PortalManagerImpl" 
-               logger="portal" role="org.apache.cocoon.portal.PortalManager"/>
-
+       The portal manager can be extended with different aspects.
+       Currently the JSR-168 aspect is configured/activated.
+       If you don't need the JSR-168 support uncomment the aspect.
   -->
-  <component class="org.apache.cocoon.portal.impl.PortletPortalManager" 
-             logger="portal" role="org.apache.cocoon.portal.PortalManager"/>
+  <component class="org.apache.cocoon.portal.impl.PortalManagerImpl" 
+             logger="portal" role="org.apache.cocoon.portal.PortalManager">
+    <aspects>
+      <!-- JSR-168 support: -->
+      <aspect type="portlet"/>
+    </aspects>
+  </component>
 
- <!-- To enable PageLabels change DefaultLinkService to PageLabelLinkService -->
- <component class="org.apache.cocoon.portal.impl.DefaultLinkService" logger="portal" role="org.apache.cocoon.portal.LinkService"/>
+  <!-- To enable PageLabels change DefaultLinkService to PageLabelLinkService -->
+  <component class="org.apache.cocoon.portal.impl.DefaultLinkService" logger="portal"
role="org.apache.cocoon.portal.LinkService"/>
 
   <!-- To enable PageLabels change DefaultEventConverter to PageLabelEventConverter -->
- <component class="org.apache.cocoon.portal.event.impl.DefaultEventConverter" logger="portal"
role="org.apache.cocoon.portal.event.EventConverter">
- </component>
+  <component class="org.apache.cocoon.portal.event.impl.DefaultEventConverter" logger="portal"
role="org.apache.cocoon.portal.event.EventConverter">
+  </component>
   
- <!-- Page Label Manager -->
- <component class="org.apache.cocoon.portal.impl.PageLabelManager" logger="portal" role="org.apache.cocoon.portal.impl.PageLabelManager">
-   <!-- Uncomment to marshall JSR-168 portlet events
-   <marshallEvents>true</marshallEvents>
-   -->
-   <!-- Uncomment to enable non sticky tabs
-   <nonStickyTabs>true</nonStickyTabs>
-   -->
- </component>
+  <!-- Page Label Manager -->
+  <component class="org.apache.cocoon.portal.impl.PageLabelManager" logger="portal" role="org.apache.cocoon.portal.impl.PageLabelManager">
+    <!-- Uncomment to marshall JSR-168 portlet events
+    <marshallEvents>true</marshallEvents>
+    -->
+    <!-- Uncomment to enable non sticky tabs
+    <nonStickyTabs>true</nonStickyTabs>
+    -->
+  </component>
 
   <!-- Coplet Adapter configuration -->
   <component class="org.apache.cocoon.core.container.DefaultServiceSelector" 
@@ -148,7 +158,7 @@
     <coplet-adapter name="application"
                     class="org.apache.cocoon.portal.coplet.adapter.impl.ApplicationCopletAdapter"
                     logger="portal"/>
- </component>
+  </component>
 
 
  <!-- Renderer Aspect configuration -->

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/coplet/adapter/impl/PortletAdapter.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/coplet/adapter/impl/PortletAdapter.java?rev=219033&r1=219032&r2=219033&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/coplet/adapter/impl/PortletAdapter.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/coplet/adapter/impl/PortletAdapter.java
Thu Jul 14 05:20:27 2005
@@ -26,9 +26,8 @@
 import org.apache.avalon.framework.context.Contextualizable;
 import org.apache.cocoon.components.ContextHelper;
 import org.apache.cocoon.environment.http.HttpEnvironment;
-import org.apache.cocoon.portal.PortalManager;
 import org.apache.cocoon.portal.coplet.CopletInstanceData;
-import org.apache.cocoon.portal.impl.PortletPortalManager;
+import org.apache.cocoon.portal.impl.PortletPortalManagerAspect;
 import org.apache.cocoon.portal.pluto.om.PortletDefinitionRegistry;
 import org.apache.cocoon.portal.pluto.om.PortletEntityListImpl;
 import org.apache.cocoon.portal.pluto.om.PortletWindowImpl;
@@ -78,7 +77,7 @@
         try {
             // now get the portal manager
             ServletConfig servletConfig = (ServletConfig) context.get(CocoonServlet.CONTEXT_SERVLET_CONFIG);
-            PortletPortalManager portalManager = (PortletPortalManager) servletConfig.getServletContext().getAttribute(PortalManager.ROLE);
+            PortletPortalManagerAspect portalManager = (PortletPortalManagerAspect) servletConfig.getServletContext().getAttribute(PortletPortalManagerAspect.class.getName());
             
             this.portletContainer = portalManager.getPortletContainer();
             this.environment = portalManager.getPortletContainerEnvironment();
@@ -125,7 +124,7 @@
                 objectModel.put("portlet-request",  req);                
             }
             final HttpServletResponse res = (HttpServletResponse) objectModel.get("portlet-response");
-            PortletPortalManager.copletInstanceData.set(coplet);
+            PortletPortalManagerAspect.copletInstanceData.set(coplet);
             try {
                 this.portletContainer.portletLoad(portletWindow, req.getRequest(portletWindow),
 
                                                   res);
@@ -135,7 +134,7 @@
                 coplet.removeTemporaryAttribute("window");
                 ((PortletEntityListImpl)pae.getPortletEntityList()).remove(portletEntity);
             } finally {
-                PortletPortalManager.copletInstanceData.set(null);
+                PortletPortalManagerAspect.copletInstanceData.set(null);
             }
         }
     }
@@ -162,7 +161,7 @@
             final Map objectModel = ContextHelper.getObjectModel(this.context);
             final ServletRequestImpl  req = (ServletRequestImpl) objectModel.get("portlet-request");
             final HttpServletResponse res = (HttpServletResponse) objectModel.get("portlet-response");
-            PortletPortalManager.copletInstanceData.set(coplet);
+            PortletPortalManagerAspect.copletInstanceData.set(coplet);
             
             // TODO - for parallel processing we have to clone the response!
             this.portletContainer.renderPortlet(window, req.getRequest(window), res);
@@ -183,7 +182,7 @@
         } catch (Exception e) {
             throw new SAXException(e);
         } finally {
-            PortletPortalManager.copletInstanceData.set(null);            
+            PortletPortalManagerAspect.copletInstanceData.set(null);            
         }
     }
 

Added: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PortletPortalManagerAspect.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PortletPortalManagerAspect.java?rev=219033&view=auto
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PortletPortalManagerAspect.java
(added)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PortletPortalManagerAspect.java
Thu Jul 14 05:20:27 2005
@@ -0,0 +1,302 @@
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.cocoon.portal.impl;
+
+import java.util.Map;
+import java.util.Properties;
+
+import javax.portlet.PortletMode;
+import javax.portlet.WindowState;
+import javax.servlet.ServletConfig;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.avalon.framework.activity.Disposable;
+import org.apache.avalon.framework.activity.Initializable;
+import org.apache.avalon.framework.container.ContainerUtil;
+import org.apache.avalon.framework.context.Context;
+import org.apache.avalon.framework.context.ContextException;
+import org.apache.avalon.framework.context.Contextualizable;
+import org.apache.avalon.framework.logger.AbstractLogEnabled;
+import org.apache.avalon.framework.parameters.Parameters;
+import org.apache.avalon.framework.service.ServiceException;
+import org.apache.avalon.framework.service.ServiceManager;
+import org.apache.avalon.framework.service.Serviceable;
+import org.apache.cocoon.ProcessingException;
+import org.apache.cocoon.components.ContextHelper;
+import org.apache.cocoon.environment.http.HttpEnvironment;
+import org.apache.cocoon.portal.PortalManager;
+import org.apache.cocoon.portal.PortalManagerAspect;
+import org.apache.cocoon.portal.PortalManagerAspectPrepareContext;
+import org.apache.cocoon.portal.PortalManagerAspectRenderContext;
+import org.apache.cocoon.portal.PortalService;
+import org.apache.cocoon.portal.event.EventManager;
+import org.apache.cocoon.portal.event.Receiver;
+import org.apache.cocoon.portal.pluto.PortletContainerEnvironmentImpl;
+import org.apache.cocoon.portal.pluto.PortletURLProviderImpl;
+import org.apache.cocoon.portal.pluto.servlet.ServletRequestImpl;
+import org.apache.cocoon.portal.pluto.servlet.ServletResponseImpl;
+import org.apache.cocoon.servlet.CocoonServlet;
+import org.apache.pluto.PortletContainer;
+import org.apache.pluto.PortletContainerException;
+import org.apache.pluto.PortletContainerImpl;
+import org.apache.pluto.om.window.PortletWindow;
+import org.apache.pluto.services.PortletContainerEnvironment;
+import org.apache.pluto.services.information.DynamicInformationProvider;
+import org.apache.pluto.services.information.InformationProviderService;
+import org.apache.pluto.services.information.PortletActionProvider;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+
+/**
+ * This aspect provides the JSR-168 support by initializing Pluto.
+ * The aspect can be configured at the portal manager.
+ *
+ * @version SVN $Id:$
+ */
+public class PortletPortalManagerAspect
+	extends AbstractLogEnabled
+	implements PortalManagerAspect,
+               Contextualizable,
+               Serviceable,
+               Initializable,
+               Disposable,
+               Receiver {
+
+    public static final ThreadLocal copletInstanceData = new InheritableThreadLocal();
+
+    /** The servlet configuration for pluto */
+    protected ServletConfig servletConfig;
+
+    /** The Portlet Container */
+    protected PortletContainer portletContainer;
+
+    /** The Portlet Container environment */
+    protected PortletContainerEnvironmentImpl portletContainerEnvironment;
+
+    /** The service locator */
+    protected ServiceManager manager;
+
+    /** The component context */
+    protected Context context;
+
+    /**
+     * @see org.apache.avalon.framework.context.Contextualizable#contextualize(org.apache.avalon.framework.context.Context)
+     */
+    public void contextualize(Context context) throws ContextException {
+        this.context = context;
+        try {
+            this.servletConfig = (ServletConfig) context.get(CocoonServlet.CONTEXT_SERVLET_CONFIG);
+            // we have to somehow pass this component down to other components!
+            // This is ugly, but it's the only chance for sofisticated component containers
+            // that wrap component implementations!
+            this.servletConfig.getServletContext().setAttribute(PortletPortalManagerAspect.class.getName(),
this);
+        } catch (ContextException ignore) {
+            // we ignore the context exception
+            // this avoids startup errors if the portal is configured for the CLI
+            // environment
+            this.getLogger().warn("The JSR-168 support is disabled as the servlet context
is not available.", ignore);
+        }
+    }
+
+    /**
+     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
+     */
+    public void service(ServiceManager manager) throws ServiceException {
+        this.manager = manager;
+        EventManager eventManager = null;
+        try {
+            eventManager = (EventManager)this.manager.lookup(EventManager.ROLE);
+            eventManager.subscribe(this);
+        } finally {
+            this.manager.release(eventManager);
+        }
+    }
+
+    /**
+     * @see org.apache.avalon.framework.activity.Disposable#dispose()
+     */
+    public void dispose() {
+        if ( this.manager != null ) {
+            EventManager eventManager = null;
+            try {
+                eventManager = (EventManager)this.manager.lookup(EventManager.ROLE);
+                eventManager.unsubscribe(this);
+            } catch (Exception ignore) {
+                // let's ignore it
+            } finally {
+                this.manager.release(eventManager);
+            }
+            this.manager = null;
+        }
+        try {
+            if (this.portletContainer != null ) {
+                this.portletContainer.shutdown();
+                this.portletContainer = null;
+            }
+            ContainerUtil.dispose(this.portletContainerEnvironment);
+            this.portletContainerEnvironment = null;
+        } catch (Throwable t) {
+            this.getLogger().error("Destruction failed!", t);
+        }
+        if ( this.servletConfig != null ) {
+            this.servletConfig.getServletContext().removeAttribute(PortalManager.ROLE);
+            this.servletConfig = null;
+        }
+    }
+
+    /**
+     * @see org.apache.avalon.framework.activity.Initializable#initialize()
+     */
+    public void initialize() throws Exception {
+        if ( this.servletConfig != null ) {
+            this.initContainer();
+        }
+    }
+
+    /**
+     * Return the portlet container
+     */
+    public PortletContainer getPortletContainer() {
+        return this.portletContainer;        
+    }
+
+    /**
+     * Return the portlet container environment
+     */
+    public PortletContainerEnvironment getPortletContainerEnvironment() {
+        return this.portletContainerEnvironment;        
+    }
+
+    /**
+     * Initialize the container
+     */
+    public void initContainer() throws Exception {
+        this.portletContainer = new PortletContainerImpl();
+
+        if (!portletContainer.isInitialized()) {
+            this.getLogger().debug ("Initializing PortletContainer...");
+
+            final String uniqueContainerName = "cocoon-portal";
+
+            this.portletContainerEnvironment = new PortletContainerEnvironmentImpl();
+            ContainerUtil.enableLogging(this.portletContainerEnvironment, this.getLogger());
+            ContainerUtil.contextualize(this.portletContainerEnvironment, this.context);
+            ContainerUtil.service(this.portletContainerEnvironment, this.manager);
+            ContainerUtil.initialize(this.portletContainerEnvironment);
+
+            Properties properties = new Properties();
+
+            try {
+                portletContainer.init(uniqueContainerName, servletConfig, this.portletContainerEnvironment,
properties);
+            } catch (PortletContainerException exc) {
+                throw new ProcessingException("Initialization of the portlet container failed.",
exc);
+            }
+        } else {
+            this.getLogger().debug("PortletContainer already initialized.");
+        }
+
+        this.getLogger().debug("PortletContainer initialized.");
+        
+    }
+
+    /**
+     * @see Receiver
+     */
+    public void inform(PortletURLProviderImpl event, PortalService service) {
+        final Map objectModel = ContextHelper.getObjectModel(this.context);
+        final ServletRequestImpl req = new ServletRequestImpl((HttpServletRequest) objectModel.get(HttpEnvironment.HTTP_REQUEST_OBJECT),
event);
+        final HttpServletResponse res = new ServletResponseImpl((HttpServletResponse) objectModel.get(HttpEnvironment.HTTP_RESPONSE_OBJECT));
+        objectModel.put("portlet-response",  res);
+        objectModel.put("portlet-request", req);        
+
+        if ( event.isAction() ) {
+            // This means we can only have ONE portlet event per request!
+            objectModel.put("portlet-event", event);
+        } else {
+            DynamicInformationProvider dynProv;
+            InformationProviderService ips;
+            PortletActionProvider pap;
+
+            ips = (InformationProviderService)this.portletContainerEnvironment.getContainerService(InformationProviderService.class);
+            dynProv = ips.getDynamicProvider(req);
+            pap = dynProv.getPortletActionProvider(event.getPortletWindow());
+            final PortletMode mode = event.getPortletMode();
+            if ( mode != null ) {
+                pap.changePortletMode(mode);
+            }
+            final WindowState state = event.getWindowState();
+            if ( state != null ) {
+                pap.changePortletWindowState(state);
+            }
+        }
+    }
+
+    /**
+     * @see org.apache.cocoon.portal.PortalManagerAspect#prepare(org.apache.cocoon.portal.PortalManagerAspectPrepareContext,
org.apache.cocoon.portal.PortalService)
+     */
+    public void prepare(PortalManagerAspectPrepareContext aspectContext,
+                        PortalService service)
+    throws ProcessingException {
+        // process the events
+        aspectContext.invokeNext();
+        
+        // if we aren't running in a servlet environment, just skip the JSR-168 part
+        if ( this.servletConfig == null ) {
+            return;
+        }
+        
+        // do we already have an environment?
+        // if not, create one
+        final Map objectModel = aspectContext.getObjectModel();
+
+        PortletURLProviderImpl event = (PortletURLProviderImpl) objectModel.get("portlet-event");
+        if ( event != null ) {
+            PortletWindow actionWindow = event.getPortletWindow();
+            try {
+                final ServletRequestImpl req = (ServletRequestImpl) objectModel.get("portlet-request");
+                final ServletResponseImpl res= (ServletResponseImpl)objectModel.get("portlet-response");
+                this.portletContainer.processPortletAction(actionWindow, req.getRequest(actionWindow),
res);
+            } catch (Exception ignore) {
+                this.getLogger().error("Error during processing of portlet action.", ignore);
+            }
+        } else if ( objectModel.get("portlet-response") == null ) {
+            final HttpServletResponse res = (HttpServletResponse) objectModel.get(HttpEnvironment.HTTP_RESPONSE_OBJECT);
+            objectModel.put("portlet-response",  new ServletResponseImpl(res));
+            final ServletRequestImpl req = new ServletRequestImpl((HttpServletRequest) objectModel.get(HttpEnvironment.HTTP_REQUEST_OBJECT),
null);
+            objectModel.put("portlet-request",  req);
+        }
+    }
+
+    /**
+     * @see org.apache.cocoon.portal.PortalManagerAspect#render(org.apache.cocoon.portal.PortalManagerAspectRenderContext,
org.apache.cocoon.portal.PortalService, org.xml.sax.ContentHandler, org.apache.avalon.framework.parameters.Parameters)
+     */
+    public void render(PortalManagerAspectRenderContext aspectContext,
+                       PortalService service,
+                       ContentHandler ch,
+                       Parameters parameters)
+    throws SAXException {
+        final Map objectModel = aspectContext.getObjectModel();
+
+        // don't generate a response, if we issued a redirect
+        if (objectModel.get("portlet-event") == null) {
+            aspectContext.invokeNext(ch, parameters);
+        }
+    }
+
+
+}
+

Propchange: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PortletPortalManagerAspect.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PortletPortalManagerAspect.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/PortletWindowAspect.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/PortletWindowAspect.java?rev=219033&r1=219032&r2=219033&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/PortletWindowAspect.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/PortletWindowAspect.java
Thu Jul 14 05:20:27 2005
@@ -25,10 +25,9 @@
 import org.apache.avalon.framework.context.Contextualizable;
 import org.apache.avalon.framework.parameters.ParameterException;
 import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.cocoon.portal.PortalManager;
 import org.apache.cocoon.portal.PortalService;
 import org.apache.cocoon.portal.coplet.CopletInstanceData;
-import org.apache.cocoon.portal.impl.PortletPortalManager;
+import org.apache.cocoon.portal.impl.PortletPortalManagerAspect;
 import org.apache.cocoon.portal.layout.Layout;
 import org.apache.cocoon.portal.layout.impl.CopletLayout;
 import org.apache.cocoon.portal.layout.renderer.aspect.RendererAspectContext;
@@ -92,7 +91,7 @@
         try {
             // now get the portal manager
             ServletConfig servletConfig = (ServletConfig) context.get(CocoonServlet.CONTEXT_SERVLET_CONFIG);
-            PortletPortalManager portalManager = (PortletPortalManager) servletConfig.getServletContext().getAttribute(PortalManager.ROLE);
+            PortletPortalManagerAspect portalManager = (PortletPortalManagerAspect) servletConfig.getServletContext().getAttribute(PortletPortalManagerAspect.class.getName());
             if ( portalManager != null ) {
                 this.environment = portalManager.getPortletContainerEnvironment();
             }

Modified: cocoon/trunk/status.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/status.xml?rev=219033&r1=219032&r2=219033&view=diff
==============================================================================
--- cocoon/trunk/status.xml (original)
+++ cocoon/trunk/status.xml Thu Jul 14 05:20:27 2005
@@ -197,6 +197,9 @@
 
   <changes>
   <release version="@version@" date="@date@">
+    <action dev="CZ" type="add">
+      Portal block: Remove deprecated PortletPortalManager.
+    </action>
     <action dev="UH" type="add" due-to="Johan Stuyts">
       Mail block: The SendMailTransformer can now configure the smtp port.
     </action>
@@ -480,6 +483,9 @@
    </action>
   </release>
   <release version="2.1.8" date="TBD">
+    <action dev="CZ" type="add">
+      Portal block: Convert PortletPortalManager into portal manager aspect.
+    </action>
     <action dev="CZ" type="add">
       CForms block: Make all WidgetValidatorBuilders ThreadSafe. Reset validation errors
                     before validating a field.



Mime
View raw message