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
Component for operations on JCR categories
-
Field Summary
Modifier and TypeFieldDescriptionprotected RightManager
The rights managerprotected KeywordProviderExtensionPoint
The tag provider extension pointstatic final String
The Avalon roleFields inherited from class org.ametys.cms.tag.jcr.AbstractJCRTagsDAO
_currentUserProvider, _observationManager, _resolver
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
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>>
Get all tag's providers_getTagRootObject
(String tagProviderId, Map<String, Object> contextualParameters) Get the tag root node objectprotected JCRTag
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 Details
-
ROLE
The Avalon role -
_tagProviderExtPt
The tag provider extension point -
_rightManager
The rights manager
-
-
Constructor Details
-
KeywordJCRDAO
public KeywordJCRDAO()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractJCRTagsDAO
- Throws:
ServiceException
-
_getTagRootObject
public ModifiableTraversableAmetysObject _getTagRootObject(String tagProviderId, Map<String, Object> contextualParameters) throws javax.jcr.RepositoryExceptionDescription 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:
javax.jcr.RepositoryException
- If an error occurred in the repository
-
_checkUserRight
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
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, throws javax.jcr.RepositoryExceptionObject> contextualParameters) 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:
javax.jcr.RepositoryException
- if an error occurred
-
_updateJCRTag
protected JCRTag _updateJCRTag(String tagId, String title, String description, Map<String, Object> otherParameters) throws UnknownAmetysObjectExceptionDescription 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
Description copied from class:AbstractJCRTagsDAO
Get all tag's providers- Specified by:
_getTagProviders
in classAbstractJCRTagsDAO
- Returns:
- the providers
-