Package org.thymeleaf.spring5.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 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 void
changeLocale(Locale locale)
void
changeLocale(Locale locale, TimeZone timeZone)
IThymeleafBindStatus
getBindStatus(String path)
IThymeleafBindStatus
getBindStatus(String path, boolean htmlEscape)
String
getContextPath()
String
getContextUrl(String relativeUrl)
String
getContextUrl(String relativeUrl, Map<String,?> params)
Boolean
getDefaultHtmlEscape()
Optional<org.springframework.validation.Errors>
getErrors(String name)
Optional<org.springframework.validation.Errors>
getErrors(String name, boolean htmlEscape)
Locale
getLocale()
String
getMessage(String code)
String
getMessage(String code, Object[] args)
String
getMessage(String code, Object[] args, boolean htmlEscape)
String
getMessage(String code, Object[] args, String defaultMessage)
String
getMessage(String code, Object[] args, String defaultMessage, boolean htmlEscape)
String
getMessage(String code, String defaultMessage)
String
getMessage(String code, List<?> args)
String
getMessage(String code, List<?> args, String defaultMessage)
String
getMessage(org.springframework.context.MessageSourceResolvable resolvable)
String
getMessage(org.springframework.context.MessageSourceResolvable resolvable, boolean htmlEscape)
org.springframework.context.MessageSource
getMessageSource()
Map<String,Object>
getModel()
String
getQueryString()
IThymeleafRequestDataValueProcessor
getRequestDataValueProcessor()
String
getRequestPath()
org.springframework.ui.context.Theme
getTheme()
TimeZone
getTimeZone()
boolean
isDefaultHtmlEscape()
void
setDefaultHtmlEscape(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
-
-