public abstract class ChangeEmail extends NotificationEmail
Modifier and Type | Field and Description |
---|---|
protected java.util.Set<com.google.gerrit.reviewdb.client.Account.Id> |
authors |
protected com.google.gerrit.reviewdb.client.Change |
change |
protected ChangeData |
changeData |
protected com.google.gerrit.reviewdb.client.ChangeMessage |
changeMessage |
protected boolean |
emailOnlyAuthors |
protected com.google.gerrit.reviewdb.client.PatchSet |
patchSet |
protected com.google.gerrit.reviewdb.client.PatchSetInfo |
patchSetInfo |
protected ProjectState |
projectState |
branch, project
args, fromId, messageClass, velocityContext
Modifier | Constructor and Description |
---|---|
protected |
ChangeEmail(EmailArguments ea,
com.google.gerrit.reviewdb.client.Change c,
java.lang.String mc) |
Modifier and Type | Method and Description |
---|---|
protected void |
add(RecipientType rt,
com.google.gerrit.reviewdb.client.Account.Id to)
Schedule delivery of this message to the given account.
|
protected void |
bccStarredBy()
BCC any user who has starred this change.
|
protected void |
ccAllApprovals()
Any user who has published comments on this change.
|
protected void |
ccExistingReviewers()
Users who have non-zero approval codes on the change.
|
protected void |
format()
Format the message body by calling
OutgoingEmail.appendText(String) . |
protected abstract void |
formatChange()
Format the message body by calling
OutgoingEmail.appendText(String) . |
protected void |
formatChangeDetail()
Format the change message and the affected file list.
|
protected void |
formatCoverLetter()
Format the sender's "cover letter",
getCoverLetter() . |
protected void |
formatFooter()
Format the message footer by calling
OutgoingEmail.appendText(String) . |
protected java.util.Set<com.google.gerrit.reviewdb.client.Account.Id> |
getAuthors()
Find all users who are authors of any part of this change.
|
java.lang.String |
getChangeDetail()
Create the change message and the affected file list.
|
java.lang.String |
getChangeMessageThreadId() |
java.lang.String |
getChangeUrl()
Get a link to the change; null if the server doesn't know its own address.
|
java.lang.String |
getCoverLetter()
Get the text of the "cover letter", from
ChangeMessage . |
boolean |
getIncludeDiff() |
protected PatchList |
getPatchList()
Get the patch list corresponding to this patch set.
|
protected java.util.Set<com.google.gerrit.reviewdb.client.AccountGroup.UUID> |
getProjectOwners()
Get the groups which own the project.
|
protected ProjectState |
getProjectState()
Get the project entity the change is in; null if its been deleted.
|
java.lang.String |
getUnifiedDiff()
Show patch set as unified difference.
|
protected ProjectWatch.Watchers |
getWatchers(com.google.gerrit.reviewdb.client.AccountProjectWatch.NotifyType type)
Returns all watchers that are relevant
|
protected void |
init()
Setup the message headers and envelope (TO, CC, BCC).
|
protected boolean |
isVisibleTo(com.google.gerrit.reviewdb.client.Account.Id to) |
protected void |
rcptToAuthors(RecipientType rt)
TO or CC all vested parties (change owner, patch set uploader, author).
|
void |
setChangeMessage(com.google.gerrit.reviewdb.client.ChangeMessage cm) |
void |
setFrom(com.google.gerrit.reviewdb.client.Account.Id id) |
void |
setPatchSet(com.google.gerrit.reviewdb.client.PatchSet ps) |
void |
setPatchSet(com.google.gerrit.reviewdb.client.PatchSet ps,
com.google.gerrit.reviewdb.client.PatchSetInfo psi) |
protected void |
setupVelocityContext() |
add, getListId, getSshHost, includeWatchers
add, add, add, appendText, getFromLine, getGerritHost, getGerritUrl, getNameEmailFor, getNameFor, getSettingsUrl, joinStrings, joinStrings, send, setHeader, setHeader, setVHeader, shouldSendMessage, velocify, velocifyFile
protected final com.google.gerrit.reviewdb.client.Change change
protected final ChangeData changeData
protected com.google.gerrit.reviewdb.client.PatchSet patchSet
protected com.google.gerrit.reviewdb.client.PatchSetInfo patchSetInfo
protected com.google.gerrit.reviewdb.client.ChangeMessage changeMessage
protected ProjectState projectState
protected java.util.Set<com.google.gerrit.reviewdb.client.Account.Id> authors
protected boolean emailOnlyAuthors
protected ChangeEmail(EmailArguments ea, com.google.gerrit.reviewdb.client.Change c, java.lang.String mc)
public void setFrom(com.google.gerrit.reviewdb.client.Account.Id id)
setFrom
in class OutgoingEmail
public void setPatchSet(com.google.gerrit.reviewdb.client.PatchSet ps)
public void setPatchSet(com.google.gerrit.reviewdb.client.PatchSet ps, com.google.gerrit.reviewdb.client.PatchSetInfo psi)
public void setChangeMessage(com.google.gerrit.reviewdb.client.ChangeMessage cm)
protected void format() throws com.google.gerrit.common.errors.EmailException
OutgoingEmail.appendText(String)
.format
in class OutgoingEmail
com.google.gerrit.common.errors.EmailException
protected abstract void formatChange() throws com.google.gerrit.common.errors.EmailException
OutgoingEmail.appendText(String)
.com.google.gerrit.common.errors.EmailException
protected void formatFooter() throws com.google.gerrit.common.errors.EmailException
OutgoingEmail.appendText(String)
.com.google.gerrit.common.errors.EmailException
protected void init() throws com.google.gerrit.common.errors.EmailException
init
in class NotificationEmail
com.google.gerrit.common.errors.EmailException
public java.lang.String getChangeUrl()
public java.lang.String getChangeMessageThreadId() throws com.google.gerrit.common.errors.EmailException
com.google.gerrit.common.errors.EmailException
protected void formatCoverLetter()
getCoverLetter()
.public java.lang.String getCoverLetter()
ChangeMessage
.protected void formatChangeDetail()
public java.lang.String getChangeDetail()
protected PatchList getPatchList() throws PatchListNotAvailableException
PatchListNotAvailableException
protected ProjectState getProjectState()
protected java.util.Set<com.google.gerrit.reviewdb.client.AccountGroup.UUID> getProjectOwners()
protected void rcptToAuthors(RecipientType rt)
protected void bccStarredBy()
protected final ProjectWatch.Watchers getWatchers(com.google.gerrit.reviewdb.client.AccountProjectWatch.NotifyType type) throws com.google.gwtorm.server.OrmException
NotificationEmail
getWatchers
in class NotificationEmail
com.google.gwtorm.server.OrmException
protected void ccAllApprovals()
protected void ccExistingReviewers()
protected void add(RecipientType rt, com.google.gerrit.reviewdb.client.Account.Id to)
OutgoingEmail
add
in class OutgoingEmail
protected boolean isVisibleTo(com.google.gerrit.reviewdb.client.Account.Id to) throws com.google.gwtorm.server.OrmException
isVisibleTo
in class OutgoingEmail
com.google.gwtorm.server.OrmException
protected java.util.Set<com.google.gerrit.reviewdb.client.Account.Id> getAuthors()
protected void setupVelocityContext()
setupVelocityContext
in class NotificationEmail
public boolean getIncludeDiff()
public java.lang.String getUnifiedDiff()