com.jalios.jcms.policy
Class AbstractDataMailPolicyFilter

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

public abstract class AbstractDataMailPolicyFilter
extends BasicMailPolicyFilter


Field Summary
protected  org.apache.log4j.Logger logger
           
 
Fields inherited from class com.jalios.jcms.policy.BasicMailPolicyFilter
REVISION
 
Fields inherited from class com.jalios.jcms.policy.AbstractPolicyFilter
order
 
Constructor Summary
AbstractDataMailPolicyFilter()
           
 
Method Summary
protected  String generateAuthKey(Member mbr, Data data)
          Returns a Base64( Id + ';' + MD5(Id + Password))
protected  String getContentFooter(Member toMbr, Data data)
          Returns a default content footer for the given data
protected  String getContentFooter(Member toMbr, Data data, String topic, String address)
          Returns a default content footer for the given data
protected  String getFooterSeparator()
          Returns footer separator
 boolean init(Plugin plugin)
          Initialize the component with the given plugin configuration
protected  Data isValidAuthKey(Member mbr, String content)
          Parse mail content to find a valid authentication key and associated Data
 
Methods inherited from class com.jalios.jcms.policy.BasicMailPolicyFilter
afterSendMail, beforeSendMail, fetchMessage
 
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

logger

protected org.apache.log4j.Logger logger
Constructor Detail

AbstractDataMailPolicyFilter

public AbstractDataMailPolicyFilter()
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
Overrides:
init in class BasicMailPolicyFilter
Parameters:
plugin - the calling plugin
Returns:
true if the component has been correctly initialized.
See Also:
PluginComponent.init(Plugin)

getFooterSeparator

protected String getFooterSeparator()
Returns footer separator

Returns:
String separator

generateAuthKey

protected String generateAuthKey(Member mbr,
                                 Data data)
Returns a Base64( Id + ';' + MD5(Id + Password))

Parameters:
mbr - the Member
data - the data
Returns:
String base64 value

isValidAuthKey

protected Data isValidAuthKey(Member mbr,
                              String content)
Parse mail content to find a valid authentication key and associated Data

Parameters:
mbr - the Member performing the reply
content - the data text
Returns:
Data the crypted data or null

getContentFooter

protected String getContentFooter(Member toMbr,
                                  Data data)
Returns a default content footer for the given data

Parameters:
toMbr - the Member
data - the data
Returns:
String footer

getContentFooter

protected String getContentFooter(Member toMbr,
                                  Data data,
                                  String topic,
                                  String address)
Returns a default content footer for the given data

Parameters:
toMbr - the Member
data - the data
topic - the mail topic
address - the address to reply
Returns:
String footer


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