Class CategoryTagProvider
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.cms.tag.AbstractTagProvider<CMSTag>
org.ametys.plugins.workspaces.categories.CategoryTagProvider
- All Implemented Interfaces:
TagProvider<CMSTag>
,PluginAware
,Configurable
,LogEnabled
,Serviceable
Class representing categories as CMS tag provider.
This directly use
CategoryJCRProvider
and transform the categories in CMSTag
-
Field Summary
Modifier and TypeFieldDescriptionprotected CategoryProviderExtensionPoint
Category tag providerprotected CategoryJCRProvider
The JCR category providerprotected TagTargetTypeExtensionPoint
Target typesFields inherited from class org.ametys.cms.tag.AbstractTagProvider
_description, _featureName, _id, _label, _pluginName
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected CategoryCMSTag
_transformToCMSTag
(Category category, Map<String, Object> contextualParameters) Transform aCategory
in aCategoryCMSTag
, forcing visibility to public and target to CONTENTgetCSSUrls
(Map<String, Object> contextualParameters) Get the list of CSS urls link to the providerReturns the provider's tag.Returns the direct children of the provider's tag.Returns the provider's tags.boolean
Determines if the tag exists.void
service
(ServiceManager smanager) Methods inherited from class org.ametys.cms.tag.AbstractTagProvider
configure, configureDescription, configureLabel, getDescription, getId, getLabel, getPluginName, setPluginInfo
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
_targetTypeEP
Target types -
_categoryProviderEP
Category tag provider -
_jcrCategoryProvider
The JCR category provider
-
-
Constructor Details
-
CategoryTagProvider
public CategoryTagProvider()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getTags
Description copied from interface:TagProvider
Returns the provider's tags.- Specified by:
getTags
in interfaceTagProvider<CMSTag>
- Parameters:
contextualParameters
- contextual parameters- Returns:
- the provider's tags.
-
getTag
Description copied from interface:TagProvider
Returns the provider's tag.- Specified by:
getTag
in interfaceTagProvider<CMSTag>
- Parameters:
tagName
- The tag namecontextualParameters
- contextual parameters- Returns:
- the provider's tag.
-
getTags
Description copied from interface:TagProvider
Returns the direct children of the provider's tag.- Specified by:
getTags
in interfaceTagProvider<CMSTag>
- Parameters:
tagName
- The tag namecontextualParameters
- contextual parameters- Returns:
- the provider's tag.
-
hasTag
Description copied from interface:TagProvider
Determines if the tag exists.- Specified by:
hasTag
in interfaceTagProvider<CMSTag>
- Parameters:
tagName
- The tag unique namecontextualParameters
- contextual parameters- Returns:
- true if the tag exists.
-
_transformToCMSTag
protected CategoryCMSTag _transformToCMSTag(Category category, Map<String, Object> contextualParameters) Transform aCategory
in aCategoryCMSTag
, forcing visibility to public and target to CONTENT- Parameters:
category
- the category to transformcontextualParameters
- the contextual parameters- Returns:
- a
CategoryCMSTag
with the same values
-
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 classAbstractTagProvider<CMSTag>
- Parameters:
contextualParameters
- contextual parameters- Returns:
- the list of CSS urls
-