Package org.ametys.cms.tag.jcr
Class JCRTagsDAO
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.cms.tag.jcr.AbstractJCRTagsDAO
org.ametys.cms.tag.jcr.JCRTagsDAO
- All Implemented Interfaces:
Component
,LogEnabled
,Serviceable
Component for operations on JCR tags
-
Field Summary
Modifier and TypeFieldDescriptionprotected RightManager
The rights managerprotected TagProviderExtensionPoint
The tag provider extension pointprotected TagsDAO
Tags DAOprotected TagTargetTypeExtensionPoint
Target typesstatic final String
The Avalon rolestatic final String
The attribute name for the target typestatic final String
The attribute name for the visibilityFields 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 -
VISIBILITY_ATTRIBUTE_NAME
The attribute name for the visibility- See Also:
-
TARGET_TYPE_ATTRIBUTE_NAME
The attribute name for the target type- See Also:
-
_tagProviderExtPt
The tag provider extension point -
_rightManager
The rights manager -
_targetTypeEP
Target types -
_tagsDAO
Tags DAO
-
-
Constructor Details
-
JCRTagsDAO
public JCRTagsDAO()
-
-
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 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:
RepositoryException
- If an error occurred in the repository
-
_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
-
_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
-
_createJCRTag
protected JCRTag _createJCRTag(String parentId, String name, String title, String description, Map<String, Object> otherParameters, Map<String, throws 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:
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
-