org.apache.cocoon.stringtemplate
Class StringTemplateReader

java.lang.Object
  extended by org.apache.cocoon.pipeline.component.AbstractPipelineComponent
      extended by org.apache.cocoon.stringtemplate.StringTemplateReader
All Implemented Interfaces:
CachingPipelineComponent, Finisher, PipelineComponent, Starter

public class StringTemplateReader
extends AbstractPipelineComponent
implements CachingPipelineComponent, Starter, Finisher


Constructor Summary
StringTemplateReader()
           
StringTemplateReader(URL source)
           
 
Method Summary
 CacheKey constructCacheKey()
          
 void execute()
          
 String getContentType()
          
 void setConfiguration(Map<String,? extends Object> configuration)
          Pass component specific configuration parameters to the pipeline component in a generic way.
 void setMimeType(String mimeType)
          Set the mime-type directly which is useful when this component is used directly.
 void setOutputStream(OutputStream outputStream)
          
 void setSource(URL source)
          Set the source URL directly when this component is used directly.
 void setup(Map<String,Object> parameters)
          The shared object map for this pipeline run.
 
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, toString, wait, wait, wait
 
Methods inherited from interface org.apache.cocoon.pipeline.component.PipelineComponent
finish
 

Constructor Detail

StringTemplateReader

public StringTemplateReader()

StringTemplateReader

public StringTemplateReader(URL source)
Method Detail

constructCacheKey

public CacheKey constructCacheKey()

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

execute

public void execute()

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

getContentType

public String getContentType()

Specified by:
getContentType in interface Finisher
See Also:
Finisher.getContentType()

setConfiguration

public void setConfiguration(Map<String,? extends Object> configuration)
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:
configuration - The Map of configuration parameters.
See Also:
PipelineComponent.setConfiguration(java.util.Map)

setMimeType

public void setMimeType(String mimeType)
Set the mime-type directly which is useful when this component is used directly.

Parameters:
mimeType - The mime-type that belongs to the content that is produced by this component.

setOutputStream

public void setOutputStream(OutputStream outputStream)

Specified by:
setOutputStream in interface Finisher
See Also:
Finisher.setOutputStream(java.io.OutputStream)

setSource

public final void setSource(URL source)
Set the source URL directly when this component is used directly.

Parameters:
source - A URL that will be used by this component.

setup

public void setup(Map<String,Object> parameters)
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.
See Also:
AbstractPipelineComponent.setup(java.util.Map)


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