Package com.atlassian.jira.template
Interface VelocityTemplatingEngine
- All Known Implementing Classes:
DefaultVelocityTemplatingEngine,EmailVelocityTemplatingEngine
Represents a fluent, easy-to-use façade over the
VelocityEngine used by the JIRA web
application.
Usage
File Templates
- To render a file template, applying a map of parameters as html:
engine.render(file("path/to/file")).applying(parameters).asHtml() - if there are no params to the template you can omit the applying call:
engine.render(file("path/to/file")).asHtml() - To render the template as plain text:
engine.render(file("path/to/file")).asPlainText()
Fragments
-
To render a vtl fragment stored in a string, applying a map of parameters as html:
engine.render(fragment("vtl-fragment")).applying(parameters).asHtml() -
if there are no params to the template you can omit the applying call:
engine.render(fragment("vtl-fragment")).asHtml() -
To render the template as plain text:
engine.render(file("path/to/file")).asPlainText()
- Since:
- v5.1
-
Nested Class Summary
Nested Classes -
Method Summary
-
Method Details
-
render
-