Package com.jalios.jcms.alert
Class AlertRule
java.lang.Object
com.jalios.jcms.alert.AlertRule
- All Implemented Interfaces:
AlertConstants,Comparable<AlertRule>
-
Field Summary
Fields inherited from interface com.jalios.jcms.alert.AlertConstants
ALERT_META_INFO_ATTRIBUTE, CTXT_DELETE_ALERT, HTML_MARKUP, MSG_PREFIX_PROP, NAME_PREFIX_PROP, NO_ALERT_FLAG, TEXT_MARKUP, WIKI_MARKUP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleancontainsAlertChannel(AlertChannel alertChannel) Returns true if this AlertRule contains the given alertChannel.booleanstatic AlertRuleString[]Returns the full name (i.e.getAlertLabel(String userLang) Returns the label of the alert type of this AlertRule.getAlertRuleSet(String json) getLevel()getName()booleanisEmpty()Returns true if this AlertRule is empty (i.e.booleanReturns true if the given alert matches this rule.booleannotEmpty()Returns true if this AlertRule is not empty (i.e.voidsetAlertChannels(String[] alertChannels) voidsetAlertChannelSet(Set<AlertChannel> alertChannelSet) voidvoidsetLevel(Alert.Level level) voidsetLevelKey(String key) voidtoJSON()static StringtoString()
-
Constructor Details
-
AlertRule
public AlertRule()
-
-
Method Details
-
matches
Returns true if the given alert matches this rule.- Parameters:
alert- the alert- Returns:
- true if the given alert matches this rule.
- Since:
- jcms-8.0.0
-
compareTo
- Specified by:
compareToin interfaceComparable<AlertRule>
-
equals
-
getLevel
-
setLevel
-
getLevelKey
-
setLevelKey
-
getDomain
-
setDomain
-
getName
-
setName
-
getAlertChannelSet
-
setAlertChannelSet
-
getAlertChannels
-
setAlertChannels
-
isEmpty
public boolean isEmpty()Returns true if this AlertRule is empty (i.e. no level, no domain and no alert channel).- Returns:
- true if this AlertRule is empty (i.e. no level, no domain and no alert channel).
- Since:
- jcms-8.0.0
-
notEmpty
public boolean notEmpty()Returns true if this AlertRule is not empty (i.e. a level, a domain or at least one alert channel).- Returns:
- true if this AlertRule is not empty (i.e. a level, a domain or at least one alert channel).
- Since:
- jcms-8.0.0
-
containsAlertChannel
Returns true if this AlertRule contains the given alertChannel.- Parameters:
alertChannel- the alertChannel- Returns:
- true if this AlertRule contains the given alertChannel.
- Since:
- jcms-8.0.0
-
getAlertFullName
Returns the full name (i.e. domain + "." + name) of the alert type of this AlertRule.- Returns:
- the full name (i.e. domain + "." + name) of the alert type of this AlertRule.
- Since:
- jcms-8.0.0
-
getAlertLabel
Returns the label of the alert type of this AlertRule.- Parameters:
userLang- the user language- Returns:
- the label of the alert type of this AlertRule.
- Since:
- jcms-8.0.0
-
toString
-
toJSON
-
toJSON
-
getAlertRuleSet
-
fromJSON
-