public class CommentSender extends ReplyToChangeSender
Modifier and Type | Class and Description |
---|---|
static interface |
CommentSender.Factory |
authors, change, changeData, changeMessage, emailOnlyAuthors, patchSet, patchSetInfo, projectState, stars, timestamp
branch
args, footers, fromId, messageClass, notify, soyContext, soyContextEmailData
Constructor and Description |
---|
CommentSender(EmailArguments ea,
CommentsUtil commentsUtil,
org.eclipse.jgit.lib.Config cfg,
Project.NameKey project,
Change.Id id) |
Modifier and Type | Method and Description |
---|---|
void |
formatChange()
Format the message body by calling
OutgoingEmail.appendText(String) . |
void |
formatFooter()
Format the message footer by calling
OutgoingEmail.appendText(String) . |
protected static java.lang.String |
getShortenedCommentMessage(Comment comment) |
protected static java.lang.String |
getShortenedCommentMessage(java.lang.String message) |
protected void |
init()
Setup the message headers and envelope (TO, CC, BCC).
|
void |
setComments(java.util.List<Comment> comments) |
void |
setLabels(java.util.List<LabelVote> labels) |
void |
setPatchSetComment(java.lang.String comment) |
protected void |
setupSoyContext() |
protected boolean |
supportsHtml()
Override this method to enable HTML in a subclass.
|
add, bccStarredBy, ccAllApprovals, ccExistingReviewers, format, getAuthors, getChangeDetail, getChangeMessageThreadId, getChangeUrl, getCoverLetter, getIncludeDiff, getPatchList, getPatchList, getProjectState, getUnifiedDiff, getWatchers, isVisibleTo, newChangeData, rcptToAuthors, removeUsersThatIgnoredTheChange, setChangeMessage, setFrom, setPatchSet, setPatchSet
add, getInstanceAndProjectName, getShortProjectName, getSshHost, includeWatchers, includeWatchers
add, add, add, add, add, add, add, addByEmail, addByEmail, appendHtml, appendText, getFromLine, getGerritHost, getNameEmailFor, getNameFor, getSettingsUrl, getUserNameEmailFor, removeHeader, removeUser, send, setHeader, setHeader, setNotify, shouldSendMessage, soyHtmlTemplate, textTemplate, useHtml
@Inject public CommentSender(EmailArguments ea, CommentsUtil commentsUtil, org.eclipse.jgit.lib.Config cfg, Project.NameKey project, Change.Id id)
public void setComments(java.util.List<Comment> comments)
public void setPatchSetComment(java.lang.String comment)
public void setLabels(java.util.List<LabelVote> labels)
protected void init() throws com.google.gerrit.exceptions.EmailException
ChangeEmail
init
in class ReplyToChangeSender
com.google.gerrit.exceptions.EmailException
- if an error occurred.public void formatChange() throws com.google.gerrit.exceptions.EmailException
ChangeEmail
OutgoingEmail.appendText(String)
.formatChange
in class ChangeEmail
com.google.gerrit.exceptions.EmailException
public void formatFooter() throws com.google.gerrit.exceptions.EmailException
ChangeEmail
OutgoingEmail.appendText(String)
.formatFooter
in class ChangeEmail
com.google.gerrit.exceptions.EmailException
- if an error occurred.protected static java.lang.String getShortenedCommentMessage(java.lang.String message)
protected static java.lang.String getShortenedCommentMessage(Comment comment)
protected void setupSoyContext()
setupSoyContext
in class ChangeEmail
protected boolean supportsHtml()
OutgoingEmail
supportsHtml
in class OutgoingEmail