|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ThemeResolver
Interface for web-based theme resolution strategies that allows for both theme resolution via the request and theme selection via request and response. This interface allows for implementations based on session, cookies, etc. The default implementation is CookieThemeResolver, which uses cookie for theme resolution and selection. Note that this resolver is only responsible for determining the current theme name. The Theme instance for the resolved theme name must be looked up via ThemeRegistry interface. For example, the user could call ThemeFns.getThemeRegistry() to obtain the current theme registry, and then call themeRegistry.getTheme(themeName) to retrieve the corresponding Theme instance, if a theme with such name is previously registered.
Method Summary | |
---|---|
java.lang.String |
getTheme(javax.servlet.http.HttpServletRequest request)
Resolve the current intended theme name via the given request. |
void |
setTheme(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String themeName)
Set the current intended theme name to the given one. |
Method Detail |
---|
java.lang.String getTheme(javax.servlet.http.HttpServletRequest request)
request
- request to be used for resolution
void setTheme(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String themeName)
request
- request to be used for theme name selectionresponse
- response to be used for theme name selectionthemeName
- the new intended theme name
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |