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
FieldsModifier and TypeFieldDescriptionprotected SourceResolverThe 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(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.booleanDetermines if the tag exists.protected voidinitializeTags(String skinName) Initialize a skin's themes from the themes file.voidservice(ServiceManager smanager) Methods inherited from class org.ametys.cms.tag.AbstractTagProvider
configureDescription, configureLabel, getCSSUrls, getDescription, getId, getLabel, getPluginName, getPriority, setPluginInfoMethods 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:
servicein interfaceServiceable- Throws:
ServiceException
-
configure
- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classAbstractTagProvider<DefaultTag>- Throws:
ConfigurationException
-
hasTag
Description copied from interface:TagProviderDetermines if the tag exists.- Specified by:
hasTagin interfaceTagProvider<DefaultTag>- Parameters:
tagID- The tag unique namecontextualParameters- contextual parameters- Returns:
- true if the tag exists.
-
getTag
Description copied from interface:TagProviderReturns the provider's tag.- Specified by:
getTagin interfaceTagProvider<DefaultTag>- Parameters:
tagID- The tag namecontextualParameters- contextual parameters- Returns:
- the provider's tag.
-
getTags
Description copied from interface:TagProviderReturns the direct children of the provider's tag.- Specified by:
getTagsin interfaceTagProvider<DefaultTag>- Parameters:
tagID- The tag namecontextualParameters- contextual parameters- Returns:
- the provider's tag.
-
getTags
Description copied from interface:TagProviderReturns the provider's tags.- Specified by:
getTagsin 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
-