org.tinyjee.maven.dim.sources
Class AbstractBufferedSource

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

public abstract class AbstractBufferedSource
extends AbstractSource

Base class for source implementations that buffer (generated) content in memory.

Author:
Juergen_Kellerer, 2011-10-19

Nested Class Summary
protected  class 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
protected  Source.Content content
           
 
Fields inherited from class org.tinyjee.maven.dim.spi.AbstractSource
parameters, sourceUrl
 
Constructor Summary
protected AbstractBufferedSource(URL sourceUrl, Map<String,Object> parameters)
           
 
Method Summary
 Source.Content getContent()
          Retrieves the source content.
 void reset()
           
protected abstract  void writeSourceContent(Writer writer)
          Is called when the source content has to be created.
 
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
 

Field Detail

content

protected Source.Content content
Constructor Detail

AbstractBufferedSource

protected AbstractBufferedSource(URL sourceUrl,
                                 Map<String,Object> parameters)
Method Detail

writeSourceContent

protected abstract void writeSourceContent(Writer writer)
                                    throws IOException
Is called when the source content has to be created.

Parameters:
writer - the writer to write the source content to.
Throws:
IOException - in case of writing failed.

getContent

public Source.Content getContent()
Description copied from interface: Source
Retrieves the source content.

Specified by:
getContent in interface Source
Overrides:
getContent in class AbstractSource
Returns:
the source content.

reset

public void reset()