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 |
---|---|
java.lang.String |
resolveThemeName(HttpServletRequest request)
Resolve the current theme name via the given request.
|
void |
setThemeName(HttpServletRequest request,
HttpServletResponse response,
java.lang.String themeName)
Set the current theme name to the given one.
|
getDefaultThemeName, setDefaultThemeName
public java.lang.String resolveThemeName(HttpServletRequest request)
ThemeResolver
request
- request to be used for resolutionpublic void setThemeName(HttpServletRequest request, @Nullable HttpServletResponse response, @Nullable java.lang.String themeName)
ThemeResolver
request
- request to be used for theme name modificationresponse
- response to be used for theme name modificationthemeName
- the new theme name (null
or empty to reset it)