public class BasicMailPolicyFilter extends AbstractPolicyFilter implements MailPolicyFilter, PluginComponent
This implementation does nothing a let the mail be sent.
MailPolicyFilter
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
REVISION |
order
Constructor and Description |
---|
BasicMailPolicyFilter() |
Modifier and Type | Method and Description |
---|---|
void |
afterSendMail(MailMessage msg,
java.util.HashMap<java.lang.String,java.lang.Object> ctxt)
Invoked after a mail was sent.
|
boolean |
beforeSendMail(MailMessage msg,
java.util.HashMap<java.lang.String,java.lang.Object> ctxt)
Invoked before a mail is sent.
|
boolean |
fetchMessage(MailMessage mail,
boolean stored,
java.util.Map<java.lang.String,java.lang.Object> ctxt)
Invoked after a mail was fetch.
|
boolean |
init(Plugin plugin)
Initialize the component with the given plugin configuration
|
compareTo, equals, getOrder, setOrder
public static final java.lang.String REVISION
public boolean init(Plugin plugin)
PluginComponent
init
in interface PluginComponent
plugin
- the calling pluginPluginComponent.init(Plugin)
public boolean beforeSendMail(MailMessage msg, java.util.HashMap<java.lang.String,java.lang.Object> ctxt)
beforeSendMail
in interface MailPolicyFilter
msg
- the MailMessage instance that will be sentctxt
- a context used to store information for this mail sending
(context is used accross beforeSendMail and afterSensMail)public void afterSendMail(MailMessage msg, java.util.HashMap<java.lang.String,java.lang.Object> ctxt)
This method may not be invoked if an exception occured during sending or if sending was cancelled by a MailPolicyFilter in beforeSendMail.
afterSendMail
in interface MailPolicyFilter
msg
- the MailMessage instance that was sentctxt
- a context used to store information for this mail sending
(context is used accross beforeSendMail and afterSensMail)public boolean fetchMessage(MailMessage mail, boolean stored, java.util.Map<java.lang.String,java.lang.Object> ctxt)
fetchMessage
in interface MailListener
mail
- the javax.mail.Message fetchedstored
- boolean to store MailMessage in JCMSctxt
- a context used to store informationCopyright © 2001-2017 Jalios SA. All Rights Reserved.