Package org.apache.ofbiz.widget.model
Class ThemeFactory
- java.lang.Object
-
- org.apache.ofbiz.widget.model.ThemeFactory
-
public class ThemeFactory extends java.lang.Object
Widget Theme Library - Theme factory class
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
module
-
Constructor Summary
Constructors Constructor Description ThemeFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List<VisualTheme>
getAvailableThemes(Delegator delegator, java.lang.String visualThemeSetId)
Return all visual theme available corresponding to all entries on the entity VisualTheme who have linked to a modelThemestatic ModelTheme
getModelThemeFromLocation(java.lang.String resourceName)
From a theme file location, resolve the modelTheme related from the cache.static VisualTheme
getVisualThemeFromId(java.lang.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(javax.servlet.http.HttpServletRequest request)
Resolve the enabled VisualTheme with this find order If a user is logged 1.
-
-
-
Method Detail
-
getVisualThemeFromId
public static VisualTheme getVisualThemeFromId(java.lang.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(java.lang.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:
-
getAvailableThemes
public static java.util.List<VisualTheme> getAvailableThemes(Delegator delegator, java.lang.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
public static VisualTheme resolveVisualTheme(javax.servlet.http.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:
-
-