Class CommentSender


  • public class CommentSender
    extends ReplyToChangeSender
    Send comments, after the author of them hit used Publish Comments in the UI.
    • Method Detail

      • setComments

        public void setComments​(List<? extends Comment> comments)
      • setPatchSetComment

        public void setPatchSetComment​(String comment)
      • init

        protected void init()
                     throws com.google.gerrit.exceptions.EmailException
        Description copied from class: ChangeEmail
        Setup the message headers and envelope (TO, CC, BCC).
        Overrides:
        init in class ReplyToChangeSender
        Throws:
        com.google.gerrit.exceptions.EmailException - if an error occurred.
      • formatFooter

        public void formatFooter()
                          throws com.google.gerrit.exceptions.EmailException
        Description copied from class: ChangeEmail
        Format the message footer by calling OutgoingEmail.appendText(String).
        Overrides:
        formatFooter in class ChangeEmail
        Throws:
        com.google.gerrit.exceptions.EmailException - if an error occurred.
      • getShortenedCommentMessage

        protected static String getShortenedCommentMessage​(String message)
        Returns a shortened version of the given comment's message. Will be shortened to 100 characters or the first line, or following the last period within the first 100 characters, whichever is shorter. If the message is shortened, an ellipsis is appended.
      • getShortenedCommentMessage

        protected static String getShortenedCommentMessage​(Comment comment)