public interface IContext
Interface for all context implementations.
A context object will be used for each template execution, and every context implementation must offer at least:
VariablesMap
object.Modifier and Type | Method and Description |
---|---|
void |
addContextExecutionInfo(String templateName)
Initializes the IContext object with the (optional) addition
of an "execution info" variable (usually called execInfo)
to the variables map.
|
Locale |
getLocale()
Returns the locale that will be used for template execution.
|
VariablesMap<String,Object> |
getVariables()
Returns the
VariablesMap object containing the variables that will be
available for the execution of expressions inside templates. |
VariablesMap<String,Object> getVariables()
Returns the VariablesMap
object containing the variables that will be
available for the execution of expressions inside templates.
Locale getLocale()
Returns the locale that will be used for template execution. This locale will determine the language of the externalized messages resolved by the message resolvers.
void addContextExecutionInfo(String templateName)
Initializes the IContext object with the (optional) addition of an "execution info" variable (usually called execInfo) to the variables map.
Each implementation of IContext will be responsible for the addition
of a specialized object of the class it prefers (implementation of the
IContextExecutionInfo
interface is recommended but not required).
templateName
- the name of the template being executedCopyright © 2016 The THYMELEAF team. All rights reserved.