org.socketelf.consumerfactory_imp.rose
Class TemplateProcessor

java.lang.Object
  extended by org.socketelf.consumerfactory_imp.rose.TemplateProcessor

 class TemplateProcessor
extends java.lang.Object

Used to construct the consumer source files.

Version:
0.7.0
Author:
suleman

Field Summary
private  freemarker.template.Configuration config
          Used to configure Freemarker.
private  ConsumerDataModel dataModel
          The consumer data model to merage with the Freemarker templates.
private  boolean valid
          A flag to indicate the output was created.
 
Constructor Summary
TemplateProcessor(java.io.File templateDir, ConsumerDataModel dataModel)
          Constructs the TemplateProcessor class.
 
Method Summary
(package private)  boolean execute(java.lang.String templateName, java.io.File outputFile)
           
(package private)  boolean isValid()
          Used to check if the template is processed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

config

private freemarker.template.Configuration config
Used to configure Freemarker.


dataModel

private ConsumerDataModel dataModel
The consumer data model to merage with the Freemarker templates.


valid

private boolean valid
A flag to indicate the output was created.

Constructor Detail

TemplateProcessor

TemplateProcessor(java.io.File templateDir,
                  ConsumerDataModel dataModel)
Constructs the TemplateProcessor class.

Parameters:
templateDir - The directory from which templates will be found.
dataModel - ConsumerDataModel to use when creating the output.
Method Detail

execute

boolean execute(java.lang.String templateName,
                java.io.File outputFile)
Parameters:
templateName - The template to use when producing the output.
outputFile - The name of the output file.
Returns:
boolean

isValid

boolean isValid()
Used to check if the template is processed.

Returns:
boolean