Package com.jalios.jcms.alert
Class BasicAlertPolicyFilter
java.lang.Object
com.jalios.jcms.policy.AbstractPolicyFilter
com.jalios.jcms.alert.BasicAlertPolicyFilter
- All Implemented Interfaces:
AlertPolicyFilter,PluginComponent,PolicyFilter,Comparable
This class provides default implementation for AlertPolicyFilter
- Since:
- jcms-8.0.0
- Author:
- Olivier Dedieu
-
Field Summary
Fields inherited from class com.jalios.jcms.policy.AbstractPolicyFilter
order -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbeforeSendAlert(Alert alert, AlertChannel alertChannel) This method is called before sending an alert in a given alert channel.getAlertChannelSet(Alert alert, Set<AlertChannel> alertChannelSet) This method is called before sending an alert to filter the alert channel set to use.booleanInitialize the component with the given plugin configurationbooleanThis method is called before saving an alert.Methods inherited from class com.jalios.jcms.policy.AbstractPolicyFilter
compareTo, equals, getOrder, setOrderMethods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareTo
-
Constructor Details
-
BasicAlertPolicyFilter
public BasicAlertPolicyFilter()
-
-
Method Details
-
init
Description copied from interface:PluginComponentInitialize the component with the given plugin configuration- Specified by:
initin interfacePluginComponent- Parameters:
plugin- the calling plugin- Returns:
- true if the component has been correctly initialized.
-
getAlertChannelSet
Description copied from interface:AlertPolicyFilterThis method is called before sending an alert to filter the alert channel set to use.- Specified by:
getAlertChannelSetin interfaceAlertPolicyFilter- Parameters:
alert- the alertalertChannelSet- the proposed alertChannelSet for this alert. Do not modify it.- Returns:
- the alertChannelSet to use for this sending.
-
beforeSendAlert
Description copied from interface:AlertPolicyFilterThis method is called before sending an alert in a given alert channel.- Specified by:
beforeSendAlertin interfaceAlertPolicyFilter- Parameters:
alert- the alertalertChannel- the alertChannel- Returns:
- the alert to be sent in the given AlertChannel
-
saveAlert
Description copied from interface:AlertPolicyFilterThis method is called before saving an alert.- Specified by:
saveAlertin interfaceAlertPolicyFilter- Parameters:
alert- the alert to be savedsaveAlert- the default value- Returns:
- true if the alert must saved false otherwise
-