Class JCRThemeProvider
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.cms.tag.AbstractTagProvider<T>
org.ametys.cms.tag.jcr.AbstractJCRTagProvider<DefaultTag>
org.ametys.plugins.linkdirectory.theme.JCRThemeProvider
- All Implemented Interfaces:
TagProvider<DefaultTag>
,PluginAware
,Prioritizable
,Configurable
,Contextualizable
,LogEnabled
,Serviceable
Class representing a JCR themes provider for links.
-
Field Summary
Modifier and TypeFieldDescriptionprotected AmetysObjectResolver
The ametys object resolverprotected SiteManager
Site Managerprotected ThemeProviderExtensionPoint
The theme provider extension pointstatic final String
Constant for plugin node nameFields inherited from class org.ametys.cms.tag.jcr.AbstractJCRTagProvider
_context, CACHE_REQUEST_ATTRIBUTE
Fields inherited from class org.ametys.cms.tag.AbstractTagProvider
_description, _featureName, _id, _label, _pluginName, _priority
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
_fillCache
(TraversableAmetysObject parentTagNode, DefaultTag parentTag, Map<String, DefaultTag> cache) Fill cacheprotected Map<String,
DefaultTag> Get the Map of tags by their unique nameprotected ModifiableTraversableAmetysObject
_getRootNode
(Map<String, Object> contextualParameters, javax.jcr.Session session) Get the root node for tagsReturns the direct children of the provider's tag.void
service
(ServiceManager smanager) Methods inherited from class org.ametys.cms.tag.jcr.AbstractJCRTagProvider
_getOrCreateNode, clearCache, configure, contextualize, getRootNode, getTag, getTags, hasTag
Methods inherited from class org.ametys.cms.tag.AbstractTagProvider
configureDescription, configureLabel, getCSSUrls, getDescription, getId, getLabel, getPluginName, getPriority, setPluginInfo
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
LINKDIRECTORY_PLUGIN_NODE_NAME
Constant for plugin node name- See Also:
-
_resolver
The ametys object resolver -
_themeProviderEP
The theme provider extension point -
_siteManager
Site Manager
-
-
Constructor Details
-
JCRThemeProvider
public JCRThemeProvider()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractJCRTagProvider<DefaultTag>
- Throws:
ServiceException
-
_fillCache
protected void _fillCache(TraversableAmetysObject parentTagNode, DefaultTag parentTag, Map<String, DefaultTag> cache) throws javax.jcr.RepositoryExceptionDescription copied from class:AbstractJCRTagProvider
Fill cache- Specified by:
_fillCache
in classAbstractJCRTagProvider<DefaultTag>
- Parameters:
parentTagNode
- The parent tag nodeparentTag
- The parent tagcache
- The cache- Throws:
javax.jcr.RepositoryException
- If an error occurred
-
_getCache
protected Map<String,DefaultTag> _getCache(Map<String, Object> contextualParameters) throws javax.jcr.RepositoryExceptionDescription copied from class:AbstractJCRTagProvider
Get the Map of tags by their unique name- Overrides:
_getCache
in classAbstractJCRTagProvider<DefaultTag>
- Parameters:
contextualParameters
- The contextual parameters- Returns:
- The non null cache
- Throws:
javax.jcr.RepositoryException
- If the cache cannot be filled
-
_getRootNode
protected ModifiableTraversableAmetysObject _getRootNode(Map<String, Object> contextualParameters, javax.jcr.Session session) throws javax.jcr.RepositoryExceptionDescription copied from class:AbstractJCRTagProvider
Get the root node for tags- Specified by:
_getRootNode
in classAbstractJCRTagProvider<DefaultTag>
- Parameters:
contextualParameters
- The contextual parameterssession
- the JCR Session to use to retrieve the root node.- Returns:
- The root node
- Throws:
javax.jcr.RepositoryException
- if an error occurred
-
getTags
Description copied from interface:TagProvider
Returns the direct children of the provider's tag.- Parameters:
tagID
- The tag namecontextualParameters
- contextual parameters- Returns:
- the provider's tag.
-