public interface ITemplatingEngine
HTML page to render.| Modifier and Type | Method and Description |
|---|---|
String |
createPlaceholder(String variable)
Creates a placeholder using the current templating engine
implementation.
|
String |
evaluate(String content,
IJsonObject jsonObject)
Evaluates the content, using the given parameters.
|
String |
evaluate(String content,
IJsonObject jsonObject,
Locale locale)
Evaluates the content, using the given parameters.
|
String |
evaluate(String content,
Map<String,Object> params)
Evaluates the content, using the given parameters.
|
String |
evaluate(String content,
Map<String,Object> params,
Locale locale)
Evaluates the content, using the given parameters.
|
String |
fromTemplate(String templatePath,
boolean isClasspathPath,
IJsonObject jsonObject)
Evaluates a template using the parameters specified
as a
IJsonObject. |
String |
fromTemplate(String templatePath,
boolean isClasspathPath,
IJsonObject jsonObject,
Locale locale)
Evaluates a template using the parameters specified
as a
IJsonObject. |
String |
fromTemplate(String templatePath,
boolean isClasspathPath,
Map<String,Object> params)
Evaluates a template using the given parameters.
|
String |
fromTemplate(String templatePath,
boolean isClasspathPath,
Map<String,Object> params,
Locale locale)
Evaluates a template using the given parameters.
|
String |
fromTemplate(String templatePath,
IJsonObject jsonObject)
Evaluates a template using the parameters specified
as a
IJsonObject. |
String |
fromTemplate(String templatePath,
IJsonObject jsonObject,
Locale locale)
Evaluates a template using the parameters specified
as a
IJsonObject. |
String |
fromTemplate(String templatePath,
Map<String,Object> params)
Evaluates a template using the given parameters.
|
String |
fromTemplate(String templatePath,
Map<String,Object> params,
Locale locale)
Evaluates a template using the given parameters.
|
String evaluate(String content, Map<String,Object> params)
String evaluate(String content, Map<String,Object> params, Locale locale)
String evaluate(String content, IJsonObject jsonObject)
IJsonObject.
Uses the default Locale.String evaluate(String content, IJsonObject jsonObject, Locale locale)
IJsonObject.
Uses the specified Locale.String fromTemplate(String templatePath, Map<String,Object> params)
templatePath - must be a classpath's relative path.String fromTemplate(String templatePath, Map<String,Object> params, Locale locale)
templatePath - must be a classpath's relative path.String fromTemplate(String templatePath, IJsonObject jsonObject)
IJsonObject.
Uses the default Locale.templatePath - must be a classpath's relative path.String fromTemplate(String templatePath, IJsonObject jsonObject, Locale locale)
IJsonObject.
Uses the specified Locale.templatePath - must be a classpath's relative path.String fromTemplate(String templatePath, boolean isClasspathPath, Map<String,Object> params)
isClasspathPath - if true, the 'templatePath' is considered as
a classpath's relative path. If false, it is considered as an absolute file
system path.String fromTemplate(String templatePath, boolean isClasspathPath, Map<String,Object> params, Locale locale)
isClasspathPath - if true, the 'templatePath' is considered as
a classpath's relative path. If false, it is considered as an absolute file
system path.String fromTemplate(String templatePath, boolean isClasspathPath, IJsonObject jsonObject)
IJsonObject.
Uses the default Locale.isClasspathPath - if true, the 'templatePath' is considered as
a classpath's relative path. If false, it is considered as an absolute file
system path.String fromTemplate(String templatePath, boolean isClasspathPath, IJsonObject jsonObject, Locale locale)
IJsonObject.
Uses the specified Locale.isClasspathPath - if true, the 'templatePath' is considered as
a classpath's relative path. If false, it is considered as an absolute file
system path.String createPlaceholder(String variable)
This is mainly useful for the tests, which don't know in advance which templating engine will be used, so which syntax to use for the placeholders.
For example, using Pebble, a call to createPlaceholder("name") will
result in "{{name}}" (without the quotes).
Copyright © 2016. All rights reserved.