cziegeler 02/05/27 05:12:10
Modified: src/java/org/apache/cocoon/components/pipeline
AbstractProcessingPipeline.java
ProcessingPipeline.java
src/java/org/apache/cocoon/components/treeprocessor
InvokeContext.java
Log:
Switching new caching interface to strings (for know...)
Revision Changes Path
1.10 +8 -9
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.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- AbstractProcessingPipeline.java 27 May 2002 09:57:19 -0000 1.9
+++ AbstractProcessingPipeline.java 27 May 2002 12:12:10 -0000 1.10
@@ -81,7 +81,7 @@
*
* @since @next-version@
* @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
- * @version CVS $Id: AbstractProcessingPipeline.java,v 1.9 2002/05/27 09:57:19
cziegeler Exp $
+ * @version CVS $Id: AbstractProcessingPipeline.java,v 1.10 2002/05/27 12:12:10
cziegeler Exp $
*/
public abstract class AbstractProcessingPipeline
extends AbstractLogEnabled
@@ -155,6 +155,13 @@
}
/**
+ * Setup this component
+ */
+ public void setup(Parameters params) {
+ this.parameters = params;
+ }
+
+ /**
* Set the generator that will be used as the initial step in the pipeline.
* The generator role is given : the actual <code>Generator</code> is fetched
* from the latest <code>ComponentManager</code> given by <code>compose()</code>
@@ -403,14 +410,6 @@
// insert the serializer
this.connect( environment, prev, this.lastConsumer);
- }
-
- /**
- * Set the configuration
- */
- public void setup(Parameters parameters)
- throws ProcessingException {
- this.parameters = parameters;
}
/**
1.5 +6 -7
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.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ProcessingPipeline.java 21 May 2002 10:16:20 -0000 1.4
+++ ProcessingPipeline.java 27 May 2002 12:12:10 -0000 1.5
@@ -77,7 +77,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Giacomo Pati</a>
- * @version CVS $Id: ProcessingPipeline.java,v 1.4 2002/05/21 10:16:20 cziegeler
Exp $
+ * @version CVS $Id: ProcessingPipeline.java,v 1.5 2002/05/27 12:12:10 cziegeler
Exp $
*/
public interface ProcessingPipeline
extends Component, Recomposable {
@@ -85,6 +85,11 @@
String ROLE = ProcessingPipeline.class.getName();
/**
+ * Setup this component
+ */
+ void setup(Parameters params);
+
+ /**
* Set the generator that will be used as the initial step in the pipeline.
* The generator role is given : the actual <code>Generator</code> is fetched
* from the latest <code>ComponentManager</code> given by <code>compose()</code>
@@ -126,12 +131,6 @@
* @param mimeType Can be null
*/
void setReader (String role, String source, Parameters param, String mimeType)
- throws ProcessingException;
-
- /**
- * Set the configuration
- */
- void setup(Parameters parameters)
throws ProcessingException;
/**
1.5 +15 -2
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.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- InvokeContext.java 27 May 2002 11:12:13 -0000 1.4
+++ InvokeContext.java 27 May 2002 12:12:10 -0000 1.5
@@ -78,7 +78,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Sylvain Wallez</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
- * @version CVS $Id: InvokeContext.java,v 1.4 2002/05/27 11:12:13 cziegeler Exp $
+ * @version CVS $Id: InvokeContext.java,v 1.5 2002/05/27 12:12:10 cziegeler Exp $
*/
public class InvokeContext implements Recomposable, Disposable, Loggable {
@@ -130,6 +130,18 @@
this.eventPipeline = eventPipeline;
}
+ /**
+ * Create an <code>InvokeContext</code> with an existing pipeline.
+ * This also means the current request is internal.
+ */
+ public InvokeContext(ProcessingPipeline pipeline) {
+ this.isInternalRequest = true;
+ this.processingPipeline = pipeline;
+ }
+
+ /**
+ * Loggable interface
+ */
public void setLogger(Logger logger) {
this.logger = logger;
}
@@ -197,8 +209,8 @@
if (this.processingPipeline == null) {
this.pipelineSelector =
(ComponentSelector)this.pipelinesManager.lookup(ProcessingPipeline.ROLE+"Selector");
this.processingPipeline =
(ProcessingPipeline)this.pipelineSelector.select(this.processingPipelineName);
- // FIXME - Setup pipeline
this.processingPipeline.recompose( this.pipelinesManager );
+ this.processingPipeline.setup( this.processingPipelineParameters );
}
return this.processingPipeline;
}
@@ -297,5 +309,6 @@
}
this.pipelinesManager = null;
}
+ this.processingPipelineParameters = null;
}
}
----------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]