public class FreemarkerUtil extends Object
Modifier and Type | Field and Description |
---|---|
protected freemarker.template.Configuration |
cfg |
Constructor and Description |
---|
FreemarkerUtil() |
Modifier and Type | Method and Description |
---|---|
static File |
ftlWrite(File output,
freemarker.template.Template template,
InputStream inputStream)
Calls ftlWrite that also accepts a key, using the output getName as the key.
|
static File |
ftlWrite(String key,
File output,
freemarker.template.Template template,
InputStream inputStream)
Loads properties from user defined properties file, if not available uses resource file
writes processed template to file
|
protected static Properties |
loadProperties(InputStream inputStream) |
protected static File |
writeTemplateToFile(File file,
freemarker.template.Template template,
Properties props) |
protected freemarker.template.Configuration cfg
public FreemarkerUtil()
public static File ftlWrite(File output, freemarker.template.Template template, InputStream inputStream) throws IOException, freemarker.template.TemplateException
output
- template
- IOException
freemarker.template.TemplateException
public static File ftlWrite(String key, File output, freemarker.template.Template template, InputStream inputStream) throws IOException, freemarker.template.TemplateException
key
- output
- template
- IOException
freemarker.template.TemplateException
protected static Properties loadProperties(InputStream inputStream) throws IOException
IOException
protected static File writeTemplateToFile(File file, freemarker.template.Template template, Properties props) throws IOException, freemarker.template.TemplateException
file
- template
- props
- IOException
freemarker.template.TemplateException
Copyright © 2005–2016 The Kuali Foundation. All rights reserved.