Class NewChangeSender
- java.lang.Object
-
- com.google.gerrit.server.mail.send.OutgoingEmail
-
- com.google.gerrit.server.mail.send.NotificationEmail
-
- com.google.gerrit.server.mail.send.ChangeEmail
-
- com.google.gerrit.server.mail.send.NewChangeSender
-
- Direct Known Subclasses:
AddReviewerSender
,CreateChangeSender
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
authors, change, changeData, changeMessage, emailOnlyAuthors, patchSet, patchSetInfo, projectState, stars, timestamp
-
Fields inherited from class com.google.gerrit.server.mail.send.NotificationEmail
branch
-
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<com.google.gerrit.mail.Address> cc)
void
addReviewers(Collection<Account.Id> cc)
void
addReviewersByEmail(Collection<com.google.gerrit.mail.Address> cc)
protected void
formatChange()
Format the message body by callingOutgoingEmail.appendText(String)
.List<String>
getReviewerNames()
protected void
init()
Setup the message headers and envelope (TO, CC, BCC).protected void
setupSoyContext()
protected boolean
supportsHtml()
Override this method to enable HTML in a subclass.-
Methods inherited from class com.google.gerrit.server.mail.send.ChangeEmail
add, bccStarredBy, ccAllApprovals, ccExistingReviewers, format, formatFooter, getAuthors, getChangeDetail, getChangeMessageThreadId, getChangeUrl, getCoverLetter, getIncludeDiff, getPatchList, getPatchList, getProjectState, getUnifiedDiff, getWatchers, isVisibleTo, newChangeData, rcptToAuthors, removeUsersThatIgnoredTheChange, setChangeMessage, setFrom, setPatchSet, setPatchSet
-
Methods inherited from class com.google.gerrit.server.mail.send.NotificationEmail
add, getInstanceAndProjectName, getShortProjectName, getSshHost, includeWatchers, includeWatchers
-
Methods inherited from class com.google.gerrit.server.mail.send.OutgoingEmail
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
-
-
-
-
Constructor Detail
-
NewChangeSender
protected NewChangeSender(EmailArguments args, ChangeData changeData)
-
-
Method Detail
-
addReviewers
public void addReviewers(Collection<Account.Id> cc)
-
addReviewersByEmail
public void addReviewersByEmail(Collection<com.google.gerrit.mail.Address> cc)
-
addExtraCC
public void addExtraCC(Collection<Account.Id> cc)
-
addExtraCCByEmail
public void addExtraCCByEmail(Collection<com.google.gerrit.mail.Address> cc)
-
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
-
supportsHtml
protected boolean supportsHtml()
Description copied from class:OutgoingEmail
Override this method to enable HTML in a subclass.- Overrides:
supportsHtml
in classOutgoingEmail
-
-