Class Overview
Utility class for working with FreeMarker.
Provides convenience methods to process a FreeMarker template with a model.
Summary
Public Methods |
static
String
|
processTemplateIntoString(Template template, Object model)
Process the specified FreeMarker template with the given model and write
the result to the given Writer.
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
Public Constructors
public
FreeMarkerTemplateUtils
()
Public Methods
public
static
String
processTemplateIntoString
(Template template, Object model)
Process the specified FreeMarker template with the given model and write
the result to the given Writer.
When using this method to prepare a text for a mail to be sent with Spring's
mail support, consider wrapping IO/TemplateException in MailPreparationException.
Parameters
model
| the model object, typically a Map that contains model names
as keys and model objects as values |
Throws
IOException
| if the template wasn't found or couldn't be read |
| if rendering failed |
TemplateException
| |