Package org.ametys.web.skin
Class SkinModel
- java.lang.Object
-
- org.ametys.web.skin.SkinModel
-
public class SkinModel extends Object
A skin Do not mistake withSkinParametersModel
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
SkinModel.CssMenuItem
Abstract representation of a menu itemclass
SkinModel.CssStyleItem
Bean representing a item of css styleclass
SkinModel.Separator
Item representing a separatorclass
SkinModel.Theme
Bean representing a theme
-
Field Summary
Fields Modifier and Type Field Description protected I18nizableText
_description
The skin descriptionprotected Path
_file
The skin directoryprotected String
_id
The skin id (e.g.protected I18nizableText
_label
The skin nameprotected String
_largeImage
The skin thumbnail 48x48protected long
_lastConfUpdate
The last time the file was loadedprotected String
_mediumImage
The skin thumbnail 32x32protected boolean
_modifiable
Is the skin modifiableprotected String
_smallImage
The skin thumbnail 16x16
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
_defaultValues()
The configuration default values (if configuration file does not exist or is unreadable)List<String>
getColors(String themeId)
Get the default colors of this themeList<String>
getDefaultColors()
Get the default colors of this modelString
getDefaultColorTheme()
Get the default color themeMap<String,String>
getDefaultValues()
Get model default valuesI18nizableText
getDescription()
The skin descriptionString
getId()
The skin idI18nizableText
getLabel()
The skin labelString
getLargeImage()
The large image file uriString
getMediumImage()
The medium image file uriPath
getPath()
Get the skin's file directoryString
getSmallImage()
The small image file uriMap<String,List<SkinModel.CssMenuItem>>
getStyleItems()
Get all style items of this modelList<SkinModel.CssMenuItem>
getStyleItems(String styleId)
Get the items of this css styleSkinModel.Theme
getTheme(String themeId)
Get a theme of this modelMap<String,SkinModel.Theme>
getThemes()
Get color themes of this modelboolean
isModifiable()
Is the model modifiable?void
refreshValues()
Refresh the conf values
-
-
-
Field Detail
-
_label
protected I18nizableText _label
The skin name
-
_description
protected I18nizableText _description
The skin description
-
_smallImage
protected String _smallImage
The skin thumbnail 16x16
-
_mediumImage
protected String _mediumImage
The skin thumbnail 32x32
-
_largeImage
protected String _largeImage
The skin thumbnail 48x48
-
_lastConfUpdate
protected long _lastConfUpdate
The last time the file was loaded
-
_modifiable
protected boolean _modifiable
Is the skin modifiable
-
-
Method Detail
-
_defaultValues
protected void _defaultValues()
The configuration default values (if configuration file does not exist or is unreadable)
-
isModifiable
public boolean isModifiable()
Is the model modifiable?- Returns:
- true if modifiable
-
refreshValues
public void refreshValues()
Refresh the conf values
-
getDefaultColorTheme
public String getDefaultColorTheme()
Get the default color theme- Returns:
- The default color theme or
null
-
getThemes
public Map<String,SkinModel.Theme> getThemes()
Get color themes of this model- Returns:
- color themes of this model
-
getTheme
public SkinModel.Theme getTheme(String themeId)
Get a theme of this model- Parameters:
themeId
- the theme id- Returns:
- the theme
-
getDefaultColors
public List<String> getDefaultColors()
Get the default colors of this model- Returns:
- The default colors of this model
-
getColors
public List<String> getColors(String themeId)
Get the default colors of this theme- Parameters:
themeId
- The theme id- Returns:
- the default colors of this theme
-
getStyleItems
public Map<String,List<SkinModel.CssMenuItem>> getStyleItems()
Get all style items of this model- Returns:
- the list of items of css style
-
getStyleItems
public List<SkinModel.CssMenuItem> getStyleItems(String styleId)
Get the items of this css style- Parameters:
styleId
- The css style id- Returns:
- the list of items of css style
-
getDefaultValues
public Map<String,String> getDefaultValues()
Get model default values- Returns:
- The default values
-
getLabel
public I18nizableText getLabel()
The skin label- Returns:
- The label
-
getDescription
public I18nizableText getDescription()
The skin description- Returns:
- The description. Can not be null but can be empty
-
getSmallImage
public String getSmallImage()
The small image file uri- Returns:
- The small image file uri
-
getMediumImage
public String getMediumImage()
The medium image file uri- Returns:
- The medium image file uri
-
getLargeImage
public String getLargeImage()
The large image file uri- Returns:
- The large image file uri
-
-