cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r329275 - in /cocoon/blocks: portal-sample/trunk/java/org/apache/cocoon/portal/coplets/basket/ portal/trunk/java/org/apache/cocoon/portal/layout/renderer/aspect/ portal/trunk/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/ portal...
Date Fri, 28 Oct 2005 19:41:57 GMT
Author: cziegeler
Date: Fri Oct 28 12:41:04 2005
New Revision: 329275

URL: http://svn.apache.org/viewcvs?rev=329275&view=rev
Log:
Clean up renderer aspects

Removed:
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/AbstractActionAspect.java
Modified:
    cocoon/blocks/portal-sample/trunk/java/org/apache/cocoon/portal/coplets/basket/AddToBasketAspect.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/renderer/aspect/RendererAspectContext.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/AbstractAspect.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/WindowAspect.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/XSLTAspect.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/adapter/PortletWindowAspect.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/wsrp/adapter/WSRPPortletWindowAspect.java

Modified: cocoon/blocks/portal-sample/trunk/java/org/apache/cocoon/portal/coplets/basket/AddToBasketAspect.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal-sample/trunk/java/org/apache/cocoon/portal/coplets/basket/AddToBasketAspect.java?rev=329275&r1=329274&r2=329275&view=diff
==============================================================================
--- cocoon/blocks/portal-sample/trunk/java/org/apache/cocoon/portal/coplets/basket/AddToBasketAspect.java
(original)
+++ cocoon/blocks/portal-sample/trunk/java/org/apache/cocoon/portal/coplets/basket/AddToBasketAspect.java
Fri Oct 28 12:41:04 2005
@@ -15,7 +15,6 @@
  */
 package org.apache.cocoon.portal.coplets.basket;
 
-import org.apache.avalon.framework.activity.Disposable;
 import org.apache.avalon.framework.parameters.ParameterException;
 import org.apache.avalon.framework.parameters.Parameters;
 import org.apache.avalon.framework.service.ServiceException;
@@ -41,10 +40,9 @@
  * @version $Id$
  */
 public final class AddToBasketAspect 
