Search in sources :

Example 1 with IThemeResolver

use of org.pentaho.platform.api.ui.IThemeResolver in project pentaho-platform by pentaho.

the class DefaultThemeManager method collectAllModuleThemes.

public Map<String, ModuleThemeInfo> collectAllModuleThemes() {
    Map<String, ModuleThemeInfo> moduleThemes = new HashMap<String, ModuleThemeInfo>();
    for (IThemeResolver resolver : resolvers) {
        Map<String, ModuleThemeInfo> moduleInfo = resolver.getModuleThemes();
        for (String moduleName : moduleInfo.keySet()) {
            // populate the cache
            cache.putInRegionCache(THEME_CACHE_REGION, MODULE_THEMES + "-" + moduleName, moduleInfo.get(moduleName));
        }
        moduleThemes.putAll(moduleInfo);
    }
    return moduleThemes;
}
Also used : HashMap(java.util.HashMap) ModuleThemeInfo(org.pentaho.platform.api.ui.ModuleThemeInfo) IThemeResolver(org.pentaho.platform.api.ui.IThemeResolver)

Example 2 with IThemeResolver

use of org.pentaho.platform.api.ui.IThemeResolver in project pentaho-platform by pentaho.

the class DefaultThemeManager method collectAllSystemThemes.

public Map<String, Theme> collectAllSystemThemes() {
    Map<String, Theme> systemThemes = new HashMap<String, Theme>();
    for (IThemeResolver resolver : resolvers) {
        Map<String, Theme> themes = resolver.getSystemThemes();
        for (String themeId : themes.keySet()) {
            // populate the cache
            cache.putInRegionCache(THEME_CACHE_REGION, SYSTEM_THEMES + "-" + themeId, themes.get(themeId));
        }
        systemThemes.putAll(themes);
    }
    return systemThemes;
}
Also used : HashMap(java.util.HashMap) Theme(org.pentaho.platform.api.ui.Theme) IThemeResolver(org.pentaho.platform.api.ui.IThemeResolver)

Aggregations

HashMap (java.util.HashMap)2 IThemeResolver (org.pentaho.platform.api.ui.IThemeResolver)2 ModuleThemeInfo (org.pentaho.platform.api.ui.ModuleThemeInfo)1 Theme (org.pentaho.platform.api.ui.Theme)1