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
,ProjectCMSTagProvider
,SkinThemeProvider
,StaticTagProvider
public abstract class AbstractTagProvider<T extends Tag>
extends AbstractLogEnabled
implements TagProvider<T>, Configurable, PluginAware
Class representing a static tag provider.
-
Field Summary
Modifier and TypeFieldDescriptionprotected I18nizableText
The descriptionprotected String
The feature nameprotected String
The idprotected I18nizableText
The labelprotected String
The plugin name -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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 configurationReturns the provider's description.getId()
Returns the provider's id.getLabel()
Returns the provider's label.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 Details
-
_pluginName
The plugin name -
_featureName
The feature name -
_id
The id -
_label
The label -
_description
The description
-
-
Constructor Details
-
AbstractTagProvider
public AbstractTagProvider()
-
-
Method Details
-
configure
- Specified by:
configure
in interfaceConfigurable
- Throws:
ConfigurationException
-
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
Description copied from interface:TagProvider
Returns the provider's label.- Specified by:
getLabel
in interfaceTagProvider<T extends Tag>
- Returns:
- the provider's label.
-
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
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
Get the plugin name- Returns:
- the plugin name
-