cziegeler 2003/11/10 00:15:26
Modified: . status.xml
src/webapp sitemap.xmap
src/java/org/apache/cocoon/components/pipeline/impl
CachingPointProcessingPipeline.java
Log:
Making CachingPointProcessingPipeline parameterizable
Revision Changes Path
1.189 +5 -1 cocoon-2.1/status.xml
Index: status.xml
===================================================================
RCS file: /home/cvs/cocoon-2.1/status.xml,v
retrieving revision 1.188
retrieving revision 1.189
diff -u -r1.188 -r1.189
--- status.xml 7 Nov 2003 14:28:27 -0000 1.188
+++ status.xml 10 Nov 2003 08:15:25 -0000 1.189
@@ -192,6 +192,10 @@
<changes>
<release version="@version@" date="@date@">
+ <action dev="CZ" type="fix">
+ The CachingPointProcessingPipeline now uses Parameters instead of
+ an own configuration scheme. See the demo sitemap for the changed
configuration.
+ </action>
<action dev="JH" type="fix" fixes-bug="23299" due-to-email="[EMAIL
PROTECTED]" due-to="Simon Mieth">
XMLByteStreamCompiler now handles also text nodes longer than 32 k.
</action>
1.39 +2 -2 cocoon-2.1/src/webapp/sitemap.xmap
Index: sitemap.xmap
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/webapp/sitemap.xmap,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- sitemap.xmap 31 Oct 2003 11:30:41 -0000 1.38
+++ sitemap.xmap 10 Nov 2003 08:15:26 -0000 1.39
@@ -344,7 +344,7 @@
<!-- parameter name="outputBufferSize" value="8192"/ -->
</map:pipe>
<map:pipe name="caching-point"
src="org.apache.cocoon.components.pipeline.impl.CachingPointProcessingPipeline">
- <autoCachingPoint>On</autoCachingPoint>
+ <parameter name="autoCachingPoint" value="On"/>
<!-- parameter name="outputBufferSize" value="8192"/ -->
</map:pipe>
<map:pipe name="noncaching"
src="org.apache.cocoon.components.pipeline.impl.NonCachingProcessingPipeline">
1.5 +7 -9
cocoon-2.1/src/java/org/apache/cocoon/components/pipeline/impl/CachingPointProcessingPipeline.java
Index: CachingPointProcessingPipeline.java
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/pipeline/impl/CachingPointProcessingPipeline.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- CachingPointProcessingPipeline.java 28 Aug 2003 06:09:29 -0000
1.4
+++ CachingPointProcessingPipeline.java 10 Nov 2003 08:15:26 -0000
1.5
@@ -51,9 +51,7 @@
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.ParameterException;
import org.apache.avalon.framework.parameters.Parameters;
import org.apache.cocoon.ProcessingException;
import org.apache.cocoon.caching.CachedResponse;
@@ -81,7 +79,7 @@
* @version CVS $Id$
*/
public class CachingPointProcessingPipeline
- extends AbstractCachingProcessingPipeline implements Configurable {
+ extends AbstractCachingProcessingPipeline {
protected ArrayList isCachePoint = new ArrayList();
protected ArrayList xmlSerializerArray = new ArrayList();
@@ -95,8 +93,9 @@
* 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);
+ public void parameterize(Parameters config) throws ParameterException {
+ super.parameterize(config);
+ this.autoCachingPointSwitch =
config.getParameter("autoCachingPoint", null);
if (this.getLogger().isDebugEnabled()) {
getLogger().debug("Auto caching-point is set to = '" +
this.autoCachingPointSwitch + "'");
@@ -110,8 +109,7 @@
if (this.autoCachingPointSwitch.toLowerCase().equals("on")) {
this.autoCachingPoint=true;
- }
- else {
+ } else {
this.autoCachingPoint=false;
}
}