Interface CommentService

All Known Implementing Classes:
CommentServiceImpl

public interface CommentService
A service for handling comments.
Since:
4.0
Author:
Neil Mc Erlean
  • Field Details

  • Method Details

    • getDiscussableAncestor

      NodeRef getDiscussableAncestor(NodeRef descendantNodeRef)
      Thi method retrieves the ancestor in the repository containment hierarchy having the fm:discussable aspect.
      Parameters:
      descendantNodeRef - The nodeRef which descends from the f:discussable node.
      Returns:
      the fm:discussable ancestor if there is one, else null
      Throws:
      org.alfresco.error.AlfrescoRuntimeException - if the specified expectedNodeType is not correct.
    • getShareCommentsTopic

      NodeRef getShareCommentsTopic(NodeRef discussableNode)
      This method retrieves the fm:topic NodeRef which holds the Share comments for the specified fm:discussable node.
      Parameters:
      discussableNode - the node whose Share comments are sought.
      Returns:
      the fm:topic NodeRef, if one exists, else null.
    • createComment

      NodeRef createComment(NodeRef discussableNode, String title, String comment, boolean suppressRollups)
      Creates a comment for the discussableNode
      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

      void updateComment(NodeRef commentNodeRef, String title, String comment)
      Updates the comment
      Parameters:
      commentNodeRef - the comment node.
      title - - title of the comment
      comment - - body of the comment
    • listComments

      org.alfresco.query.PagingResults<NodeRef> listComments(NodeRef discussableNode, org.alfresco.query.PagingRequest paging)
      Returns a paged list of comments.
      Parameters:
      discussableNode - the node which is being commented on .
      paging - paging.
      Returns:
      a list of comment nodes
    • deleteComment

      void deleteComment(NodeRef commentNodeRef)
      Deletes the comment for the discussableNode
      Parameters:
      commentNodeRef - the node in Share which is being commented on.
    • getCommentPermissions

      Map<String,Boolean> getCommentPermissions(NodeRef discussableNode, NodeRef commentNodeRef)
      canEdit / canDelete
      Parameters:
      discussableNode -
      commentNodeRef -
      Returns: