public class

ThemeChangeInterceptor

extends HandlerInterceptorAdapter
java.lang.Object
   ↳ org.springframework.web.servlet.handler.HandlerInterceptorAdapter
     ↳ org.springframework.web.servlet.theme.ThemeChangeInterceptor

Class Overview

Interceptor that allows for changing the current theme on every request, via a configurable request parameter.

See Also

Summary

Constants
String DEFAULT_PARAM_NAME Default name of the theme specification parameter: "theme".
Public Constructors
ThemeChangeInterceptor()
Public Methods
String getParamName()
Return the name of the parameter that contains a theme specification in a theme change request.
boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
This implementation always returns true.
void setParamName(String paramName)
Set the name of the parameter that contains a theme specification in a theme change request.
[Expand]
Inherited Methods
From class org.springframework.web.servlet.handler.HandlerInterceptorAdapter
From class java.lang.Object
From interface org.springframework.web.servlet.HandlerInterceptor

Constants

public static final String DEFAULT_PARAM_NAME

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

Constant Value: "theme"

Public Constructors

public ThemeChangeInterceptor ()

Public Methods

public String getParamName ()

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

public boolean preHandle (HttpServletRequest request, HttpServletResponse response, Object handler)

This implementation always returns true.

Parameters
request current HTTP request
response current HTTP response
handler chosen handler to execute, for type and/or instance evaluation
Returns
  • true if the execution chain should proceed with the next interceptor or the handler itself. Else, DispatcherServlet assumes that this interceptor has already dealt with the response itself.
Throws
ServletException

public void setParamName (String paramName)

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