public abstract class NotificationEmail extends OutgoingEmail
Modifier and Type | Field and Description |
---|---|
protected com.google.gerrit.reviewdb.client.Branch.NameKey |
branch |
protected com.google.gerrit.reviewdb.client.Project.NameKey |
project |
args, fromId, messageClass, velocityContext
Modifier | Constructor and Description |
---|---|
protected |
NotificationEmail(EmailArguments ea,
java.lang.String mc,
com.google.gerrit.reviewdb.client.Project.NameKey project,
com.google.gerrit.reviewdb.client.Branch.NameKey branch) |
Modifier and Type | Method and Description |
---|---|
protected void |
add(RecipientType type,
com.google.gerrit.server.mail.ProjectWatch.Watchers.List list)
Add users or email addresses to the TO, CC, or BCC list.
|
java.lang.String |
getListId() |
java.lang.String |
getSshHost() |
protected abstract ProjectWatch.Watchers |
getWatchers(com.google.gerrit.reviewdb.client.AccountProjectWatch.NotifyType type)
Returns all watchers that are relevant
|
protected void |
includeWatchers(com.google.gerrit.reviewdb.client.AccountProjectWatch.NotifyType type)
Include users and groups that want notification of events.
|
protected void |
init()
Setup the message headers and envelope (TO, CC, BCC).
|
protected void |
setupVelocityContext() |
add, add, add, add, appendText, format, getFromLine, getGerritHost, getGerritUrl, getNameEmailFor, getNameFor, getSettingsUrl, isVisibleTo, joinStrings, joinStrings, send, setFrom, setHeader, setHeader, setVHeader, shouldSendMessage, velocify, velocifyFile
protected com.google.gerrit.reviewdb.client.Project.NameKey project
protected com.google.gerrit.reviewdb.client.Branch.NameKey branch
protected NotificationEmail(EmailArguments ea, java.lang.String mc, com.google.gerrit.reviewdb.client.Project.NameKey project, com.google.gerrit.reviewdb.client.Branch.NameKey branch)
protected void init() throws com.google.gerrit.common.errors.EmailException
OutgoingEmail
init
in class OutgoingEmail
com.google.gerrit.common.errors.EmailException
- if an error occurred.public java.lang.String getListId() throws com.google.gerrit.common.errors.EmailException
com.google.gerrit.common.errors.EmailException
protected void includeWatchers(com.google.gerrit.reviewdb.client.AccountProjectWatch.NotifyType type)
protected abstract ProjectWatch.Watchers getWatchers(com.google.gerrit.reviewdb.client.AccountProjectWatch.NotifyType type) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
protected void add(RecipientType type, com.google.gerrit.server.mail.ProjectWatch.Watchers.List list)
public java.lang.String getSshHost()
protected void setupVelocityContext()
setupVelocityContext
in class OutgoingEmail