| org.apache.cocoon.components.pipeline.AbstractProcessingPipeline
All known Subclasses: org.apache.cocoon.components.pipeline.impl.NonCachingProcessingPipeline, org.apache.cocoon.components.pipeline.impl.BaseCachingProcessingPipeline,
AbstractProcessingPipeline | abstract public class AbstractProcessingPipeline extends AbstractLogEnabled implements ProcessingPipeline,Parameterizable,Recyclable(Code) | | This is the base for all implementations of a ProcessingPipeline .
since: 2.1 author: Carsten Ziegeler version: CVS $Id: AbstractProcessingPipeline.java 451148 2006-09-29 07:50:00Z anathaniel $ |
Method Summary | |
public void | addTransformer(String role, String source, Parameters param, Parameters hintParam) Add a transformer at the end of the pipeline.
The transformer role is given : the actual Transformer is fetched
from the latest ComponentManager given by compose()
or recompose() .
Parameters: role - the transformer role in the component manager. Parameters: source - the source used to setup the transformer (e.g. | protected boolean | checkIfModified(Environment environment, long lastModified) | protected boolean | checkPipeline() | public void | compose(ComponentManager manager) | protected void | connect(Environment environment, XMLProducer producer, XMLConsumer consumer) | protected void | connectPipeline(Environment environment) Connect the XML pipeline. | public Generator | getGenerator() | public String | getKeyForEventPipeline() Return the key for the event pipeline
If the "event pipeline" (= the complete pipeline without the
serializer) is cacheable and valid, return a key. | protected Location | getLocation(Parameters param) | public SourceValidity | getValidityForEventPipeline() Return valid validity objects for the event pipeline
If the "event pipeline" (= the complete pipeline without the
serializer) is cacheable and valid, return all validity objects. | protected void | handleException(Exception e) Handles exception which can happen during pipeline processing. | public void | informBranchPoint() Informs pipeline we have come across a branch point. | protected boolean | isInternalError() | public void | parameterize(Parameters params) | public void | prepareInternal(Environment environment) Prepare an internal processing. | protected void | prepareInternalErrorHandler(Environment environment, ProcessingException ex) If prepareInternal fails, prepare internal error handler. | protected void | preparePipeline(Environment environment) | public boolean | process(Environment environment) Process the given Environment , producing the output. | public boolean | process(Environment environment, XMLConsumer consumer) Process the given Environment , but do not use the
serializer. | protected boolean | processErrorHandler(Environment environment, ProcessingException e, XMLConsumer consumer) | protected boolean | processReader(Environment environment) Process the pipeline using a reader. | protected boolean | processXMLPipeline(Environment environment) | public void | recompose(ComponentManager manager) | public void | recycle() | public void | release() Release this component. | public void | setErrorHandler(SitemapErrorHandler errorHandler) Sets error handler for this pipeline. | public void | setGenerator(String role, String source, Parameters param, Parameters hintParam) Set the generator that will be used as the initial step in the pipeline. | protected void | setMimeTypeForReader(Environment environment) | protected void | setMimeTypeForSerializer(Environment environment) | public void | setReader(String role, String source, Parameters param, String mimeType) | public void | setSerializer(String role, String source, Parameters param, Parameters hintParam, String mimeType) | public void | setup(Parameters params) | protected void | setupPipeline(Environment environment) Setup pipeline components. | protected void | setupReader(Environment environment) |
configuration | protected Parameters configuration(Code) | | The configuration
|
configuredExpires | protected long configuredExpires(Code) | | Configured Expires value
|
configuredOutputBufferSize | protected int configuredOutputBufferSize(Code) | | Configured Output Buffer Size
|
expires | protected long expires(Code) | | Expires value
|
generatorParam | protected Parameters generatorParam(Code) | | |
generatorSelector | protected ComponentSelector generatorSelector(Code) | | |
lastConsumer | protected XMLConsumer lastConsumer(Code) | | This is the last component in the pipeline, either the serializer
or a custom XML consumer in case of internal processing.
|
manager | protected ComponentManager manager(Code) | | The component manager set with compose()
|
newManager | protected ComponentManager newManager(Code) | | The component manager set with compose() and recompose()
|
outputBufferSize | protected int outputBufferSize(Code) | | Output Buffer Size
|
parameters | protected Parameters parameters(Code) | | The parameters
|
readerParam | protected Parameters readerParam(Code) | | |
serializerParam | protected Parameters serializerParam(Code) | | |
sitemapReaderMimeType | protected String sitemapReaderMimeType(Code) | | |
sitemapSerializerMimeType | protected String sitemapSerializerMimeType(Code) | | |
addTransformer | public void addTransformer(String role, String source, Parameters param, Parameters hintParam) throws ProcessingException(Code) | | Add a transformer at the end of the pipeline.
The transformer role is given : the actual Transformer is fetched
from the latest ComponentManager given by compose()
or recompose() .
Parameters: role - the transformer role in the component manager. Parameters: source - the source used to setup the transformer (e.g. XSL file), ornull if no source is given. Parameters: param - the parameters for the transfomer. throws: ProcessingException - if the generator couldn't be obtained. |
checkPipeline | protected boolean checkPipeline()(Code) | | Sanity check
true if the pipeline is 'sane', false otherwise. |
compose | public void compose(ComponentManager manager) throws ComponentException(Code) | | Composable Interface
|
getGenerator | public Generator getGenerator()(Code) | | Get the generator - used for content aggregation
|
getKeyForEventPipeline | public String getKeyForEventPipeline()(Code) | | Return the key for the event pipeline
If the "event pipeline" (= the complete pipeline without the
serializer) is cacheable and valid, return a key.
Otherwise return null
|
getValidityForEventPipeline | public SourceValidity getValidityForEventPipeline()(Code) | | Return valid validity objects for the event pipeline
If the "event pipeline" (= the complete pipeline without the
serializer) is cacheable and valid, return all validity objects.
Otherwise return null
|
informBranchPoint | public void informBranchPoint()(Code) | | Informs pipeline we have come across a branch point.
Default behaviour is do nothing.
|
isInternalError | protected boolean isInternalError()(Code) | | true if error happened during internal pipeline prepare call. |
parameterize | public void parameterize(Parameters params) throws ParameterException(Code) | | Parameterizable Interface - Configuration
|
recompose | public void recompose(ComponentManager manager) throws ComponentException(Code) | | Recomposable Interface
|
recycle | public void recycle()(Code) | | |
release | public void release()(Code) | | Release this component.
If you get an instance not by a component manager but for example
by a processor, you have to release this component by calling
this method and NOT by using a component manager!
|
setErrorHandler | public void setErrorHandler(SitemapErrorHandler errorHandler)(Code) | | Sets error handler for this pipeline.
Used for handling errors in the internal pipelines.
Parameters: errorHandler - error handler |
setGenerator | public void setGenerator(String role, String source, Parameters param, Parameters hintParam) throws ProcessingException(Code) | | Set the generator that will be used as the initial step in the pipeline.
The generator role is given : the actual Generator is fetched
from the latest ComponentManager given by compose()
or recompose() .
Parameters: role - the generator role in the component manager. Parameters: source - the source where to produce XML from, or null if nosource is given. Parameters: param - the parameters for the generator. throws: ProcessingException - if the generator couldn't be obtained. |
setMimeTypeForReader | protected void setMimeTypeForReader(Environment environment) throws ProcessingException(Code) | | Set the mime-type for a reader
Parameters: environment - The current environment |
setMimeTypeForSerializer | protected void setMimeTypeForSerializer(Environment environment) throws ProcessingException(Code) | | Set the mime-type for a serializer
Parameters: environment - The current environment |
setSerializer | public void setSerializer(String role, String source, Parameters param, Parameters hintParam, String mimeType) throws ProcessingException(Code) | | Set the serializer for this pipeline
Parameters: mimeType - Can be null |
setup | public void setup(Parameters params)(Code) | | Setup this component
|
|
|