org.tinyjee.maven.dim.sources
Class TemplateSource

java.lang.Object
  extended by org.tinyjee.maven.dim.spi.AbstractSource
      extended by org.tinyjee.maven.dim.sources.AbstractBufferedSource
          extended by org.tinyjee.maven.dim.sources.TemplateSource
All Implemented Interfaces:
Source

public class TemplateSource
extends AbstractBufferedSource

Wraps a source content that contains a velocity template and executes it on using the Source interfaces.

Version:
1.0
Author:
Juergen_Kellerer, 2010-09-04

Nested Class Summary
static class TemplateSource.UrlResourceLoader
          Resolves templates from Urls.
 
Nested classes/interfaces inherited from class org.tinyjee.maven.dim.sources.AbstractBufferedSource
AbstractBufferedSource.BufferedSourceContent
 
Nested classes/interfaces inherited from class org.tinyjee.maven.dim.spi.AbstractSource
AbstractSource.SourceContent
 
Nested classes/interfaces inherited from interface org.tinyjee.maven.dim.spi.Source
Source.Content
 
Field Summary
 
Fields inherited from class org.tinyjee.maven.dim.sources.AbstractBufferedSource
content
 
Fields inherited from class org.tinyjee.maven.dim.spi.AbstractSource
parameters, sourceUrl
 
Constructor Summary
TemplateSource(URL sourceUrl, Source source)
          Constructs a new TemplateSource.
 
Method Summary
protected  void writeSourceContent(Writer writer)
          Is called when the source content has to be created.
 
Methods inherited from class org.tinyjee.maven.dim.sources.AbstractBufferedSource
getContent, reset
 
Methods inherited from class org.tinyjee.maven.dim.spi.AbstractSource
getUrl, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TemplateSource

public TemplateSource(URL sourceUrl,
                      Source source)
Constructs a new TemplateSource.

Parameters:
sourceUrl - the original source URL (used for naming purposes).
source - the source containing the template source and context params.
Method Detail

writeSourceContent

protected void writeSourceContent(Writer writer)
                           throws IOException
Description copied from class: AbstractBufferedSource
Is called when the source content has to be created.

Specified by:
writeSourceContent in class AbstractBufferedSource
Parameters:
writer - the writer to write the source content to.
Throws:
IOException - in case of writing failed.