Class 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  
      • Fields inherited from class com.sun.webui.theme.ThemeContext

        DEFAULT_LOCALE, DEFAULT_THEME, DEFAULT_THEME_VERSION, LOCALE_SEPARATOR, NOVERSION, SUPPORTED_LOCALES, THEME_CONTEXT, THEME_FACTORY_CLASS_NAME, THEME_MESSAGES, THEME_RESOURCES, THEME_SERVLET_CONTEXT
    • 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.
    • 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
    • Constructor Detail

      • AdminguiThemeContext

        protected AdminguiThemeContext​(String themeName,
                                       String themeVersion)
        This constructor takes in the theme name and version to use by default.
        Parameters:
        themeName - The theme name (i.e. suntheme).
        themeVersion - The version number (i.e. 4.2).
    • 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 the ApplicationMap.
      • getInstance

        public static com.sun.webui.theme.ThemeContext getInstance​(jakarta.faces.context.FacesContext context,
                                                                   Properties propMap)
        Returns:
        an instance of ThemeContext using properties provided via Integration point.
      • getDefaultClassLoader

        public ClassLoader getDefaultClassLoader()
        This method delegates to JSFThemeContext.
        Overrides:
        getDefaultClassLoader in class com.sun.webui.theme.ThemeContext
      • setDefaultClassLoader

        public void setDefaultClassLoader​(ClassLoader classLoader)
        This method delegates to JSFThemeContext.
        Overrides:
        setDefaultClassLoader in class com.sun.webui.theme.ThemeContext
      • getRequestContextPath

        public String getRequestContextPath()
        This method delegates to JSFThemeContext.
        Overrides:
        getRequestContextPath in class com.sun.webui.theme.ThemeContext
      • setRequestContextPath

        public void setRequestContextPath​(String path)
        This method delegates to JSFThemeContext.
        Overrides:
        setRequestContextPath in class com.sun.webui.theme.ThemeContext
      • getResourcePath

        public String getResourcePath​(String path)
        This method delegates to JSFThemeContext.
        Overrides:
        getResourcePath in class com.sun.webui.theme.ThemeContext