Package org.apache.ofbiz.widget.model
Class ThemeFactory
java.lang.Object
org.apache.ofbiz.widget.model.ThemeFactory
Widget Theme Library - Theme factory class
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<VisualTheme>
getAvailableThemes
(Delegator delegator, String visualThemeSetId) Return all visual theme available corresponding to all entries on the entity VisualTheme who have linked to a modelThemestatic ModelTheme
getModelThemeFromLocation
(String resourceName) From a theme file location, resolve the modelTheme related from the cache.Scan all Theme.xml definitionstatic VisualTheme
getVisualThemeFromId
(String visualThemeId) From a visualThemeId return the VisualTheme object corresponding in cache If it's empty, reload the cache from all Theme definitionstatic VisualTheme
resolveVisualTheme
(HttpServletRequest request) Resolve the enabled VisualTheme with this find order If a user is logged 1.
-
Method Details
-
getThemeXmlFiles
Scan all Theme.xml definition- Returns:
- Throws:
IOException
-
getVisualThemeFromId
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
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:
-
getAvailableThemes
public static List<VisualTheme> getAvailableThemes(Delegator delegator, String visualThemeSetId) throws GenericEntityException Return all visual theme available corresponding to all entries on the entity VisualTheme who have linked to a modelTheme- Parameters:
delegator
-visualThemeSetId
-- Returns:
- Throws:
GenericEntityException
-
resolveVisualTheme
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:
-