cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r210138 - in /cocoon/branches/BRANCH_2_1_X: ./ src/blocks/portal/java/org/apache/cocoon/portal/ src/blocks/portal/java/org/apache/cocoon/portal/impl/
Date Mon, 11 Jul 2005 14:14:27 GMT
Author: cziegeler
Date: Mon Jul 11 07:14:26 2005
New Revision: 210138

URL: http://svn.apache.org/viewcvs?rev=210138&view=rev
Log:
Portal block: Add portal manager aspects for more flexible portal processing.

Added:
    cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/PortalManagerAspect.java
  (with props)
    cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/PortalManagerAspectPrepareContext.java
  (with props)
    cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/PortalManagerAspectRenderContext.java
  (with props)
    cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/DefaultPortalManagerAspectContext.java
  (with props)
    cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalManagerAspectChain.java
  (with props)
Modified:
    cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalManagerImpl.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortletPortalManager.java
    cocoon/branches/BRANCH_2_1_X/status.xml

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/PortalManagerAspect.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/PortalManagerAspect.java?rev=210138&view=auto
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/PortalManagerAspect.java
(added)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/PortalManagerAspect.java
Mon Jul 11 07:14:26 2005
@@ -0,0 +1,42 @@
+/*
+ * Copyright 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;
+
+import org.apache.avalon.framework.parameters.Parameters;
+import org.apache.cocoon.ProcessingException;
+import org.apache.cocoon.portal.PortalService;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+
+/**
+ * @since 2.1.8
+ * @version SVN $Id$
+ */
+public interface PortalManagerAspect {
+
+    /** The role to lookup an aspect. */
+    String ROLE = PortalManagerAspect.class.getName();
+
+    void prepare(PortalManagerAspectPrepareContext context,
+                 PortalService service)
+    throws ProcessingException;
+
+    void render(PortalManagerAspectRenderContext context,
+                PortalService                  service,
+                ContentHandler                 ch,
+                Parameters                     parameters)
+    throws SAXException;
+}

Propchange: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/PortalManagerAspect.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/PortalManagerAspect.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/PortalManagerAspectPrepareContext.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/PortalManagerAspectPrepareContext.java?rev=210138&view=auto
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/PortalManagerAspectPrepareContext.java
(added)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/PortalManagerAspectPrepareContext.java
Mon Jul 11 07:14:26 2005
@@ -0,0 +1,44 @@
+/*
+ * Copyright 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;
+
+import java.util.Map;
+
+import org.apache.avalon.framework.parameters.Parameters;
+import org.apache.cocoon.ProcessingException;
+
+/**
+ * @since 2.1.8
+ * @version SVN $Id$
+ */
+public interface PortalManagerAspectPrepareContext {
+
+    /**
+     * Invoke next aspect 
+     */
+    void invokeNext()
+    throws ProcessingException;
+
+    /** 
+     * Get the {@link Parameters} of the aspect.
+     */
+    Parameters getAspectParameters();
+
+    /**
+     * Get the object model.
+     */
+    Map getObjectModel();
+}

Propchange: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/PortalManagerAspectPrepareContext.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/PortalManagerAspectPrepareContext.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/PortalManagerAspectRenderContext.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/PortalManagerAspectRenderContext.java?rev=210138&view=auto
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/PortalManagerAspectRenderContext.java
(added)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/PortalManagerAspectRenderContext.java
Mon Jul 11 07:14:26 2005
@@ -0,0 +1,46 @@
+/*
+ * Copyright 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;
+
+import java.util.Map;
+
+import org.apache.avalon.framework.parameters.Parameters;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+
+/**
+ * @since 2.1.8
+ * @version SVN $Id$
+ */
+public interface PortalManagerAspectRenderContext {
+
+    /**
+     * Invoke next aspect 
+     */
+    void invokeNext(ContentHandler ch,
+                    Parameters     parameters)
+    throws SAXException;
+
+    /** 
+     * Get the {@link Parameters} of the aspect.
+     */
+    Parameters getAspectParameters();
+
+    /**
+     * Get the object model.
+     */
+    Map getObjectModel();
+}

