Class JCRThemesDAO
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.ametys.cms.tag.jcr.AbstractJCRTagsDAO
-
- org.ametys.plugins.linkdirectory.theme.JCRThemesDAO
-
- All Implemented Interfaces:
Component,LogEnabled,Serviceable
public class JCRThemesDAO extends AbstractJCRTagsDAO
Component for operations on JCR tags
-
-
Field Summary
Fields Modifier and Type Field Description protected RightManager_rightManagerThe rights managerprotected ThemeProviderExtensionPoint_tagProviderExtPtThe tag provider extension pointstatic StringROLEThe Avalon role-
Fields inherited from class org.ametys.cms.tag.jcr.AbstractJCRTagsDAO
_currentUserProvider, _observationManager, _resolver
-
-
Constructor Summary
Constructors Constructor Description JCRThemesDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void_checkUserRight()Check if the user right to access the featureprotected JCRTag_createJCRTag(String parentId, String name, String title, String description, Map<String,Object> otherParameters, Map<String,Object> contextualParameters)Create a JCR tag under his parentprotected Tag_getTagFromName(String name, Map<String,Object> contextualParameters)Get the tag from the nameprotected Set<TagProvider<? extends Tag>>_getTagProviders()Get all tag's providersModifiableTraversableAmetysObject_getTagRootObject(String tagProviderId, Map<String,Object> contextualParameters)Get the tag root node objectprotected JCRTag_updateJCRTag(String tagId, String title, String description, Map<String,Object> otherParameters)Update a JCR tagvoidservice(ServiceManager serviceManager)-
Methods inherited from class org.ametys.cms.tag.jcr.AbstractJCRTagsDAO
_findUniqueName, _hasTag, addTag, createTag, deleteTag, getTag, getTagRootNode, moveTags, updateTag
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Field Detail
-
_tagProviderExtPt
protected ThemeProviderExtensionPoint _tagProviderExtPt
The tag provider extension point
-
_rightManager
protected RightManager _rightManager
The rights manager
-
-
Constructor Detail
-
JCRThemesDAO
public JCRThemesDAO()
-
-
Method Detail
-
service
public void service(ServiceManager serviceManager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classAbstractJCRTagsDAO- Throws:
ServiceException
-
_getTagRootObject
public ModifiableTraversableAmetysObject _getTagRootObject(String tagProviderId, Map<String,Object> contextualParameters) throws RepositoryException
Description copied from class:AbstractJCRTagsDAOGet the tag root node object- Specified by:
_getTagRootObjectin classAbstractJCRTagsDAO- Parameters:
tagProviderId- The tag provider idcontextualParameters- Contextual parameters transmitted by the environment.- Returns:
- The tag root node object
- Throws:
RepositoryException- If an error occurred in the repository
-
_checkUserRight
protected void _checkUserRight() throws IllegalStateException
Description copied from class:AbstractJCRTagsDAOCheck if the user right to access the feature- Specified by:
_checkUserRightin classAbstractJCRTagsDAO- Throws:
IllegalStateException- if the user has no right
-
_getTagFromName
protected Tag _getTagFromName(String name, Map<String,Object> contextualParameters)
Description copied from class:AbstractJCRTagsDAOGet the tag from the name- Specified by:
_getTagFromNamein classAbstractJCRTagsDAO- Parameters:
name- the namecontextualParameters- the contextual parameters- Returns:
- the tag
-
_createJCRTag
protected JCRTag _createJCRTag(String parentId, String name, String title, String description, Map<String,Object> otherParameters, Map<String,Object> contextualParameters) throws RepositoryException
Description copied from class:AbstractJCRTagsDAOCreate a JCR tag under his parent- Specified by:
_createJCRTagin classAbstractJCRTagsDAO- Parameters:
parentId- the parent idname- the nametitle- the titledescription- the descriptionotherParameters- the other parameterscontextualParameters- Contextual parameters transmitted by the environment.- Returns:
- the created JCR tag
- Throws:
RepositoryException- if an error occurred
-
_updateJCRTag
protected JCRTag _updateJCRTag(String tagId, String title, String description, Map<String,Object> otherParameters) throws UnknownAmetysObjectException
Description copied from class:AbstractJCRTagsDAOUpdate a JCR tag- Specified by:
_updateJCRTagin classAbstractJCRTagsDAO- Parameters:
tagId- the tag id to updatetitle- the titledescription- the descriptionotherParameters- the other parameters- Returns:
- return the updated JCR tag
- Throws:
UnknownAmetysObjectException- if an error occurred
-
_getTagProviders
protected Set<TagProvider<? extends Tag>> _getTagProviders()
Description copied from class:AbstractJCRTagsDAOGet all tag's providers- Specified by:
_getTagProvidersin classAbstractJCRTagsDAO- Returns:
- the providers
-
-