org.thymeleaf.context
Class Context

Object
  extended by org.thymeleaf.context.AbstractContext
      extended by org.thymeleaf.context.Context
All Implemented Interfaces:
IContext

public class Context
extends AbstractContext

Standard implementation of IContext.

This IContext implementation uses a ContextExecutionInfo object as its IContextExecutionInfo implementation.

If Thymeleaf is used for the creation of an HTML/XHTML interface in a web application, an implementation of the IWebContext interface should be used instead.

Since:
1.0
Author:
Daniel Fernández

Field Summary
 
Fields inherited from class org.thymeleaf.context.AbstractContext
EXEC_INFO_VARIABLE_NAME
 
Constructor Summary
Context()
           Create an instance without specifying a locale.
Context(java.util.Locale locale)
           Create an instance specifying a locale.
Context(java.util.Locale locale, java.util.Map<String,?> variables)
           Create an instance specifying a locale and an initial set of context variables.
 
Method Summary
protected  IContextExecutionInfo buildContextExecutionInfo(String templateName)
           Creates the specific instance of IContextExecutionInfo to be added to the context as the execInfo variable.
 
Methods inherited from class org.thymeleaf.context.AbstractContext
addContextExecutionInfo, clearVariables, getLocale, getVariables, setLocale, setVariable, setVariables
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Context

public Context()

Create an instance without specifying a locale. Using this constructor, the default locale (Locale.getDefault()) will be used.


Context

public Context(java.util.Locale locale)

Create an instance specifying a locale.

Parameters:
locale - the locale to be used.

Context

public Context(java.util.Locale locale,
               java.util.Map<String,?> variables)

Create an instance specifying a locale and an initial set of context variables.

Parameters:
locale - the locale to be used.
variables - the initial set of context variables.
Method Detail

buildContextExecutionInfo

protected IContextExecutionInfo buildContextExecutionInfo(String templateName)
Description copied from class: AbstractContext

Creates the specific instance of IContextExecutionInfo to be added to the context as the execInfo variable.

Specified by:
buildContextExecutionInfo in class AbstractContext
Parameters:
templateName - the name of the template being executed
Returns:
the execution info object


Copyright © 2012 The THYMELEAF team. All Rights Reserved.