com.antelmann.net.mail
Class TableCustomizer
java.lang.Object
com.antelmann.net.mail.TableCustomizer
- All Implemented Interfaces:
- EmailCustomizer
- Direct Known Subclasses:
- TableModelCustomizer
public class TableCustomizer
- extends Object
- implements EmailCustomizer
uses a map to customize emails.
The key of the main map is the email address and the corresponding value
is a map containing all properties for the given address.
- Author:
- Holger Antelmann
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
map
protected Map<String,Map<String,String>> map
TableCustomizer
public TableCustomizer(Map<String,Map<String,String>> map)
individualizeEmail
public void individualizeEmail(Email email,
javax.mail.internet.InternetAddress address)
throws javax.mail.MessagingException
- Description copied from interface:
EmailCustomizer
- this method is called by the
EmailAccount.send() method to individualize
the body of an email given the address.
- Specified by:
individualizeEmail in interface EmailCustomizer
- Throws:
javax.mail.MessagingException- See Also:
EmailAccount.sendEmails(Email, InternetAddress[], EmailCustomizer, Monitor)
customizeReplacement
protected void customizeReplacement(Email email,
javax.mail.internet.InternetAddress address,
Map<String,String> params)
- used to customize the replacement.
This implementation follows this rule:
All existing occurrences of ${key} will be replaced with the
value retrieved from the props parameter.
The props map will be filled with the row data for the given
address, with the column name as the key and the cell data as value.
If more sophisticated decision-making is required to construct the email
message, this method can simply be overwritten.
getAddresses
public String[] getAddresses()
getInternetAddresses
public javax.mail.internet.InternetAddress[] getInternetAddresses()
throws javax.mail.internet.AddressException
- Throws:
javax.mail.internet.AddressException
createTableModel
public TableModel createTableModel()
(c) 2001-2006 Holger Antelmann - all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads