edu.sampleu.common
Class FreemarkerUtil
java.lang.Object
edu.sampleu.common.FreemarkerUtil
public class FreemarkerUtil
- extends Object
FreemarkerUtil loads properties from user defined InputStream. systemPropertiesOverride should be used to override properties
using a given key to identify them from JVM args. (i.e. -Dkey.name to override the name property in the key file.)
TODO setup so the loading and overriding of properties is done for the user rather then them having to call it.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
Field Summary |
protected freemarker.template.Configuration |
cfg
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cfg
protected freemarker.template.Configuration cfg
FreemarkerUtil
public FreemarkerUtil()
ftlWrite
public static File ftlWrite(File output,
freemarker.template.Template template,
InputStream inputStream)
throws IOException,
freemarker.template.TemplateException
- Calls ftlWrite that also accepts a key, using the output getName as the key.
- Parameters:
output
- template
-
- Returns:
-
- Throws:
IOException
freemarker.template.TemplateException
ftlWrite
public static File ftlWrite(String key,
File output,
freemarker.template.Template template,
InputStream inputStream)
throws IOException,
freemarker.template.TemplateException
- Loads properties from user defined properties file, if not available uses resource file
writes processed template to file
- Parameters:
key
- output
- template
-
- Throws:
IOException
freemarker.template.TemplateException
loadProperties
protected static Properties loadProperties(InputStream inputStream)
throws IOException
- Throws:
IOException
writeTemplateToFile
protected static File writeTemplateToFile(File file,
freemarker.template.Template template,
Properties props)
throws IOException,
freemarker.template.TemplateException
- Parameters:
file
- template
- props
-
- Returns:
-
- Throws:
IOException
freemarker.template.TemplateException
Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.