public class SpincastPebbleTemplatingEngine extends Object implements TemplatingEngine
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
logger |
static String |
PEBBLE_PARAMS_AS_JSONOBJECT |
| Constructor and Description |
|---|
SpincastPebbleTemplatingEngine(SpincastConfig spincastConfig,
SpincastPebbleTemplatingEngineConfig spincastPebbleTemplatingEngineConfig,
SpincastPebbleExtension spincastPebbleExtension,
JsonManager jsonManager) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addCommonLoaderFeatures(com.mitchellbosecke.pebble.PebbleEngine.Builder builder) |
String |
createPlaceholder(String variable) |
String |
evaluate(String content,
JsonObject jsonObject) |
String |
evaluate(String content,
JsonObject jsonObject,
Locale locale) |
String |
evaluate(String content,
Map<String,Object> params) |
String |
evaluate(String content,
Map<String,Object> params,
Locale locale) |
String |
fromTemplate(String templatePath,
boolean isClasspathPath,
JsonObject jsonObject) |
String |
fromTemplate(String templatePath,
boolean isClasspathPath,
JsonObject jsonObject,
Locale locale) |
String |
fromTemplate(String templatePath,
boolean isClasspathPath,
Map<String,Object> params) |
String |
fromTemplate(String templatePath,
boolean isClasspathPath,
Map<String,Object> params,
Locale locale) |
String |
fromTemplate(String templatePath,
JsonObject jsonObject) |
String |
fromTemplate(String templatePath,
JsonObject jsonObject,
Locale locale) |
String |
fromTemplate(String templatePath,
Map<String,Object> params) |
String |
fromTemplate(String templatePath,
Map<String,Object> params,
Locale locale) |
protected com.mitchellbosecke.pebble.loader.Loader<String> |
getClasspathTemplateLoader() |
protected com.mitchellbosecke.pebble.loader.Loader<String> |
getFileSystemTemplateLoader() |
protected JsonManager |
getJsonManager() |
protected com.mitchellbosecke.pebble.PebbleEngine |
getPebbleEngineString() |
protected com.mitchellbosecke.pebble.PebbleEngine |
getPebbleEngineTemplateClasspath() |
protected com.mitchellbosecke.pebble.PebbleEngine |
getPebbleEngineTemplateFileSystem() |
protected SpincastConfig |
getSpincastConfig() |
protected SpincastPebbleExtension |
getSpincastPebbleExtension() |
protected SpincastPebbleTemplatingEngineConfig |
getSpincastPebbleTemplatingEngineConfig() |
protected String |
parse(String htmlOrPath,
JsonObject paramsAsJsonObject,
Map<String,Object> params,
boolean isTemplate,
boolean isClasspathPath,
Locale locale) |
protected static final org.slf4j.Logger logger
public static final String PEBBLE_PARAMS_AS_JSONOBJECT
@Inject public SpincastPebbleTemplatingEngine(SpincastConfig spincastConfig, SpincastPebbleTemplatingEngineConfig spincastPebbleTemplatingEngineConfig, @Nullable SpincastPebbleExtension spincastPebbleExtension, JsonManager jsonManager)
protected SpincastConfig getSpincastConfig()
protected SpincastPebbleTemplatingEngineConfig getSpincastPebbleTemplatingEngineConfig()
protected SpincastPebbleExtension getSpincastPebbleExtension()
protected JsonManager getJsonManager()
protected com.mitchellbosecke.pebble.PebbleEngine getPebbleEngineString()
protected com.mitchellbosecke.pebble.PebbleEngine getPebbleEngineTemplateClasspath()
protected com.mitchellbosecke.pebble.PebbleEngine getPebbleEngineTemplateFileSystem()
protected void addCommonLoaderFeatures(com.mitchellbosecke.pebble.PebbleEngine.Builder builder)
protected com.mitchellbosecke.pebble.loader.Loader<String> getClasspathTemplateLoader()
protected com.mitchellbosecke.pebble.loader.Loader<String> getFileSystemTemplateLoader()
public String evaluate(String content, JsonObject jsonObject)
evaluate in interface TemplatingEnginepublic String evaluate(String content, JsonObject jsonObject, Locale locale)
evaluate in interface TemplatingEnginepublic String evaluate(String content, Map<String,Object> params)
evaluate in interface TemplatingEnginepublic String evaluate(String content, Map<String,Object> params, Locale locale)
evaluate in interface TemplatingEnginepublic String fromTemplate(String templatePath, JsonObject jsonObject)
fromTemplate in interface TemplatingEnginepublic String fromTemplate(String templatePath, JsonObject jsonObject, Locale locale)
fromTemplate in interface TemplatingEnginepublic String fromTemplate(String templatePath, boolean isClasspathPath, JsonObject jsonObject)
fromTemplate in interface TemplatingEnginepublic String fromTemplate(String templatePath, boolean isClasspathPath, JsonObject jsonObject, Locale locale)
fromTemplate in interface TemplatingEnginepublic String fromTemplate(String templatePath, Map<String,Object> params)
fromTemplate in interface TemplatingEnginepublic String fromTemplate(String templatePath, Map<String,Object> params, Locale locale)
fromTemplate in interface TemplatingEnginepublic String fromTemplate(String templatePath, boolean isClasspathPath, Map<String,Object> params)
fromTemplate in interface TemplatingEnginepublic String fromTemplate(String templatePath, boolean isClasspathPath, Map<String,Object> params, Locale locale)
fromTemplate in interface TemplatingEngineprotected String parse(String htmlOrPath, JsonObject paramsAsJsonObject, Map<String,Object> params, boolean isTemplate, boolean isClasspathPath, Locale locale)
public String createPlaceholder(String variable)
createPlaceholder in interface TemplatingEngineCopyright © 2017. All rights reserved.