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
public class SkinTagProvider extends StaticTagProvider
This class represents the tags provide by the skin
-
-
Field Summary
Fields Modifier and Type Field Description protected SourceResolver
_resolver
The source resolverprivate SiteManager
_siteManager
private SkinConfigurationHelper
_skinConfigurationHelper
protected Map<String,List<String>>
_skinLocalIds
The tagsprivate SkinsManager
_skinsManager
protected Map<String,Map<String,CMSTag>>
_skinTags
The tags-
Fields inherited from class org.ametys.cms.tag.StaticTagProvider
_localIds, _tags, _targetTypeEP
-
Fields inherited from class org.ametys.cms.tag.AbstractTagProvider
_description, _featureName, _id, _label, _pluginName
-
-
Constructor Summary
Constructors Constructor Description SkinTagProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configure(Configuration configuration)
protected Map<String,CMSTag>
configureTags(Configuration configuration, String skinName, CMSTag parent, String defaultCatalogue)
Configure tag from the passed configurationMap<String,CMSTag>
getTags(Map<String,Object> contextualParameters)
Returns the provider's tags.protected void
initializeTags(String skinName)
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 Detail
-
_resolver
protected SourceResolver _resolver
The source resolver
-
_skinLocalIds
protected Map<String,List<String>> _skinLocalIds
The tags
-
_siteManager
private SiteManager _siteManager
-
_skinsManager
private SkinsManager _skinsManager
-
_skinConfigurationHelper
private SkinConfigurationHelper _skinConfigurationHelper
-
-
Constructor Detail
-
SkinTagProvider
public SkinTagProvider()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classStaticTagProvider
- Throws:
ServiceException
-
configure
public void configure(Configuration configuration) throws ConfigurationException
- Specified by:
configure
in interfaceConfigurable
- Overrides:
configure
in classStaticTagProvider
- Throws:
ConfigurationException
-
getTags
public Map<String,CMSTag> getTags(Map<String,Object> contextualParameters)
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.
-
initializeTags
protected void initializeTags(String skinName) throws Exception
Initialize a skin's tags from the tags file.- Parameters:
skinName
- the name 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
-
-