com.jalios.jcms.alert
Class BasicAlertPolicyFilter

java.lang.Object
  extended by com.jalios.jcms.policy.AbstractPolicyFilter
      extended by com.jalios.jcms.alert.BasicAlertPolicyFilter
All Implemented Interfaces:
AlertPolicyFilter, PluginComponent, PolicyFilter, Comparable

public class BasicAlertPolicyFilter
extends AbstractPolicyFilter
implements AlertPolicyFilter

This class provides default implementation for AlertPolicyFilter

Since:
jcms-8.0.0
Version:
$Revision: 43280 $
Author:
Olivier Dedieu

Field Summary
 
Fields inherited from class com.jalios.jcms.policy.AbstractPolicyFilter
order
 
Fields inherited from interface com.jalios.jcms.plugin.PluginComponent
REVISION
 
Constructor Summary
BasicAlertPolicyFilter()
           
 
Method Summary
 Alert beforeSendAlert(Alert alert, AlertChannel alertChannel)
          This method is called before sending an alert in a given alert channel.
 Set<AlertChannel> getAlertChannelSet(Alert alert, Set<AlertChannel> alertChannelSet)
          This method is called before sending an alert to filter the alert channel set to use.
 boolean init(Plugin plugin)
          Initialize the component with the given plugin configuration
 boolean saveAlert(Alert alert, boolean saveAlert)
          This method is called before saving an alert.
 
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
 

Constructor Detail

BasicAlertPolicyFilter

public BasicAlertPolicyFilter()
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 component has been correctly initialized.

getAlertChannelSet

public Set<AlertChannel> getAlertChannelSet(Alert alert,
                                            Set<AlertChannel> alertChannelSet)
Description copied from interface: AlertPolicyFilter
This method is called before sending an alert to filter the alert channel set to use.

Specified by:
getAlertChannelSet in interface AlertPolicyFilter
Parameters:
alert - the alert
alertChannelSet - the proposed alertChannelSet for this alert
Returns:
the alertChannelSet to use for this sending.

beforeSendAlert

public Alert beforeSendAlert(Alert alert,
                             AlertChannel alertChannel)
Description copied from interface: AlertPolicyFilter
This method is called before sending an alert in a given alert channel.

Specified by:
beforeSendAlert in interface AlertPolicyFilter
Parameters:
alert - the alert
alertChannel - the alertChannel
Returns:
the alert to be sent in the given AlertChannel

saveAlert

public boolean saveAlert(Alert alert,
                         boolean saveAlert)
Description copied from interface: AlertPolicyFilter
This method is called before saving an alert.

Specified by:
saveAlert in interface AlertPolicyFilter
Parameters:
alert - the alert to be saved
saveAlert - the default value
Returns:
true if the alert must saved false otherwise


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