Class MultipartEmailTransport
- java.lang.Object
-
- com.atlassian.bamboo.notification.transports.MultipartEmailTransport
-
- All Implemented Interfaces:
NotificationTransport
@ThreadSafe public class MultipartEmailTransport extends Object
-
-
Constructor Summary
Constructors Constructor Description MultipartEmailTransport(String emailAddress, com.atlassian.event.api.EventPublisher eventPublisher, NotificationFormatter notificationFormatter, AdministrationConfigurationAccessor administrationConfigurationAccessor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.atlassian.mail.Email
beginEmail(@NotNull Notification notification)
Creates a newEmail
object with information that is common to all e-mail notifications.boolean
equals(Object o)
String
getEmailAddress()
int
hashCode()
protected void
send(com.atlassian.mail.Email email)
Publishes the e-mail event to the publishing servicevoid
sendNotification(@NotNull Notification notification)
Send off the notification of this transport type.protected com.atlassian.mail.Email
updateEmail(@NotNull com.atlassian.mail.Email email, @NotNull Notification notification)
Applies notification-specific customizations to the e-mail as provided for in theExtendedNotification
interface.
-
-
-
Constructor Detail
-
MultipartEmailTransport
public MultipartEmailTransport(String emailAddress, com.atlassian.event.api.EventPublisher eventPublisher, NotificationFormatter notificationFormatter, AdministrationConfigurationAccessor administrationConfigurationAccessor)
-
-
Method Detail
-
sendNotification
public void sendNotification(@NotNull @NotNull Notification notification)
Description copied from interface:NotificationTransport
Send off the notification of this transport type.- Parameters:
notification
- object (used to generate notification content)
-
beginEmail
protected com.atlassian.mail.Email beginEmail(@NotNull @NotNull Notification notification) throws Exception
Creates a newEmail
object with information that is common to all e-mail notifications.- Parameters:
notification
- the notification to be sent to the transport- Returns:
- the newly initialized e-mail data
- Throws:
Exception
- ifNotification.getEmailSubject()
does
-
updateEmail
protected com.atlassian.mail.Email updateEmail(@NotNull @NotNull com.atlassian.mail.Email email, @NotNull @NotNull Notification notification)
Applies notification-specific customizations to the e-mail as provided for in theExtendedNotification
interface.- Parameters:
email
- the e-mail to be alterednotification
- the notification to be sent to the transport- Returns:
- email, possibly with modifications
-
send
protected void send(com.atlassian.mail.Email email)
Publishes the e-mail event to the publishing service- Parameters:
email
- the completed e-mail to be sent
-
getEmailAddress
public String getEmailAddress()
-
-