Class AlertRule

    • Constructor Detail

      • AlertRule

        public AlertRule()
    • Method Detail

      • matches

        public boolean matches​(Alert alert)
        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

        public int compareTo​(AlertRule other)
        Specified by:
        compareTo in interface java.lang.Comparable<AlertRule>
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • setLevel

        public void setLevel​(Alert.Level level)
      • getLevelKey

        public java.lang.String getLevelKey()
      • setLevelKey

        public void setLevelKey​(java.lang.String key)
      • getDomain

        public java.lang.String getDomain()
      • setDomain

        public void setDomain​(java.lang.String domain)
      • getName

        public java.lang.String getName()
      • setName

        public void setName​(java.lang.String name)
      • getAlertChannelSet

        public java.util.Set<AlertChannel> getAlertChannelSet()
      • setAlertChannelSet

        public void setAlertChannelSet​(java.util.Set<AlertChannel> alertChannelSet)
      • getAlertChannels

        public java.lang.String[] getAlertChannels()
      • setAlertChannels

        public void setAlertChannels​(java.lang.String[] alertChannels)
      • 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

        public boolean containsAlertChannel​(AlertChannel alertChannel)
        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

        public java.lang.String 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

        public java.lang.String getAlertLabel​(java.lang.String userLang)
        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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toJSON

        public java.lang.String toJSON()
      • toJSON

        public static java.lang.String toJSON​(java.util.Set<AlertRule> ruleSet)
      • getAlertRuleSet

        public static java.util.Set<AlertRule> getAlertRuleSet​(java.lang.String json)
      • fromJSON

        public static AlertRule fromJSON​(java.lang.String json)