public class SpringWebMvcThymeleafRequestContext extends Object implements IThymeleafRequestContext
Implementation of the IThymeleafRequestContext
interface, meant to wrap a Spring
RequestContext
object.
RequestContext
Constructor and Description |
---|
SpringWebMvcThymeleafRequestContext(org.springframework.web.servlet.support.RequestContext requestContext,
javax.servlet.http.HttpServletRequest httpServletRequest) |
Modifier and Type | Method and 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) |
javax.servlet.http.HttpServletRequest |
getHttpServletRequest() |
Locale |
getLocale() |
String |
getMessage(org.springframework.context.MessageSourceResolvable resolvable) |
String |
getMessage(org.springframework.context.MessageSourceResolvable resolvable,
boolean htmlEscape) |
String |
getMessage(String code) |
String |
getMessage(String code,
List<?> args) |
String |
getMessage(String code,
List<?> args,
String defaultMessage) |
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) |
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) |
String |
toString() |
public SpringWebMvcThymeleafRequestContext(org.springframework.web.servlet.support.RequestContext requestContext, javax.servlet.http.HttpServletRequest httpServletRequest)
public javax.servlet.http.HttpServletRequest getHttpServletRequest()
public org.springframework.context.MessageSource getMessageSource()
getMessageSource
in interface IThymeleafRequestContext
public Map<String,Object> getModel()
getModel
in interface IThymeleafRequestContext
public Locale getLocale()
getLocale
in interface IThymeleafRequestContext
public TimeZone getTimeZone()
getTimeZone
in interface IThymeleafRequestContext
public void changeLocale(Locale locale)
changeLocale
in interface IThymeleafRequestContext
public void changeLocale(Locale locale, TimeZone timeZone)
changeLocale
in interface IThymeleafRequestContext
public void setDefaultHtmlEscape(boolean defaultHtmlEscape)
setDefaultHtmlEscape
in interface IThymeleafRequestContext
public boolean isDefaultHtmlEscape()
isDefaultHtmlEscape
in interface IThymeleafRequestContext
public Boolean getDefaultHtmlEscape()
getDefaultHtmlEscape
in interface IThymeleafRequestContext
public String getContextPath()
getContextPath
in interface IThymeleafRequestContext
public String getContextUrl(String relativeUrl)
getContextUrl
in interface IThymeleafRequestContext
public String getContextUrl(String relativeUrl, Map<String,?> params)
getContextUrl
in interface IThymeleafRequestContext
public String getRequestPath()
getRequestPath
in interface IThymeleafRequestContext
public String getQueryString()
getQueryString
in interface IThymeleafRequestContext
public String getMessage(String code, String defaultMessage)
getMessage
in interface IThymeleafRequestContext
public String getMessage(String code, Object[] args, String defaultMessage)
getMessage
in interface IThymeleafRequestContext
public String getMessage(String code, List<?> args, String defaultMessage)
getMessage
in interface IThymeleafRequestContext
public String getMessage(String code, Object[] args, String defaultMessage, boolean htmlEscape)
getMessage
in interface IThymeleafRequestContext
public String getMessage(String code) throws org.springframework.context.NoSuchMessageException
getMessage
in interface IThymeleafRequestContext
org.springframework.context.NoSuchMessageException
public String getMessage(String code, Object[] args) throws org.springframework.context.NoSuchMessageException
getMessage
in interface IThymeleafRequestContext
org.springframework.context.NoSuchMessageException
public String getMessage(String code, List<?> args) throws org.springframework.context.NoSuchMessageException
getMessage
in interface IThymeleafRequestContext
org.springframework.context.NoSuchMessageException
public String getMessage(String code, Object[] args, boolean htmlEscape) throws org.springframework.context.NoSuchMessageException
getMessage
in interface IThymeleafRequestContext
org.springframework.context.NoSuchMessageException
public String getMessage(org.springframework.context.MessageSourceResolvable resolvable) throws org.springframework.context.NoSuchMessageException
getMessage
in interface IThymeleafRequestContext
org.springframework.context.NoSuchMessageException
public String getMessage(org.springframework.context.MessageSourceResolvable resolvable, boolean htmlEscape) throws org.springframework.context.NoSuchMessageException
getMessage
in interface IThymeleafRequestContext
org.springframework.context.NoSuchMessageException
public Optional<org.springframework.validation.Errors> getErrors(String name)
getErrors
in interface IThymeleafRequestContext
public Optional<org.springframework.validation.Errors> getErrors(String name, boolean htmlEscape)
getErrors
in interface IThymeleafRequestContext
public org.springframework.ui.context.Theme getTheme()
getTheme
in interface IThymeleafRequestContext
public IThymeleafRequestDataValueProcessor getRequestDataValueProcessor()
getRequestDataValueProcessor
in interface IThymeleafRequestContext
public IThymeleafBindStatus getBindStatus(String path) throws IllegalStateException
getBindStatus
in interface IThymeleafRequestContext
IllegalStateException
public IThymeleafBindStatus getBindStatus(String path, boolean htmlEscape) throws IllegalStateException
getBindStatus
in interface IThymeleafRequestContext
IllegalStateException
Copyright © 2017 The THYMELEAF team. All rights reserved.