Package org.ametys.plugins.linkdirectory
Class LinkDirectoryColorsComponent
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.linkdirectory.LinkDirectoryColorsComponent
- All Implemented Interfaces:
LogEnabled
,Component
,Configurable
,Serviceable
public class LinkDirectoryColorsComponent
extends AbstractLogEnabled
implements Component, Serviceable, Configurable
Component listing the available colors for a link
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Class representing a colors configurationstatic class
Class representing a link directory reloader -
Field Summary
Modifier and TypeFieldDescriptionThe colors configurationThe cache of colors for each skinsprotected FileReloaderUtils
The file reloader utilsprotected SiteManager
The site managerstatic final String
The component role -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription_getColorsFromSkin
(String siteName) Get colors configuration from skin_parseColors
(Configuration configuration) Parse colors from configurationvoid
configure
(Configuration configuration) Get colors from site namegetDefaultKey
(String siteName) Get the default color keyvoid
service
(ServiceManager manager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
The component role -
_siteManager
The site manager -
_fileReloaderUtils
The file reloader utils -
_colorsConfiguration
The colors configuration -
_colorsSkinCache
The cache of colors for each skins
-
-
Constructor Details
-
LinkDirectoryColorsComponent
public LinkDirectoryColorsComponent()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
configure
- Specified by:
configure
in interfaceConfigurable
- Throws:
ConfigurationException
-
getColors
Get colors from site name- Parameters:
siteName
- the site name- Returns:
- the map of colors
-
getDefaultKey
Get the default color key- Parameters:
siteName
- the site name- Returns:
- the default key
-
_parseColors
protected LinkDirectoryColorsComponent.ColorsConfiguration _parseColors(Configuration configuration) throws ConfigurationException Parse colors from configuration- Parameters:
configuration
- the configuration- Returns:
- the colors configuration
- Throws:
ConfigurationException
- if a configuration error occurred
-
_getColorsFromSkin
Get colors configuration from skin- Parameters:
siteName
- the site name- Returns:
- the colors configuration
-