com.agimatec.commons.generator
Class FreemarkerFileGenerator
java.lang.Object
com.agimatec.commons.generator.FreemarkerFileGenerator
public class FreemarkerFileGenerator
- extends Object
Description:
User: roman.stumm
Date: 27.04.2007
Time: 17:57:39
Copyright: Agimatec GmbH
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static final org.apache.commons.logging.Log log
freemarker
protected freemarker.template.Configuration freemarker
UTF8
public static final String UTF8
- See Also:
- Constant Field Values
NullWriter
public static final Writer NullWriter
FreemarkerFileGenerator
public FreemarkerFileGenerator(File templateDir)
throws IOException
- Throws:
IOException
setTemplateName
public void setTemplateName(String templateName)
setCharset
public void setCharset(String charset)
setDestFileName
public void setDestFileName(String target)
putModel
public void putModel(String name,
Object obj)
getRoot
public Map getRoot()
getTemplateName
public String getTemplateName()
getCharset
public String getCharset()
getDestFileName
public String getDestFileName()
getBaseDir
public String getBaseDir()
setBaseDir
public void setBaseDir(String baseDir)
generate
public void generate()
throws IOException,
freemarker.template.TemplateException
- Throws:
IOException
freemarker.template.TemplateException
generate
public void generate(Writer out)
throws IOException,
freemarker.template.TemplateException
- Throws:
IOException
freemarker.template.TemplateException
getDestFile
public File getDestFile()
outputToFile
public void outputToFile(String newDestFile)
throws IOException
- Utility method for templates that need to change the
output file during template processing!
- Throws:
IOException- See Also:
outputToNull()
outputToNull
public void outputToNull()
throws IOException
- Utility method for template to write template output to 'nothing'.
- Throws:
IOException- See Also:
outputToFile(String)
outputToWriter
public void outputToWriter(Writer outWriter)
throws IOException
- Utility method for template to write to the given writer
- Parameters:
outWriter -
- Throws:
IOException
getFreemarker
public freemarker.template.Configuration getFreemarker()
exeptLast
public List exeptLast(Collection coll)
last
public Object last(Collection coll)
exeptFirst
public List exeptFirst(Collection coll)
first
public Object first(Collection coll)
Copyright © 2008-2011. All Rights Reserved.