Class KeywordJCRDAO
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.ametys.cms.tag.jcr.AbstractJCRTagsDAO
-
- org.ametys.plugins.workspaces.keywords.KeywordJCRDAO
-
- All Implemented Interfaces:
Component
,LogEnabled
,Serviceable
public class KeywordJCRDAO extends AbstractJCRTagsDAO
Component for operations on JCR categories
-
-
Field Summary
Fields Modifier and Type Field Description protected RightManager
_rightManager
The rights managerprotected KeywordProviderExtensionPoint
_tagProviderExtPt
The tag provider extension pointstatic String
ROLE
The Avalon role-
Fields inherited from class org.ametys.cms.tag.jcr.AbstractJCRTagsDAO
_currentUserProvider, _observationManager, _resolver
-
-
Constructor Summary
Constructors Constructor Description KeywordJCRDAO()
-
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 tagvoid
service(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 KeywordProviderExtensionPoint _tagProviderExtPt
The tag provider extension point
-
_rightManager
protected RightManager _rightManager
The rights manager
-
-
Constructor Detail
-
KeywordJCRDAO
public KeywordJCRDAO()
-
-
Method Detail
-
service
public void service(ServiceManager serviceManager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractJCRTagsDAO
- Throws:
ServiceException
-
_getTagRootObject
public ModifiableTraversableAmetysObject _getTagRootObject(String tagProviderId, Map<String,Object> contextualParameters) throws RepositoryException
Description copied from class:AbstractJCRTagsDAO
Get the tag root node object- Specified by:
_getTagRootObject
in 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:AbstractJCRTagsDAO
Check if the user right to access the feature- Specified by:
_checkUserRight
in classAbstractJCRTagsDAO
- Throws:
IllegalStateException
- if the user has no right
-
_getTagFromName
protected Tag _getTagFromName(String name, Map<String,Object> contextualParameters)
Description copied from class:AbstractJCRTagsDAO
Get the tag from the name- Specified by:
_getTagFromName
in 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:AbstractJCRTagsDAO
Create a JCR tag under his parent- Specified by:
_createJCRTag
in 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:AbstractJCRTagsDAO
Update a JCR tag- Specified by:
_updateJCRTag
in 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:AbstractJCRTagsDAO
Get all tag's providers- Specified by:
_getTagProviders
in classAbstractJCRTagsDAO
- Returns:
- the providers
-
-