Package com.aspectran.pebble
Class PebbleEngineFactory
java.lang.Object
com.aspectran.pebble.PebbleEngineFactory
- All Implemented Interfaces:
ActivityContextAware
,Aware
- Direct Known Subclasses:
PebbleEngineFactoryBean
Factory that configures a Pebble Engine Configuration.
Created: 2016. 1. 9.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.pebbletemplates.pebble.PebbleEngine
Creates a PebbleEngine instance.protected io.pebbletemplates.pebble.loader.Loader<?>
getAggregateTemplateLoader
(io.pebbletemplates.pebble.loader.Loader<?>[] templateLoaders) Return a Template Loader based on the given Template Loader list.protected io.pebbletemplates.pebble.loader.Loader<?>
getTemplateLoaderForPath
(String templateLoaderPath) Determine a Pebble Engine Template Loader for the given path.void
setActivityContext
(ActivityContext context) void
setDefaultLocale
(String defaultLocale) void
setStrictVariables
(boolean strictVariables) void
setTemplateLoader
(io.pebbletemplates.pebble.loader.Loader<?> templateLoaders) void
setTemplateLoader
(io.pebbletemplates.pebble.loader.Loader<?>[] templateLoaders) void
setTemplateLoader
(List<io.pebbletemplates.pebble.loader.Loader<?>> templateLoaderList) void
setTemplateLoaderPath
(String templateLoaderPath) void
setTemplateLoaderPath
(String[] templateLoaderPaths) void
setTemplateLoaderPath
(List<String> templateLoaderPathList)
-
Constructor Details
-
PebbleEngineFactory
public PebbleEngineFactory()
-
-
Method Details
-
setActivityContext
- Specified by:
setActivityContext
in interfaceActivityContextAware
-
setDefaultLocale
-
setStrictVariables
public void setStrictVariables(boolean strictVariables) -
setTemplateLoaderPath
-
setTemplateLoaderPath
-
setTemplateLoaderPath
-
setTemplateLoader
public void setTemplateLoader(io.pebbletemplates.pebble.loader.Loader<?> templateLoaders) -
setTemplateLoader
public void setTemplateLoader(io.pebbletemplates.pebble.loader.Loader<?>[] templateLoaders) -
setTemplateLoader
-
createPebbleEngine
public io.pebbletemplates.pebble.PebbleEngine createPebbleEngine()Creates a PebbleEngine instance.- Returns:
- a PebbleEngine object that can be used to create PebbleTemplate objects
-
getAggregateTemplateLoader
protected io.pebbletemplates.pebble.loader.Loader<?> getAggregateTemplateLoader(io.pebbletemplates.pebble.loader.Loader<?>[] templateLoaders) Return a Template Loader based on the given Template Loader list. If more than one Template Loader has been registered, a DelegatingLoader needs to be created.- Parameters:
templateLoaders
- the final List of TemplateLoader instances- Returns:
- the aggregate TemplateLoader
-
getTemplateLoaderForPath
protected io.pebbletemplates.pebble.loader.Loader<?> getTemplateLoaderForPath(@NonNull String templateLoaderPath) Determine a Pebble Engine Template Loader for the given path.- Parameters:
templateLoaderPath
- the path to load templates from- Returns:
- an appropriate Template Loader
-