Package org.ametys.web.skin
Class Skin
java.lang.Object
org.ametys.web.skin.Skin
A skin
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
Is the skin abstractprotected I18nizableText
The skin descriptionprotected String
The skin id (e.g.protected I18nizableText
The skin nameprotected String
The skin thumbnail 48x48protected long
The last time the file was loadedprotected String
The skin thumbnail 32x32protected boolean
Is the skin modifiableParents of the skin in the inheritance processprotected Path
The skin root pathprotected SkinsManager
The skins manager to access componentsprotected String
The skin thumbnail 16x16protected Map<String,
SkinTemplate> The map of templates id and associated templates -
Constructor Summary
ConstructorDescriptionSkin
(String id, Path skinPath, boolean modifiable, SkinsManager skinsManager) Creates a skin -
Method Summary
Modifier and TypeMethodDescriptionprotected void
The configuration default values (if configuration file does not exist or is unreadable)void
dispose()
Dispose skin componentThe skin descriptiongetId()
The skin idgetLabel()
The skin labelThe large image file uriThe medium image file uriGet the parent skins from the inheritance point of view.Get the skin's path.The small image file urigetTemplate
(String id) Get a templateGet the list of existing templatesboolean
Is the skin abstract?boolean
Is the skin modifiable?boolean
Is the skin modifiable?void
Refresh the configuration values
-
Field Details
-
_id
The skin id (e.g. the directory name) -
_path
The skin root path -
_label
The skin name -
_description
The skin description -
_smallImage
The skin thumbnail 16x16 -
_mediumImage
The skin thumbnail 32x32 -
_largeImage
The skin thumbnail 48x48 -
_templates
The map of templates id and associated templates -
_lastConfUpdate
The last time the file was loaded -
_modifiable
Is the skin modifiable -
_abstract
Is the skin abstract -
_parents
Parents of the skin in the inheritance process -
_skinsManager
The skins manager to access components
-
-
Constructor Details
-
Skin
Creates a skin- Parameters:
id
- The id of the skin (e.g. the directory name)skinPath
- The skin root pathmodifiable
- Is this skin modifiable?skinsManager
- The skins manager
-
-
Method Details
-
dispose
Dispose skin component -
isModifiable
Is the skin modifiable?- Returns:
- true if modifiable
-
isAbstract
Is the skin abstract?- Returns:
- true if abstract
-
isConfigurable
Is the skin modifiable?- Returns:
- true if modifiable
-
getParents
Get the parent skins from the inheritance point of view. Consider usingSkinsManager.getSkinAndParents(org.ametys.web.skin.Skin)
- Returns:
- The non null list of parents. The sooner a parent appears in the list, the stronger it is.
-
getTemplates
Get the list of existing templates- Returns:
- A set of skin names. Can be null if there is an error.
-
getTemplate
Get a template- Parameters:
id
- The id of the template- Returns:
- The template or null if the template doesn't exists
-
_defaultValues
The configuration default values (if configuration file does not exist or is unreadable) -
refreshValues
Refresh the configuration values -
getId
The skin id- Returns:
- the id
-
getLabel
The skin label- Returns:
- The label
-
getDescription
The skin description- Returns:
- The description. Can not be null but can be empty
-
getSmallImage
The small image file uri- Returns:
- The small image file uri
-
getMediumImage
The medium image file uri- Returns:
- The medium image file uri
-
getLargeImage
The large image file uri- Returns:
- The large image file uri
-
getRawPath
Get the skin's path. Should not be used. Use the skin:// protocol.- Returns:
- the skin's path
-