Class SpringWebMvcThymeleafRequestContext
Object
org.thymeleaf.spring5.context.webmvc.SpringWebMvcThymeleafRequestContext
- All Implemented Interfaces:
IThymeleafRequestContext
Implementation of the IThymeleafRequestContext interface, meant to wrap a Spring
RequestContext object.
- Since:
- 3.0.3
- Author:
- Daniel Fernández
- See Also:
-
RequestContext
-
Constructor Summary
ConstructorsConstructorDescriptionSpringWebMvcThymeleafRequestContext(org.springframework.web.servlet.support.RequestContext requestContext, javax.servlet.http.HttpServletRequest httpServletRequest) -
Method Summary
Modifier and TypeMethodDescriptionvoidchangeLocale(Locale locale) voidchangeLocale(Locale locale, TimeZone timeZone) getBindStatus(String path) getBindStatus(String path, boolean htmlEscape) getContextUrl(String relativeUrl) getContextUrl(String relativeUrl, Map<String, ?> params) Optional<org.springframework.validation.Errors>Optional<org.springframework.validation.Errors>javax.servlet.http.HttpServletRequestgetMessage(String code) getMessage(String code, Object[] args) getMessage(String code, Object[] args, boolean htmlEscape) getMessage(String code, Object[] args, String defaultMessage) getMessage(String code, Object[] args, String defaultMessage, boolean htmlEscape) getMessage(String code, String defaultMessage) getMessage(String code, List<?> args) getMessage(String code, List<?> args, String defaultMessage) getMessage(org.springframework.context.MessageSourceResolvable resolvable) getMessage(org.springframework.context.MessageSourceResolvable resolvable, boolean htmlEscape) org.springframework.context.MessageSourcegetModel()org.springframework.ui.context.ThemegetTheme()booleanvoidsetDefaultHtmlEscape(boolean defaultHtmlEscape) toString()
-
Constructor Details
-
SpringWebMvcThymeleafRequestContext
public SpringWebMvcThymeleafRequestContext(org.springframework.web.servlet.support.RequestContext requestContext, javax.servlet.http.HttpServletRequest httpServletRequest)
-
-
Method Details
-
getHttpServletRequest
public javax.servlet.http.HttpServletRequest getHttpServletRequest() -
getMessageSource
public org.springframework.context.MessageSource getMessageSource()- Specified by:
getMessageSourcein interfaceIThymeleafRequestContext
-
getModel
- Specified by:
getModelin interfaceIThymeleafRequestContext
-
getLocale
- Specified by:
getLocalein interfaceIThymeleafRequestContext
-
getTimeZone
- Specified by:
getTimeZonein interfaceIThymeleafRequestContext
-
changeLocale
- Specified by:
changeLocalein interfaceIThymeleafRequestContext
-
changeLocale
- Specified by:
changeLocalein interfaceIThymeleafRequestContext
-
setDefaultHtmlEscape
public void setDefaultHtmlEscape(boolean defaultHtmlEscape) - Specified by:
setDefaultHtmlEscapein interfaceIThymeleafRequestContext
-
isDefaultHtmlEscape
public boolean isDefaultHtmlEscape()- Specified by:
isDefaultHtmlEscapein interfaceIThymeleafRequestContext
-
getDefaultHtmlEscape
- Specified by:
getDefaultHtmlEscapein interfaceIThymeleafRequestContext
-
getContextPath
- Specified by:
getContextPathin interfaceIThymeleafRequestContext
-
getContextUrl
- Specified by:
getContextUrlin interfaceIThymeleafRequestContext
-
getContextUrl
- Specified by:
getContextUrlin interfaceIThymeleafRequestContext
-
getRequestPath
- Specified by:
getRequestPathin interfaceIThymeleafRequestContext
-
getQueryString
- Specified by:
getQueryStringin interfaceIThymeleafRequestContext
-
getMessage
- Specified by:
getMessagein interfaceIThymeleafRequestContext
-
getMessage
- Specified by:
getMessagein interfaceIThymeleafRequestContext
-
getMessage
- Specified by:
getMessagein interfaceIThymeleafRequestContext
-
getMessage
- Specified by:
getMessagein interfaceIThymeleafRequestContext
-
getMessage
- Specified by:
getMessagein interfaceIThymeleafRequestContext- Throws:
org.springframework.context.NoSuchMessageException
-
getMessage
public String getMessage(String code, Object[] args) throws org.springframework.context.NoSuchMessageException - Specified by:
getMessagein interfaceIThymeleafRequestContext- Throws:
org.springframework.context.NoSuchMessageException
-
getMessage
public String getMessage(String code, List<?> args) throws org.springframework.context.NoSuchMessageException - Specified by:
getMessagein interfaceIThymeleafRequestContext- Throws:
org.springframework.context.NoSuchMessageException
-
getMessage
public String getMessage(String code, Object[] args, boolean htmlEscape) throws org.springframework.context.NoSuchMessageException - Specified by:
getMessagein interfaceIThymeleafRequestContext- Throws:
org.springframework.context.NoSuchMessageException
-
getMessage
public String getMessage(org.springframework.context.MessageSourceResolvable resolvable) throws org.springframework.context.NoSuchMessageException - Specified by:
getMessagein interfaceIThymeleafRequestContext- Throws:
org.springframework.context.NoSuchMessageException
-
getMessage
public String getMessage(org.springframework.context.MessageSourceResolvable resolvable, boolean htmlEscape) throws org.springframework.context.NoSuchMessageException - Specified by:
getMessagein interfaceIThymeleafRequestContext- Throws:
org.springframework.context.NoSuchMessageException
-
getErrors
- Specified by:
getErrorsin interfaceIThymeleafRequestContext
-
getErrors
- Specified by:
getErrorsin interfaceIThymeleafRequestContext
-
getTheme
public org.springframework.ui.context.Theme getTheme()- Specified by:
getThemein interfaceIThymeleafRequestContext
-
getRequestDataValueProcessor
- Specified by:
getRequestDataValueProcessorin interfaceIThymeleafRequestContext
-
getBindStatus
- Specified by:
getBindStatusin interfaceIThymeleafRequestContext- Throws:
IllegalStateException
-
getBindStatus
public IThymeleafBindStatus getBindStatus(String path, boolean htmlEscape) throws IllegalStateException - Specified by:
getBindStatusin interfaceIThymeleafRequestContext- Throws:
IllegalStateException
-
toString
-