Package org.thymeleaf.spring5.context
Interface IThymeleafRequestContext
-
- All Known Implementing Classes:
SpringWebFluxThymeleafRequestContext,SpringWebMvcThymeleafRequestContext
public interface IThymeleafRequestContextThis 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 thisRequestContext.- Since:
- 3.0.3
- Author:
- Daniel Fernández
- See Also:
SpringWebMvcThymeleafRequestContext,SpringWebFluxThymeleafRequestContext
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidchangeLocale(Locale locale)voidchangeLocale(Locale locale, TimeZone timeZone)IThymeleafBindStatusgetBindStatus(String path)IThymeleafBindStatusgetBindStatus(String path, boolean htmlEscape)StringgetContextPath()StringgetContextUrl(String relativeUrl)StringgetContextUrl(String relativeUrl, Map<String,?> params)BooleangetDefaultHtmlEscape()Optional<org.springframework.validation.Errors>getErrors(String name)Optional<org.springframework.validation.Errors>getErrors(String name, boolean htmlEscape)LocalegetLocale()StringgetMessage(String code)StringgetMessage(String code, Object[] args)StringgetMessage(String code, Object[] args, boolean htmlEscape)StringgetMessage(String code, Object[] args, String defaultMessage)StringgetMessage(String code, Object[] args, String defaultMessage, boolean htmlEscape)StringgetMessage(String code, String defaultMessage)StringgetMessage(String code, List<?> args)StringgetMessage(String code, List<?> args, String defaultMessage)StringgetMessage(org.springframework.context.MessageSourceResolvable resolvable)StringgetMessage(org.springframework.context.MessageSourceResolvable resolvable, boolean htmlEscape)org.springframework.context.MessageSourcegetMessageSource()Map<String,Object>getModel()StringgetQueryString()IThymeleafRequestDataValueProcessorgetRequestDataValueProcessor()StringgetRequestPath()org.springframework.ui.context.ThemegetTheme()TimeZonegetTimeZone()booleanisDefaultHtmlEscape()voidsetDefaultHtmlEscape(boolean defaultHtmlEscape)
-
-
-
Method Detail
-
getMessageSource
org.springframework.context.MessageSource getMessageSource()
-
getLocale
Locale getLocale()
-
getTimeZone
TimeZone getTimeZone()
-
changeLocale
void changeLocale(Locale locale)
-
setDefaultHtmlEscape
void setDefaultHtmlEscape(boolean defaultHtmlEscape)
-
isDefaultHtmlEscape
boolean isDefaultHtmlEscape()
-
getDefaultHtmlEscape
Boolean getDefaultHtmlEscape()
-
getContextPath
String getContextPath()
-
getRequestPath
String getRequestPath()
-
getQueryString
String getQueryString()
-
getMessage
String getMessage(String code, Object[] args, String defaultMessage, boolean htmlEscape)
-
getMessage
String getMessage(String code) throws org.springframework.context.NoSuchMessageException
- 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
Optional<org.springframework.validation.Errors> getErrors(String name, boolean htmlEscape)
-
getTheme
org.springframework.ui.context.Theme getTheme()
-
getRequestDataValueProcessor
IThymeleafRequestDataValueProcessor getRequestDataValueProcessor()
-
getBindStatus
IThymeleafBindStatus getBindStatus(String path) throws IllegalStateException
- Throws:
IllegalStateException
-
getBindStatus
IThymeleafBindStatus getBindStatus(String path, boolean htmlEscape) throws IllegalStateException
- Throws:
IllegalStateException
-
-