cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/jxforms/java/org/apache/cocoon/generation JXFormsGenerator.java
Date Thu, 04 Sep 2003 09:38:41 GMT
cziegeler    2003/09/04 02:38:40

  Modified:    src/blocks/slide/java/org/apache/cocoon/generation
                        SourceDescriptionGenerator.java
               src/blocks/chaperon/java/org/apache/cocoon/generation
                        TextGenerator.java
               src/blocks/portal/java/org/apache/cocoon/portal/generation
                        PortalGenerator.java
               src/blocks/profiler/java/org/apache/cocoon/generation
                        ProfilerGenerator.java
               src/blocks/slop/java/org/apache/cocoon/slop/generation
                        SlopGenerator.java
               src/blocks/velocity/java/org/apache/cocoon/generation
                        VelocityGenerator.java
               src/blocks/midi/java/org/apache/cocoon/generation
                        XMidiGenerator.java
               src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/generation
                        ConfigurationGenerator.java PortalGenerator.java
               src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/generation
                        ConfigurationGenerator.java
               src/scratchpad/src/org/apache/cocoon/generation
                        FlowVelocityGenerator.java GarbageGenerator.java
                        JellyGenerator.java XPathTraversableGenerator.java
                        RequestAttributeGenerator.java
                        TraversableGenerator.java
               src/blocks/asciiart/java/org/apache/cocoon/generation/asciiart
                        AsciiArtSVGGenerator.java
               src/blocks/batik/java/org/apache/cocoon/generation
                        FragmentExtractorGenerator.java
               src/blocks/proxy/java/org/apache/cocoon/util
                        RequestForwardingHttpMethod.java
               src/blocks/proxy/java/org/apache/cocoon/generation
                        WebServiceProxyGenerator.java
                        HttpProxyGenerator.java GenericProxyGenerator.java
               src/blocks/lucene/java/org/apache/cocoon/generation
                        SearchGenerator.java
               src/blocks/html/java/org/apache/cocoon/generation
                        HTMLGenerator.java
               src/blocks/bsf/java/org/apache/cocoon/generation
                        ScriptGenerator.java
               src/blocks/jxforms/java/org/apache/cocoon/generation
                        JXFormsGenerator.java
  Log:
  Moving to ServiceableGenerator and fixing many component releases!
  
  Revision  Changes    Path
  1.5       +4 -4      cocoon-2.1/src/blocks/slide/java/org/apache/cocoon/generation/SourceDescriptionGenerator.java
  
  Index: SourceDescriptionGenerator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/slide/java/org/apache/cocoon/generation/SourceDescriptionGenerator.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SourceDescriptionGenerator.java	19 May 2003 10:02:06 -0000	1.4
  +++ SourceDescriptionGenerator.java	4 Sep 2003 09:38:32 -0000	1.5
  @@ -58,8 +58,8 @@
   import java.util.Map;
   
   import org.apache.avalon.excalibur.pool.Recyclable;
  -import org.apache.avalon.framework.component.ComponentException;
   import org.apache.avalon.framework.parameters.Parameters;
  +import org.apache.avalon.framework.service.ServiceException;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.caching.CacheableProcessingComponent;
   import org.apache.cocoon.components.source.InspectableSource;
  @@ -90,7 +90,7 @@
    * @author <a href="mailto:stephan@apache.org">Stephan Michels</a>
    * @version CVS $Id$
    */
  -public class SourceDescriptionGenerator extends ComposerGenerator
  +public class SourceDescriptionGenerator extends ServiceableGenerator
     implements CacheableProcessingComponent, Recyclable {
   
       /** Namespace of the source description. */
  @@ -544,7 +544,7 @@
                   properties[i].toSAX(consumer);
                   this.contentHandler.endPrefixMapping("");
               }
  -        } catch (ComponentException ce) {
  +        } catch (ServiceException ce) {
               if (getLogger().isDebugEnabled()) {
                   getLogger().debug("Could not retrieve source inspector", ce);
               }
  
  
  
  1.3       +2 -2      cocoon-2.1/src/blocks/chaperon/java/org/apache/cocoon/generation/TextGenerator.java
  
  Index: TextGenerator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/chaperon/java/org/apache/cocoon/generation/TextGenerator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TextGenerator.java	19 Mar 2003 15:42:15 -0000	1.2
  +++ TextGenerator.java	4 Sep 2003 09:38:32 -0000	1.3
  @@ -80,7 +80,7 @@
    * @author <a href="mailto:stephan@apache.org">Stephan Michels </a>
    * @version CVS $Id$
    */
  -public class TextGenerator extends ComposerGenerator
  +public class TextGenerator extends ServiceableGenerator
     implements CacheableProcessingComponent {
   
       /** The URI of the text element */
  
  
  
  1.3       +6 -6      cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/generation/PortalGenerator.java
  
  Index: PortalGenerator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/generation/PortalGenerator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PortalGenerator.java	17 Jun 2003 19:59:33 -0000	1.2
  +++ PortalGenerator.java	4 Sep 2003 09:38:32 -0000	1.3
  @@ -53,12 +53,12 @@
   import java.io.IOException;
   import java.util.Map;
   
  -import org.apache.avalon.framework.component.ComponentException;
   import org.apache.avalon.framework.parameters.ParameterException;
   import org.apache.avalon.framework.parameters.Parameters;
  +import org.apache.avalon.framework.service.ServiceException;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.environment.SourceResolver;
  -import org.apache.cocoon.generation.ComposerGenerator;
  +import org.apache.cocoon.generation.ServiceableGenerator;
   import org.apache.cocoon.portal.PortalManager;
   import org.apache.cocoon.portal.PortalService;
   import org.xml.sax.SAXException;
  @@ -71,7 +71,7 @@
    * @version CVS $Id$
    */
   public class PortalGenerator 
  -extends ComposerGenerator {
  +extends ServiceableGenerator {
   
   	/**
   	 * @see org.apache.cocoon.generation.Generator#generate()
  @@ -84,7 +84,7 @@
               pm = (PortalManager)this.manager.lookup(PortalManager.ROLE);
               pm.process();
               pm.showPortal(this.xmlConsumer, this.parameters);
  -        } catch (ComponentException ce) {
  +        } catch (ServiceException ce) {
               throw new ProcessingException("Unable to lookup portal manager.", ce);
           } finally {
               this.manager.release(pm);
  @@ -107,7 +107,7 @@
               service.setPortalName(par.getParameter("portal-name"));
           } catch (ParameterException pe) {
               throw new ProcessingException("Parameter portal-name is required.");
  -        } catch (ComponentException ce) {
  +        } catch (ServiceException ce) {
               throw new ProcessingException("Unable to lookup portal service.", ce);
           } finally {
               this.manager.release(service);
  
  
  
  1.5       +8 -8      cocoon-2.1/src/blocks/profiler/java/org/apache/cocoon/generation/ProfilerGenerator.java
  
  Index: ProfilerGenerator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/profiler/java/org/apache/cocoon/generation/ProfilerGenerator.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ProfilerGenerator.java	16 May 2003 08:49:19 -0000	1.4
  +++ ProfilerGenerator.java	4 Sep 2003 09:38:32 -0000	1.5
  @@ -50,9 +50,9 @@
   */
   package org.apache.cocoon.generation;
   
  -import org.apache.avalon.framework.component.ComponentException;
  -import org.apache.avalon.framework.component.ComponentManager;
   import org.apache.avalon.framework.parameters.Parameters;
  +import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.components.profiler.EnvironmentInfo;
   import org.apache.cocoon.components.profiler.Profiler;
  @@ -81,7 +81,7 @@
    * @author <a href="mailto:stephan@apache.org">Stephan Michels</a>
    * @version CVS $Id$
    */
  -public class ProfilerGenerator extends ComposerGenerator {
  +public class ProfilerGenerator extends ServiceableGenerator {
   
       /**
        * The XML PROFILER_NS for the output document.
  @@ -117,10 +117,10 @@
       private boolean fragmentOnly;
   
       /**
  -     * Composable
  +     * Serviceable
        */
  -    public void compose(ComponentManager manager) throws ComponentException {
  -        super.compose(manager);
  +    public void service(ServiceManager manager) throws ServiceException {
  +        super.service(manager);
           this.profiler = (Profiler) super.manager.lookup(Profiler.ROLE);
       }
   
  @@ -505,7 +505,7 @@
                   else
                       deserializer.setConsumer(this.xmlConsumer);
                   deserializer.deserialize(fragment);
  -            } catch (ComponentException ce) {
  +            } catch (ServiceException ce) {
                   getLogger().debug("Could not retrieve XMLDeserializer component",
                                     ce);
                   throw new SAXException("Could not retrieve XMLDeserializer component",
  
  
  
  1.3       +3 -3      cocoon-2.1/src/blocks/slop/java/org/apache/cocoon/slop/generation/SlopGenerator.java
  
  Index: SlopGenerator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/slop/java/org/apache/cocoon/slop/generation/SlopGenerator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SlopGenerator.java	7 Aug 2003 11:08:06 -0000	1.2
  +++ SlopGenerator.java	4 Sep 2003 09:38:32 -0000	1.3
  @@ -61,7 +61,7 @@
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.caching.CacheableProcessingComponent;
   import org.apache.cocoon.environment.SourceResolver;
  -import org.apache.cocoon.generation.ComposerGenerator;
  +import org.apache.cocoon.generation.ServiceableGenerator;
   import org.apache.cocoon.slop.interfaces.SlopParser;
   import org.apache.cocoon.slop.parsing.SimpleSlopParser;
   import org.apache.excalibur.source.Source;
  @@ -78,7 +78,7 @@
    * @version CVS $Id$
    */
   
  -public class SlopGenerator extends ComposerGenerator
  +public class SlopGenerator extends ServiceableGenerator
           implements CacheableProcessingComponent {
   
       private Source inputSource = null;
  
  
  
  1.8       +5 -6      cocoon-2.1/src/blocks/velocity/java/org/apache/cocoon/generation/VelocityGenerator.java
  
  Index: VelocityGenerator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/velocity/java/org/apache/cocoon/generation/VelocityGenerator.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- VelocityGenerator.java	12 Jul 2003 19:39:41 -0000	1.7
  +++ VelocityGenerator.java	4 Sep 2003 09:38:33 -0000	1.8
  @@ -59,14 +59,13 @@
   import java.util.*;
   
   import org.apache.avalon.framework.activity.Initializable;
  -import org.apache.avalon.framework.component.Component;
  -import org.apache.avalon.framework.component.ComponentException;
   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.ContextException;
   import org.apache.avalon.framework.context.DefaultContext;
   import org.apache.avalon.framework.parameters.Parameters;
  +import org.apache.avalon.framework.service.ServiceException;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.ResourceNotFoundException;
   import org.apache.cocoon.components.flow.FlowHelper;
  @@ -177,7 +176,7 @@
    *
    * @version CVS $Id$
    */
  -public class VelocityGenerator extends ComposerGenerator
  +public class VelocityGenerator extends ServiceableGenerator
           implements Initializable, Configurable, LogSystem {
   
       /**
  @@ -1075,7 +1074,7 @@
           } catch (SAXException e) {
               getLogger().error("VelocityGenerator.generate()", e);
               throw e;
  -        } catch (ComponentException e) {
  +        } catch (ServiceException e) {
               getLogger().error("Could not get parser", e);
               throw new ProcessingException("Exception in VelocityGenerator.generate()",
e);
           } catch (ProcessingException e) {
  @@ -1084,7 +1083,7 @@
               getLogger().error("Could not get parser", e);
               throw new ProcessingException("Exception in VelocityGenerator.generate()",
e);
           } finally {
  -            this.manager.release((Component) parser);
  +            this.manager.release(parser);
           }
       }
   
  
  
  
  1.2       +1 -1      cocoon-2.1/src/blocks/midi/java/org/apache/cocoon/generation/XMidiGenerator.java
  
  Index: XMidiGenerator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/midi/java/org/apache/cocoon/generation/XMidiGenerator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XMidiGenerator.java	11 Aug 2003 21:54:09 -0000	1.1
  +++ XMidiGenerator.java	4 Sep 2003 09:38:33 -0000	1.2
  @@ -85,7 +85,7 @@
    * @author <a href="mailto:peter@palserv.com">Peter Loeb</a>
    */
   
  -public class XMidiGenerator extends ComposerGenerator implements Parameterizable
  +public class XMidiGenerator extends AbstractGenerator implements Parameterizable
   {
   
     /** The input source */
  
  
  
  1.3       +5 -5      cocoon-2.1/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/generation/ConfigurationGenerator.java
  
  Index: ConfigurationGenerator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/generation/ConfigurationGenerator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ConfigurationGenerator.java	18 Jun 2003 12:36:46 -0000	1.2
  +++ ConfigurationGenerator.java	4 Sep 2003 09:38:33 -0000	1.3
  @@ -52,11 +52,11 @@
   
   import java.io.IOException;
   
  -import org.apache.avalon.framework.component.ComponentException;
  +import org.apache.avalon.framework.service.ServiceException;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.environment.ObjectModelHelper;
   import org.apache.cocoon.environment.Request;
  -import org.apache.cocoon.generation.ComposerGenerator;
  +import org.apache.cocoon.generation.ServiceableGenerator;
   import org.apache.cocoon.webapps.portal.components.PortalManager;
   import org.xml.sax.SAXException;
   
  @@ -68,7 +68,7 @@
    * @version CVS $Id$
   */
   public final class ConfigurationGenerator
  -extends ComposerGenerator {
  +extends ServiceableGenerator {
   
       public void generate()
       throws IOException, SAXException, ProcessingException {
  @@ -90,7 +90,7 @@
               }
   
               this.xmlConsumer.endDocument();
  -        } catch (ComponentException ce) {
  +        } catch (ServiceException ce) {
               throw new ProcessingException("Lookup of portal failed.", ce);
           } finally {
               this.manager.release(portal);
  
  
  
  1.5       +6 -7      cocoon-2.1/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/generation/PortalGenerator.java
  
  Index: PortalGenerator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/generation/PortalGenerator.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- PortalGenerator.java	6 May 2003 17:08:53 -0000	1.4
  +++ PortalGenerator.java	4 Sep 2003 09:38:33 -0000	1.5
  @@ -52,12 +52,11 @@
   
   import java.io.IOException;
   
  -import org.apache.avalon.framework.component.Component;
  -import org.apache.avalon.framework.component.ComponentException;
  +import org.apache.avalon.framework.service.ServiceException;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.environment.ObjectModelHelper;
   import org.apache.cocoon.environment.Request;
  -import org.apache.cocoon.generation.ComposerGenerator;
  +import org.apache.cocoon.generation.ServiceableGenerator;
   import org.apache.cocoon.webapps.portal.components.PortalManager;
   import org.apache.cocoon.webapps.session.FormManager;
   import org.xml.sax.SAXException;
  @@ -69,7 +68,7 @@
    * @version CVS $Id$
   */
   public final class PortalGenerator
  -extends ComposerGenerator {
  +extends ServiceableGenerator {
   
       public void generate()
       throws IOException, SAXException, ProcessingException {
  @@ -90,10 +89,10 @@
   
               }
               this.xmlConsumer.endDocument();
  -        } catch (ComponentException ce) {
  +        } catch (ServiceException ce) {
               throw new ProcessingException("Lookup of PortalManager failed.", ce);
           } finally {
  -            this.manager.release( (Component)formManager);
  +            this.manager.release( formManager);
               this.manager.release(portal);
           }
       }
  
  
  
  1.5       +3 -3      cocoon-2.1/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/generation/ConfigurationGenerator.java
  
  Index: ConfigurationGenerator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/generation/ConfigurationGenerator.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ConfigurationGenerator.java	23 May 2003 12:13:14 -0000	1.4
  +++ ConfigurationGenerator.java	4 Sep 2003 09:38:34 -0000	1.5
  @@ -63,7 +63,7 @@
   import org.apache.cocoon.environment.Request;
   import org.apache.cocoon.environment.Response;
   import org.apache.cocoon.environment.Session;
  -import org.apache.cocoon.generation.ComposerGenerator;
  +import org.apache.cocoon.generation.ServiceableGenerator;
   import org.apache.cocoon.webapps.authentication.AuthenticationManager;
   import org.apache.cocoon.webapps.authentication.context.AuthenticationContext;
   import org.apache.cocoon.webapps.authentication.user.RequestState;
  @@ -90,7 +90,7 @@
    * @version CVS $Id$
   */
   public final class ConfigurationGenerator
  -extends ComposerGenerator {
  +extends ServiceableGenerator {
   
       /** Request parameter */
       public static final String REQ_PARAMETER_STATE = "authstate";
  
  
  
  1.10      +2 -2      cocoon-2.1/src/scratchpad/src/org/apache/cocoon/generation/FlowVelocityGenerator.java
  
  Index: FlowVelocityGenerator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/scratchpad/src/org/apache/cocoon/generation/FlowVelocityGenerator.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- FlowVelocityGenerator.java	18 May 2003 16:36:41 -0000	1.9
  +++ FlowVelocityGenerator.java	4 Sep 2003 09:38:34 -0000	1.10
  @@ -177,7 +177,7 @@
    *
    * @version CVS $Id$
    */
  -public class FlowVelocityGenerator extends ComposerGenerator
  +public class FlowVelocityGenerator extends ServiceableGenerator
           implements Initializable, Configurable, LogSystem {
   
       /**
  
  
  
  1.7       +1 -1      cocoon-2.1/src/scratchpad/src/org/apache/cocoon/generation/GarbageGenerator.java
  
  Index: GarbageGenerator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/scratchpad/src/org/apache/cocoon/generation/GarbageGenerator.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- GarbageGenerator.java	11 Aug 2003 13:11:44 -0000	1.6
  +++ GarbageGenerator.java	4 Sep 2003 09:38:34 -0000	1.7
  @@ -72,7 +72,7 @@
   import org.xml.sax.SAXException;
   import org.xml.sax.SAXParseException;
   
  -public class GarbageGenerator extends ComposerGenerator {
  +public class GarbageGenerator extends ServiceableGenerator {
   
       // FIXME - We should not use a static variable here: use a component instead
       protected static Map cache = new HashMap();
  
  
  
  1.3       +1 -1      cocoon-2.1/src/scratchpad/src/org/apache/cocoon/generation/JellyGenerator.java
  
  Index: JellyGenerator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/scratchpad/src/org/apache/cocoon/generation/JellyGenerator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JellyGenerator.java	4 Aug 2003 03:06:30 -0000	1.2
  +++ JellyGenerator.java	4 Sep 2003 09:38:34 -0000	1.3
  @@ -76,7 +76,7 @@
    *
    * @author <a href="mailto:amal.sirvisetti@sirvisetti.com">Amal Sirvisetti</a>
    */
  -public class JellyGenerator extends ComposerGenerator 
  +public class JellyGenerator extends ServiceableGenerator 
   {
   
       /** The Jelly Context */
  
  
  
  1.3       +15 -5     cocoon-2.1/src/scratchpad/src/org/apache/cocoon/generation/XPathTraversableGenerator.java
  
  Index: XPathTraversableGenerator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/scratchpad/src/org/apache/cocoon/generation/XPathTraversableGenerator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XPathTraversableGenerator.java	13 Jul 2003 12:33:53 -0000	1.2
  +++ XPathTraversableGenerator.java	4 Sep 2003 09:38:34 -0000	1.3
  @@ -57,9 +57,9 @@
   import java.util.HashMap;
   import java.util.Map;
   
  -import org.apache.avalon.framework.component.ComponentException;
  -import org.apache.avalon.framework.component.ComponentManager;
   import org.apache.avalon.framework.parameters.Parameters;
  +import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.environment.SourceResolver;
   import org.apache.cocoon.xml.dom.DOMStreamer;
  @@ -208,12 +208,22 @@
           }
       }
   
  -    public void compose(ComponentManager manager) throws ComponentException {
  -        super.compose(manager);
  +    public void service(ServiceManager manager) throws ServiceException {
  +        super.service(manager);
           processor = (XPathProcessor)manager.lookup(XPathProcessor.ROLE);
           parser = (DOMParser)manager.lookup(DOMParser.ROLE);
       }
   
  +    public void dispose() {
  +        if ( this.manager != null ) {
  +            this.manager.release( processor );
  +            this.manager.release( parser );
  +            this.processor = null;
  +            this.parser = null;
  +        }
  +        super.dispose();
  +    }
  +    
       /**
        * Adds a single node to the generated document. If the path is a
        * directory, and depth is greater than zero, then recursive calls
  
  
  
  1.4       +2 -2      cocoon-2.1/src/scratchpad/src/org/apache/cocoon/generation/RequestAttributeGenerator.java
  
  Index: RequestAttributeGenerator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/scratchpad/src/org/apache/cocoon/generation/RequestAttributeGenerator.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- RequestAttributeGenerator.java	3 Sep 2003 13:35:20 -0000	1.3
  +++ RequestAttributeGenerator.java	4 Sep 2003 09:38:34 -0000	1.4
  @@ -85,7 +85,7 @@
    *   required="yes"
    *   default="none"
    */
  -public class RequestAttributeGenerator extends ComposerGenerator {
  +public class RequestAttributeGenerator extends ServiceableGenerator {
       /**
        * The name of this class
        *
  
  
  
  1.7       +2 -2      cocoon-2.1/src/scratchpad/src/org/apache/cocoon/generation/TraversableGenerator.java
  
  Index: TraversableGenerator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/scratchpad/src/org/apache/cocoon/generation/TraversableGenerator.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TraversableGenerator.java	1 Aug 2003 17:21:15 -0000	1.6
  +++ TraversableGenerator.java	4 Sep 2003 09:38:34 -0000	1.7
  @@ -129,7 +129,7 @@
    * @author <a href="gianugo@apache.org">Gianugo Rabellino</a>
    * @version CVS $Id$
    */
  -public class TraversableGenerator extends ComposerGenerator implements CacheableProcessingComponent
{
  +public class TraversableGenerator extends ServiceableGenerator implements CacheableProcessingComponent
{
   
       /** The URI of the namespace of this generator. */
       protected static final String URI = "http://apache.org/cocoon/collection/1.0";
  
  
  
  1.4       +6 -5      cocoon-2.1/src/blocks/asciiart/java/org/apache/cocoon/generation/asciiart/AsciiArtSVGGenerator.java
  
  Index: AsciiArtSVGGenerator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/asciiart/java/org/apache/cocoon/generation/asciiart/AsciiArtSVGGenerator.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AsciiArtSVGGenerator.java	19 Mar 2003 15:42:15 -0000	1.3
  +++ AsciiArtSVGGenerator.java	4 Sep 2003 09:38:35 -0000	1.4
  @@ -67,7 +67,7 @@
   import org.apache.cocoon.caching.CacheableProcessingComponent;
   import org.apache.cocoon.components.source.SourceUtil;
   import org.apache.cocoon.environment.SourceResolver;
  -import org.apache.cocoon.generation.ComposerGenerator;
  +import org.apache.cocoon.generation.AbstractGenerator;
   import org.apache.excalibur.source.Source;
   import org.apache.excalibur.source.SourceException;
   import org.apache.excalibur.source.SourceValidity;
  @@ -82,8 +82,9 @@
    * @version CVS $Id$
    * @since Cocoon 2.1, 22 December 2002
    */
  -public class AsciiArtSVGGenerator extends ComposerGenerator
  -         implements CacheableProcessingComponent {
  +public class AsciiArtSVGGenerator 
  +    extends AbstractGenerator
  +    implements CacheableProcessingComponent {
   
       /**
        * The input source
  @@ -127,7 +128,7 @@
        *@exception  IOException          general io fails
        */
       public void setup(SourceResolver resolver, Map objectModel, String src, Parameters
par)
  -             throws ProcessingException, SAXException, IOException {
  +    throws ProcessingException, SAXException, IOException {
           super.setup(resolver, objectModel, src, par);
           
           try {
  
  
  
  1.3       +4 -5      cocoon-2.1/src/blocks/batik/java/org/apache/cocoon/generation/FragmentExtractorGenerator.java
  
  Index: FragmentExtractorGenerator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/batik/java/org/apache/cocoon/generation/FragmentExtractorGenerator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FragmentExtractorGenerator.java	19 Mar 2003 15:42:16 -0000	1.2
  +++ FragmentExtractorGenerator.java	4 Sep 2003 09:38:35 -0000	1.3
  @@ -50,8 +50,7 @@
   */
   package org.apache.cocoon.generation;
   
  -import org.apache.avalon.framework.component.ComponentException;
  -
  +import org.apache.avalon.framework.service.ServiceException;
   import org.apache.cocoon.caching.CacheableProcessingComponent;
   import org.apache.cocoon.components.sax.XMLDeserializer;
   
  @@ -75,7 +74,7 @@
    * @author <a href="mailto:paul@luminas.co.uk">Paul Russell</a>
    * @version CVS $Id$
    */
  -public class FragmentExtractorGenerator extends ComposerGenerator
  +public class FragmentExtractorGenerator extends ServiceableGenerator
           implements CacheableProcessingComponent {
   
       /**
  @@ -116,7 +115,7 @@
               deserializer.setConsumer(this.xmlConsumer);
               deserializer.deserialize(fragment);
   
  -        } catch (ComponentException ce) {
  +        } catch (ServiceException ce) {
               getLogger().error("Could not lookup for component.", ce);
               throw new SAXException("Could not lookup for component.", ce);
           } finally
  
  
  
  1.2       +2 -1      cocoon-2.1/src/blocks/proxy/java/org/apache/cocoon/util/RequestForwardingHttpMethod.java
  
  Index: RequestForwardingHttpMethod.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/proxy/java/org/apache/cocoon/util/RequestForwardingHttpMethod.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RequestForwardingHttpMethod.java	29 Aug 2003 17:33:24 -0000	1.1
  +++ RequestForwardingHttpMethod.java	4 Sep 2003 09:38:36 -0000	1.2
  @@ -124,6 +124,7 @@
                   String path = cookies[i].getPath();
                   String value = cookies[i].getValue();
                   Cookie cookie = new Cookie(domain, path, value);
  +                cookie.setName(name);
                   newCookiesList.add(cookie);
               }
           
  
  
  
  1.3       +5 -6      cocoon-2.1/src/blocks/proxy/java/org/apache/cocoon/generation/WebServiceProxyGenerator.java
  
  Index: WebServiceProxyGenerator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/proxy/java/org/apache/cocoon/generation/WebServiceProxyGenerator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- WebServiceProxyGenerator.java	21 Aug 2003 12:54:20 -0000	1.2
  +++ WebServiceProxyGenerator.java	4 Sep 2003 09:38:37 -0000	1.3
  @@ -50,9 +50,8 @@
    */
   package org.apache.cocoon.generation;
   
  -import org.apache.avalon.framework.component.Component;
  -import org.apache.avalon.framework.component.ComponentException;
   import org.apache.avalon.framework.parameters.Parameters;
  +import org.apache.avalon.framework.service.ServiceException;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.components.source.SourceUtil;
   import org.apache.cocoon.environment.ObjectModelHelper;
  @@ -109,7 +108,7 @@
    * @author <a href="mailto:tc@hist.umn.edu">Tony Collen</a>, December 2, 2002
    * @version CVS $Id$
    */
  -public class WebServiceProxyGenerator extends ComposerGenerator {
  +public class WebServiceProxyGenerator extends ServiceableGenerator {
   
       private static final String HTTP_CLIENT = "HTTP_CLIENT";
       private static final String METHOD_GET = "GET";
  @@ -158,10 +157,10 @@
               parser = (SAXParser)this.manager.lookup(SAXParser.ROLE);
               parser.parse(inputSource, super.xmlConsumer);
   
  -        } catch (ComponentException ex) {
  +        } catch (ServiceException ex) {
               throw new ProcessingException("WebServiceProxyGenerator.generate() error",
ex);
           } finally {
  -            this.manager.release((Component)parser);
  +            this.manager.release(parser);
           }
   
       } // generate
  
  
  
  1.4       +5 -6      cocoon-2.1/src/blocks/proxy/java/org/apache/cocoon/generation/HttpProxyGenerator.java
  
  Index: HttpProxyGenerator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/proxy/java/org/apache/cocoon/generation/HttpProxyGenerator.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- HttpProxyGenerator.java	5 Jul 2003 04:27:27 -0000	1.3
  +++ HttpProxyGenerator.java	4 Sep 2003 09:38:37 -0000	1.4
  @@ -54,12 +54,11 @@
   import java.util.Iterator;
   import java.util.Map;
   
  -import org.apache.avalon.framework.component.Component;
  -import org.apache.avalon.framework.component.ComponentException;
   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.parameters.Parameters;
  +import org.apache.avalon.framework.service.ServiceException;
   
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.ResourceNotFoundException;
  @@ -91,7 +90,7 @@
    * @author <a href="mailto:pier@apache.org">Pier Fumagalli</a>, February 2003
    * @version CVS $Id$
    */
  -public class HttpProxyGenerator extends ComposerGenerator implements Configurable {
  +public class HttpProxyGenerator extends ServiceableGenerator implements Configurable {
   
       /** The HTTP method to use at request time. */
       private HttpMethodBase method = null;
  @@ -298,10 +297,10 @@
               InputSource inputSource = new InputSource(response);
               parser = (SAXParser) this.manager.lookup(SAXParser.ROLE);
               parser.parse(inputSource, super.xmlConsumer);
  -        } catch (ComponentException ex) {
  +        } catch (ServiceException ex) {
               throw new ProcessingException("Unable to get parser", ex);
           } finally {
  -            this.manager.release((Component) parser);
  +            this.manager.release(parser);
               this.method.releaseConnection();
               connection.close();
           }
  
  
  
  1.2       +18 -8     cocoon-2.1/src/blocks/proxy/java/org/apache/cocoon/generation/GenericProxyGenerator.java
  
  Index: GenericProxyGenerator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/proxy/java/org/apache/cocoon/generation/GenericProxyGenerator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- GenericProxyGenerator.java	29 Aug 2003 17:33:24 -0000	1.1
  +++ GenericProxyGenerator.java	4 Sep 2003 09:38:37 -0000	1.2
  @@ -55,9 +55,9 @@
   import javax.servlet.http.HttpServletRequest;
   import javax.servlet.http.HttpServletResponse;
   
  -import org.apache.avalon.framework.component.ComponentException;
  -import org.apache.avalon.framework.component.ComponentManager;
   import org.apache.avalon.framework.parameters.Parameters;
  +import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.environment.SourceResolver;
   import org.apache.cocoon.environment.http.HttpEnvironment;
  @@ -83,7 +83,7 @@
    * @author <a href="mailto:gianugo@apache.org">Gianugo Rabellino</a>
    * @version $Id$
    */
  -public class GenericProxyGenerator extends ComposerGenerator {
  +public class GenericProxyGenerator extends ServiceableGenerator {
    
       /** The real URL to forward requests to */
       HttpURL destination;
  @@ -100,12 +100,22 @@
        * 
        * @see org.apache.avalon.framework.component.Composable#compose(org.apache.avalon.framework.component.ComponentManager)
        */
  -    public void compose(ComponentManager manager) throws ComponentException {
  -        super.compose(manager);
  -        parser = (SAXParser)manager.lookup(SAXParser.ROLE);
  -      
  +    public void service(ServiceManager manager) throws ServiceException {
  +        super.service(manager);
  +        this.parser = (SAXParser)manager.lookup(SAXParser.ROLE);
       }
   
  +    /**
  +     * Dispose
  +     */
  +    public void dispose() {
  +        if ( this.manager != null ) {
  +            this.manager.release( this.parser );
  +            this.parser = null;
  +        }
  +        super.dispose();
  +    }
  +    
       /**
        * Setup this component by getting the (required) "url" parameter and the 
        * (optional) "path" parameter.  If path is not specified, the request URI will
  
  
  
  1.3       +9 -9      cocoon-2.1/src/blocks/lucene/java/org/apache/cocoon/generation/SearchGenerator.java
  
  Index: SearchGenerator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/lucene/java/org/apache/cocoon/generation/SearchGenerator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SearchGenerator.java	11 Mar 2003 17:44:21 -0000	1.2
  +++ SearchGenerator.java	4 Sep 2003 09:38:38 -0000	1.3
  @@ -52,12 +52,12 @@
   
   import org.apache.avalon.framework.activity.Initializable;
   import org.apache.avalon.framework.activity.Disposable;
  -import org.apache.avalon.framework.component.ComponentException;
  -import org.apache.avalon.framework.component.ComponentManager;
   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;
   
   import org.apache.cocoon.Constants;
   import org.apache.cocoon.ProcessingException;
  @@ -130,7 +130,7 @@
    * @author <a href="mailto:jeremy@apache.org">Jeremy Quinn</a>
    * @version CVS $Id$
    */
  -public class SearchGenerator extends ComposerGenerator
  +public class SearchGenerator extends ServiceableGenerator
       implements Contextualizable, Initializable, Disposable
   {
   
  @@ -401,11 +401,11 @@
       // TODO: parameterize()
   
       /**
  -     * Set the current <code>ComponentManager</code> instance used by this
  -     * <code>Composable</code>.
  +     * Set the current <code>ServiceManager</code> instance used by this
  +     * <code>Serviceable</code>.
        */
  -    public void compose(ComponentManager manager) throws ComponentException {
  -        super.compose(manager);
  +    public void service(ServiceManager manager) throws ServiceException {
  +        super.service(manager);
   //        lcs = (LuceneCocoonSearcher) this.manager.lookup(LuceneCocoonSearcher.ROLE);
       }
   
  @@ -732,7 +732,7 @@
                   hits = lcs.search(queryString, LuceneXMLIndexer.BODY_FIELD);
               } catch (IOException ioe) {
                   throw new ProcessingException("IOException in search", ioe);
  -            } catch (ComponentException ce) {
  +            } catch (ServiceException ce) {
                   throw new ProcessingException("ComponentException in search", ce);
               } finally {
                   if (lcs != null) {
  
  
  
  1.8       +8 -9      cocoon-2.1/src/blocks/html/java/org/apache/cocoon/generation/HTMLGenerator.java
  
  Index: HTMLGenerator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/html/java/org/apache/cocoon/generation/HTMLGenerator.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- HTMLGenerator.java	3 Sep 2003 12:54:54 -0000	1.7
  +++ HTMLGenerator.java	4 Sep 2003 09:38:39 -0000	1.8
  @@ -62,13 +62,12 @@
   import javax.servlet.http.HttpServletRequest;
   
   import org.apache.avalon.framework.activity.Disposable;
  -import org.apache.avalon.framework.component.Component;
  -import org.apache.avalon.framework.component.ComponentException;
  -import org.apache.avalon.framework.component.ComponentManager;
   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.parameters.Parameters;
  +import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.ResourceNotFoundException;
   import org.apache.cocoon.caching.CacheableProcessingComponent;
  @@ -96,7 +95,7 @@
    *
    * @version CVS $Id$
    */
  -public class HTMLGenerator extends ComposerGenerator
  +public class HTMLGenerator extends ServiceableGenerator
   implements Configurable, CacheableProcessingComponent, Disposable {
   
       /** The parameter that specifies what request attribute to use, if any */
  @@ -117,9 +116,9 @@
       /** JTidy properties */
       private Properties properties;
   
  -    public void compose(ComponentManager manager)
  -    throws ComponentException {
  -        super.compose( manager );
  +    public void service(ServiceManager manager)
  +    throws ServiceException {
  +        super.service( manager );
           this.processor = (XPathProcessor)this.manager.lookup(XPathProcessor.ROLE);
       }
   
  @@ -346,7 +345,7 @@
   
       public void dispose() {
           if (this.manager != null) {
  -            this.manager.release((Component)this.processor);
  +            this.manager.release(this.processor);
               this.manager = null;
           }
           this.processor = null;
  
  
  
  1.3       +3 -4      cocoon-2.1/src/blocks/bsf/java/org/apache/cocoon/generation/ScriptGenerator.java
  
  Index: ScriptGenerator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/bsf/java/org/apache/cocoon/generation/ScriptGenerator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ScriptGenerator.java	4 Aug 2003 03:09:16 -0000	1.2
  +++ ScriptGenerator.java	4 Sep 2003 09:38:39 -0000	1.3
  @@ -54,7 +54,6 @@
   import com.ibm.bsf.BSFManager;
   import com.ibm.bsf.util.IOUtils;
   
  -import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  @@ -93,7 +92,7 @@
    * @author <a href="mailto:jafoster@engmail.uwaterloo.ca">Jason Foster</a>
    * @version CVS $Id$
    */
  -public class ScriptGenerator extends ComposerGenerator implements Configurable {
  +public class ScriptGenerator extends ServiceableGenerator implements Configurable {
   
       protected class BSFLanguage
       {
  @@ -217,7 +216,7 @@
               throw new ProcessingException(
                       "Exception in ScriptGenerator.generate()", e);
           } finally {
  -            this.manager.release((Component)parser);
  +            this.manager.release(parser);
           }
       }
   }
  
  
  
  1.3       +1 -1      cocoon-2.1/src/blocks/jxforms/java/org/apache/cocoon/generation/JXFormsGenerator.java
  
  Index: JXFormsGenerator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/jxforms/java/org/apache/cocoon/generation/JXFormsGenerator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JXFormsGenerator.java	4 Aug 2003 03:06:30 -0000	1.2
  +++ JXFormsGenerator.java	4 Sep 2003 09:38:40 -0000	1.3
  @@ -86,7 +86,7 @@
    * <p><a href="http://jakarta.apache.org/commons/jxpath"><em>JX</em>Path</a>
based implementation of <a href="http://www.w3.org/TR/xforms"><em>XForms</em></a></p>
    */
   
  -public class JXFormsGenerator extends ComposerGenerator {
  +public class JXFormsGenerator extends ServiceableGenerator {
   
       private static final JXPathContextFactory 
           jxpathContextFactory = JXPathContextFactory.newInstance();
  
  
  

Mime
View raw message