org.thymeleaf.testing.templateengine.context.web
Class SpringWebProcessingContextBuilder
Object
org.thymeleaf.testing.templateengine.context.web.WebProcessingContextBuilder
org.thymeleaf.testing.templateengine.context.web.SpringWebProcessingContextBuilder
- All Implemented Interfaces:
- IProcessingContextBuilder
- Direct Known Subclasses:
- SpringSecurityWebProcessingContextBuilder
public class SpringWebProcessingContextBuilder
- extends WebProcessingContextBuilder
|
Method Summary |
protected org.springframework.web.context.WebApplicationContext |
createApplicationContext(ITest test,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext servletContext,
Locale locale,
Map<String,Object> variables)
|
protected void |
doAdditionalVariableProcessing(ITest test,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext servletContext,
Locale locale,
Map<String,Object> variables)
|
protected org.thymeleaf.context.IWebContext |
doCreateWebContextInstance(ITest test,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext servletContext,
Locale locale,
Map<String,Object> variables)
|
String |
getApplicationContextConfigLocation()
|
protected List<String> |
getBindingVariableNames(ITest test,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext servletContext,
Locale locale,
Map<String,Object> variables)
Deprecated. Not needed anymore. All valid candidate objects in model will now be automatically bound. |
boolean |
getShareAppContextForAllTests()
|
protected void |
initBinder(String bindingVariableName,
Object bindingObject,
ITest test,
org.springframework.validation.DataBinder dataBinder,
Locale locale,
Map<String,Object> variables)
|
protected void |
initBindingResult(String bindingVariableName,
Object bindingObject,
ITest test,
org.springframework.validation.BindingResult bindingResult,
Locale locale,
Map<String,Object> variables)
|
protected void |
initSpring(org.springframework.context.ApplicationContext applicationContext,
ITest test,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext servletContext,
Locale locale,
Map<String,Object> variables)
|
void |
setApplicationContextConfigLocation(String applicationContextConfigLocation)
|
void |
setShareAppContextForAllTests(boolean shareAppContextForAllTests)
|
| Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_BINDING_VARIABLE_NAME
@Deprecated
public static final String DEFAULT_BINDING_VARIABLE_NAME
- Deprecated. Not needed anymore. All candidate objects in model will now be automatically bound.
- See Also:
- Constant Field Values
DEFAULT_BINDING_MODEL_VARIABLE_NAME
public static final String DEFAULT_BINDING_MODEL_VARIABLE_NAME
- See Also:
- Constant Field Values
DEFAULT_APPLICATION_CONTEXT_CONFIG_LOCATION
public static final String DEFAULT_APPLICATION_CONTEXT_CONFIG_LOCATION
- See Also:
- Constant Field Values
SpringWebProcessingContextBuilder
public SpringWebProcessingContextBuilder()
getApplicationContextConfigLocation
public String getApplicationContextConfigLocation()
setApplicationContextConfigLocation
public void setApplicationContextConfigLocation(String applicationContextConfigLocation)
getShareAppContextForAllTests
public boolean getShareAppContextForAllTests()
setShareAppContextForAllTests
public void setShareAppContextForAllTests(boolean shareAppContextForAllTests)
doAdditionalVariableProcessing
protected final void doAdditionalVariableProcessing(ITest test,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext servletContext,
Locale locale,
Map<String,Object> variables)
- Overrides:
doAdditionalVariableProcessing in class WebProcessingContextBuilder
doCreateWebContextInstance
protected org.thymeleaf.context.IWebContext doCreateWebContextInstance(ITest test,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext servletContext,
Locale locale,
Map<String,Object> variables)
- Overrides:
doCreateWebContextInstance in class WebProcessingContextBuilder
getBindingVariableNames
@Deprecated
protected List<String> getBindingVariableNames(ITest test,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext servletContext,
Locale locale,
Map<String,Object> variables)
- Deprecated. Not needed anymore. All valid candidate objects in model will now be automatically bound.
Returns the name of the variables that must be considered "binding models", usually
those that serve as form-backing beans.
Default behaviour is:
- Look for a context variable called binding. If this variable exists,
it will be considered to contain the name (single-valued) or names (list) of
the binding variables (as literal/s).
- If binding does not exist, look for a context variable called model.
The object contained in that variable will be considered to be the binding model itself.
- Returns:
- the binding variable names
initBinder
protected void initBinder(String bindingVariableName,
Object bindingObject,
ITest test,
org.springframework.validation.DataBinder dataBinder,
Locale locale,
Map<String,Object> variables)
initBindingResult
protected void initBindingResult(String bindingVariableName,
Object bindingObject,
ITest test,
org.springframework.validation.BindingResult bindingResult,
Locale locale,
Map<String,Object> variables)
createApplicationContext
protected org.springframework.web.context.WebApplicationContext createApplicationContext(ITest test,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext servletContext,
Locale locale,
Map<String,Object> variables)
initSpring
protected void initSpring(org.springframework.context.ApplicationContext applicationContext,
ITest test,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext servletContext,
Locale locale,
Map<String,Object> variables)
Copyright © 2013 The THYMELEAF team. All Rights Reserved.