Class AddKeySender
- java.lang.Object
-
- com.google.gerrit.server.mail.send.OutgoingEmail
-
- com.google.gerrit.server.mail.send.AddKeySender
-
public class AddKeySender extends OutgoingEmail
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceAddKeySender.Factory
-
Field Summary
-
Fields inherited from class com.google.gerrit.server.mail.send.OutgoingEmail
args, footers, fromId, messageClass, notify, soyContext, soyContextEmailData
-
-
Constructor Summary
Constructors Constructor Description AddKeySender(EmailArguments args, IdentifiedUser user, AccountSshKey sshKey)AddKeySender(EmailArguments args, IdentifiedUser user, List<String> gpgKeys)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidformat()Format the message body by callingOutgoingEmail.appendText(String).StringgetEmail()StringgetGpgKeys()StringgetKeyType()StringgetSshKey()StringgetUserNameEmail()protected voidinit()Setup the message headers and envelope (TO, CC, BCC).protected voidsetupSoyContext()protected booleanshouldSendMessage()protected booleansupportsHtml()Override this method to enable HTML in a subclass.-
Methods inherited from class com.google.gerrit.server.mail.send.OutgoingEmail
add, add, add, add, add, add, add, add, addByEmail, addByEmail, appendHtml, appendText, getFromLine, getGerritHost, getNameEmailFor, getNameFor, getSettingsUrl, getUserNameEmailFor, isVisibleTo, removeHeader, removeUser, send, setFrom, setHeader, setHeader, setNotify, soyHtmlTemplate, textTemplate, useHtml
-
-
-
-
Constructor Detail
-
AddKeySender
public AddKeySender(EmailArguments args, IdentifiedUser user, AccountSshKey sshKey)
-
AddKeySender
public AddKeySender(EmailArguments args, IdentifiedUser user, List<String> gpgKeys)
-
-
Method Detail
-
init
protected void init() throws com.google.gerrit.exceptions.EmailExceptionDescription copied from class:OutgoingEmailSetup the message headers and envelope (TO, CC, BCC).- Overrides:
initin classOutgoingEmail- Throws:
com.google.gerrit.exceptions.EmailException- if an error occurred.
-
shouldSendMessage
protected boolean shouldSendMessage()
- Overrides:
shouldSendMessagein classOutgoingEmail
-
format
protected void format() throws com.google.gerrit.exceptions.EmailExceptionDescription copied from class:OutgoingEmailFormat the message body by callingOutgoingEmail.appendText(String).- Specified by:
formatin classOutgoingEmail- Throws:
com.google.gerrit.exceptions.EmailException
-
getEmail
public String getEmail()
-
getUserNameEmail
public String getUserNameEmail()
-
getKeyType
public String getKeyType()
-
getSshKey
public String getSshKey()
-
getGpgKeys
public String getGpgKeys()
-
setupSoyContext
protected void setupSoyContext()
- Overrides:
setupSoyContextin classOutgoingEmail
-
supportsHtml
protected boolean supportsHtml()
Description copied from class:OutgoingEmailOverride this method to enable HTML in a subclass.- Overrides:
supportsHtmlin classOutgoingEmail
-
-