public final class VelocityProvider extends Object
Modifier and Type | Method and Description |
---|---|
static String |
getContent(String templateName,
String placeholderName,
Object contextObject)
Builds a String using the Velocity template engine with a template by the given templateName.
|
static org.apache.velocity.Template |
getTemplate(String name)
Returns the Template by the given name if existing.
|
static org.apache.velocity.VelocityContext |
getVelocity()
Builds and returns an instance of the VelocityContext.
|
public static org.apache.velocity.VelocityContext getVelocity() throws Exception
Exception
- if an error occurs.public static org.apache.velocity.Template getTemplate(String name) throws Exception
name
- The filename of the template to get.Exception
- if an error occurs or the template does not exist.public static String getContent(String templateName, String placeholderName, Object contextObject) throws Exception
templateName
- The name of the template to use.placeholderName
- The name of the placeholder to use.contextObject
- The context object to use.Exception
- if an error occurs.Copyright © 2020 Hyland Software Germany GmbH. All rights reserved.