org.apache.cocoon.stringtemplate
Class StringTemplateGenerator

java.lang.Object
  extended by org.apache.cocoon.pipeline.component.AbstractPipelineComponent
      extended by org.apache.cocoon.sax.AbstractSAXPipelineComponent
          extended by org.apache.cocoon.sax.AbstractSAXProducer
              extended by org.apache.cocoon.stringtemplate.StringTemplateGenerator
All Implemented Interfaces:
CachingPipelineComponent, PipelineComponent, Producer, Starter, SAXPipelineComponent, SAXProducer
Direct Known Subclasses:
ControllerContextAwareStringTemplateGenerator

public class StringTemplateGenerator
extends AbstractSAXProducer
implements Starter, CachingPipelineComponent


Field Summary
protected  Map<String,Object> parameters
           
 
Constructor Summary
StringTemplateGenerator()
           
StringTemplateGenerator(File file)
           
StringTemplateGenerator(InputStream stream)
           
StringTemplateGenerator(String string)
           
StringTemplateGenerator(URL source)
           
 
Method Summary
 CacheKey constructCacheKey()
          
 void execute()
          
protected  String getTemplate()
           
protected  String renderTemplate()
           
 void setConfiguration(Map<String,? extends Object> parameters)
          Pass component specific configuration parameters to the pipeline component in a generic way.
 void setStream(InputStream stream)
           
 void setup(Map<String,Object> parameters)
          The shared object map for this pipeline run.
 
Methods inherited from class org.apache.cocoon.sax.AbstractSAXProducer
getSAXConsumer, setConsumer, setSAXConsumer, toString
 
Methods inherited from class org.apache.cocoon.pipeline.component.AbstractPipelineComponent
finish
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.cocoon.pipeline.component.PipelineComponent
finish
 

Field Detail

parameters

protected Map<String,Object> parameters
Constructor Detail

StringTemplateGenerator

public StringTemplateGenerator()

StringTemplateGenerator

public StringTemplateGenerator(URL source)

StringTemplateGenerator

public StringTemplateGenerator(File file)

StringTemplateGenerator

public StringTemplateGenerator(InputStream stream)

StringTemplateGenerator

public StringTemplateGenerator(String string)
Method Detail

setStream

public void setStream(InputStream stream)

constructCacheKey

public CacheKey constructCacheKey()

Specified by:
constructCacheKey in interface CachingPipelineComponent
See Also:
CachingPipelineComponent.constructCacheKey()

getTemplate

protected String getTemplate()
                      throws IOException
Throws:
IOException

renderTemplate

protected String renderTemplate()
                         throws IOException
Throws:
IOException

execute

public void execute()

Specified by:
execute in interface Starter
See Also:
Starter.execute()

setup

public void setup(Map<String,Object> parameters)
Description copied from interface: PipelineComponent
The shared object map for this pipeline run.

Specified by:
setup in interface PipelineComponent
Overrides:
setup in class AbstractPipelineComponent
Parameters:
parameters - A Map of parameters that are available to all PipelineComponents. This is a modifiable map that can be changed by this pipeline component.

setConfiguration

public void setConfiguration(Map<String,? extends Object> parameters)
Pass component specific configuration parameters to the pipeline component in a generic way. This is useful in environments that automatically assemble pipelines with their components and can't use the components constructors or setters.

Specified by:
setConfiguration in interface PipelineComponent
Overrides:
setConfiguration in class AbstractPipelineComponent
Parameters:
parameters - The Map of configuration parameters.
See Also:
org.apache.cocoon.pipeline.component.AbstractSAXProducer#setConfiguration(java.util.Map)


Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.