Propchange: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/PortalManagerAspectRenderContext.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/PortalManagerAspectRenderContext.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/DefaultPortalManagerAspectContext.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/DefaultPortalManagerAspectContext.java?rev=210138&view=auto
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/DefaultPortalManagerAspectContext.java
(added)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/DefaultPortalManagerAspectContext.java
Mon Jul 11 07:14:26 2005
@@ -0,0 +1,90 @@
+/*
+ * Copyright 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.Iterator;
+import java.util.Map;
+
+import org.apache.avalon.framework.parameters.Parameters;
+import org.apache.cocoon.ProcessingException;
+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.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+
+/**
+ * The aspect context is passed to every aspect.
+ * @since 2.1.8
+ * @version SVN $Id$
+ */
+public final class DefaultPortalManagerAspectContext
+    implements PortalManagerAspectRenderContext, PortalManagerAspectPrepareContext {
+
+    private final PortalService service;
+    private final Map objectModel;
+    private Iterator iterator;
+    private Iterator configIterator;
+    private Parameters config;
+    
+    public DefaultPortalManagerAspectContext(PortalManagerAspectChain chain,
+                                             PortalService service,
+                                             Map objectModel) {
+        this.service = service;
+        this.objectModel = objectModel;
+        this.iterator = chain.getIterator();
+        this.configIterator = chain.getConfigIterator();
+    }
+    
+	/**
+	 * @see org.apache.cocoon.portal.PortalManagerAspectPrepareContext#invokeNext()
+	 */
+	public void invokeNext() 
+    throws ProcessingException {
+        if (this.iterator.hasNext()) {
+            this.config = (Parameters)this.configIterator.next();
+            final PortalManagerAspect aspect = (PortalManagerAspect) iterator.next();
+            aspect.prepare(this, this.service);
+        }
+    }
+
+    /**
+     * @see org.apache.cocoon.portal.PortalManagerAspectPrepareContext#getAspectParameters()
+     */
+    public Parameters getAspectParameters() {
+        return this.config;
+    }
+
+    /**
+     * @see org.apache.cocoon.portal.PortalManagerAspectRenderContext#invokeNext(org.xml.sax.ContentHandler,
org.apache.avalon.framework.parameters.Parameters)
+     */
+    public void invokeNext(ContentHandler ch, Parameters parameters) 
+    throws SAXException {
+        if (this.iterator.hasNext()) {
+            this.config = (Parameters)this.configIterator.next();
+            final PortalManagerAspect aspect = (PortalManagerAspect) iterator.next();
+            aspect.render(this, this.service, ch, parameters);
+        }
+    }
+
+    /**
+     * @see org.apache.cocoon.portal.layout.renderer.aspect.RendererAspectContext#getObjectModel()
+     */
+    public Map getObjectModel() {
+        return this.objectModel;
+    }
+}

Propchange: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/DefaultPortalManagerAspectContext.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/DefaultPortalManagerAspectContext.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalManagerAspectChain.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalManagerAspectChain.java?rev=210138&view=auto
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalManagerAspectChain.java
(added)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalManagerAspectChain.java
Mon Jul 11 07:14:26 2005
@@ -0,0 +1,84 @@
+/*
+ * Copyright 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.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.avalon.framework.configuration.Configuration;
+import org.apache.avalon.framework.configuration.ConfigurationException;
+import org.apache.avalon.framework.parameters.Parameters;
+import org.apache.avalon.framework.service.ServiceException;
+import org.apache.avalon.framework.service.ServiceSelector;
+import org.apache.cocoon.portal.PortalManagerAspect;
+
+/**
+ * This chain holds all configured aspects for a portal manager.
+ * @since 2.1.8
+ * @version SVN $Id$
+ */
+public final class PortalManagerAspectChain {
+    
+    protected List aspects = new ArrayList(3);
+    
+    protected List configs = new ArrayList(3);
+    
+    public void configure(ServiceSelector     selector,
+                          Configuration       conf,
+                          PortalManagerAspect endAspect,
+                          Parameters          endAspectParameters) 
+    throws ConfigurationException {
+        if ( conf != null ) {
+            Configuration[] aspects = conf.getChildren("aspect");
+            for(int i=0; i < aspects.length; i++) {
+                final Configuration current = aspects[i];
+                final String role = current.getAttribute("type");
+                if ( selector == null ) {
+                    throw new ConfigurationException("No selector for aspects defined.");
+                }
+                try {
+                    PortalManagerAspect pAspect = (PortalManagerAspect) selector.select(role);
+                    this.aspects.add(pAspect);               
+                    Parameters aspectConfiguration = Parameters.fromConfiguration(current);
+                    this.configs.add(aspectConfiguration);
+                    
+                } catch (ServiceException se) {
+                    throw new ConfigurationException("Unable to lookup aspect " + role, se);
+                }
+            }
+        }
+        this.aspects.add(endAspect);
+        this.configs.add(endAspectParameters);
+    }
+    
+    public Iterator getIterator() {
+        return this.aspects.iterator();
+    }
+    
+    public Iterator getConfigIterator() {
+        return this.configs.iterator();
+    }
+    
+    public void dispose(ServiceSelector selector) {
+        Iterator i = this.aspects.iterator();
+        while (i.hasNext()) {
+            selector.release(i.next()); 
+        }
+        this.aspects.clear();
+        this.configs.clear();
+    }
+}

