Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 97089 invoked by uid 500); 27 Feb 2000 07:14:32 -0000 Delivered-To: apmail-xml-cocoon-cvs@apache.org Received: (qmail 97086 invoked by uid 1023); 27 Feb 2000 07:14:32 -0000 Date: 27 Feb 2000 07:14:32 -0000 Message-ID: <20000227071432.97085.qmail@locus.apache.org> From: pier@locus.apache.org To: xml-cocoon-cvs@apache.org Subject: cvs commit: xml-cocoon/src/org/apache/cocoon/sitemap GenericProcessor.java pier 00/02/26 23:14:32 Modified: src/org/apache/cocoon/sitemap Tag: xml-cocoon2 GenericProcessor.java Log: [Cocoon 2.0] Initial support for components parametrization. Revision Changes Path No revision No revision 1.1.2.4 +13 -5 xml-cocoon/src/org/apache/cocoon/sitemap/Attic/GenericProcessor.java Index: GenericProcessor.java =================================================================== RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/sitemap/Attic/GenericProcessor.java,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -r1.1.2.3 -r1.1.2.4 --- GenericProcessor.java 2000/02/27 05:45:19 1.1.2.3 +++ GenericProcessor.java 2000/02/27 07:14:32 1.1.2.4 @@ -17,6 +17,7 @@ import org.apache.arch.config.Configurable; import org.apache.arch.config.Configuration; import org.apache.arch.config.ConfigurationException; +import org.apache.cocoon.Parameters; import org.apache.cocoon.Processor; import org.apache.cocoon.ProcessingException; import org.apache.cocoon.Request; @@ -34,7 +35,7 @@ * * @author Pierpaolo Fumagalli * (Apache Software Foundation, Exoffice Technologies) - * @version CVS $Revision: 1.1.2.3 $ $Date: 2000/02/27 05:45:19 $ + * @version CVS $Revision: 1.1.2.4 $ $Date: 2000/02/27 07:14:32 $ */ public class GenericProcessor implements Composer, Configurable, Processor { @@ -48,10 +49,16 @@ private PatternTranslator targetTranslator=null; /** The generator role */ private String generator=null; + /** The generator parameters */ + private Parameters generatorParam=null; /** The filter roles vector */ private Vector filters=new Vector(); + /** The filter parameters vector */ + private Vector filtersParam=new Vector(); /** The serializer role */ private String serializer=null; + /** The serializer role */ + private Parameters serializerParam=null; /** * Create a new SitemapPartition instance. @@ -92,11 +99,13 @@ if (c==null) throw new ConfigurationException("Generator not specified",conf); this.generator="generator:"+c.getAttribute("name"); + this.generatorParam=Parameters.fromConfiguration(c); // Get the serializer c=conf.getConfiguration("serializer"); if (c==null) throw new ConfigurationException("Serializer not specified",conf); this.serializer="serializer:"+c.getAttribute("name"); + this.serializerParam=Parameters.fromConfiguration(c); // Set up the filters vetctor Enumeration e=conf.getConfigurations("filter"); while (e.hasMoreElements()) { @@ -120,9 +129,8 @@ throw new ProcessingException("Error translating \""+ req.getUri()+"\""); } -if (this.serializer==null) throw new NullPointerException("SER"); Serializer s=(Serializer)this.manager.getComponent(this.serializer); - s.setup(req,res,src,null); + s.setup(req,res,src,this.serializerParam); s.setOutputStream(out); XMLConsumer current=s; for (int x=0; x