cziegeler 2002/08/09 00:47:17 Modified: src/java/org/apache/cocoon/components/pipeline AbstractProcessingPipeline.java ProcessingPipeline.java src/java/org/apache/cocoon/components/pipeline/impl CachingPointProcessingPipeline.java src/java/org/apache/cocoon/components/treeprocessor InvokeContext.java SimpleParentProcessingNode.java src/java/org/apache/cocoon/components/treeprocessor/sitemap ActSetNode.java ActTypeNode.java ActionSetNode.java GenerateNode.java MatchNode.java PipelinesNode.java PreparableMatchNode.java SelectNode.java SerializeNode.java SwitchSelectNode.java TransformNode.java src/webapp sitemap.xmap Added: src/java/org/apache/cocoon/components/treeprocessor PipelineEventComponentProcessingNode.java Log: Applied patch to complete (auto) caching-point functionality PR: 11530 Submitted by: Michael Melhem [[EMAIL PROTECTED]] Revision Changes Path 1.19 +3 -2 xml-cocoon2/src/java/org/apache/cocoon/components/pipeline/AbstractProcessingPipeline.java Index: AbstractProcessingPipeline.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/pipeline/AbstractProcessingPipeline.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- AbstractProcessingPipeline.java 15 Jul 2002 08:17:28 -0000 1.18 +++ AbstractProcessingPipeline.java 9 Aug 2002 07:47:16 -0000 1.19 @@ -63,6 +63,7 @@ import org.apache.cocoon.ProcessingException; import org.apache.cocoon.components.CocoonComponentManager; import org.apache.cocoon.components.pipeline.OutputComponentSelector; +import org.apache.cocoon.components.treeprocessor.ProcessingNode; import org.apache.cocoon.environment.Environment; import org.apache.cocoon.environment.ObjectModelHelper; import org.apache.cocoon.environment.Response; @@ -204,7 +205,7 @@ } /** - * Inform pipeline we have come across a branch point + * Informs pipeline we have come across a branch point * Default Behaviour is do nothing */ public void informBranchPoint() {} 1.10 +3 -2 xml-cocoon2/src/java/org/apache/cocoon/components/pipeline/ProcessingPipeline.java Index: ProcessingPipeline.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/pipeline/ProcessingPipeline.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- ProcessingPipeline.java 15 Jul 2002 08:17:28 -0000 1.9 +++ ProcessingPipeline.java 9 Aug 2002 07:47:16 -0000 1.10 @@ -53,6 +53,7 @@ import org.apache.avalon.framework.component.Component; import org.apache.avalon.framework.component.Recomposable; import org.apache.avalon.framework.parameters.Parameters; +import org.apache.cocoon.components.treeprocessor.ProcessingNode; import org.apache.cocoon.ProcessingException; import org.apache.cocoon.environment.Environment; import org.apache.cocoon.generation.Generator; @@ -120,7 +121,7 @@ Generator getGenerator(); /** - * Inform pipeline we have come across a branch point + * Informs pipeline we have come across a branch point */ public void informBranchPoint(); 1.2 +58 -13 xml-cocoon2/src/java/org/apache/cocoon/components/pipeline/impl/CachingPointProcessingPipeline.java Index: CachingPointProcessingPipeline.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/pipeline/impl/CachingPointProcessingPipeline.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- CachingPointProcessingPipeline.java 15 Jul 2002 08:17:28 -0000 1.1 +++ CachingPointProcessingPipeline.java 9 Aug 2002 07:47:16 -0000 1.2 @@ -51,6 +51,9 @@ package org.apache.cocoon.components.pipeline.impl; 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.cocoon.ProcessingException; import org.apache.cocoon.caching.Cache; @@ -85,11 +88,40 @@ * @version CVS $Id$ */ public class CachingPointProcessingPipeline - extends AbstractCachingProcessingPipeline { + extends AbstractCachingProcessingPipeline implements Configurable { protected ArrayList isCachePoint = new ArrayList(); protected ArrayList xmlSerializerArray = new ArrayList(); protected boolean nextIsCachePoint = false; + protected String autoCachingPointSwitch; + protected boolean autoCachingPoint = true; + + + /** + * The <code>CachingPointProcessingPipeline</code> is configurable. + * The autoCachingPoint algorithm can be switced on/off + * in the sitemap.xmap + */ + public void configure(Configuration config) throws ConfigurationException { + this.autoCachingPointSwitch = config.getChild("autoCachingPoint").getValue(null); + + if (this.getLogger().isDebugEnabled()) { + getLogger().debug("Auto caching-point is set to = '" + this.autoCachingPointSwitch + "'"); + } + + // Default is that auto caching-point is on + if (this.autoCachingPointSwitch == null){ + this.autoCachingPoint=true; + return; + } + + if (this.autoCachingPointSwitch.toLowerCase().equals("on")) { + this.autoCachingPoint=true; + } + else { + this.autoCachingPoint=false; + } + } /** @@ -98,26 +130,37 @@ public void addTransformer (String role, String source, Parameters param) throws ProcessingException { super.addTransformer(role, source, param); - + // add caching point flag // default value is false this.isCachePoint.add(new Boolean(this.nextIsCachePoint)); this.nextIsCachePoint = false; + + //REVISIT: Alter the interface to pass an extra "pipeline-hint" paramater + // and add pipeline-hint check for manual "caching-point" + } /** - * Inform the pipeline that we have come across - * a branch point in the tree + * Determine if the given branch-point + * is a caching-point + * + * Please Note: this method is used by auto caching-point + * and is of no consequence when auto caching-point is switched off */ public void informBranchPoint() { - // - // Set cachepoint flag whenever we come across a branchpoint - // + + if (this.generator == null) + return; + + if (!this.autoCachingPoint) + return; + this.nextIsCachePoint = true; - if (this.getLogger().isDebugEnabled()) { - this.getLogger().debug("Informed Pipeline of branch point"); - } + if (this.getLogger().isDebugEnabled()) { + this.getLogger().debug("Informed Pipeline of branch point"); + } } /** @@ -165,9 +208,10 @@ this.cache.store(environment.getObjectModel(), this.pipelineCacheKey.copy(), response); + if (this.getLogger().isDebugEnabled()) { this.getLogger().debug("Caching results for the following key: " - + this.pipelineCacheKey ); + + this.pipelineCacheKey); } // @@ -186,6 +230,7 @@ copy, 0, copy.length); this.pipelineValidityObjects = copy; } //end serializer loop + } } } @@ -373,7 +418,7 @@ } this.xmlSerializerArray.clear(); this.nextIsCachePoint = false; - + this.autoCachingPointSwitch=null; } } 1.13 +10 -1 xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/InvokeContext.java Index: InvokeContext.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/InvokeContext.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- InvokeContext.java 31 Jul 2002 13:13:26 -0000 1.12 +++ InvokeContext.java 9 Aug 2002 07:47:16 -0000 1.13 @@ -120,6 +120,15 @@ } /** + * Determines if the Pipeline been set for this context + */ + public boolean pipelineIsSet() { + if (this.processingPipeline != null) + return true; + return false; + } + + /** * Create an <code>InvokeContext</code> */ public InvokeContext(boolean internalRequest) { 1.2 +43 -12 xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/SimpleParentProcessingNode.java Index: SimpleParentProcessingNode.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/SimpleParentProcessingNode.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- SimpleParentProcessingNode.java 5 Mar 2002 08:26:22 -0000 1.1 +++ SimpleParentProcessingNode.java 9 Aug 2002 07:47:17 -0000 1.2 @@ -1,36 +1,36 @@ /* - + ============================================================================ The Apache Software License, Version 1.1 ============================================================================ - + Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved. - + Redistribution and use in source and binary forms, with or without modifica- tion, are permitted provided that the following conditions are met: - + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - + 3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by the Apache Software Foundation (http://www.apache.org/)." Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. - + 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact [EMAIL PROTECTED] - + 5. Products derived from this software may not be called "Apache", nor may "Apache" appear in their name, without prior written permission of the Apache Software Foundation. - + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE @@ -41,18 +41,20 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - + This software consists of voluntary contributions made by many individuals on behalf of the Apache Software Foundation and was originally created by Stefano Mazzocchi <[EMAIL PROTECTED]>. For more information on the Apache Software Foundation, please see <http://www.apache.org/>. - + */ package org.apache.cocoon.components.treeprocessor; import org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode; import org.apache.cocoon.components.treeprocessor.ProcessingNode; +import org.apache.cocoon.environment.Environment; + /** * * @author <a href="mailto:[EMAIL PROTECTED]">Sylvain Wallez</a> @@ -66,5 +68,34 @@ public void setChildren(ProcessingNode[] children) { this.children = children; + } + + /** + * Boolean method with returns true if this Node has children + * and false otherwise + * + * @return boolean + */ + public boolean hasChildren() { + if ((this.children == null) || (this.children.length > 0)) + return true; + return false; + } + + + /** + * Define common invoke behavior here + */ + public boolean invoke(Environment env, InvokeContext context) throws Exception { + + + // inform the pipeline (if available) that we have come across + // a possible branch point + if (context.pipelineIsSet() && this.hasChildren() ) { + context.getProcessingPipeline().informBranchPoint(); + } + + // processing not yet complete, so return false + return false; } } 1.1 xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/PipelineEventComponentProcessingNode.java Index: PipelineEventComponentProcessingNode.java =================================================================== /* ============================================================================ The Apache Software License, Version 1.1 ============================================================================ Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modifica- tion, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by the Apache Software Foundation (http://www.apache.org/)." Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact [EMAIL PROTECTED] 5. Products derived from this software may not be called "Apache", nor may "Apache" appear in their name, without prior written permission of the Apache Software Foundation. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. This software consists of voluntary contributions made by many individuals on behalf of the Apache Software Foundation and was originally created by Stefano Mazzocchi <[EMAIL PROTECTED]>. For more information on the Apache Software Foundation, please see <http://www.apache.org/>. */ package org.apache.cocoon.components.treeprocessor; import org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode; import java.util.Map; /** * * @author <a href="mailto:[EMAIL PROTECTED]">Michael Melhem</a> * @version CVS $Id: PipelineEventComponentProcessingNode.java,v 1.1 2002/08/09 07:47:17 cziegeler Exp $ */ public abstract class PipelineEventComponentProcessingNode extends AbstractProcessingNode { protected Map views; public void setViews(Map views) { this.views = views; } public boolean hasViews() { if (this.views != null) return true; return false; } } 1.5 +4 -1 xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/sitemap/ActSetNode.java Index: ActSetNode.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/sitemap/ActSetNode.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- ActSetNode.java 24 Jun 2002 20:32:19 -0000 1.4 +++ ActSetNode.java 9 Aug 2002 07:47:17 -0000 1.5 @@ -99,6 +99,9 @@ public final boolean invoke(Environment env, InvokeContext context) throws Exception { + // Perform any common invoke functionality + super.invoke(env, context); + Parameters resolvedParams = VariableResolver.buildParameters( this.parameters, context.getMapStack(), 1.5 +4 -1 xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/sitemap/ActTypeNode.java Index: ActTypeNode.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/sitemap/ActTypeNode.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- ActTypeNode.java 24 Jun 2002 20:32:19 -0000 1.4 +++ ActTypeNode.java 9 Aug 2002 07:47:17 -0000 1.5 @@ -111,6 +111,9 @@ public final boolean invoke(Environment env, InvokeContext context) throws Exception { + + // Perform any common invoke functionality + super.invoke(env, context); // Prepare data needed by the action Map objectModel = env.getObjectModel(); 1.5 +4 -1 xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/sitemap/ActionSetNode.java Index: ActionSetNode.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/sitemap/ActionSetNode.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- ActionSetNode.java 24 Jun 2002 20:32:19 -0000 1.4 +++ ActionSetNode.java 9 Aug 2002 07:47:17 -0000 1.5 @@ -122,6 +122,9 @@ public final boolean invoke(Environment env, InvokeContext context) throws Exception { + + // Perform any common invoke functionalty + // super.invoke(env, context); String msg = "An action-set cannot be invoked, at " + this.getLocation(); getLogger().error(msg); throw new UnsupportedOperationException(msg); 1.6 +6 -10 xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/sitemap/GenerateNode.java Index: GenerateNode.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/sitemap/GenerateNode.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- GenerateNode.java 15 Jul 2002 08:17:29 -0000 1.5 +++ GenerateNode.java 9 Aug 2002 07:47:17 -0000 1.6 @@ -53,10 +53,10 @@ import org.apache.cocoon.environment.Environment; import org.apache.cocoon.sitemap.PatternException; -import org.apache.cocoon.components.treeprocessor.AbstractProcessingNode; import org.apache.cocoon.components.treeprocessor.CategoryNode; import org.apache.cocoon.components.treeprocessor.InvokeContext; import org.apache.cocoon.components.treeprocessor.ParameterizableProcessingNode; +import org.apache.cocoon.components.treeprocessor.PipelineEventComponentProcessingNode; import org.apache.cocoon.components.treeprocessor.ProcessingNode; import org.apache.cocoon.components.treeprocessor.variables.VariableResolver; @@ -68,7 +68,7 @@ * @version CVS $Id$ */ -public class GenerateNode extends AbstractProcessingNode implements ParameterizableProcessingNode { +public class GenerateNode extends PipelineEventComponentProcessingNode implements ParameterizableProcessingNode { private String generatorName; @@ -76,7 +76,6 @@ private Map parameters; - private Map views; /** The category node */ private CategoryNode viewsNode; @@ -90,9 +89,6 @@ this.parameters = parameterMap; } - public void setViews(Map views) { - this.views = views; - } public final boolean invoke(Environment env, InvokeContext context) throws Exception { @@ -106,12 +102,12 @@ VariableResolver.buildParameters(this.parameters, mapStack, objectModel) ); + // Check view if (this.views != null) { - //inform the pipeline that we have a branch point - context.getProcessingPipeline().informBranchPoint(); - + //inform the pipeline that we have a branch point + context.getProcessingPipeline().informBranchPoint(); String cocoonView = env.getView(); if (cocoonView != null) { 1.5 +4 -1 xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/sitemap/MatchNode.java Index: MatchNode.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/sitemap/MatchNode.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- MatchNode.java 24 Jun 2002 20:32:19 -0000 1.4 +++ MatchNode.java 9 Aug 2002 07:47:17 -0000 1.5 @@ -105,6 +105,9 @@ public final boolean invoke(Environment env, InvokeContext context) throws Exception { + + // Perform any common invoke functionality + super.invoke(env, context); List mapStack = context.getMapStack(); Map objectModel = env.getObjectModel(); 1.8 +4 -1 xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/sitemap/PipelinesNode.java Index: PipelinesNode.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/sitemap/PipelinesNode.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- PipelinesNode.java 29 May 2002 12:50:21 -0000 1.7 +++ PipelinesNode.java 9 Aug 2002 07:47:17 -0000 1.8 @@ -126,6 +126,9 @@ */ public final boolean invoke(Environment env, InvokeContext context) throws Exception { + + // Perform any common invoke functionality + super.invoke(env, context); // Recompose context (and pipelines) to the local component manager context.recompose(this.manager); 1.5 +4 -1 xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/sitemap/PreparableMatchNode.java Index: PreparableMatchNode.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/sitemap/PreparableMatchNode.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- PreparableMatchNode.java 24 Jun 2002 20:32:19 -0000 1.4 +++ PreparableMatchNode.java 9 Aug 2002 07:47:17 -0000 1.5 @@ -127,6 +127,9 @@ public final boolean invoke(Environment env, InvokeContext context) throws Exception { + + // Perform any common invoke functionality + super.invoke(env, context); Map objectModel = env.getObjectModel(); Parameters resolvedParams = VariableResolver.buildParameters( 1.5 +4 -1 xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/sitemap/SelectNode.java Index: SelectNode.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/sitemap/SelectNode.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- SelectNode.java 24 Jun 2002 20:32:19 -0000 1.4 +++ SelectNode.java 9 Aug 2002 07:47:17 -0000 1.5 @@ -122,6 +122,9 @@ public final boolean invoke(Environment env, InvokeContext context) throws Exception { + // Perform any common invoke functionality + super.invoke(env, context); + // Prepare data needed by the action Map objectModel = env.getObjectModel(); List mapStack = context.getMapStack(); 1.5 +5 -9 xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/sitemap/SerializeNode.java Index: SerializeNode.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/sitemap/SerializeNode.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- SerializeNode.java 8 Aug 2002 03:21:28 -0000 1.4 +++ SerializeNode.java 9 Aug 2002 07:47:17 -0000 1.5 @@ -58,8 +58,8 @@ import org.apache.cocoon.sitemap.PatternException; -import org.apache.cocoon.components.treeprocessor.AbstractProcessingNode; import org.apache.cocoon.components.treeprocessor.InvokeContext; +import org.apache.cocoon.components.treeprocessor.PipelineEventComponentProcessingNode; import org.apache.cocoon.components.treeprocessor.ProcessingNode; import java.util.*; @@ -69,7 +69,7 @@ * @version CVS $Id$ */ -public class SerializeNode extends AbstractProcessingNode { +public class SerializeNode extends PipelineEventComponentProcessingNode { private String serializerName; @@ -77,7 +77,6 @@ private int statusCode; - private Map views; /** * Build a <code>SerializerNode</code> having a name, a mime-type and a status code (HTTP codes). @@ -92,9 +91,6 @@ this.statusCode = statusCode; } - public void setViews(Map views) { - this.views = views; - } public final boolean invoke(Environment env, InvokeContext context) throws Exception { @@ -102,8 +98,8 @@ // Check view if (this.views != null) { - //inform the pipeline that we have a branch point - context.getProcessingPipeline().informBranchPoint(); + //inform the pipeline that we have a branch point + context.getProcessingPipeline().informBranchPoint(); String cocoonView = env.getView(); if (cocoonView != null) { 1.4 +4 -1 xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/sitemap/SwitchSelectNode.java Index: SwitchSelectNode.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/sitemap/SwitchSelectNode.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- SwitchSelectNode.java 24 Jun 2002 20:32:19 -0000 1.3 +++ SwitchSelectNode.java 9 Aug 2002 07:47:17 -0000 1.4 @@ -123,6 +123,9 @@ public final boolean invoke(Environment env, InvokeContext context) throws Exception { + + // Perform any common invoke functionality + super.invoke(env, context); // Prepare data needed by the action Map objectModel = env.getObjectModel(); 1.5 +5 -9 xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/sitemap/TransformNode.java Index: TransformNode.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/sitemap/TransformNode.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- TransformNode.java 15 Jul 2002 08:17:29 -0000 1.4 +++ TransformNode.java 9 Aug 2002 07:47:17 -0000 1.5 @@ -53,9 +53,9 @@ import org.apache.cocoon.environment.Environment; import org.apache.cocoon.sitemap.PatternException; -import org.apache.cocoon.components.treeprocessor.AbstractProcessingNode; import org.apache.cocoon.components.treeprocessor.InvokeContext; import org.apache.cocoon.components.treeprocessor.ParameterizableProcessingNode; +import org.apache.cocoon.components.treeprocessor.PipelineEventComponentProcessingNode; import org.apache.cocoon.components.treeprocessor.ProcessingNode; import org.apache.cocoon.components.treeprocessor.variables.VariableResolver; @@ -68,7 +68,7 @@ * @version CVS $Id$ */ -public class TransformNode extends AbstractProcessingNode implements ParameterizableProcessingNode { +public class TransformNode extends PipelineEventComponentProcessingNode implements ParameterizableProcessingNode { private String transformerName; @@ -76,7 +76,6 @@ private Map parameters; - private Map views; public TransformNode(String name, VariableResolver source) throws PatternException { this.transformerName = name; @@ -87,9 +86,6 @@ this.parameters = parameterMap; } - public void setViews(Map views) { - this.views = views; - } public final boolean invoke(Environment env, InvokeContext context) throws Exception { @@ -106,8 +102,8 @@ // Check view if (this.views != null) { - //inform the pipeline that we have a branch point - context.getProcessingPipeline().informBranchPoint(); + //inform the pipeline that we have a branch point + context.getProcessingPipeline().informBranchPoint(); String cocoonView = env.getView(); if (cocoonView != null) { 1.72 +3 -1 xml-cocoon2/src/webapp/sitemap.xmap Index: sitemap.xmap =================================================================== RCS file: /home/cvs/xml-cocoon2/src/webapp/sitemap.xmap,v retrieving revision 1.71 retrieving revision 1.72 diff -u -r1.71 -r1.72 --- sitemap.xmap 15 Jul 2002 08:17:29 -0000 1.71 +++ sitemap.xmap 9 Aug 2002 07:47:17 -0000 1.72 @@ -312,7 +312,9 @@ --> <map:pipelines default="caching"> <map:pipeline name="caching" src="org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline"/> - <map:pipeline name="cachingpoint" src="org.apache.cocoon.components.pipeline.impl.CachingPointProcessingPipeline"/> + <map:pipeline name="caching-point" src="org.apache.cocoon.components.pipeline.impl.CachingPointProcessingPipeline"> + <autoCachingPoint>On</autoCachingPoint> + </map:pipeline> <map:pipeline name="noncaching" src="org.apache.cocoon.components.pipeline.impl.NonCachingProcessingPipeline"/> <!-- The following two can be used for profiling: <map:pipeline name="profile-caching" src="org.apache.cocoon.components.profiler.ProfilingCachingProcessingPipeline"/>
---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]