Interface CommentManager


  • public interface CommentManager
    This is subsystem which allows to keep various user comments. Each comment is identified by comment id.
    • Method Detail

      • newComment

        @NotNull
        Comment newComment​(long userId,
                           java.lang.String comment)
        Create new comment
        Parameters:
        userId - Id of user, -1 if not available
        comment - comment
        Returns:
        created comment
      • newComment

        @NotNull
        Comment newComment​(@Nullable
                           SUser user,
                           java.lang.String comment)
        Creates new comment
        Parameters:
        user - user
        comment - comment
        Returns:
        new comment
      • findComment

        @Nullable
        Comment findComment​(long commentId)
        Find comment by comment Id
        Parameters:
        commentId - comment identifier
        Returns:
        found comment object or null
      • createComment

        @NotNull
        Comment createComment​(long commentId,
                              long userId,
                              java.lang.String comment,
                              java.util.Date timestamp)
        Used to create Comment object from existing data, for example loaded from SQL query. If brand new comment should be created, use newComment method
        Parameters:
        commentId - id of the comment to be created
        userId - Id of user, -1 if not available
        comment - comment text
        timestamp - when comment was created
        Returns:
        see above