java.lang.Object
de.agilecoders.wicket.core.settings.SessionThemeProvider
- All Implemented Interfaces:
ActiveThemeProvider
- Direct Known Subclasses:
CookieThemeProvider
#### Description
An
ActiveThemeProvider implementation that stores the active theme
in the user session as style.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidassertBoundSession(Session session) checks on existing session, if there isn't one it will be created.returns the current active theme (can be user/session scoped).protected StringLoads the name of theme from the session's stylevoidsetActiveTheme(ITheme theme) sets the active themevoidsetActiveTheme(String themeName) sets the active theme by its name.protected voidstoreThemeName(String themeName) Stores the theme name in the session's style
-
Constructor Details
-
SessionThemeProvider
public SessionThemeProvider()
-
-
Method Details
-
getActiveTheme
Description copied from interface:ActiveThemeProviderreturns the current active theme (can be user/session scoped). If none is set a default theme should be returned (implementation specific). There is a session scoped implementation:SessionThemeProvider- Specified by:
getActiveThemein interfaceActiveThemeProvider- Returns:
- the current active theme
-
setActiveTheme
Description copied from interface:ActiveThemeProvidersets the active theme by its name.- Specified by:
setActiveThemein interfaceActiveThemeProvider- Parameters:
themeName- the theme name
-
setActiveTheme
Description copied from interface:ActiveThemeProvidersets the active theme- Specified by:
setActiveThemein interfaceActiveThemeProvider- Parameters:
theme- the theme to set
-
loadThemeName
Loads the name of theme from the session's style- Returns:
- The session's style
-
storeThemeName
Stores the theme name in the session's style- Parameters:
themeName- The name of the current theme
-
assertBoundSession
checks on existing session, if there isn't one it will be created.- Parameters:
session- current session to bind
-