com.acsinet_solutions.cetia4.service.impl
Class SimpleMailNotificationManager

java.lang.Object
  extended by com.acsinet_solutions.cetia4.service.impl.SimpleMailNotificationManager
All Implemented Interfaces:
NotificationManager

public class SimpleMailNotificationManager
extends java.lang.Object
implements NotificationManager

A simple notification manager that uses JavaMail to provide its notifications.

Author:
Santiago Arriaga

Constructor Summary
SimpleMailNotificationManager()
          Public constructor
 
Method Summary
 void notify(java.lang.String key, java.util.List addresses, java.util.Map<java.lang.String,java.lang.Object> params)
          Notify a message to the given List of adresses.
 void notify(java.lang.String key, java.util.Map<java.lang.String,java.lang.Object> params)
          Notify a message.
 void setBccAddress(java.lang.String bccAddress)
          Set the BCC address
 void setFromAddress(java.lang.String fromAddress)
          Set the from address
 void setSmtpProvider(java.lang.String smtpProvider)
          Set the mail SMTP provider
 void setTemplates(java.util.Map map)
          Set the templates and subjects for this notification manager.
 void setTextFactory(TextFactory textFactory)
          Set the associated text factory instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleMailNotificationManager

public SimpleMailNotificationManager()
Public constructor

Method Detail

setTextFactory

public final void setTextFactory(TextFactory textFactory)
Set the associated text factory instance.


setSmtpProvider

public final void setSmtpProvider(java.lang.String smtpProvider)
Set the mail SMTP provider


setFromAddress

public final void setFromAddress(java.lang.String fromAddress)
Set the from address


setBccAddress

public final void setBccAddress(java.lang.String bccAddress)
Set the BCC address


setTemplates

public final void setTemplates(java.util.Map map)
Set the templates and subjects for this notification manager. TODO: Support for mail addresses as a composite object of the map value.


notify

public void notify(java.lang.String key,
                   java.util.Map<java.lang.String,java.lang.Object> params)
            throws NotificationException
Description copied from interface: NotificationManager
Notify a message.

Specified by:
notify in interface NotificationManager
Parameters:
key - The not-null not-emtpy valid message key
params - The not-null maybe-empty Map instance with not-null not-empty String keys and not-null values.
Throws:
NotificationException

notify

public void notify(java.lang.String key,
                   java.util.List addresses,
                   java.util.Map<java.lang.String,java.lang.Object> params)
            throws NotificationException
Description copied from interface: NotificationManager
Notify a message to the given List of adresses.

Specified by:
notify in interface NotificationManager
Parameters:
key - The not-null not-emtpy valid message key.
addresses - A not-null maybe-empty List instance of not-null String instances representing valid addresses for the notification framework being used.
params - The not-null maybe-empty Map instance with not-null not-empty String keys and not-null values.
Throws:
NotificationException