Package org.glassfish.admingui.theme
Class AdminguiThemeContext
- java.lang.Object
-
- com.sun.webui.theme.ThemeContext
-
- com.sun.webui.theme.ServletThemeContext
-
- org.glassfish.admingui.theme.AdminguiThemeContext
-
public class AdminguiThemeContext extends com.sun.webui.theme.ServletThemeContext
This class allows us to use a
Map
to pass in parameters which alter the Woodstock theme instead of using context-params from the web.xml. This allows us greater runtime control over the theme and helps allow the Woodstock theme properties to be overridden by plugins.- Author:
- ana, Ken
-
-
Field Summary
Fields Modifier and Type Field Description static String
THEME_NAME_KEY
These keys are used when getting the property values provided in the custom theme plugin properties file.static String
THEME_VERSION_KEY
-
Constructor Summary
Constructors Modifier Constructor Description protected
AdminguiThemeContext(String themeName, String themeVersion)
This constructor takes in the theme name and version to use by default.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ClassLoader
getDefaultClassLoader()
This method delegates toJSFThemeContext
.static com.sun.webui.theme.ThemeContext
getInstance(jakarta.faces.context.FacesContext context, String themeName, String themeVersion)
static com.sun.webui.theme.ThemeContext
getInstance(jakarta.faces.context.FacesContext context, Properties propMap)
String
getRequestContextPath()
This method delegates toJSFThemeContext
.String
getResourcePath(String path)
This method delegates toJSFThemeContext
.void
setDefaultClassLoader(ClassLoader classLoader)
This method delegates toJSFThemeContext
.void
setRequestContextPath(String path)
This method delegates toJSFThemeContext
.-
Methods inherited from class com.sun.webui.theme.ThemeContext
getDefaultLocale, getDefaultTheme, getDefaultThemeMajorVersion, getDefaultThemeMinorVersion, getDefaultThemeVersion, getMessages, getSupportedLocales, getThemeFactory, getThemeFactoryClassName, getThemeResources, getThemeServletContext, setDefaultLocale, setDefaultTheme, setDefaultThemeVersion, setMessages, setSupportedLocales, setThemeFactoryClassName, setThemeResources, setThemeServletContext
-
-
-
-
Field Detail
-
THEME_NAME_KEY
public static final String THEME_NAME_KEY
These keys are used when getting the property values provided in the custom theme plugin properties file.- See Also:
- Constant Field Values
-
THEME_VERSION_KEY
public static final String THEME_VERSION_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static com.sun.webui.theme.ThemeContext getInstance(jakarta.faces.context.FacesContext context, String themeName, String themeVersion)
- Returns:
- an instance of
ThemeContext
creating one if necessary and persisting it in theApplicationMap
.
-
getInstance
public static com.sun.webui.theme.ThemeContext getInstance(jakarta.faces.context.FacesContext context, Properties propMap)
- Returns:
- an instance of
ThemeContext
using properties provided viaIntegration point
.
-
getDefaultClassLoader
public ClassLoader getDefaultClassLoader()
This method delegates toJSFThemeContext
.- Overrides:
getDefaultClassLoader
in classcom.sun.webui.theme.ThemeContext
-
setDefaultClassLoader
public void setDefaultClassLoader(ClassLoader classLoader)
This method delegates toJSFThemeContext
.- Overrides:
setDefaultClassLoader
in classcom.sun.webui.theme.ThemeContext
-
getRequestContextPath
public String getRequestContextPath()
This method delegates toJSFThemeContext
.- Overrides:
getRequestContextPath
in classcom.sun.webui.theme.ThemeContext
-
setRequestContextPath
public void setRequestContextPath(String path)
This method delegates toJSFThemeContext
.- Overrides:
setRequestContextPath
in classcom.sun.webui.theme.ThemeContext
-
-