public class FixedThemeResolver extends AbstractThemeResolver
ThemeResolver implementation
that simply uses a fixed theme. The fixed name can be defined via
the "defaultThemeName" property; out of the box, it is "theme".
Note: Does not support setThemeName, as the fixed theme
cannot be changed.
AbstractThemeResolver.setDefaultThemeName(java.lang.String)ORIGINAL_DEFAULT_THEME_NAME| Constructor and Description |
|---|
FixedThemeResolver() |
| Modifier and Type | Method and Description |
|---|---|
String |
resolveThemeName(HttpServletRequest request)
Resolve the current theme name via the given request.
|
void |
setThemeName(HttpServletRequest request,
HttpServletResponse response,
String themeName)
Set the current theme name to the given one.
|
getDefaultThemeName, setDefaultThemeNamepublic String resolveThemeName(HttpServletRequest request)
ThemeResolverrequest - the request to be used for resolutionpublic void setThemeName(HttpServletRequest request, @Nullable HttpServletResponse response, @Nullable String themeName)
ThemeResolverrequest - the request to be used for theme name modificationresponse - the response to be used for theme name modificationthemeName - the new theme name (null or empty to reset it)