org.thymeleaf.context
Interface IContext

All Known Subinterfaces:
IWebContext
All Known Implementing Classes:
AbstractContext, Context, WebContext

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:

Since:
1.0
Author:
Daniel Fernández

Method Summary
 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.
 

Method Detail

getVariables

VariablesMap<String,Object> getVariables()

Returns the VariablesMap object containing the variables that will be available for the execution of expressions inside templates.

Returns:
the variables map.

getLocale

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.

Returns:
the locale to be used for template execution.

addContextExecutionInfo

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).

Parameters:
templateName - the name of the template being executed


Copyright © 2012 The THYMELEAF team. All Rights Reserved.