ca.krasnay.scaffold
Interface TemplateProcessor
- All Known Implementing Classes:
- VelocityTemplateProcessor
public interface TemplateProcessor
Performs textual substitution into a template using a particular
template technology.
process
String process(String template,
Map<String,Object> map,
boolean isHtml)
throws TemplateParseException
- Substitutes a set of values into a template and returns the result.
- Parameters:
template - Template into which to substitute. The particular syntax for
specifying where data should be substituted is dependent on
the particular template technology being used.map - Map of values to substitute into the template. Non-string
values are converted to strings by calling their toString()
method.isHtml - If true, values being substituted are escaped according to
HTML/XML rules, unless the values are instances of
RawString. If false, no escaping is performed.
- Throws:
TemplateParseException - if the template engine is unable to parse the given template.
Copyright © 2015. All rights reserved.