public class AlertRule extends java.lang.Object implements AlertConstants, java.lang.Comparable
ALERT_TRIGGER_DELETION_PROP, CTXT_DELETE_ALERT, HTML_MARKUP, MSG_PREFIX_PROP, NAME_PREFIX_PROP, TEXT_MARKUP, WIKI_MARKUP
Constructor and Description |
---|
AlertRule() |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object obj) |
boolean |
containsAlertChannel(AlertChannel alertChannel)
Returns true if this AlertRule contains the given alertChannel.
|
boolean |
equals(java.lang.Object obj) |
static AlertRule |
fromJSON(java.lang.String json) |
java.lang.String[] |
getAlertChannels() |
java.util.Set<AlertChannel> |
getAlertChannelSet() |
java.lang.String |
getAlertFullName()
Returns the full name (i.e. domain + "." + name) of the alert type of this AlertRule.
|
java.lang.String |
getAlertLabel(java.lang.String userLang)
Returns the label of the alert type of this AlertRule.
|
static java.util.Set<AlertRule> |
getAlertRuleSet(java.lang.String json) |
java.lang.String |
getDomain() |
Alert.Level |
getLevel() |
java.lang.String |
getLevelKey() |
java.lang.String |
getName() |
boolean |
isEmpty()
Returns true if this AlertRule is empty (i.e. no level, no domain and no alert channel).
|
boolean |
matches(Alert alert)
Returns true if the given alert match this rule.
|
boolean |
notEmpty()
Returns true if this AlertRule is not empty (i.e. a level, a domain or an alert channel).
|
void |
setAlertChannels(java.lang.String[] alertChannels) |
void |
setAlertChannelSet(java.util.Set<AlertChannel> alertChannelSet) |
void |
setDomain(java.lang.String domain) |
void |
setLevel(Alert.Level level) |
void |
setLevelKey(java.lang.String key) |
void |
setName(java.lang.String name) |
java.lang.String |
toJSON() |
static java.lang.String |
toJSON(java.util.Set<AlertRule> ruleSet) |
java.lang.String |
toString() |
public boolean matches(Alert alert)
alert
- the alertpublic int compareTo(java.lang.Object obj)
compareTo
in interface java.lang.Comparable
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public Alert.Level getLevel()
public void setLevel(Alert.Level level)
public java.lang.String getLevelKey()
public void setLevelKey(java.lang.String key)
public java.lang.String getDomain()
public void setDomain(java.lang.String domain)
public java.lang.String getName()
public void setName(java.lang.String name)
public java.util.Set<AlertChannel> getAlertChannelSet()
public void setAlertChannelSet(java.util.Set<AlertChannel> alertChannelSet)
public java.lang.String[] getAlertChannels()
public void setAlertChannels(java.lang.String[] alertChannels)
public boolean isEmpty()
public boolean notEmpty()
public boolean containsAlertChannel(AlertChannel alertChannel)
alertChannel
- the alertChannelpublic java.lang.String getAlertFullName()
public java.lang.String getAlertLabel(java.lang.String userLang)
userLang
- the user languagepublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toJSON()
public static java.lang.String toJSON(java.util.Set<AlertRule> ruleSet)
public static java.util.Set<AlertRule> getAlertRuleSet(java.lang.String json)
public static AlertRule fromJSON(java.lang.String json)
Copyright © 2001-2010 Jalios SA. All Rights Reserved.