org.thymeleaf.testing.templateengine.context.web
Class SpringWebProcessingContextBuilder

Object
  extended by org.thymeleaf.testing.templateengine.context.web.WebProcessingContextBuilder
      extended by org.thymeleaf.testing.templateengine.context.web.SpringWebProcessingContextBuilder
All Implemented Interfaces:
IProcessingContextBuilder
Direct Known Subclasses:
SpringSecurityWebProcessingContextBuilder

public class SpringWebProcessingContextBuilder
extends WebProcessingContextBuilder


Field Summary
static String DEFAULT_APPLICATION_CONTEXT_CONFIG_LOCATION
           
static String DEFAULT_BINDING_MODEL_VARIABLE_NAME
           
static String DEFAULT_BINDING_VARIABLE_NAME
          Deprecated. Not needed anymore. All candidate objects in model will now be automatically bound.
 
Fields inherited from class org.thymeleaf.testing.templateengine.context.web.WebProcessingContextBuilder
DEFAULT_LOCALE
 
Constructor Summary
SpringWebProcessingContextBuilder()
           
 
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 org.thymeleaf.testing.templateengine.context.web.WebProcessingContextBuilder
build
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

SpringWebProcessingContextBuilder

public SpringWebProcessingContextBuilder()
Method Detail

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:

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.