public class StaticTagProvider extends AbstractLogEnabled implements TagProvider, Contextualizable, Configurable, PluginAware, Serviceable
Modifier and Type | Field and Description |
---|---|
protected Context |
_context
The context.
|
protected I18nizableText |
_description
The description
|
protected String |
_featureName
The feature name
|
protected String |
_id
The id
|
protected I18nizableText |
_label
The label
|
protected List<String> |
_localIds
List of statically defined ids
|
protected ServiceManager |
_manager
The service manager
|
protected String |
_pluginName
The plugin name
|
protected Map<String,Tag> |
_tags
The tags
|
protected TagTargetTypeExtensionPoint |
_targetTypeEP
Target types
|
Constructor and Description |
---|
StaticTagProvider()
Constructor
|
Modifier and Type | Method and Description |
---|---|
private Tag |
_recursiveSearchTags(Map<String,Tag> tags,
String tagID) |
void |
configure(Configuration configuration) |
protected I18nizableText |
configureDescription(Configuration configuration,
String defaultCatalogue)
Configure description from the passed configuration
|
protected I18nizableText |
configureLabel(Configuration configuration,
String defaultCatalogue)
Configure label from the passed configuration
|
protected Map<String,Tag> |
configureTags(Configuration configuration,
Tag parent,
String defaultCatalogue)
Configure tag from the passed configuration
|
void |
contextualize(Context context) |
I18nizableText |
getDescription()
Returns the provider's description.
|
Map<String,Tag> |
getFilteredTags(String targetType,
Map<String,Object> contextualParameters)
Returns the provider's tags filtered by target type
|
String |
getId()
Returns the provider's id.
|
I18nizableText |
getLabel()
Returns the provider's label.
|
List<String> |
getLocalIds()
Returns the list of statically defined ids
|
String |
getPluginName()
Get the plugin name
|
Tag |
getTag(String tagID,
Map<String,Object> contextualParameters)
Returns the provider's tag.
|
Map<String,Tag> |
getTags(Map<String,Object> contextualParameters)
Returns the provider's tags.
|
Collection<Tag> |
getTags(String tagID,
Map<String,Object> contextualParameters)
Returns the direct children of the provider's tag.
|
boolean |
hasTag(String tagID,
Map<String,Object> contextualParameters)
Determines if the tag exists.
|
void |
service(ServiceManager smanager) |
void |
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. |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
protected String _pluginName
protected String _featureName
protected ServiceManager _manager
protected I18nizableText _label
protected I18nizableText _description
protected TagTargetTypeExtensionPoint _targetTypeEP
public StaticTagProvider()
public void service(ServiceManager smanager) throws ServiceException
service
in interface Serviceable
ServiceException
public void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
ContextException
public void configure(Configuration configuration) throws ConfigurationException
configure
in interface Configurable
ConfigurationException
public String getId()
TagProvider
getId
in interface TagProvider
public List<String> getLocalIds()
public I18nizableText getLabel()
TagProvider
getLabel
in interface TagProvider
public I18nizableText getDescription()
TagProvider
getDescription
in interface TagProvider
public Map<String,Tag> getTags(Map<String,Object> contextualParameters)
TagProvider
getTags
in interface TagProvider
contextualParameters
- contextual parameterspublic Map<String,Tag> getFilteredTags(String targetType, Map<String,Object> contextualParameters)
TagProvider
getFilteredTags
in interface TagProvider
targetType
- If not null, returns only tags matching this target typecontextualParameters
- contextual parameterspublic boolean hasTag(String tagID, Map<String,Object> contextualParameters)
TagProvider
hasTag
in interface TagProvider
tagID
- The tag unique namecontextualParameters
- contextual parameterspublic Tag getTag(String tagID, Map<String,Object> contextualParameters)
TagProvider
getTag
in interface TagProvider
tagID
- The tag namecontextualParameters
- contextual parameterspublic Collection<Tag> getTags(String tagID, Map<String,Object> contextualParameters)
TagProvider
getTags
in interface TagProvider
tagID
- The tag namecontextualParameters
- contextual parameterspublic void setPluginInfo(String pluginName, String featureName, String id)
PluginAware
setPluginInfo
in interface PluginAware
pluginName
- Unique identifier for the plugin hosting the extensionfeatureName
- Unique feature identifier (unique for a given pluginName)id
- Unique identifier of this componentpublic String getPluginName()
protected Map<String,Tag> configureTags(Configuration configuration, Tag parent, String defaultCatalogue) throws ConfigurationException
configuration
- The configurationparent
- The parent tag if anydefaultCatalogue
- The default catalogue for i18nTag
ConfigurationException
- If an error occurredprotected I18nizableText configureLabel(Configuration configuration, String defaultCatalogue) throws ConfigurationException
configuration
- The configurationdefaultCatalogue
- The default catalogueConfigurationException
- If an error occurredprotected I18nizableText configureDescription(Configuration configuration, String defaultCatalogue) throws ConfigurationException
configuration
- The configurationdefaultCatalogue
- The default catalogueConfigurationException
- If an error occurred