cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r515531 - in /cocoon/trunk/blocks/cocoon-portal: cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/support/ cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/profile/impl/ cocoon-portal-impl/src/m...
Date Wed, 07 Mar 2007 11:01:30 GMT
Author: cziegeler
Date: Wed Mar  7 03:01:28 2007
New Revision: 515531

URL: http://svn.apache.org/viewvc?view=rev&rev=515531
Log:
Add new interfaces for easier aspect handling

Added:
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/AspectChain.java
  (with props)
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/DynamicAspect.java
  (with props)
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/support/AspectChainImpl.java
      - copied, changed from r515051, cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/support/AspectChain.java
Removed:
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/support/AspectChain.java
Modified:
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/support/RendererAspectChain.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/profile/impl/AbstractProfileManager.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/PortalManager.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/BasicAspectContext.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/ProfileManagerAspectContext.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/ResponseProcessorAspectContext.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/impl/support/ProfileManagerAspectContextImpl.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/impl/support/RequestProcessorAspectContextImpl.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/impl/support/ResponseProcessorAspectContextImpl.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/support/BasicAspectContextImpl.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/impl/DefaultPortalManager.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/spring/AspectsBeanDefinitionParser.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/spring/RegistrationBeanPostProcessor.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-portlet-impl/src/main/java/org/apache/cocoon/portal/pluto/adapter/PortletAdapter.java

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/support/RendererAspectChain.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/support/RendererAspectChain.java?view=diff&rev=515531&r1=515530&r2=515531
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/support/RendererAspectChain.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/support/RendererAspectChain.java
Wed Mar  7 03:01:28 2007
@@ -23,7 +23,7 @@
 
 import org.apache.cocoon.portal.PortalException;
 import org.apache.cocoon.portal.layout.renderer.aspect.RendererAspect;
-import org.apache.cocoon.portal.services.aspects.support.AspectChain;
+import org.apache.cocoon.portal.services.aspects.support.AspectChainImpl;
 
 /**
  * This chain holds all configured renderer aspects for one renderer.
@@ -41,7 +41,7 @@
  *
  * @version $Id$
  */
