Class CommentSender


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

      • CommentSender

        @Inject
        public CommentSender​(EmailArguments ea,
                             CommentsUtil commentsUtil,
                             org.eclipse.jgit.lib.Config cfg,
                             Project.NameKey project,
                             Change.Id id)
                      throws com.google.gwtorm.server.OrmException
        Throws:
        com.google.gwtorm.server.OrmException
    • Method Detail

      • setComments

        public void setComments​(List<Comment> comments)
                         throws com.google.gwtorm.server.OrmException
        Throws:
        com.google.gwtorm.server.OrmException
      • setPatchSetComment

        public void setPatchSetComment​(String comment)
      • hasInlineComments

        @Deprecated
        public boolean hasInlineComments()
        Deprecated.
        No longer used outside Velocity. Remove this method when VTL support is removed.
      • getInlineComments

        @Deprecated
        public String getInlineComments()
        Deprecated.
        No longer used outside Velocity. Remove this method when VTL support is removed.
      • getInlineComments

        @Deprecated
        public String getInlineComments​(int lines)
        Deprecated.
        No longer used outside Velocity. Remove this method when VTL support is removed.
      • 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)
      • supportsHtml

        protected boolean supportsHtml()
        Description copied from class: OutgoingEmail
        Override this method to enable HTML in a subclass.
        Overrides:
        supportsHtml in class OutgoingEmail