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
ConstructorDescriptionSpringWebMvcThymeleafRequestContext
(org.springframework.web.servlet.support.RequestContext requestContext, javax.servlet.http.HttpServletRequest httpServletRequest) -
Method Summary
Modifier and TypeMethodDescriptionvoid
changeLocale
(Locale locale) void
changeLocale
(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.HttpServletRequest
getMessage
(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.MessageSource
getModel()
org.springframework.ui.context.Theme
getTheme()
boolean
void
setDefaultHtmlEscape
(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:
getMessageSource
in interfaceIThymeleafRequestContext
-
getModel
- Specified by:
getModel
in interfaceIThymeleafRequestContext
-
getLocale
- Specified by:
getLocale
in interfaceIThymeleafRequestContext
-
getTimeZone
- Specified by:
getTimeZone
in interfaceIThymeleafRequestContext
-
changeLocale
- Specified by:
changeLocale
in interfaceIThymeleafRequestContext
-
changeLocale
- Specified by:
changeLocale
in interfaceIThymeleafRequestContext
-
setDefaultHtmlEscape
public void setDefaultHtmlEscape(boolean defaultHtmlEscape) - Specified by:
setDefaultHtmlEscape
in interfaceIThymeleafRequestContext
-
isDefaultHtmlEscape
public boolean isDefaultHtmlEscape()- Specified by:
isDefaultHtmlEscape
in interfaceIThymeleafRequestContext
-
getDefaultHtmlEscape
- Specified by:
getDefaultHtmlEscape
in interfaceIThymeleafRequestContext
-
getContextPath
- Specified by:
getContextPath
in interfaceIThymeleafRequestContext
-
getContextUrl
- Specified by:
getContextUrl
in interfaceIThymeleafRequestContext
-
getContextUrl
- Specified by:
getContextUrl
in interfaceIThymeleafRequestContext
-
getRequestPath
- Specified by:
getRequestPath
in interfaceIThymeleafRequestContext
-
getQueryString
- Specified by:
getQueryString
in interfaceIThymeleafRequestContext
-
getMessage
- Specified by:
getMessage
in interfaceIThymeleafRequestContext
-
getMessage
- Specified by:
getMessage
in interfaceIThymeleafRequestContext
-
getMessage
- Specified by:
getMessage
in interfaceIThymeleafRequestContext
-
getMessage
- Specified by:
getMessage
in interfaceIThymeleafRequestContext
-
getMessage
- Specified by:
getMessage
in interfaceIThymeleafRequestContext
- Throws:
org.springframework.context.NoSuchMessageException
-
getMessage
public String getMessage(String code, Object[] args) throws org.springframework.context.NoSuchMessageException - Specified by:
getMessage
in interfaceIThymeleafRequestContext
- Throws:
org.springframework.context.NoSuchMessageException
-
getMessage
public String getMessage(String code, List<?> args) throws org.springframework.context.NoSuchMessageException - Specified by:
getMessage
in interfaceIThymeleafRequestContext
- Throws:
org.springframework.context.NoSuchMessageException
-
getMessage
public String getMessage(String code, Object[] args, boolean htmlEscape) throws org.springframework.context.NoSuchMessageException - Specified by:
getMessage
in interfaceIThymeleafRequestContext
- Throws:
org.springframework.context.NoSuchMessageException
-
getMessage
public String getMessage(org.springframework.context.MessageSourceResolvable resolvable) throws org.springframework.context.NoSuchMessageException - Specified by:
getMessage
in interfaceIThymeleafRequestContext
- Throws:
org.springframework.context.NoSuchMessageException
-
getMessage
public String getMessage(org.springframework.context.MessageSourceResolvable resolvable, boolean htmlEscape) throws org.springframework.context.NoSuchMessageException - Specified by:
getMessage
in interfaceIThymeleafRequestContext
- Throws:
org.springframework.context.NoSuchMessageException
-
getErrors
- Specified by:
getErrors
in interfaceIThymeleafRequestContext
-
getErrors
- Specified by:
getErrors
in interfaceIThymeleafRequestContext
-
getTheme
public org.springframework.ui.context.Theme getTheme()- Specified by:
getTheme
in interfaceIThymeleafRequestContext
-
getRequestDataValueProcessor
- Specified by:
getRequestDataValueProcessor
in interfaceIThymeleafRequestContext
-
getBindStatus
- Specified by:
getBindStatus
in interfaceIThymeleafRequestContext
- Throws:
IllegalStateException
-
getBindStatus
public IThymeleafBindStatus getBindStatus(String path, boolean htmlEscape) throws IllegalStateException - Specified by:
getBindStatus
in interfaceIThymeleafRequestContext
- Throws:
IllegalStateException
-
toString
-