Class ThemeFactory


  • public class ThemeFactory
    extends Object
    Widget Theme Library - Theme factory class
    • Field Detail

      • module

        public static final String module
    • Constructor Detail

      • ThemeFactory

        public ThemeFactory()
    • Method Detail

      • getVisualThemeFromId

        public static VisualTheme getVisualThemeFromId​(String visualThemeId)
        From a visualThemeId return the VisualTheme object corresponding in cache If it's empty, reload the cache from all Theme definition
        Parameters:
        visualThemeId -
        Returns:
      • getModelThemeFromLocation

        public static ModelTheme getModelThemeFromLocation​(String resourceName)
        From a theme file location, resolve the modelTheme related from the cache. If empty, load the modeTheme definition and put it in cache
        Parameters:
        resourceName -
        Returns:
      • resolveVisualTheme

        public static VisualTheme resolveVisualTheme​(HttpServletRequest request)
        Resolve the enabled VisualTheme with this find order If a user is logged 1. Check if present en session with key "visualTheme" 2. Check from user preference If user isn't logged or visualTheme not find with logged user 3. Check if visualThemeId has been set on the webapp attribute 4. Check the general.properties VISUAL_THEME 5. return COMMON
        Parameters:
        request -
        Returns: