Package com.sun.webui.theme

Examples of com.sun.webui.theme.ThemeContext


     *      if necessary and persisting it in the <code>ApplicationMap</code>.
     */
    public synchronized static ThemeContext getInstance(FacesContext context, String themeName, String themeVersion) {
  Map map = context.getExternalContext().getApplicationMap();
  String themeKey = THEME_CONTEXT + themeName + themeVersion;
  ThemeContext themeContext = (ThemeContext) map.get(themeKey);
  if (themeContext == null) {
      themeContext = new AdminguiThemeContext(themeName, themeVersion);
      map.put(themeKey, themeContext);
  }
  return themeContext;
View Full Code Here


    public synchronized static ThemeContext getInstance(FacesContext context,  Properties propMap) {
  Map map = context.getExternalContext().getApplicationMap();       
        String themeName = (String)propMap.get(THEME_NAME_KEY);
        String themeVersion = (String)propMap.get(THEME_VERSION_KEY);
  String themeKey = THEME_CONTEXT + themeName + themeVersion;
  ThemeContext themeContext = (ThemeContext) map.get(themeKey);
  if (themeContext == null) {
      themeContext = new AdminguiThemeContext(themeName, themeVersion);
      map.put(themeKey, themeContext);
  }
  return themeContext;
View Full Code Here

            @HandlerOutput(name = "themeContext", type = ThemeContext.class)
        })
    public static void getTheme(HandlerContext handlerCtx) {
        String themeName = (String) handlerCtx.getInputValue("themeName");
        String themeVersion = (String) handlerCtx.getInputValue("themeVersion");
        ThemeContext themeContext = AdminguiThemeContext.getInstance(
                handlerCtx.getFacesContext(), themeName, themeVersion);
        handlerCtx.setOutputValue("themeContext", themeContext);
    }
View Full Code Here

                    ClassLoader pluginCL = ConsoleClassLoader.findModuleClassLoader(ip.getConsoleConfigId());
                    URL propertyFileURL = pluginCL.getResource("/" + content);
                    try {
                        Properties propertyMap = new Properties();
                        propertyMap.load(propertyFileURL.openStream());
                        ThemeContext themeContext =
          AdminguiThemeContext.getInstance(ctx, propertyMap);
      themeContext.setDefaultClassLoader(pluginCL);
                        handlerCtx.setOutputValue("themeContext", themeContext);
                    } catch (Exception ex) {
                        throw new RuntimeException(
                                "Unable to access properties file '" + content + "'!", ex);
                    }
View Full Code Here

            @HandlerOutput(name = "themeContext", type = ThemeContext.class)
        })
    public static void getTheme(HandlerContext handlerCtx) {
        String themeName = (String) handlerCtx.getInputValue("themeName");
        String themeVersion = (String) handlerCtx.getInputValue("themeVersion");
        ThemeContext themeContext = AdminguiThemeContext.getInstance(
                handlerCtx.getFacesContext(), themeName, themeVersion);
        handlerCtx.setOutputValue("themeContext", themeContext);
    }
View Full Code Here

                    ClassLoader pluginCL = ConsoleClassLoader.findModuleClassLoader(ip.getConsoleConfigId());
                    URL propertyFileURL = pluginCL.getResource("/" + content);
                    try {
                        Properties propertyMap = new Properties();
                        propertyMap.load(propertyFileURL.openStream());
                        ThemeContext themeContext =
          AdminguiThemeContext.getInstance(ctx, propertyMap);
      themeContext.setDefaultClassLoader(pluginCL);
                        handlerCtx.setOutputValue("themeContext", themeContext);
                    } catch (Exception ex) {
                        throw new RuntimeException(
                                "Unable to access properties file '" + content + "'!", ex);
                    }
View Full Code Here

TOP

Related Classes of com.sun.webui.theme.ThemeContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.