org.blojsom.plugin.registration
Class RegistrationNotification

java.lang.Object
  extended byorg.blojsom.plugin.notification.AbstractNotification
      extended byorg.blojsom.plugin.notification.AbstractVelocityEmailNotification
          extended byorg.blojsom.plugin.registration.RegistrationNotification
All Implemented Interfaces:
Notification, org.springframework.web.context.ServletContextAware

public class RegistrationNotification
extends AbstractVelocityEmailNotification

RegistrationNotification

Version:
$Id: RegistrationNotification.java,v 1.2 2007/01/17 02:35:05 czarneckid Exp $
Author:
Eric Broyles

Field Summary
 
Fields inherited from class org.blojsom.plugin.notification.AbstractNotification
charEncoding, contentType, emailTemplate, mailServer
 
Constructor Summary
RegistrationNotification(org.apache.commons.mail.Email email, java.net.URL emailTemplate, User user, Blog blog)
          Create a new registration notification
 
Method Summary
protected  java.util.List convertElementsToString(javax.mail.Address[] addresses)
          Convert a list of addresses into the list
protected  java.util.List getBlindCarbonCopyRecipients()
          Retrieve the list of BCC recipients
protected  java.util.List getCarbonCopyRecipients()
          Retrieve the list of CC recipients
 org.apache.commons.mail.Email getEmail()
          Retrieve the e-mail message
protected  java.util.List getRecipients()
          Retrieve the list of recipients
protected  java.lang.String getSender()
          Retrieve the sender
protected  java.lang.String getSubject()
          Retrieve the subject
 void send()
          Send the e-mail
 void setEmail(org.apache.commons.mail.Email email)
          Set the e-mail message
 
Methods inherited from class org.blojsom.plugin.notification.AbstractVelocityEmailNotification
get, getMessage, put, putAll, setServletContext
 
Methods inherited from class org.blojsom.plugin.notification.AbstractNotification
encodeRegexCharacters, getEmailTemplate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegistrationNotification

public RegistrationNotification(org.apache.commons.mail.Email email,
                                java.net.URL emailTemplate,
                                User user,
                                Blog blog)
                         throws javax.mail.MessagingException
Create a new registration notification

Parameters:
email - E-mail message
emailTemplate - URL for template
user - User
blog - Blog
Throws:
javax.mail.MessagingException - If there is an error setting the e-mail content
Method Detail

getBlindCarbonCopyRecipients

protected java.util.List getBlindCarbonCopyRecipients()
Description copied from class: AbstractNotification
Retrieve the list of BCC recipients

Specified by:
getBlindCarbonCopyRecipients in class AbstractNotification
Returns:
List of BCC recipients
See Also:
AbstractNotification.getBlindCarbonCopyRecipients()

getCarbonCopyRecipients

protected java.util.List getCarbonCopyRecipients()
Description copied from class: AbstractNotification
Retrieve the list of CC recipients

Specified by:
getCarbonCopyRecipients in class AbstractNotification
Returns:
List of CC recipients
See Also:
AbstractNotification.getBlindCarbonCopyRecipients()

getRecipients

protected java.util.List getRecipients()
Description copied from class: AbstractNotification
Retrieve the list of recipients

Specified by:
getRecipients in class AbstractNotification
Returns:
Recipients
See Also:
AbstractNotification.getRecipients()

getSender

protected java.lang.String getSender()
Description copied from class: AbstractNotification
Retrieve the sender

Specified by:
getSender in class AbstractNotification
Returns:
Sender
See Also:
AbstractNotification.getSender()

getSubject

protected java.lang.String getSubject()
Description copied from class: AbstractNotification
Retrieve the subject

Specified by:
getSubject in class AbstractNotification
Returns:
Subject
See Also:
AbstractNotification.getSubject()

getEmail

public org.apache.commons.mail.Email getEmail()
Retrieve the e-mail message

Returns:
E-mail message

setEmail

public void setEmail(org.apache.commons.mail.Email email)
Set the e-mail message

Parameters:
email - E-mail message

send

public void send()
          throws org.apache.commons.mail.EmailException
Send the e-mail

Specified by:
send in interface Notification
Overrides:
send in class AbstractNotification
Throws:
org.apache.commons.mail.EmailException - If there is an error sending the e-mail

convertElementsToString

protected java.util.List convertElementsToString(javax.mail.Address[] addresses)
Convert a list of addresses into the list

Parameters:
addresses - Array of addresses
Returns:
List of addresses