Package org.thymeleaf.context
Class WebContext
- Object
-
- org.thymeleaf.context.AbstractContext
-
- org.thymeleaf.context.WebContext
-
- All Implemented Interfaces:
IContext
,IWebContext
public final class WebContext extends AbstractContext implements IWebContext
Basic web-oriented implementation of the
IContext
andIWebContext
interfaces.This context implementation contains all the required web artifacts needed for template execution in web environments, and should be enough for most web-based scenarios of template processing.
Note this class was modified in a backwards-incompatible way in Thymeleaf 3.1.0.
- Since:
- 3.1.0
- Author:
- Daniel Fernández
-
-
Constructor Summary
Constructors Constructor Description WebContext(IWebExchange webExchange)
WebContext(IWebExchange webExchange, Locale locale)
WebContext(IWebExchange webExchange, Locale locale, Map<String,Object> variables)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IWebExchange
getExchange()
Returns theIWebExchange
object associated with the template execution.-
Methods inherited from class org.thymeleaf.context.AbstractContext
clearVariables, containsVariable, getLocale, getVariable, getVariableNames, removeVariable, setLocale, setVariable, setVariables
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.thymeleaf.context.IContext
containsVariable, getLocale, getVariable, getVariableNames
-
-
-
-
Constructor Detail
-
WebContext
public WebContext(IWebExchange webExchange)
-
WebContext
public WebContext(IWebExchange webExchange, Locale locale)
-
WebContext
public WebContext(IWebExchange webExchange, Locale locale, Map<String,Object> variables)
-
-
Method Detail
-
getExchange
public IWebExchange getExchange()
Description copied from interface:IWebContext
Returns the
IWebExchange
object associated with the template execution.- Specified by:
getExchange
in interfaceIWebContext
- Returns:
- the web exchange object.
-
-