Package org.thymeleaf.spring6.context
Interface IThymeleafRequestContext
- All Known Implementing Classes:
SpringWebFluxThymeleafRequestContext
,SpringWebMvcThymeleafRequestContext
public interface IThymeleafRequestContext
This interface is meant to abstract a Spring RequestContext
, without the client code
needing to know if it is a Spring WebMVC or Spring WebFlux implementation of this
RequestContext
.
- Since:
- 3.0.3
- Author:
- Daniel Fernández
- See Also:
-
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>
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()
Deprecated.boolean
void
setDefaultHtmlEscape
(boolean defaultHtmlEscape)
-
Method Details
-
getMessageSource
org.springframework.context.MessageSource getMessageSource() -
getModel
-
getLocale
Locale getLocale() -
getTimeZone
TimeZone getTimeZone() -
changeLocale
-
changeLocale
-
setDefaultHtmlEscape
void setDefaultHtmlEscape(boolean defaultHtmlEscape) -
isDefaultHtmlEscape
boolean isDefaultHtmlEscape() -
getDefaultHtmlEscape
Boolean getDefaultHtmlEscape() -
getContextPath
String getContextPath() -
getContextUrl
-
getContextUrl
-
getRequestPath
String getRequestPath() -
getQueryString
String getQueryString() -
getMessage
-
getMessage
-
getMessage
-
getMessage
-
getMessage
- Throws:
org.springframework.context.NoSuchMessageException
-
getMessage
String getMessage(String code, Object[] args) throws org.springframework.context.NoSuchMessageException - Throws:
org.springframework.context.NoSuchMessageException
-
getMessage
String getMessage(String code, List<?> args) throws org.springframework.context.NoSuchMessageException - Throws:
org.springframework.context.NoSuchMessageException
-
getMessage
String getMessage(String code, Object[] args, boolean htmlEscape) throws org.springframework.context.NoSuchMessageException - Throws:
org.springframework.context.NoSuchMessageException
-
getMessage
String getMessage(org.springframework.context.MessageSourceResolvable resolvable) throws org.springframework.context.NoSuchMessageException - Throws:
org.springframework.context.NoSuchMessageException
-
getMessage
String getMessage(org.springframework.context.MessageSourceResolvable resolvable, boolean htmlEscape) throws org.springframework.context.NoSuchMessageException - Throws:
org.springframework.context.NoSuchMessageException
-
getErrors
-
getErrors
-
getTheme
Deprecated.RequestContext.getTheme()
was deprecated in Spring 6, with no direct replacement. -
getRequestDataValueProcessor
IThymeleafRequestDataValueProcessor getRequestDataValueProcessor() -
getBindStatus
- Throws:
IllegalStateException
-
getBindStatus
- Throws:
IllegalStateException
-
RequestContext.getTheme()
was deprecated in Spring 6, with no direct replacement.