| java.lang.Object org.springframework.ui.velocity.VelocityEngineUtils
VelocityEngineUtils | abstract public class VelocityEngineUtils (Code) | | Utility class for working with a VelocityEngine.
Provides convenience methods to merge a Velocity template with a model.
author: Juergen Hoeller since: 22.01.2004 |
Method Summary | |
public static void | mergeTemplate(VelocityEngine velocityEngine, String templateLocation, Map model, Writer writer) Merge the specified Velocity template with the given model and write
the result to the given Writer. | public static void | mergeTemplate(VelocityEngine velocityEngine, String templateLocation, String encoding, Map model, Writer writer) Merge the specified Velocity template with the given model and write
the result to the given Writer. | public static String | mergeTemplateIntoString(VelocityEngine velocityEngine, String templateLocation, Map model) Merge the specified Velocity template with the given model into a String. | public static String | mergeTemplateIntoString(VelocityEngine velocityEngine, String templateLocation, String encoding, Map model) Merge the specified Velocity template with the given model into a String. |
mergeTemplate | public static void mergeTemplate(VelocityEngine velocityEngine, String templateLocation, Map model, Writer writer) throws VelocityException(Code) | | Merge the specified Velocity template with the given model and write
the result to the given Writer.
Parameters: velocityEngine - VelocityEngine to work with Parameters: templateLocation - the location of template, relative to Velocity'sresource loader path Parameters: model - the Map that contains model names as keys and model objectsas values Parameters: writer - the Writer to write the result to throws: VelocityException - if the template wasn't found or rendering failed |
mergeTemplate | public static void mergeTemplate(VelocityEngine velocityEngine, String templateLocation, String encoding, Map model, Writer writer) throws VelocityException(Code) | | Merge the specified Velocity template with the given model and write
the result to the given Writer.
Parameters: velocityEngine - VelocityEngine to work with Parameters: templateLocation - the location of template, relative to Velocity'sresource loader path Parameters: encoding - the encoding of the template file Parameters: model - the Map that contains model names as keys and model objectsas values Parameters: writer - the Writer to write the result to throws: VelocityException - if the template wasn't found or rendering failed |
mergeTemplateIntoString | public static String mergeTemplateIntoString(VelocityEngine velocityEngine, String templateLocation, Map model) throws VelocityException(Code) | | Merge the specified Velocity template with the given model into a String.
When using this method to prepare a text for a mail to be sent with Spring's
mail support, consider wrapping VelocityException in MailPreparationException.
Parameters: velocityEngine - VelocityEngine to work with Parameters: templateLocation - the location of template, relative to Velocity'sresource loader path Parameters: model - the Map that contains model names as keys and model objectsas values the result as String throws: VelocityException - if the template wasn't found or rendering failed See Also: org.springframework.mail.MailPreparationException |
mergeTemplateIntoString | public static String mergeTemplateIntoString(VelocityEngine velocityEngine, String templateLocation, String encoding, Map model) throws VelocityException(Code) | | Merge the specified Velocity template with the given model into a String.
When using this method to prepare a text for a mail to be sent with Spring's
mail support, consider wrapping VelocityException in MailPreparationException.
Parameters: velocityEngine - VelocityEngine to work with Parameters: templateLocation - the location of template, relative to Velocity'sresource loader path Parameters: encoding - the encoding of the template file Parameters: model - the Map that contains model names as keys and model objectsas values the result as String throws: VelocityException - if the template wasn't found or rendering failed See Also: org.springframework.mail.MailPreparationException |
|
|