Package org.ametys.cms.tag
Class AbstractTagProvider<T extends Tag>
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.ametys.cms.tag.AbstractTagProvider<T>
-
- Type Parameters:
T
- the tag class
- All Implemented Interfaces:
TagProvider<T>
,PluginAware
,Configurable
,LogEnabled
- Direct Known Subclasses:
AbstractJCRTagProvider
,CategoryTagProvider
,GroupTagProvider
,KeywordTagProvider
,SkinThemeProvider
,StaticTagProvider
public abstract class AbstractTagProvider<T extends Tag> extends AbstractLogEnabled implements TagProvider<T>, Configurable, PluginAware
Class representing a static tag provider.
-
-
Field Summary
Fields Modifier and Type Field Description protected I18nizableText
_description
The descriptionprotected String
_featureName
The feature nameprotected String
_id
The idprotected I18nizableText
_label
The labelprotected String
_pluginName
The plugin name
-
Constructor Summary
Constructors Constructor Description AbstractTagProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configure(Configuration configuration)
protected I18nizableText
configureDescription(Configuration configuration, String defaultCatalogue)
Configure description from the passed configurationprotected I18nizableText
configureLabel(Configuration configuration, String defaultCatalogue)
Configure label from the passed configurationI18nizableText
getDescription()
Returns the provider's description.String
getId()
Returns the provider's id.I18nizableText
getLabel()
Returns the provider's label.String
getPluginName()
Get the plugin namevoid
setPluginInfo(String pluginName, String featureName, String id)
Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ametys.cms.tag.TagProvider
getTag, getTags, getTags, hasTag
-
-
-
-
Field Detail
-
_pluginName
protected String _pluginName
The plugin name
-
_featureName
protected String _featureName
The feature name
-
_label
protected I18nizableText _label
The label
-
_description
protected I18nizableText _description
The description
-
-
Constructor Detail
-
AbstractTagProvider
public AbstractTagProvider()
-
-
Method Detail
-
configure
public void configure(Configuration configuration) throws ConfigurationException
- Specified by:
configure
in interfaceConfigurable
- Throws:
ConfigurationException
-
getId
public String getId()
Description copied from interface:TagProvider
Returns the provider's id.- Specified by:
getId
in interfaceTagProvider<T extends Tag>
- Returns:
- the provider's id.
-
getLabel
public I18nizableText getLabel()
Description copied from interface:TagProvider
Returns the provider's label.- Specified by:
getLabel
in interfaceTagProvider<T extends Tag>
- Returns:
- the provider's label.
-
getDescription
public I18nizableText getDescription()
Description copied from interface:TagProvider
Returns the provider's description.- Specified by:
getDescription
in interfaceTagProvider<T extends Tag>
- Returns:
- the provider's description.
-
configureLabel
protected I18nizableText configureLabel(Configuration configuration, String defaultCatalogue) throws ConfigurationException
Configure label from the passed configuration- Parameters:
configuration
- The configurationdefaultCatalogue
- The default catalogue- Returns:
- The label
- Throws:
ConfigurationException
- If an error occurred
-
configureDescription
protected I18nizableText configureDescription(Configuration configuration, String defaultCatalogue) throws ConfigurationException
Configure description from the passed configuration- Parameters:
configuration
- The configurationdefaultCatalogue
- The default catalogue- Returns:
- The description
- Throws:
ConfigurationException
- If an error occurred
-
setPluginInfo
public void setPluginInfo(String pluginName, String featureName, String id)
Description copied from interface:PluginAware
Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.- Specified by:
setPluginInfo
in interfacePluginAware
- Parameters:
pluginName
- Unique identifier for the plugin hosting the extensionfeatureName
- Unique feature identifier (unique for a given pluginName)id
- Unique identifier of this component
-
getPluginName
public String getPluginName()
Get the plugin name- Returns:
- the plugin name
-
-