|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.jira.mail.builder.EmailBuilder
public class EmailBuilder
This should be used for creation of all email messages in JIRA, it allows to encapsulate the logic of rendering emails.
Constructor Summary | |
---|---|
EmailBuilder(Email email,
NotificationRecipient notificationRecipient)
|
|
EmailBuilder(Email email,
NotificationRecipient notificationRecipient,
IssueEvent event)
|
|
EmailBuilder(Email email,
String mimeType,
Locale recipientLocale)
|
|
EmailBuilder(Email email,
String mimeType,
Locale recipientLocale,
IssueEvent issueEvent)
|
Method Summary | |
---|---|
EmailBuilder |
addAttachment(javax.mail.BodyPart bodyPart)
Specified attachment will be added to rendered e-mail unchanged. |
EmailBuilder |
addAttachments(Collection<javax.mail.BodyPart> bodyParts)
Specified attachments will be added to rendered e-mail unchanged. |
EmailBuilder |
addParameters(Map<String,Object> templateParameters)
|
com.atlassian.mail.queue.MailQueueItem |
renderLater()
Returns a MailQueueItem which will render email message during send |
Email |
renderNow()
Blocking method - renders e-mail message in current thread |
com.atlassian.mail.queue.SingleMailQueueItem |
renderNowAsQueueItem()
Invokes renderNow() and wraps the result in SingleMailQueueItem |
EmailBuilder |
withBody(String bodyTemplate)
|
EmailBuilder |
withBodyFromFile(String bodyTemplatePath)
|
EmailBuilder |
withSubject(String subjectTemplate)
Render subject with specified Velocity template This is optional |
EmailBuilder |
withSubjectFromFile(String subjectTemplatePath)
Render subject with Velocity template from specified file This is optional |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EmailBuilder(Email email, String mimeType, Locale recipientLocale, IssueEvent issueEvent)
public EmailBuilder(Email email, String mimeType, Locale recipientLocale)
public EmailBuilder(Email email, NotificationRecipient notificationRecipient, IssueEvent event)
public EmailBuilder(Email email, NotificationRecipient notificationRecipient)
Method Detail |
---|
public EmailBuilder addAttachment(javax.mail.BodyPart bodyPart)
bodyPart
-
public EmailBuilder addAttachments(Collection<javax.mail.BodyPart> bodyParts)
bodyParts
-
public EmailBuilder withSubject(String subjectTemplate)
subjectTemplate
- Velocity template
public EmailBuilder withSubjectFromFile(String subjectTemplatePath)
subjectTemplatePath
- Path to Velocity file
public EmailBuilder withBody(String bodyTemplate)
public EmailBuilder withBodyFromFile(String bodyTemplatePath)
public EmailBuilder addParameters(Map<String,Object> templateParameters)
public com.atlassian.mail.queue.SingleMailQueueItem renderNowAsQueueItem() throws javax.mail.MessagingException
javax.mail.MessagingException
public Email renderNow() throws javax.mail.MessagingException
javax.mail.MessagingException
public com.atlassian.mail.queue.MailQueueItem renderLater()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |