public class TemplateEngine extends Object
Modifier and Type | Field and Description |
---|---|
static String |
TEMPLATE_PATH |
static String |
TEMPLATE_SUFFIX |
Constructor and Description |
---|
TemplateEngine() |
Modifier and Type | Method and Description |
---|---|
org.trimou.engine.MustacheEngine |
getEngine()
Constructs a template engine with some additional helpers and lambdas for HTML generation.
|
String |
getTemplateDir()
Gets the template directory.
|
String |
renderTemplate(String templateName,
ApiModel api)
Renders a template of the given name with the given action, using the parameter name
action . |
void |
setTemplateDir(String templateDir)
Set the template directory.
|
public static final String TEMPLATE_SUFFIX
public static final String TEMPLATE_PATH
public String renderTemplate(String templateName, ApiModel api)
action
.templateName
- template nameapi
- RAML API model as context objectpublic String getTemplateDir()
public void setTemplateDir(String templateDir)
templateDir
- template directorypublic org.trimou.engine.MustacheEngine getEngine()
Copyright © 2016–2017 OPS4J - Open Participation Software for Java. All rights reserved.