-extends AbstractAspect 
-implements Disposable {
+extends AbstractAspect {
 
-    /** The basket manager */
+    /** The basket manager. */
     protected BasketManager basketManager;
 
     /**
@@ -62,8 +60,8 @@
         if ( this.manager != null ) {
             this.manager.release(this.basketManager);
             this.basketManager = null;
-            this.manager = null;
         }
+        super.dispose();
     }
 
     /**

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/renderer/aspect/RendererAspectContext.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/renderer/aspect/RendererAspectContext.java?rev=329275&r1=329274&r2=329275&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/renderer/aspect/RendererAspectContext.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/renderer/aspect/RendererAspectContext.java
Fri Oct 28 12:41:04 2005
@@ -43,21 +43,6 @@
     Object getAspectConfiguration();
 
     /**
-     * Set an attribute
-     */
-    void setAttribute(String key, Object attribute);
-
-    /**
-     * Get an attribute
-     */
-    Object getAttribute(String key);
-
-    /**
-     * Remove an attribute
-     */
-    void removeAttribute(String key);
-
-    /**
      * Get the object model
      */
     Map getObjectModel();

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/AbstractAspect.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/AbstractAspect.java?rev=329275&r1=329274&r2=329275&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/AbstractAspect.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/AbstractAspect.java
Fri Oct 28 12:41:04 2005
@@ -15,19 +15,10 @@
  */
 package org.apache.cocoon.portal.layout.renderer.aspect.impl;
 
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.avalon.framework.parameters.ParameterException;
 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.avalon.framework.thread.ThreadSafe;
-import org.apache.cocoon.portal.PortalService;
-import org.apache.cocoon.portal.layout.Layout;
+import org.apache.cocoon.portal.impl.AbstractComponent;
 import org.apache.cocoon.portal.layout.renderer.aspect.RendererAspect;
-import org.apache.cocoon.portal.layout.renderer.aspect.RendererAspectContext;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
 
 /**
  * Base class for renderer aspects.
@@ -35,29 +26,8 @@
  * @version $Id$
  */
 public abstract class AbstractAspect
-    extends AbstractLogEnabled
-    implements Serviceable, ThreadSafe, RendererAspect {
-
-    protected ServiceManager manager;
-
-    /**
-     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
-     */
-    public void service(ServiceManager manager) throws ServiceException {
-        this.manager = manager;
-    }
-
-    /**
-     * @see org.apache.cocoon.portal.layout.renderer.aspect.RendererAspect#toSAX(org.apache.cocoon.portal.layout.renderer.aspect.RendererAspectContext,
org.apache.cocoon.portal.layout.Layout, org.apache.cocoon.portal.PortalService, org.xml.sax.ContentHandler)
-     */
-    public void toSAX(
-        RendererAspectContext context,
-        Layout layout,
-        PortalService service,
-        ContentHandler handler)
-        throws SAXException {
-        // empty implementation
-    }
+    extends AbstractComponent
+    implements RendererAspect {
 
     /**
      * @see org.apache.cocoon.portal.layout.renderer.aspect.RendererAspect#prepareConfiguration(org.apache.avalon.framework.parameters.Parameters)

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/WindowAspect.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/WindowAspect.java?rev=329275&r1=329274&r2=329275&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/WindowAspect.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/WindowAspect.java
Fri Oct 28 12:41:04 2005
@@ -80,7 +80,7 @@
     protected static class PreparedConfiguration {
         public String tagName;
         public boolean rootTag;
-        
+
         public void takeValues(PreparedConfiguration from) {
             this.tagName = from.tagName;
             this.rootTag = from.rootTag;

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/XSLTAspect.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/XSLTAspect.java?rev=329275&r1=329274&r2=329275&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/XSLTAspect.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/XSLTAspect.java
Fri Oct 28 12:41:04 2005
@@ -26,11 +26,9 @@
 import javax.xml.transform.sax.SAXResult;
 import javax.xml.transform.sax.TransformerHandler;
 
-import org.apache.avalon.framework.activity.Disposable;
 import org.apache.avalon.framework.parameters.ParameterException;
 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.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.avalon.framework.configuration.Configurable;
@@ -87,22 +85,12 @@
  */
 public class XSLTAspect 
     extends AbstractAspect
-    implements Disposable, Configurable {
+    implements Configurable {
 
     protected List variables = new ArrayList();
 
     protected Parameters parameters;
 
-//    protected VariableResolverFactory variableFactory;
-
-    /**
-     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
-     */
-    public void service(ServiceManager manager) throws ServiceException {
-        super.service(manager);
-//        this.variableFactory = (VariableResolverFactory) this.manager.lookup(VariableResolverFactory.ROLE);
-    }
-
     /**
      * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)
      */
@@ -248,9 +236,7 @@
                 ContainerUtil.dispose(vars.next());
             }
             this.variables.clear();
-            //this.manager.release( this.variableFactory);
-            this.manager = null;
-            //this.variableFactory = null;
         }
+        super.dispose();
     }
 }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/adapter/PortletWindowAspect.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/adapter/PortletWindowAspect.java?rev=329275&r1=329274&r2=329275&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/adapter/PortletWindowAspect.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/adapter/PortletWindowAspect.java
Fri Oct 28 12:41:04 2005
@@ -22,7 +22,6 @@
 
 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.ParameterException;
 import org.apache.avalon.framework.parameters.Parameters;
 import org.apache.cocoon.portal.PortalService;
@@ -76,16 +75,16 @@
  * @version $Id$
  */
 public final class PortletWindowAspect 
-extends AbstractAspect 
-implements Contextualizable {
+    extends AbstractAspect {
 
     /** The environment */
     protected PortletContainerEnvironment environment;
-    
-    /* (non-Javadoc)
+
+    /**
      * @see org.apache.avalon.framework.context.Contextualizable#contextualize(org.apache.avalon.framework.context.Context)
      */
     public void contextualize(Context context) throws ContextException {
+        super.contextualize(context);
         try {
             // now get the portal manager
             ServletConfig servletConfig = (ServletConfig) context.get(CocoonServlet.CONTEXT_SERVLET_CONFIG);
@@ -101,7 +100,7 @@
         }
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.cocoon.portal.layout.renderer.RendererAspect#toSAX(org.apache.cocoon.portal.layout.renderer.RendererAspectContext,
org.apache.cocoon.portal.layout.Layout, org.apache.cocoon.portal.PortalService, org.xml.sax.ContentHandler)
      */
     public void toSAX(RendererAspectContext context,
@@ -123,7 +122,7 @@
             if ( ((PortletWindowImpl)window).getLayout() == null ) {
                 ((PortletWindowImpl)window).setLayout((CopletLayout)layout);
             }
-            
+
             String title = (String) copletInstanceData.getTemporaryAttribute("dynamic-title");
             if ( title == null ) {
                 final PortletDefinition def = window.getPortletEntity().getPortletDefinition();
@@ -134,18 +133,17 @@
                 }
             }
             XMLUtils.createElement(contenthandler, "title", title);            
-        
 
             if ( this.environment != null ) {
                 InformationProviderService ips = (InformationProviderService) this.environment.getContainerService(InformationProviderService.class);
                 DynamicInformationProvider dip = ips.getDynamicProvider((HttpServletRequest)
context.getObjectModel().get("portlet-request"));
-                
+
                 // Sizing
                 WindowState ws = (WindowState)copletInstanceData.getTemporaryAttribute("window-state");

                 if ( ws == null ) {
                     ws = WindowState.NORMAL;
                 }
-                
+
                 if ( !ws.equals(WindowState.MINIMIZED) && !ws.equals(WindowState.MAXIMIZED))
{
                     PortletURLProviderImpl url = (PortletURLProviderImpl)dip.getPortletURLProvider(window);
                     url.clearParameters();
@@ -195,7 +193,7 @@
         }
 
         context.invokeNext( layout, service, contenthandler );
-        
+
         if ( config.rootTag ) {
             XMLUtils.endElement(contenthandler, config.tagName);
         }
@@ -210,8 +208,8 @@
             this.rootTag = from.rootTag;
         }
     }
-    
-    /* (non-Javadoc)
+
+    /**
      * @see org.apache.cocoon.portal.layout.renderer.aspect.RendererAspect#prepareConfiguration(org.apache.avalon.framework.parameters.Parameters)
      */
     public Object prepareConfiguration(Parameters configuration) 
@@ -221,5 +219,4 @@
         pc.rootTag = configuration.getParameterAsBoolean("root-tag", true);
         return pc;
     }
-
 }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/wsrp/adapter/WSRPPortletWindowAspect.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/wsrp/adapter/WSRPPortletWindowAspect.java?rev=329275&r1=329274&r2=329275&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/wsrp/adapter/WSRPPortletWindowAspect.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/wsrp/adapter/WSRPPortletWindowAspect.java
Fri Oct 28 12:41:04 2005
@@ -24,7 +24,6 @@
 
 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.ParameterException;
 import org.apache.avalon.framework.parameters.Parameters;
 import org.apache.cocoon.portal.PortalService;
@@ -82,8 +81,7 @@
  * @version $Id$
  */
 public final class WSRPPortletWindowAspect 
-extends AbstractAspect
-    implements Contextualizable {
+extends AbstractAspect {
 
     /** The environment implementation*/
     protected ConsumerEnvironmentImpl environment;
@@ -95,6 +93,7 @@
      * @see org.apache.avalon.framework.context.Contextualizable#contextualize(org.apache.avalon.framework.context.Context)
      */
     public void contextualize(Context context) throws ContextException {
+        super.contextualize(context);
         try {
             // now get the wsrp adapter
             ServletConfig servletConfig = (ServletConfig) context.get(CocoonServlet.CONTEXT_SERVLET_CONFIG);
@@ -161,7 +160,7 @@
                         final Map p = new HashMap();
                         p.put(Constants.URL_TYPE, Constants.URL_TYPE_RENDER);
                         p.put(Constants.WINDOW_STATE, WindowStates._minimized);
-                        
+
                         final String link = urlGenerator.getRenderURL(p);
                         XMLUtils.createElement(contenthandler, "minimize-uri", link);
                     }
@@ -226,7 +225,7 @@
         }
 
         context.invokeNext( layout, service, contenthandler );
-        
+
         if ( config.rootTag ) {
             XMLUtils.endElement(contenthandler, config.tagName);
         }
@@ -237,13 +236,13 @@
      * 
      */
     protected static class PreparedConfiguration {
-        
+
         /** name of the element */
         public String tagName;
-        
+
         /** shows if the element is on the highest level */
         public boolean rootTag;
-        
+
         /**
          * set the configuration to the local attributes<br/>
          * 
@@ -254,7 +253,7 @@
             this.rootTag = from.rootTag;
         }
     }
-    
+
     /**
      * @see org.apache.cocoon.portal.layout.renderer.aspect.RendererAspect#prepareConfiguration(org.apache.avalon.framework.parameters.Parameters)
      */



Mime
View raw message