Class NewChangeSender
- java.lang.Object
-
- com.google.gerrit.server.mail.send.OutgoingEmail
-
- com.google.gerrit.server.mail.send.ChangeEmail
-
- com.google.gerrit.server.mail.send.NewChangeSender
-
- Direct Known Subclasses:
CreateChangeSender
,ModifyReviewerSender
public abstract class NewChangeSender extends ChangeEmail
Sends an email alerting a user to a new change for them to review.
-
-
Field Summary
-
Fields inherited from class com.google.gerrit.server.mail.send.ChangeEmail
branch, change, changeData, changeMessage, emailOnlyAttentionSetIfEnabled, patchSet, patchSetInfo, projectState, stars, timestamp, watcherAccounts, watcherEmails
-
Fields inherited from class com.google.gerrit.server.mail.send.OutgoingEmail
args, footers, fromId, messageClass, notify, soyContext, soyContextEmailData
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
NewChangeSender(EmailArguments args, ChangeData changeData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addExtraCC(Collection<Account.Id> cc)
void
addExtraCCByEmail(Collection<Address> cc)
void
addRemovedByEmailReviewers(Collection<Address> removed)
void
addRemovedReviewers(Collection<Account.Id> removed)
void
addReviewers(Collection<Account.Id> cc)
void
addReviewersByEmail(Collection<Address> cc)
protected void
formatChange()
Format the message body by callingOutgoingEmail.appendText(String)
.protected void
init()
Setup the message headers and envelope (TO, CC, BCC).protected void
setupSoyContext()
-
Methods inherited from class com.google.gerrit.server.mail.send.ChangeEmail
addAuthors, bccStarredBy, ccAllApprovals, ccExistingReviewers, format, formatFooter, getAuthors, getChangeDetail, getChangeMessageThreadId, getChangeUrl, getCoverLetter, getDiffTemplateData, getIncludeDiff, getProjectState, getUnifiedDiff, includeWatchers, includeWatchers, isRecipientAllowed, isRecipientAllowed, listModifiedFiles, listModifiedFiles, newChangeData, newChangeData, setChangeMessage, setFrom, setPatchSet, setPatchSet
-
Methods inherited from class com.google.gerrit.server.mail.send.OutgoingEmail
addByAccountId, addByAccountId, addByEmail, addByEmail, addFooter, appendHtml, appendText, getFromLine, getGerritHost, getNameEmailFor, getNameFor, getSettingsUrl, getSoyContext, getSoyContextEmailData, getUserNameEmailFor, removeHeader, removeUser, send, setHeader, setHeader, setMessageId, setNotify, shouldSendMessage, soyHtmlTemplate, textTemplate, useHtml
-
-
-
-
Constructor Detail
-
NewChangeSender
protected NewChangeSender(EmailArguments args, ChangeData changeData)
-
-
Method Detail
-
addReviewers
public void addReviewers(Collection<Account.Id> cc)
-
addReviewersByEmail
public void addReviewersByEmail(Collection<Address> cc)
-
addExtraCC
public void addExtraCC(Collection<Account.Id> cc)
-
addExtraCCByEmail
public void addExtraCCByEmail(Collection<Address> cc)
-
addRemovedReviewers
public void addRemovedReviewers(Collection<Account.Id> removed)
-
addRemovedByEmailReviewers
public void addRemovedByEmailReviewers(Collection<Address> removed)
-
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 classChangeEmail
- Throws:
com.google.gerrit.exceptions.EmailException
- if an error occurred.
-
formatChange
protected void formatChange() throws com.google.gerrit.exceptions.EmailException
Description copied from class:ChangeEmail
Format the message body by callingOutgoingEmail.appendText(String)
.- Specified by:
formatChange
in classChangeEmail
- Throws:
com.google.gerrit.exceptions.EmailException
-
setupSoyContext
protected void setupSoyContext()
- Overrides:
setupSoyContext
in classChangeEmail
-
-