public class LinkDirectoryColorsComponent extends AbstractLogEnabled implements Component, Serviceable, Configurable
Modifier and Type | Class and Description |
---|---|
static class |
LinkDirectoryColorsComponent.ColorsConfiguration
Class representing a colors configuration
|
static class |
LinkDirectoryColorsComponent.LinkDirectoryReloader
Class representing a link directory reloader
|
Modifier and Type | Field and Description |
---|---|
protected LinkDirectoryColorsComponent.ColorsConfiguration |
_colorsConfiguration
The colors configuration
|
protected Map<String,LinkDirectoryColorsComponent.ColorsConfiguration> |
_colorsSkinCache
The cache of colors for each skins
|
protected FileReloaderUtils |
_fileReloaderUtils
The file reloader utils
|
protected SiteManager |
_siteManager
The site manager
|
static String |
ROLE
The component role
|
Constructor and Description |
---|
LinkDirectoryColorsComponent() |
Modifier and Type | Method and Description |
---|---|
protected LinkDirectoryColorsComponent.ColorsConfiguration |
_getColorsFromSkin(String siteName)
Get colors configuration from skin
|
protected LinkDirectoryColorsComponent.ColorsConfiguration |
_parseColors(Configuration configuration)
Parse colors from configuration
|
void |
configure(Configuration configuration) |
Map<String,Map<String,String>> |
getColors(String siteName)
Get colors from site name
|
String |
getDefaultKey(String siteName)
Get the default color key
|
void |
service(ServiceManager manager) |
getLogger, setLogger
protected SiteManager _siteManager
protected FileReloaderUtils _fileReloaderUtils
protected LinkDirectoryColorsComponent.ColorsConfiguration _colorsConfiguration
protected Map<String,LinkDirectoryColorsComponent.ColorsConfiguration> _colorsSkinCache
public LinkDirectoryColorsComponent()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public void configure(Configuration configuration) throws ConfigurationException
configure
in interface Configurable
ConfigurationException
public Map<String,Map<String,String>> getColors(String siteName)
siteName
- the site namepublic String getDefaultKey(String siteName)
siteName
- the site nameprotected LinkDirectoryColorsComponent.ColorsConfiguration _parseColors(Configuration configuration) throws ConfigurationException
configuration
- the configurationConfigurationException
- if a configuration error occurredprotected LinkDirectoryColorsComponent.ColorsConfiguration _getColorsFromSkin(String siteName)
siteName
- the site name