Class TextEmailTransport
java.lang.Object
com.atlassian.bamboo.notification.transports.TextEmailTransport
- All Implemented Interfaces:
NotificationTransport
Knows how to send text emails to the given email address.
-
Constructor Summary
ConstructorsConstructorDescriptionTextEmailTransport(String emailAddress, com.atlassian.event.api.EventPublisher eventPublisher, AdministrationConfigurationAccessor administrationConfigurationAccessor) -
Method Summary
Modifier and TypeMethodDescriptionprotected com.atlassian.mail.EmailbeginEmail(@NotNull Notification notification) Creates a newEmailobject with information that is common to all e-mail notifications.intbooleaninthashCode()protected voidsend(com.atlassian.mail.Email email) Publishes the e-mail event to the publishing servicevoidsendNotification(@NotNull Notification notification) Send off the notification of this transport type.protected com.atlassian.mail.EmailupdateEmail(@NotNull com.atlassian.mail.Email email, @NotNull Notification notification) Applies notification-specific customizations to the e-mail as provided for in theExtendedNotificationinterface.
-
Constructor Details
-
TextEmailTransport
public TextEmailTransport(String emailAddress, com.atlassian.event.api.EventPublisher eventPublisher, AdministrationConfigurationAccessor administrationConfigurationAccessor)
-
-
Method Details
-
sendNotification
Description copied from interface:NotificationTransportSend off the notification of this transport type.- Parameters:
notification- object (used to generate notification content)
-
hashCode
public int hashCode() -
equals
-
compareTo
-
beginEmail
protected com.atlassian.mail.Email beginEmail(@NotNull @NotNull Notification notification) throws Exception Creates a newEmailobject 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 theExtendedNotificationinterface.- 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
-