spring-framework / org.springframework.web.servlet.theme / ThemeChangeInterceptor

ThemeChangeInterceptor

open class ThemeChangeInterceptor : HandlerInterceptorAdapter

Interceptor that allows for changing the current theme on every request, via a configurable request parameter (default parameter name: "theme").

Author
Juergen Hoeller

Since
20.06.2003

See Also
org.springframework.web.servlet.ThemeResolver

Constructors

<init>

ThemeChangeInterceptor()

Interceptor that allows for changing the current theme on every request, via a configurable request parameter (default parameter name: "theme").

Properties

DEFAULT_PARAM_NAME

static val DEFAULT_PARAM_NAME: String

Default name of the theme specification parameter: "theme".

Functions

getParamName

open fun getParamName(): String

Return the name of the parameter that contains a theme specification in a theme change request.

preHandle

open fun preHandle(request: HttpServletRequest, response: HttpServletResponse, handler: Any): Boolean

setParamName

open fun setParamName(paramName: String): Unit

Set the name of the parameter that contains a theme specification in a theme change request. Default is "theme".