Class CommentServiceImpl

    • Constructor Detail

      • CommentServiceImpl

        public CommentServiceImpl()
    • Method Detail

      • setSiteService

        public void setSiteService​(SiteService siteService)
      • setActivityService

        public void setActivityService​(ActivityService activityService)
      • setNodeService

        public void setNodeService​(org.alfresco.service.cmr.repository.NodeService nodeService)
      • setContentService

        public void setContentService​(ContentService contentService)
      • setCannedQueryRegistry

        public void setCannedQueryRegistry​(org.alfresco.util.registry.NamedObjectRegistry<org.alfresco.query.CannedQueryFactory<? extends Object>> cannedQueryRegistry)
      • setPolicyComponent

        public void setPolicyComponent​(PolicyComponent policyComponent)
      • setBehaviourFilter

        public void setBehaviourFilter​(BehaviourFilter behaviourFilter)
      • setPermissionService

        public void setPermissionService​(org.alfresco.service.cmr.security.PermissionService permissionService)
      • setLockService

        public void setLockService​(LockService lockService)
      • setDictionaryService

        public void setDictionaryService​(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
      • onBootstrap

        protected void onBootstrap​(org.springframework.context.ApplicationEvent event)
        Specified by:
        onBootstrap in class org.springframework.extensions.surf.util.AbstractLifecycleBean
      • onShutdown

        protected void onShutdown​(org.springframework.context.ApplicationEvent event)
        Specified by:
        onShutdown in class org.springframework.extensions.surf.util.AbstractLifecycleBean
      • getDiscussableAncestor

        public org.alfresco.service.cmr.repository.NodeRef getDiscussableAncestor​(org.alfresco.service.cmr.repository.NodeRef descendantNodeRef)
        Description copied from interface: CommentService
        Thi method retrieves the ancestor in the repository containment hierarchy having the fm:discussable aspect.
        Specified by:
        getDiscussableAncestor in interface CommentService
        Parameters:
        descendantNodeRef - The nodeRef which descends from the f:discussable node.
        Returns:
        the fm:discussable ancestor if there is one, else null
      • listComments

        public org.alfresco.query.PagingResults<org.alfresco.service.cmr.repository.NodeRef> listComments​(org.alfresco.service.cmr.repository.NodeRef discussableNode,
                                                                                                          org.alfresco.query.PagingRequest paging)
        Description copied from interface: CommentService
        Returns a paged list of comments.
        Specified by:
        listComments in interface CommentService
        Parameters:
        discussableNode - the node which is being commented on .
        paging - paging.
        Returns:
        a list of comment nodes
      • getShareCommentsTopic

        public org.alfresco.service.cmr.repository.NodeRef getShareCommentsTopic​(org.alfresco.service.cmr.repository.NodeRef discussableNode)
        Description copied from interface: CommentService
        This method retrieves the fm:topic NodeRef which holds the Share comments for the specified fm:discussable node.
        Specified by:
        getShareCommentsTopic in interface CommentService
        Parameters:
        discussableNode - the node whose Share comments are sought.
        Returns:
        the fm:topic NodeRef, if one exists, else null.
      • createComment

        public org.alfresco.service.cmr.repository.NodeRef createComment​(org.alfresco.service.cmr.repository.NodeRef discussableNode,
                                                                         String title,
                                                                         String comment,
                                                                         boolean suppressRollups)
        Description copied from interface: CommentService
        Creates a comment for the discussableNode
        Specified by:
        createComment in interface CommentService
        Parameters:
        discussableNode - the node in Share which is being commented on .
        title - - title of the comment
        comment - - body of the comment
        suppressRollups - - should it suppressRollups
        Returns:
        NodeRef - the created node reference
      • updateComment

        public void updateComment​(org.alfresco.service.cmr.repository.NodeRef commentNodeRef,
                                  String title,
                                  String comment)
        Description copied from interface: CommentService
        Updates the comment
        Specified by:
        updateComment in interface CommentService
        Parameters:
        commentNodeRef - the comment node.
        title - - title of the comment
        comment - - body of the comment
      • deleteComment

        public void deleteComment​(org.alfresco.service.cmr.repository.NodeRef commentNodeRef)
        Description copied from interface: CommentService
        Deletes the comment for the discussableNode
        Specified by:
        deleteComment in interface CommentService
        Parameters:
        commentNodeRef - the node in Share which is being commented on.
      • getCommentPermissions

        public Map<String,​Boolean> getCommentPermissions​(org.alfresco.service.cmr.repository.NodeRef discussableNode,
                                                               org.alfresco.service.cmr.repository.NodeRef commentNodeRef)
        Description copied from interface: CommentService
        canEdit / canDelete
        Specified by:
        getCommentPermissions in interface CommentService
        Returns: