com.atlassian.bamboo.notification.transports
Class TextEmailTransport

java.lang.Object
  extended by com.atlassian.bamboo.notification.transports.TextEmailTransport
All Implemented Interfaces:
NotificationTransport

@ThreadSafe
public class TextEmailTransport
extends java.lang.Object

Knows how to send text emails to the given email address.


Constructor Summary
TextEmailTransport(java.lang.String emailAddress, com.atlassian.event.api.EventPublisher eventPublisher, AdministrationConfigurationManager administrationConfigurationManager)
           
 
Method Summary
protected  com.atlassian.mail.Email beginEmail(Notification notification)
          Creates a new Email object with information that is common to all e-mail notifications.
 int compareTo(java.lang.Object obj)
           
 boolean equals(java.lang.Object o)
           
 java.lang.String getEmailAddress()
           
 int hashCode()
           
protected  void send(com.atlassian.mail.Email email)
          Publishes the e-mail event to the publishing service
 void sendNotification(Notification notification)
          Send off the notification of this transport type.
protected  com.atlassian.mail.Email updateEmail(com.atlassian.mail.Email email, Notification notification)
          Applies notification-specific customizations to the e-mail as provided for in the ExtendedNotification interface.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextEmailTransport

public TextEmailTransport(java.lang.String emailAddress,
                          com.atlassian.event.api.EventPublisher eventPublisher,
                          AdministrationConfigurationManager administrationConfigurationManager)
Method Detail

sendNotification

public void sendNotification(@NotNull
                             Notification notification)
Description copied from interface: NotificationTransport
Send off the notification of this transport type.

Parameters:
notification - object (used to generate notification content)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

compareTo

public int compareTo(java.lang.Object obj)

beginEmail

protected com.atlassian.mail.Email beginEmail(@NotNull
                                              Notification notification)
                                       throws java.lang.Exception
Creates a new Email 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:
java.lang.Exception - if Notification.getEmailSubject() does

updateEmail

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 the ExtendedNotification interface.

Parameters:
email - the e-mail to be altered
notification - 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 java.lang.String getEmailAddress()


Copyright © 2012 Atlassian. All Rights Reserved.