Interface CommentManager


@ProviderType public interface CommentManager
Author:
André de Oliveira
  • Method Details

    • addComment

      long addComment(long userId, long groupId, String className, long classPK, String body, Function<String,ServiceContext> serviceContextFunction) throws PortalException
      Throws:
      PortalException
    • addComment

      long addComment(String externalReferenceCode, long userId, long groupId, String className, long classPK, String userName, String subject, String body, Function<String,ServiceContext> serviceContextFunction) throws PortalException
      Throws:
      PortalException
    • addComment

      long addComment(String externalReferenceCode, long userId, String className, long classPK, String userName, long parentCommentId, String subject, String body, Function<String,ServiceContext> serviceContextFunction) throws PortalException
      Throws:
      PortalException
    • addDiscussion

      void addDiscussion(long userId, long groupId, String className, long classPK, String userName) throws PortalException
      Throws:
      PortalException
    • copyDiscussion

      Discussion copyDiscussion(long userId, long groupId, String className, long classPK, long newClassPK, Function<String,ServiceContext> serviceContextFunction) throws PortalException
      Throws:
      PortalException
    • deleteComment

      void deleteComment(long commentId) throws PortalException
      Throws:
      PortalException
    • deleteDiscussion

      void deleteDiscussion(String className, long classPK) throws PortalException
      Throws:
      PortalException
    • deleteGroupComments

      void deleteGroupComments(long groupId) throws PortalException
      Throws:
      PortalException
    • fetchComment

      Comment fetchComment(long commentId)
    • fetchComment

      Comment fetchComment(long groupId, String externalReferenceCode)
      Returns a comment matching with the external reference code and the group ID
      Parameters:
      groupId - the primary key of the group
      externalReferenceCode - the comment's external reference code
      Returns:
      the matching comment or null if it could not be found
    • fetchDiscussionComment

      DiscussionComment fetchDiscussionComment(long userId, long commentId) throws PortalException
      Throws:
      PortalException
    • getChildComments

      List<Comment> getChildComments(long parentCommentId, int status, int start, int end)
      Returns a range of all the comments matching the parent comment ID and status.
      Parameters:
      parentCommentId - the parent comment's ID
      status - the comments' status
      start - the lower bound of the range of comments
      end - the upper bound of the range of comments (not inclusive)
      Returns:
      the range of matching comments
    • getChildCommentsCount

      int getChildCommentsCount(long parentCommentId, int status)
      Returns the number of comments matching the parent comment ID and status.
      Parameters:
      parentCommentId - the parent comment's ID
      status - the comments' status
      Returns:
      the number of matching comments
    • getComment

      Comment getComment(long groupId, String externalReferenceCode) throws PortalException
      Throws:
      PortalException
    • getCommentsCount

      int getCommentsCount(String className, long classPK)
    • getDiscussion

      Discussion getDiscussion(long userId, long groupId, String className, long classPK, Function<String,ServiceContext> serviceContextFunction) throws PortalException
      Throws:
      PortalException
    • getDiscussionStagingHandler

      DiscussionStagingHandler getDiscussionStagingHandler()
    • getRootComments

      List<Comment> getRootComments(String className, long classPK, int status, int start, int end) throws PortalException
      Returns a range of all the model's root comments matching the class name, class primary key, and status. This count includes only direct comments to the model; it does not include replies.
      Parameters:
      className - the class name
      classPK - the model class's primary key
      status - the comments' status
      start - the lower bound of the range of comments
      end - the upper bound of the range of comments (not inclusive)
      Returns:
      the range of matching comments
      Throws:
      PortalException
    • getRootCommentsCount

      int getRootCommentsCount(String className, long classPK, int status)
      Returns the number of the model's root comments matching the class name, class primary key, and status. This count includes only direct comments to the model; it does not include replies.
      Parameters:
      className - the class name
      classPK - the model class's primary key
      status - the comments' status
      Returns:
      the number of matching comments
    • hasDiscussion

      boolean hasDiscussion(String className, long classPK) throws PortalException
      Throws:
      PortalException
    • moveDiscussionToTrash

      void moveDiscussionToTrash(String className, long classPK)
    • restoreDiscussionFromTrash

      void restoreDiscussionFromTrash(String className, long classPK)
    • subscribeDiscussion

      void subscribeDiscussion(long userId, long groupId, String className, long classPK) throws PortalException
      Throws:
      PortalException
    • unsubscribeDiscussion

      void unsubscribeDiscussion(long userId, String className, long classPK) throws PortalException
      Throws:
      PortalException
    • updateComment

      long updateComment(long userId, String className, long classPK, long commentId, String subject, String body, Function<String,ServiceContext> serviceContextFunction) throws PortalException
      Throws:
      PortalException