Package org.ametys.web.tags
Class SkinTagProvider
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.cms.tag.AbstractTagProvider<CMSTag>
org.ametys.cms.tag.StaticTagProvider
org.ametys.web.tags.SkinTagProvider
- All Implemented Interfaces:
TagProvider<CMSTag>
,PluginAware
,Configurable
,LogEnabled
,Serviceable
This class represents the tags provide by the skin
-
Field Summary
Fields inherited from class org.ametys.cms.tag.StaticTagProvider
_colorsComponent, _localIds, _tags, _targetTypeEP
Fields inherited from class org.ametys.cms.tag.AbstractTagProvider
_description, _featureName, _id, _label, _pluginName
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
_getSkinId
(Map<String, Object> contextualParameters) Retrieves the skin id from the given contextual parametersvoid
configure
(Configuration configuration) configureTags
(Configuration configuration, String skinName, CMSTag parent, String defaultCatalogue) Configure tag from the passed configurationgetCSSUrls
(Map<String, Object> contextualParameters) Get the list of CSS urls link to the providerReturns the provider's tags.protected void
initializeTags
(String skinId) Initialize a skin's tags from the tags file.void
service
(ServiceManager smanager) Methods inherited from class org.ametys.cms.tag.StaticTagProvider
configureTags, getLocalIds, getTag, getTags, hasTag
Methods inherited from class org.ametys.cms.tag.AbstractTagProvider
configureDescription, configureLabel, getDescription, getId, getLabel, getPluginName, 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
-
SkinTagProvider
public SkinTagProvider()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classStaticTagProvider
- Throws:
ServiceException
-
configure
- Specified by:
configure
in interfaceConfigurable
- Overrides:
configure
in classStaticTagProvider
- Throws:
ConfigurationException
-
getTags
Description copied from interface:TagProvider
Returns the provider's tags.- Specified by:
getTags
in interfaceTagProvider<CMSTag>
- Overrides:
getTags
in classStaticTagProvider
- Parameters:
contextualParameters
- contextual parameters- Returns:
- the provider's tags.
-
_getSkinId
Retrieves the skin id from the given contextual parameters- Parameters:
contextualParameters
- the contextual parameters- Returns:
- the optional skin id
-
initializeTags
Initialize a skin's tags from the tags file.- Parameters:
skinId
- the id of the skin to initialize tags.- Throws:
Exception
- if an error occurs.
-
configureTags
protected Map<String,CMSTag> configureTags(Configuration configuration, String skinName, CMSTag parent, String defaultCatalogue) throws ConfigurationException Configure tag from the passed configuration- Parameters:
configuration
- The configurationskinName
- the skin nameparent
- The parent tag if anydefaultCatalogue
- The default catalog for i18n- Returns:
- a Set of
CMSTag
- Throws:
ConfigurationException
- if configuration is invalid
-
getCSSUrls
Description copied from interface:TagProvider
Get the list of CSS urls link to the provider- Specified by:
getCSSUrls
in interfaceTagProvider<CMSTag>
- Overrides:
getCSSUrls
in classStaticTagProvider
- Parameters:
contextualParameters
- contextual parameters- Returns:
- the list of CSS urls
-