Class SpringWebFluxThymeleafRequestContext
Object
org.thymeleaf.spring6.context.webflux.SpringWebFluxThymeleafRequestContext
- All Implemented Interfaces:
IThymeleafRequestContext
public class SpringWebFluxThymeleafRequestContext
extends Object
implements 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
ConstructorDescriptionSpringWebFluxThymeleafRequestContext
(org.springframework.web.reactive.result.view.RequestContext requestContext, org.springframework.web.server.ServerWebExchange serverWebExchange) -
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.web.server.ServerWebExchange
org.springframework.ui.context.Theme
getTheme()
Deprecated.boolean
void
setDefaultHtmlEscape
(boolean defaultHtmlEscape) toString()
-
Constructor Details
-
SpringWebFluxThymeleafRequestContext
public SpringWebFluxThymeleafRequestContext(org.springframework.web.reactive.result.view.RequestContext requestContext, org.springframework.web.server.ServerWebExchange serverWebExchange)
-
-
Method Details
-
getServerWebExchange
public org.springframework.web.server.ServerWebExchange getServerWebExchange() -
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
Deprecated.RequestContext.getTheme()
was deprecated in Spring 6, with no direct replacement.- 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
-
RequestContext.getTheme()
was deprecated in Spring 6, with no direct replacement.