Package com.avoka.core.util
Class StringTemplate
java.lang.Object
com.avoka.core.util.StringTemplate
Provides a StringTemplate which utilizes the Velocity Engine.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionStringTemplate
(String content) Create a template with the given content.StringTemplate
(String content, ServletContext servletContext) Create a template with the given content. -
Method Summary
-
Field Details
-
DEFAULT_TEMPLATE_PROPS
- See Also:
-
-
Constructor Details
-
StringTemplate
Create a template with the given content.- Parameters:
content
- the template content
-
StringTemplate
Create a template with the given content.- Parameters:
content
- the template contentservletContext
- the applications servlet context
-
-
Method Details
-
merge
Merge the given model data with the template.- Parameters:
model
- the model data to merge- Returns:
- the rendered template merged with the model
-
merge
Merge the given model key name and value with the template.- Parameters:
key
- the model key namevalue
- the model value- Returns:
- the rendered template merged with the model
-
getTemplateEngine
protected org.apache.velocity.app.VelocityEngine getTemplateEngine()
-