Propchange: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalManagerAspectChain.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalManagerAspectChain.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalManagerImpl.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalManagerImpl.java?rev=210138&r1=210137&r2=210138&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalManagerImpl.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalManagerImpl.java
Mon Jul 11 07:14:26 2005
@@ -16,14 +16,25 @@
 package org.apache.cocoon.portal.impl;
 
 import org.apache.avalon.framework.activity.Disposable;
+import org.apache.avalon.framework.configuration.Configurable;
+import org.apache.avalon.framework.configuration.Configuration;
+import org.apache.avalon.framework.configuration.ConfigurationException;
+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.ServiceSelector;
 import org.apache.avalon.framework.service.Serviceable;
 import org.apache.avalon.framework.thread.ThreadSafe;
 import org.apache.cocoon.ProcessingException;
+import org.apache.cocoon.components.ContextHelper;
 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.layout.Layout;
@@ -40,7 +51,7 @@
  */
 public class PortalManagerImpl
 	extends AbstractLogEnabled
-	implements PortalManager, Serviceable, Disposable, ThreadSafe {
+	implements PortalManager, Serviceable, Disposable, ThreadSafe, Contextualizable, PortalManagerAspect,
Configurable {
 
     /** The service manager */
     protected ServiceManager manager;
@@ -48,6 +59,13 @@
     /** The portal service */
     protected PortalService portalService;
 
+    protected PortalManagerAspectChain chain;
+
+    protected ServiceSelector aspectSelector;
+
+    /** The component context. */
+    protected Context context;
+
     /**
      * @see org.apache.avalon.framework.service.Serviceable#service(ServiceManager)
      */
@@ -55,6 +73,9 @@
     throws ServiceException {
         this.manager = serviceManager;
         this.portalService = (PortalService)this.manager.lookup(PortalService.ROLE);
+        if ( this.manager.hasService(PortalManagerAspect.ROLE+"Selector") ) {
+            this.aspectSelector = (ServiceSelector) this.manager.lookup( PortalManagerAspect.ROLE+"Selector");
+        }
     }
 
     /**
@@ -65,6 +86,12 @@
             this.manager.release(this.portalService);
             this.portalService = null;
             this.manager = null;
+            if ( this.chain != null) {
+                this.chain.dispose( this.aspectSelector );
+            }
+            this.manager.release( this.aspectSelector );
+            this.aspectSelector = null;
+            this.manager = null;
         }
     }
 
@@ -73,8 +100,11 @@
      */
     public void process()
     throws ProcessingException {
-        EventManager eventManager = this.portalService.getComponentManager().getEventManager();
-        eventManager.processEvents();
+        DefaultPortalManagerAspectContext aspectContext =
+            new DefaultPortalManagerAspectContext(this.chain,
+                                                  this.portalService,
+                                                  ContextHelper.getObjectModel(this.context));
+        aspectContext.invokeNext();
     }
 
 	/**
@@ -82,6 +112,40 @@
 	 */
 	public void showPortal(ContentHandler contentHandler, Parameters parameters) 
     throws SAXException {
+        DefaultPortalManagerAspectContext aspectContext =
+            new DefaultPortalManagerAspectContext(this.chain,
+                                                  this.portalService,
+                                                  ContextHelper.getObjectModel(this.context));
+        aspectContext.invokeNext(contentHandler, parameters);
+	}
+
+    /**
+     * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)
+     */
+    public void configure(Configuration conf) throws ConfigurationException {
+        this.chain = new PortalManagerAspectChain();
+        this.chain.configure(this.aspectSelector, conf.getChild("aspects"), this, new Parameters());
+    }
+
+    /**
+     * @see org.apache.avalon.framework.context.Contextualizable#contextualize(org.apache.avalon.framework.context.Context)
+     */
+    public void contextualize(Context context) throws ContextException {
+        this.context = context;
+    }
+
+    /**
+     * @see org.apache.cocoon.portal.PortalManagerAspect#prepare(org.apache.cocoon.portal.PortalManagerAspectPrepareContext,
org.apache.cocoon.portal.PortalService)
+     */
+    public void prepare(PortalManagerAspectPrepareContext context, PortalService service)
throws ProcessingException {
+        EventManager eventManager = this.portalService.getComponentManager().getEventManager();
+        eventManager.processEvents();
+    }
+
+    /**
+     * @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 context, PortalService service, ContentHandler
ch, Parameters parameters) throws SAXException {
         // first check for a full screen layout
         Layout portalLayout = this.portalService.getEntryLayout(null);
         if ( portalLayout == null ) {
@@ -90,8 +154,8 @@
 
         Renderer portalLayoutRenderer = this.portalService.getComponentManager().getRenderer(
portalLayout.getRendererName());       
 
-        contentHandler.startDocument();
-        portalLayoutRenderer.toSAX(portalLayout, this.portalService, contentHandler);
-        contentHandler.endDocument();
+        ch.startDocument();
+        portalLayoutRenderer.toSAX(portalLayout, this.portalService, ch);
+        ch.endDocument();
 	}
 }

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortletPortalManager.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortletPortalManager.java?rev=210138&r1=210137&r2=210138&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortletPortalManager.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortletPortalManager.java
Mon Jul 11 07:14:26 2005
@@ -24,12 +24,10 @@
 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.parameters.Parameters;
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
@@ -66,7 +64,7 @@
  */
 public class PortletPortalManager
 	extends PortalManagerImpl
-	implements Initializable, Contextualizable, Disposable, Subscriber {
+	implements Initializable, Subscriber {
 
     public static final ThreadLocal copletInstanceData = new InheritableThreadLocal();
     
@@ -79,14 +77,11 @@
     /** The Portlet Container environment */
     protected PortletContainerEnvironmentImpl portletContainerEnvironment;
     
-    /** The component context */
-    protected Context context;
-    
-    /* (non-Javadoc)
+    /**
      * @see org.apache.avalon.framework.context.Contextualizable#contextualize(org.apache.avalon.framework.context.Context)
      */
     public void contextualize(Context context) throws ContextException {
-        this.context = context;
+        super.contextualize(context);
         try {
             this.servletConfig = (ServletConfig) context.get(CocoonServlet.CONTEXT_SERVLET_CONFIG);
             // we have to somehow pass this component down to other components!
@@ -101,7 +96,7 @@
         }
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
      */
     public void service(ServiceManager manager) throws ServiceException {
@@ -115,7 +110,7 @@
         }
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.avalon.framework.activity.Disposable#dispose()
      */
     public void dispose() {
@@ -144,7 +139,7 @@
             this.servletConfig.getServletContext().removeAttribute(PortalManager.ROLE);
             this.servletConfig = null;
         }
-        this.manager = null;
+        super.dispose();
     }
 
     /* (non-Javadoc)

Modified: cocoon/branches/BRANCH_2_1_X/status.xml
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/status.xml?rev=210138&r1=210137&r2=210138&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/status.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/status.xml Mon Jul 11 07:14:26 2005
@@ -197,6 +197,9 @@
   <changes>
   <release version="@version@" date="@date@">
     <action dev="CZ" type="add">
+      Portal block: Add portal manager aspects for more flexible portal processing.
+    </action>     
+    <action dev="CZ" type="add">
       CForms block: Add isValid() method to a Widget.
     </action>     
     <action dev="VG" type="add" fixes-bug="29817" due-to="Patrick Herber" due-to-email="patrick@arpage.ch">



Mime
View raw message