Class SkinThemeProvider
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.cms.tag.AbstractTagProvider<DefaultTag>
org.ametys.plugins.linkdirectory.theme.SkinThemeProvider
- All Implemented Interfaces:
TagProvider<DefaultTag>
,PluginAware
,Prioritizable
,Configurable
,LogEnabled
,Serviceable
This class represents the themes provided by the skin
-
Field Summary
Modifier and TypeFieldDescriptionprotected SourceResolver
The source resolverThe tagsprotected Map<String,
Map<String, DefaultTag>> The tagsFields inherited from class org.ametys.cms.tag.AbstractTagProvider
_description, _featureName, _id, _label, _pluginName, _priority
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(Configuration configuration) protected Map<String,
DefaultTag> configureTags
(Configuration configuration, String skinName, DefaultTag parent, String defaultCatalogue) Configure themes from the passed configurationReturns the provider's tag.Returns the direct children of the provider's tag.Returns the provider's tags.boolean
Determines if the tag exists.protected void
initializeTags
(String skinName) Initialize a skin's themes from the themes file.void
service
(ServiceManager smanager) Methods inherited from class org.ametys.cms.tag.AbstractTagProvider
configureDescription, configureLabel, getCSSUrls, getDescription, getId, getLabel, getPluginName, getPriority, setPluginInfo
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
_resolver
The source resolver -
_skinLocalIds
The tags -
_skinTags
The tags
-
-
Constructor Details
-
SkinThemeProvider
public SkinThemeProvider()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
configure
- Specified by:
configure
in interfaceConfigurable
- Overrides:
configure
in classAbstractTagProvider<DefaultTag>
- Throws:
ConfigurationException
-
hasTag
Description copied from interface:TagProvider
Determines if the tag exists.- Specified by:
hasTag
in interfaceTagProvider<DefaultTag>
- Parameters:
tagID
- The tag unique namecontextualParameters
- contextual parameters- Returns:
- true if the tag exists.
-
getTag
Description copied from interface:TagProvider
Returns the provider's tag.- Specified by:
getTag
in interfaceTagProvider<DefaultTag>
- Parameters:
tagID
- The tag namecontextualParameters
- contextual parameters- Returns:
- the provider's tag.
-
getTags
Description copied from interface:TagProvider
Returns the direct children of the provider's tag.- Specified by:
getTags
in interfaceTagProvider<DefaultTag>
- Parameters:
tagID
- The tag namecontextualParameters
- contextual parameters- Returns:
- the provider's tag.
-
getTags
Description copied from interface:TagProvider
Returns the provider's tags.- Specified by:
getTags
in interfaceTagProvider<DefaultTag>
- Parameters:
contextualParameters
- contextual parameters- Returns:
- the provider's tags.
-
initializeTags
Initialize a skin's themes from the themes file.- Parameters:
skinName
- the name of the skin to initialize themes.- Throws:
Exception
- if an error occurs.
-
configureTags
protected Map<String,DefaultTag> configureTags(Configuration configuration, String skinName, DefaultTag parent, String defaultCatalogue) throws ConfigurationException Configure themes from the passed configuration- Parameters:
configuration
- The configurationskinName
- the skin nameparent
- The parent theme if any (as recursion is disabled, should be null)defaultCatalogue
- The default catalog for i18n- Returns:
- a Set of
DefaultTag
- Throws:
ConfigurationException
- if configuration is invalid
-