Package org.ametys.web.skin
Class Skin
java.lang.Object
org.ametys.web.skin.Skin
A skin
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanIs the skin abstractprotected I18nizableTextThe skin descriptionprotected StringThe skin id (e.g.protected I18nizableTextThe skin nameprotected StringThe skin thumbnail 48x48protected longThe last time the file was loadedprotected StringThe skin thumbnail 32x32protected booleanIs the skin modifiableParents of the skin in the inheritance processprotected PathThe skin root pathprotected SkinConfigurationHelperThe skin configuration helperprotected SkinsManagerThe skins manager to access componentsprotected StringThe skin thumbnail 16x16protected Map<String,SkinTemplate> The map of templates id and associated templates -
Constructor Summary
ConstructorsConstructorDescriptionSkin(String id, Path skinPath, boolean modifiable, SkinsManager skinsManager, SkinConfigurationHelper skinConfigurationHelper) Creates a skin -
Method Summary
Modifier and TypeMethodDescriptionprotected voidThe configuration default values (if configuration file does not exist or is unreadable)voiddispose()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 templatesbooleanIs the skin abstract?booleanIs the skin modifiable?booleanIs the skin modifiable?voidRefresh 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 -
_skinConfigurationHelper
The skin configuration helper
-
-
Constructor Details
-
Skin
public Skin(String id, Path skinPath, boolean modifiable, SkinsManager skinsManager, SkinConfigurationHelper skinConfigurationHelper) 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 managerskinConfigurationHelper- The skin configuration helper
-
-
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
-