public abstract class NotificationEmail extends OutgoingEmail
Modifier and Type | Field and Description |
---|---|
protected Branch.NameKey |
branch |
args, footers, fromId, messageClass, notify, soyContext, soyContextEmailData
Modifier | Constructor and Description |
---|---|
protected |
NotificationEmail(EmailArguments ea,
java.lang.String mc,
Branch.NameKey branch) |
Modifier and Type | Method and Description |
---|---|
protected void |
add(RecipientType type,
com.google.gerrit.server.mail.send.ProjectWatch.Watchers.List list)
Add users or email addresses to the TO, CC, or BCC list.
|
protected static java.lang.String |
getInstanceAndProjectName(java.lang.String instanceName,
java.lang.String projectName) |
protected static java.lang.String |
getShortProjectName(java.lang.String projectName) |
java.lang.String |
getSshHost() |
protected abstract ProjectWatch.Watchers |
getWatchers(ProjectWatches.NotifyType type,
boolean includeWatchersFromNotifyConfig)
Returns all watchers that are relevant
|
protected void |
includeWatchers(ProjectWatches.NotifyType type)
Include users and groups that want notification of events.
|
protected void |
includeWatchers(ProjectWatches.NotifyType type,
boolean includeWatchersFromNotifyConfig)
Include users and groups that want notification of events.
|
protected void |
init()
Setup the message headers and envelope (TO, CC, BCC).
|
protected void |
setupSoyContext() |
add, add, add, add, add, add, add, add, addByEmail, addByEmail, appendHtml, appendText, format, getFromLine, getGerritHost, getNameEmailFor, getNameFor, getSettingsUrl, getUserNameEmailFor, isVisibleTo, removeHeader, removeUser, send, setFrom, setHeader, setHeader, setNotify, shouldSendMessage, soyHtmlTemplate, supportsHtml, textTemplate, useHtml
protected Branch.NameKey branch
protected NotificationEmail(EmailArguments ea, java.lang.String mc, Branch.NameKey branch)
protected void init() throws com.google.gerrit.exceptions.EmailException
OutgoingEmail
init
in class OutgoingEmail
com.google.gerrit.exceptions.EmailException
- if an error occurred.protected void includeWatchers(ProjectWatches.NotifyType type)
protected void includeWatchers(ProjectWatches.NotifyType type, boolean includeWatchersFromNotifyConfig)
protected abstract ProjectWatch.Watchers getWatchers(ProjectWatches.NotifyType type, boolean includeWatchersFromNotifyConfig)
protected void add(RecipientType type, com.google.gerrit.server.mail.send.ProjectWatch.Watchers.List list)
public java.lang.String getSshHost()
protected void setupSoyContext()
setupSoyContext
in class OutgoingEmail
protected static java.lang.String getShortProjectName(java.lang.String projectName)
protected static java.lang.String getInstanceAndProjectName(java.lang.String instanceName, java.lang.String projectName)