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
Component for operations on JCR tags
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected RightManagerThe rights managerprotected ThemeProviderExtensionPointThe tag provider extension pointstatic final StringThe Avalon roleFields inherited from class org.ametys.cms.tag.jcr.AbstractJCRTagsDAO
_currentUserProvider, _observationManager, _resolver -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidCheck 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 JCRTagUpdate a JCR tagFind a JCR tag and return its datagetTagRootNode(String tagProviderId, Map<String, Object> contextualParameters) Get the root node for tagsvoidservice(ServiceManager serviceManager) Methods inherited from class org.ametys.cms.tag.jcr.AbstractJCRTagsDAO
_findUniqueName, _hasTag, addTag, createTag, deleteTag, moveTags, updateTagMethods 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
-
JCRThemesDAO
public JCRThemesDAO()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classAbstractJCRTagsDAO- Throws:
ServiceException
-
_getTagRootObject
public ModifiableTraversableAmetysObject _getTagRootObject(String tagProviderId, Map<String, Object> contextualParameters) throws javax.jcr.RepositoryExceptionDescription 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:
javax.jcr.RepositoryException- If an error occurred in the repository
-
_checkUserRight
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
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, throws javax.jcr.RepositoryExceptionObject> contextualParameters) 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:
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: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
Description copied from class:AbstractJCRTagsDAOGet all tag's providers- Specified by:
_getTagProvidersin classAbstractJCRTagsDAO- Returns:
- the providers
-
getTagRootNode
public Map<String,Object> getTagRootNode(String tagProviderId, Map<String, Object> contextualParameters) throws ProcessingExceptionDescription copied from class:AbstractJCRTagsDAOGet the root node for tags- Overrides:
getTagRootNodein classAbstractJCRTagsDAO- Parameters:
tagProviderId- The tag provider idcontextualParameters- Contextual parameters transmitted by the environment.- Returns:
- The root node in key "id"
- Throws:
ProcessingException- If an error occurred in the repository
-
getTag
Description copied from class:AbstractJCRTagsDAOFind a JCR tag and return its data- Overrides:
getTagin classAbstractJCRTagsDAO- Parameters:
tagId- The tag's id- Returns:
- The result map
-