com.jalios.jcms.policy
Class BasicMailPolicyFilter

java.lang.Object
  extended by com.jalios.jcms.policy.AbstractPolicyFilter
      extended by com.jalios.jcms.policy.BasicMailPolicyFilter
All Implemented Interfaces:
PluginComponent, MailPolicyFilter, PolicyFilter, Comparable

public class BasicMailPolicyFilter
extends AbstractPolicyFilter
implements MailPolicyFilter, PluginComponent

Default implementation of MailPolicyFilter.

This implementation does nothing a let the mail be sent.

Since:
jcms-6.0.1
Version:
$Revision: 23251 $
See Also:
MailPolicyFilter

Field Summary
static String REVISION
           
 
Fields inherited from class com.jalios.jcms.policy.AbstractPolicyFilter
order
 
Constructor Summary
BasicMailPolicyFilter()
           
 
Method Summary
 void afterSendMail(MailMessage msg, HashMap<String,Object> ctxt)
          Invoked after a mail was sent.
 boolean beforeSendMail(MailMessage msg, HashMap<String,Object> ctxt)
          Invoked before a mail is sent.
 boolean init(Plugin plugin)
          Initialize the component with the given plugin configuration
 
Methods inherited from class com.jalios.jcms.policy.AbstractPolicyFilter
compareTo, equals, getOrder, setOrder
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values
Constructor Detail

BasicMailPolicyFilter

public BasicMailPolicyFilter()
Method Detail

init

public boolean init(Plugin plugin)
Description copied from interface: PluginComponent
Initialize the component with the given plugin configuration

Specified by:
init in interface PluginComponent
Parameters:
plugin - the calling plugin
Returns:
true if the conponent has been correctly initialized.
Since:
jcms-6.0.1
See Also:
PluginComponent.init(Plugin)

beforeSendMail

public boolean beforeSendMail(MailMessage msg,
                              HashMap<String,Object> ctxt)
Invoked before a mail is sent.

Specified by:
beforeSendMail in interface MailPolicyFilter
Parameters:
msg - the MailMessage instance that will be sent
ctxt - a context used to store information for this mail sending (context is used accross beforeSendMail and afterSensMail)
Returns:
true to stop the sending, false to continue. implementation of BasicMailPolicyFilter is to return false

afterSendMail

public void afterSendMail(MailMessage msg,
                          HashMap<String,Object> ctxt)
Invoked after a mail was sent.

This method may not be invoked if an exception occured during sending or if sending was cancelled by a MailPolicyFilter in beforeSendMail.

Specified by:
afterSendMail in interface MailPolicyFilter
Parameters:
msg - the MailMessage instance that was sent
ctxt - a context used to store information for this mail sending (context is used accross beforeSendMail and afterSensMail)


Copyright © 2001-2007 Jalios SA. All Rights Reserved.