-public final class RendererAspectChain extends AspectChain {
+public final class RendererAspectChain extends AspectChainImpl {
 
     /** The list of the configuration objects for each renderer aspects. */
     protected List configs;
@@ -65,7 +65,7 @@
     }
 
     /**
-     * @see org.apache.cocoon.portal.services.aspects.support.AspectChain#addAspect(java.lang.Object,
java.util.Properties, int)
+     * @see org.apache.cocoon.portal.services.aspects.support.AspectChainImpl#addAspect(java.lang.Object,
java.util.Properties, int)
      */
     public void addAspect(Object aspect, Properties config, int index) throws PortalException
{
         if ( configs == null ) {

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/profile/impl/AbstractProfileManager.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/profile/impl/AbstractProfileManager.java?view=diff&rev=515531&r1=515530&r2=515531
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/profile/impl/AbstractProfileManager.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/profile/impl/AbstractProfileManager.java
Wed Mar  7 03:01:28 2007
@@ -34,7 +34,7 @@
 import org.apache.cocoon.portal.om.PortalUser;
 import org.apache.cocoon.portal.profile.ProfileManager;
 import org.apache.cocoon.portal.services.aspects.impl.support.ProfileManagerAspectContextImpl;
-import org.apache.cocoon.portal.services.aspects.support.AspectChain;
+import org.apache.cocoon.portal.services.aspects.support.AspectChainImpl;
 import org.apache.cocoon.portal.util.AbstractBean;
 import org.springframework.core.Ordered;
 
@@ -48,13 +48,13 @@
     implements ProfileManager, Receiver, Ordered {
 
     /** The chain for the configured profile manager aspects. */
-    protected AspectChain chain;
+    protected AspectChainImpl chain;
 
     /**
      * Set the event chain.
      * @param a A chain.
      */
-    public void setAspectChain(AspectChain a) {
+    public void setAspectChain(AspectChainImpl a) {
         this.chain = a;
     }
 

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/PortalManager.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/PortalManager.java?view=diff&rev=515531&r1=515530&r2=515531
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/PortalManager.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/PortalManager.java
Wed Mar  7 03:01:28 2007
@@ -59,7 +59,7 @@
     /**
      * Render the portal.
      * @param ch         The content handler receiving the sax events.
-     * @param Properties A properties object (can be null)
+     * @param properties A properties object (can be null)
      * @throws SAXException
      */
     void render(ContentHandler ch,

Added: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/AspectChain.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/AspectChain.java?view=auto&rev=515531
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/AspectChain.java
(added)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/AspectChain.java
Wed Mar  7 03:01:28 2007
@@ -0,0 +1,47 @@
+/*
+ * 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.cocoon.portal.services.aspects;
+
+import java.util.Iterator;
+import java.util.Properties;
+
+import org.apache.cocoon.portal.PortalException;
+
+/**
+ * Reusable implementation of an aspect chain.
+ *
+ * @since 2.2
+ * @version $Id$
+ */
+public interface AspectChain {
+
+    Properties EMPTY_PROPERTIES = new Properties();
+
+    Class getAspectClass();
+
+    void addAspect(Object aspect, Properties config)
+    throws PortalException;
+
+    void addAspect(Object aspect, Properties config, int index)
+    throws PortalException;
+
+    boolean hasAspects();
+
+    Iterator getAspectsIterator();
+
+    Iterator getPropertiesIterator();
+}

Propchange: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/AspectChain.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/AspectChain.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/BasicAspectContext.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/BasicAspectContext.java?view=diff&rev=515531&r1=515530&r2=515531
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/BasicAspectContext.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/BasicAspectContext.java
Wed Mar  7 03:01:28 2007
@@ -30,13 +30,15 @@
  */
 public interface BasicAspectContext {
 
-    /** 
+    /**
      * Get the {@link Properties} of the aspect.
+     * @return The aspect properties.
      */
     Properties getAspectProperties();
 
     /**
      * Get the portal service.
+     * @return The portal service.
      */
     PortalService getPortalService();
 }

Added: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/DynamicAspect.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/DynamicAspect.java?view=auto&rev=515531
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/DynamicAspect.java
(added)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/DynamicAspect.java
Wed Mar  7 03:01:28 2007
@@ -0,0 +1,37 @@
+/*
+ * 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.cocoon.portal.services.aspects;
+
+
+/**
+ * This is a marker interface for marking a bean as a dynamic aspect.
+ * A dynamic aspect does not need to be configured in the configuration.
+ * If the corresponding bean is configured, it is added to the aspect
+ * configuration automatically.
+ *
+ * @see ProfileManagerAspect
+ * @see RequestProcessorAspect
+ * @see ResponseProcessorAspect
+ * @see org.apache.cocoon.portal.layout.renderer.aspect.RendererAspect
+ *
+ * @since 2.2
+ * @version $Id$
+ */
+public interface DynamicAspect {
+
+  // just a marker interface
+}

Propchange: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/DynamicAspect.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/DynamicAspect.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/ProfileManagerAspectContext.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/ProfileManagerAspectContext.java?view=diff&rev=515531&r1=515530&r2=515531
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/ProfileManagerAspectContext.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/ProfileManagerAspectContext.java
Wed Mar  7 03:01:28 2007
@@ -25,7 +25,8 @@
 public interface ProfileManagerAspectContext extends BasicAspectContext {
 
     /**
-     * Invoke next aspect .
+     * Invoke next aspect.
+     * @param profile The profile information.
      */
-    void invokeNext(Object object);
+    void invokeNext(Object profile);
 }

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/ResponseProcessorAspectContext.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/ResponseProcessorAspectContext.java?view=diff&rev=515531&r1=515530&r2=515531
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/ResponseProcessorAspectContext.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/ResponseProcessorAspectContext.java
Wed Mar  7 03:01:28 2007
@@ -29,7 +29,10 @@
     extends BasicAspectContext {
 
     /**
-     * Invoke next aspect
+     * Invoke next aspect.
+     * @param ch The content handler for rendering.
+     * @param parameters Optional parameters for rendering.
+     * @throws SAXException If anything goes wrong.
      */
     void invokeNext(ContentHandler ch,
                     Properties     parameters)

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/impl/support/ProfileManagerAspectContextImpl.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/impl/support/ProfileManagerAspectContextImpl.java?view=diff&rev=515531&r1=515530&r2=515531
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/impl/support/ProfileManagerAspectContextImpl.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/impl/support/ProfileManagerAspectContextImpl.java
Wed Mar  7 03:01:28 2007
@@ -23,7 +23,7 @@
 import org.apache.cocoon.portal.om.Layout;
 import org.apache.cocoon.portal.services.aspects.ProfileManagerAspect;
 import org.apache.cocoon.portal.services.aspects.ProfileManagerAspectContext;
-import org.apache.cocoon.portal.services.aspects.support.AspectChain;
+import org.apache.cocoon.portal.services.aspects.support.AspectChainImpl;
 import org.apache.cocoon.portal.services.aspects.support.BasicAspectContextImpl;
 
 /**
@@ -45,7 +45,7 @@
     protected Object result;
 
     public ProfileManagerAspectContextImpl(PortalService service,
-                                           AspectChain   chain,
+                                           AspectChainImpl   chain,
                                            int           phase) {
         super(service, chain);
         this.phase = phase;
@@ -87,7 +87,7 @@
 
     /**
      * Return the resulting profile depending on the phase.
-     * @return
+     * @return The resulting profile.
      */
     public Object getResult() {
         return this.result;

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/impl/support/RequestProcessorAspectContextImpl.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/impl/support/RequestProcessorAspectContextImpl.java?view=diff&rev=515531&r1=515530&r2=515531
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/impl/support/RequestProcessorAspectContextImpl.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/impl/support/RequestProcessorAspectContextImpl.java
Wed Mar  7 03:01:28 2007
@@ -19,7 +19,7 @@
 import org.apache.cocoon.portal.PortalService;
 import org.apache.cocoon.portal.services.aspects.RequestProcessorAspect;
 import org.apache.cocoon.portal.services.aspects.RequestProcessorAspectContext;
-import org.apache.cocoon.portal.services.aspects.support.AspectChain;
+import org.apache.cocoon.portal.services.aspects.support.AspectChainImpl;
 import org.apache.cocoon.portal.services.aspects.support.BasicAspectContextImpl;
 
 /**
@@ -32,7 +32,7 @@
     implements RequestProcessorAspectContext {
 
     public RequestProcessorAspectContextImpl(PortalService service,
-                                             AspectChain    chain) {
+                                             AspectChainImpl    chain) {
         super(service, chain);
     }
 

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/impl/support/ResponseProcessorAspectContextImpl.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/impl/support/ResponseProcessorAspectContextImpl.java?view=diff&rev=515531&r1=515530&r2=515531
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/impl/support/ResponseProcessorAspectContextImpl.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/impl/support/ResponseProcessorAspectContextImpl.java
Wed Mar  7 03:01:28 2007
@@ -21,7 +21,7 @@
 import org.apache.cocoon.portal.PortalService;
 import org.apache.cocoon.portal.services.aspects.ResponseProcessorAspect;
 import org.apache.cocoon.portal.services.aspects.ResponseProcessorAspectContext;
-import org.apache.cocoon.portal.services.aspects.support.AspectChain;
+import org.apache.cocoon.portal.services.aspects.support.AspectChainImpl;
 import org.apache.cocoon.portal.services.aspects.support.BasicAspectContextImpl;
 import org.xml.sax.ContentHandler;
 import org.xml.sax.SAXException;
@@ -36,7 +36,7 @@
     implements ResponseProcessorAspectContext {
 
     public ResponseProcessorAspectContextImpl(PortalService service,
-                                              AspectChain    chain) {
+                                              AspectChainImpl    chain) {
         super(service, chain);
     }
 

Copied: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/support/AspectChainImpl.java
(from r515051, cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/support/AspectChain.java)
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/support/AspectChainImpl.java?view=diff&rev=515531&p1=cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/support/AspectChain.java&r1=515051&p2=cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/support/AspectChainImpl.java&r2=515531
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/support/AspectChain.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/support/AspectChainImpl.java
Wed Mar  7 03:01:28 2007
@@ -21,8 +21,8 @@
 import java.util.List;
 import java.util.Properties;
 
-import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.cocoon.portal.PortalException;
+import org.apache.cocoon.portal.services.aspects.AspectChain;
 
 /**
  * Reusable implementation of an aspect chain.
@@ -30,9 +30,7 @@
  * @since 2.2
  * @version $Id$
  */
-public class AspectChain {
-
-    public static final Properties EMPTY_PROPERTIES = new Properties();
+public class AspectChainImpl implements AspectChain {
 
     /** The aspect class. */
     protected final Class aspectClass;
@@ -46,7 +44,7 @@
     /** Do we have any aspects? */
     protected boolean process = false;
 
-    public AspectChain(Class aClass, List aspects, List properties)
+    public AspectChainImpl(Class aClass, List aspects, List properties)
     throws PortalException {
         this.aspectClass = aClass;
         if ( aspects.size() != properties.size() ) {
@@ -59,17 +57,30 @@
         }
     }
 
-    public AspectChain(Class aClass) {
+    public AspectChainImpl(Class aClass) {
         this.aspectClass = aClass;
         this.aspects = new ArrayList(3);
         this.configs = new ArrayList(3);
     }
 
+    /**
+     * @see org.apache.cocoon.portal.services.aspects.AspectChain#getAspectClass()
+     */
+    public Class getAspectClass() {
+        return this.aspectClass;
+    }
+
+    /**
+     * @see org.apache.cocoon.portal.services.aspects.AspectChain#addAspect(java.lang.Object,
java.util.Properties)
+     */
     public void addAspect(Object aspect, Properties config)
     throws PortalException {
         this.addAspect(aspect, config, -1);
     }
 
+    /**
+     * @see org.apache.cocoon.portal.services.aspects.AspectChain#addAspect(java.lang.Object,
java.util.Properties, int)
+     */
     public void addAspect(Object aspect, Properties config, int index)
     throws PortalException {
         if ( !this.aspectClass.isInstance(aspect) ) {
@@ -86,25 +97,24 @@
         }
     }
 
+    /**
+     * @see org.apache.cocoon.portal.services.aspects.AspectChain#hasAspects()
+     */
     public boolean hasAspects() {
         return this.process;
     }
 
+    /**
+     * @see org.apache.cocoon.portal.services.aspects.AspectChain#getAspectsIterator()
+     */
     public Iterator getAspectsIterator() {
         return this.aspects.iterator();
     }
 
+    /**
+     * @see org.apache.cocoon.portal.services.aspects.AspectChain#getPropertiesIterator()
+     */
     public Iterator getPropertiesIterator() {
         return this.configs.iterator();
-    }
-
-    public void dispose(ServiceManager manager) {
-        final Iterator i = this.aspects.iterator();
-        while (i.hasNext()) {
-            final Object component = i.next();
-            manager.release(component);
-        }
-        this.aspects.clear();
-        this.configs.clear();
     }
 }

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/support/BasicAspectContextImpl.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/support/BasicAspectContextImpl.java?view=diff&rev=515531&r1=515530&r2=515531
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/support/BasicAspectContextImpl.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/support/BasicAspectContextImpl.java
Wed Mar  7 03:01:28 2007
@@ -43,7 +43,7 @@
     protected Properties aspectProperties;
 
     public BasicAspectContextImpl(PortalService service,
-                                  AspectChain   chain) {
+                                  AspectChainImpl   chain) {
         this.portalService = service;
         if ( chain != null ) {
             this.aspectsIterator = chain.getAspectsIterator();

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/impl/DefaultPortalManager.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/impl/DefaultPortalManager.java?view=diff&rev=515531&r1=515530&r2=515531
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/impl/DefaultPortalManager.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/impl/DefaultPortalManager.java
Wed Mar  7 03:01:28 2007
@@ -39,7 +39,7 @@
 import org.apache.cocoon.portal.services.aspects.ResponseProcessorAspectContext;
 import org.apache.cocoon.portal.services.aspects.impl.support.RequestProcessorAspectContextImpl;
 import org.apache.cocoon.portal.services.aspects.impl.support.ResponseProcessorAspectContextImpl;
-import org.apache.cocoon.portal.services.aspects.support.AspectChain;
+import org.apache.cocoon.portal.services.aspects.support.AspectChainImpl;
 import org.apache.cocoon.portal.util.AbstractBean;
 import org.apache.cocoon.xml.AttributesImpl;
 import org.apache.cocoon.xml.XMLUtils;
@@ -56,16 +56,16 @@
 	implements PortalManager, RequestProcessorAspect, ResponseProcessorAspect {
 
     /** The aspect chain for additional request processing. */
-    protected AspectChain requestChain;
+    protected AspectChainImpl requestChain;
 
     /** The aspect chain for additional response processing. */
-    protected AspectChain responseChain;
+    protected AspectChainImpl responseChain;
 
     /**
      * Set the request aspect chain.
      * @param a A chain.
      */
-    public void setRequestAspectChain(AspectChain a) {
+    public void setRequestAspectChain(AspectChainImpl a) {
         this.requestChain = a;
     }
 
@@ -73,7 +73,7 @@
      * Set the response aspect chain.
      * @param a A chain.
      */
-    public void setResponseAspectChain(AspectChain a) {
+    public void setResponseAspectChain(AspectChainImpl a) {
         this.responseChain = a;
     }
 
@@ -104,11 +104,11 @@
     public void init()
     throws PortalException {
         if ( this.requestChain == null ) {
-            this.requestChain = new AspectChain(RequestProcessorAspect.class);
+            this.requestChain = new AspectChainImpl(RequestProcessorAspect.class);
         }
         this.requestChain.addAspect(this, null);
         if ( this.responseChain == null ) {
-            this.responseChain = new AspectChain(ResponseProcessorAspect.class);
+            this.responseChain = new AspectChainImpl(ResponseProcessorAspect.class);
         }
         this.responseChain.addAspect(this, null);
     }

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/spring/AspectsBeanDefinitionParser.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/spring/AspectsBeanDefinitionParser.java?view=diff&rev=515531&r1=515530&r2=515531
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/spring/AspectsBeanDefinitionParser.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/spring/AspectsBeanDefinitionParser.java
Wed Mar  7 03:01:28 2007
@@ -21,7 +21,8 @@
 import java.util.List;
 import java.util.Properties;
 
-import org.apache.cocoon.portal.services.aspects.support.AspectChain;
+import org.apache.cocoon.portal.services.aspects.AspectChain;
+import org.apache.cocoon.portal.services.aspects.support.AspectChainImpl;
 import org.apache.cocoon.spring.configurator.impl.AbstractElementParser;
 import org.springframework.beans.factory.BeanDefinitionStoreException;
 import org.springframework.beans.factory.config.BeanDefinition;
@@ -48,7 +49,7 @@
 
     public AspectsBeanDefinitionParser(final String className) {
         this.baseClass = className;
-        this.aspectChainClass = AspectChain.class;
+        this.aspectChainClass = AspectChainImpl.class;
     }
 
     public AspectsBeanDefinitionParser(final String className, Class aspectChainClass) {

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/spring/RegistrationBeanPostProcessor.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/spring/RegistrationBeanPostProcessor.java?view=diff&rev=515531&r1=515530&r2=515531
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/spring/RegistrationBeanPostProcessor.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/spring/RegistrationBeanPostProcessor.java
Wed Mar  7 03:01:28 2007
@@ -17,7 +17,7 @@
 package org.apache.cocoon.portal.spring;
 
 import org.apache.cocoon.portal.PortalService;
-import org.apache.cocoon.portal.coplet.adapter.CopletAdapter;
+import org.apache.cocoon.portal.services.aspects.DynamicAspect;
 import org.apache.cocoon.portal.services.aspects.RequestProcessorAspect;
 import org.apache.cocoon.portal.services.aspects.ResponseProcessorAspect;
 import org.springframework.beans.BeansException;
@@ -47,10 +47,10 @@
      * @see org.springframework.beans.factory.config.BeanPostProcessor#postProcessAfterInitialization(java.lang.Object,
java.lang.String)
      */
     public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException
{
-        if ( bean instanceof CopletAdapter && bean instanceof ResponseProcessorAspect
) {
+        if ( bean instanceof DynamicAspect && bean instanceof ResponseProcessorAspect
) {
             ((PortalService)this.beanFactory.getBean(PortalService.class.getName())).getPortalManager().register((ResponseProcessorAspect)bean);
         }
-        if ( bean instanceof CopletAdapter && bean instanceof RequestProcessorAspect
) {
+        if ( bean instanceof DynamicAspect && bean instanceof RequestProcessorAspect
) {
             ((PortalService)this.beanFactory.getBean(PortalService.class.getName())).getPortalManager().register((RequestProcessorAspect)bean);
         }
         return bean;

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-portlet-impl/src/main/java/org/apache/cocoon/portal/pluto/adapter/PortletAdapter.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-portlet-impl/src/main/java/org/apache/cocoon/portal/pluto/adapter/PortletAdapter.java?view=diff&rev=515531&r1=515530&r2=515531
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-portlet-impl/src/main/java/org/apache/cocoon/portal/pluto/adapter/PortletAdapter.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-portlet-impl/src/main/java/org/apache/cocoon/portal/pluto/adapter/PortletAdapter.java
Wed Mar  7 03:01:28 2007
@@ -52,6 +52,7 @@
 import org.apache.cocoon.portal.pluto.om.common.ObjectIDImpl;
 import org.apache.cocoon.portal.pluto.servlet.ServletRequestImpl;
 import org.apache.cocoon.portal.pluto.servlet.ServletResponseImpl;
+import org.apache.cocoon.portal.services.aspects.DynamicAspect;
 import org.apache.cocoon.portal.services.aspects.RequestProcessorAspect;
 import org.apache.cocoon.portal.services.aspects.ResponseProcessorAspect;
 import org.apache.cocoon.portal.services.aspects.ResponseProcessorAspectContext;
@@ -82,7 +83,7 @@
  */
 public class PortletAdapter
     extends AbstractCopletAdapter
-    implements RequestProcessorAspect, ResponseProcessorAspect, CopletDecorationProvider,
Receiver, Parameterizable {
+    implements RequestProcessorAspect, ResponseProcessorAspect, DynamicAspect, CopletDecorationProvider,
Receiver, Parameterizable {
 
     /** Name of the temporary coplet instance attribute holding the portlet window. */
     public static final String PORTLET_WINDOW_ATTRIBUTE_NAME = PortletAdapter.class.getName()
+ "/window";



Mime
View raw message