cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sylv...@apache.org
Subject cvs commit: xml-cocoon2/src/scratchpad/src/org/apache/cocoon/treeprocessor/sitemap AggregateNode.java SerializeNode.java
Date Wed, 16 Jan 2002 10:54:12 GMT
sylvain     02/01/16 02:54:12

  Modified:    src/scratchpad/src/org/apache/cocoon/treeprocessor
                        MapStackResolver.java
               src/scratchpad/src/org/apache/cocoon/treeprocessor/sitemap
                        AggregateNode.java SerializeNode.java
  Log:
  Remove EMPTY_PARAMETERS constant which is now in avalon Parameters class.
  
  Revision  Changes    Path
  1.5       +2 -13     xml-cocoon2/src/scratchpad/src/org/apache/cocoon/treeprocessor/MapStackResolver.java
  
  Index: MapStackResolver.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/treeprocessor/MapStackResolver.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- MapStackResolver.java	16 Jan 2002 10:26:57 -0000	1.4
  +++ MapStackResolver.java	16 Jan 2002 10:54:11 -0000	1.5
  @@ -18,22 +18,11 @@
    * Utility class for handling {...} pattern substitutions from a List of Maps.
    *
    * @author <a href="mailto:sylvain@apache.org">Sylvain Wallez</a>
  - * @version CVS $Revision: 1.4 $ $Date: 2002/01/16 10:26:57 $
  + * @version CVS $Revision: 1.5 $ $Date: 2002/01/16 10:54:11 $
    */
   
   public abstract class MapStackResolver {
   
  -    /**
  -     * An empty <code>Parameters</code> object, returned by <code>buildParameters()</code>
  -     * if it is given a <code>null</code> Map.
  -     */
  -    public static final Parameters EMPTY_PARAMETERS;
  -
  -    static {
  -        EMPTY_PARAMETERS = new Parameters();
  -        EMPTY_PARAMETERS.makeReadOnly();
  -    }
  -
       public static final Map EMPTY_MAP = Collections.unmodifiableMap(new java.util.HashMap(0));
   
       /**
  @@ -117,7 +106,7 @@
        */
       public static Parameters buildParameters(Map expressions, List mapStack) throws PatternException
{
           if (expressions == null || expressions.size() == 0) {
  -            return EMPTY_PARAMETERS;
  +            return Parameters.EMPTY_PARAMETERS;
           }
   
           Parameters result = new Parameters();
  
  
  
  1.3       +4 -2      xml-cocoon2/src/scratchpad/src/org/apache/cocoon/treeprocessor/sitemap/AggregateNode.java
  
  Index: AggregateNode.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/treeprocessor/sitemap/AggregateNode.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AggregateNode.java	15 Jan 2002 11:10:54 -0000	1.2
  +++ AggregateNode.java	16 Jan 2002 10:54:12 -0000	1.3
  @@ -8,6 +8,8 @@
   
   package org.apache.cocoon.treeprocessor.sitemap;
   
  +import org.apache.avalon.framework.parameters.Parameters;
  +
   import org.apache.cocoon.components.pipeline.EventPipeline;
   import org.apache.cocoon.components.pipeline.StreamPipeline;
   import org.apache.cocoon.environment.Environment;
  @@ -38,7 +40,7 @@
    * <a href="http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=100517130418424">here</a>.
    *
    * @author <a href="mailto:sylvain@apache.org">Sylvain Wallez</a>
  - * @version CVS $Revision: 1.2 $ $Date: 2002/01/15 11:10:54 $
  + * @version CVS $Revision: 1.3 $ $Date: 2002/01/16 10:54:12 $
    */
   
   public class AggregateNode extends AbstractProcessingNode {
  @@ -79,7 +81,7 @@
           // Setup aggregator
           EventPipeline eventPipeline = context.getEventPipeline();
           
  -        eventPipeline.setGenerator("!content-aggregator!", null, MapStackResolver.EMPTY_PARAMETERS);
  +        eventPipeline.setGenerator("!content-aggregator!", null, Parameters.EMPTY_PARAMETERS);
   
           ContentAggregator aggregator = (ContentAggregator)eventPipeline.getGenerator();
           aggregator.setRootElement(this.element, this.nsURI, this.nsPrefix);
  
  
  
  1.3       +6 -5      xml-cocoon2/src/scratchpad/src/org/apache/cocoon/treeprocessor/sitemap/SerializeNode.java
  
  Index: SerializeNode.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/treeprocessor/sitemap/SerializeNode.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SerializeNode.java	15 Jan 2002 11:10:54 -0000	1.2
  +++ SerializeNode.java	16 Jan 2002 10:54:12 -0000	1.3
  @@ -8,6 +8,8 @@
   
   package org.apache.cocoon.treeprocessor.sitemap;
   
  +import org.apache.avalon.framework.parameters.Parameters;
  +
   import org.apache.cocoon.Constants;
   import org.apache.cocoon.environment.Environment;
   import org.apache.cocoon.components.pipeline.StreamPipeline;
  @@ -16,14 +18,13 @@
   
   import org.apache.cocoon.treeprocessor.AbstractProcessingNode;
   import org.apache.cocoon.treeprocessor.InvokeContext;
  -import org.apache.cocoon.treeprocessor.MapStackResolver;
   import org.apache.cocoon.treeprocessor.ProcessingNode;
   
   import java.util.*;
   /**
    *
    * @author <a href="mailto:sylvain@apache.org">Sylvain Wallez</a>
  - * @version CVS $Revision: 1.2 $ $Date: 2002/01/15 11:10:54 $
  + * @version CVS $Revision: 1.3 $ $Date: 2002/01/16 10:54:12 $
    */
   
   public class SerializeNode extends AbstractProcessingNode {
  @@ -74,7 +75,7 @@
           // Perform link translation if requested
           if (env.getObjectModel().containsKey(Constants.LINK_OBJECT)) {
               context.getEventPipeline().addTransformer(
  -                "!link-translator!", null, MapStackResolver.EMPTY_PARAMETERS
  +                "!link-translator!", null, Parameters.EMPTY_PARAMETERS
               );
           }
   
  @@ -85,7 +86,7 @@
               pipeline.setSerializer(
                   this.serializerName,
                   null,
  -                MapStackResolver.EMPTY_PARAMETERS // No parameters on serializers
  +                Parameters.EMPTY_PARAMETERS // No parameters on serializers
               );
               
           } else {
  @@ -93,7 +94,7 @@
               pipeline.setSerializer(
                   this.serializerName,
                   null,
  -                MapStackResolver.EMPTY_PARAMETERS,
  +                Parameters.EMPTY_PARAMETERS,
                   this.mimeType
               );
           }
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message