Class EventProcessingPolicyRule


  • public class EventProcessingPolicyRule
    extends Object
    This class represents single rule of event processing policy.
    • Constructor Detail

      • EventProcessingPolicyRule

        public EventProcessingPolicyRule()
        Create empty rule
      • EventProcessingPolicyRule

        public EventProcessingPolicyRule​(org.netxms.base.NXCPMessage msg,
                                         int ruleNumber)
        Create rule from NXCP message.
        Parameters:
        msg - NXCP message
    • Method Detail

      • fillMessage

        public void fillMessage​(org.netxms.base.NXCPMessage msg)
        Fill NXCP message with rule's data
        Parameters:
        msg - NXCP message
      • getComments

        public String getComments()
        Get rule's comments.
        Returns:
        Rule's comments
      • setComments

        public void setComments​(String comments)
        Set rule's comments.
        Parameters:
        comments - New comments
      • getScript

        public String getScript()
        Returns:
        the script
      • setScript

        public void setScript​(String script)
        Parameters:
        script - the script to set
      • getFlags

        public int getFlags()
        Returns:
        the flags
      • setFlags

        public void setFlags​(int flags)
        Parameters:
        flags - the flags to set
      • getAlarmKey

        public String getAlarmKey()
        Returns:
        the alarmKey
      • setAlarmKey

        public void setAlarmKey​(String alarmKey)
        Parameters:
        alarmKey - the alarmKey to set
      • getAlarmMessage

        public String getAlarmMessage()
        Returns:
        the alarmMessage
      • setAlarmMessage

        public void setAlarmMessage​(String alarmMessage)
        Parameters:
        alarmMessage - the alarmMessage to set
      • getAlarmSeverity

        public Severity getAlarmSeverity()
        Returns:
        the alarmSeverity
      • setAlarmSeverity

        public void setAlarmSeverity​(Severity alarmSeverity)
        Parameters:
        alarmSeverity - the alarmSeverity to set
      • getAlarmTimeout

        public int getAlarmTimeout()
        Returns:
        the alarmTimeout
      • setAlarmTimeout

        public void setAlarmTimeout​(int alarmTimeout)
        Parameters:
        alarmTimeout - the alarmTimeout to set
      • getAlarmTimeoutEvent

        public long getAlarmTimeoutEvent()
        Returns:
        the alarmTimeoutEvent
      • setAlarmTimeoutEvent

        public void setAlarmTimeoutEvent​(long alarmTimeoutEvent)
        Parameters:
        alarmTimeoutEvent - the alarmTimeoutEvent to set
      • getAlarmCategories

        public List<Long> getAlarmCategories()
        Returns:
        alarmCategoryIds the alarm category ids
      • setAlarmCategories

        public void setAlarmCategories​(List<Long> alarmCategoryIds)
        Parameters:
        alarmCategoryIds - the alarm category ids to set
      • removeAlarmCategory

        public void removeAlarmCategory​(Long categoryId)
        Remove specific alarm category from categories list
        Parameters:
        categoryId - alarm category ID
      • getRcaScriptName

        public String getRcaScriptName()
        Get name of root cause analysis script.
        Returns:
        name of root cause analysis script (can be null or empty string if not set)
      • setRcaScriptName

        public void setRcaScriptName​(String rcaScriptName)
        Set name of root cause analysis script.
        Parameters:
        rcaScriptName - name of root cause analysis script (can be null or empty string to disable RCA)
      • getSources

        public List<Long> getSources()
        Returns:
        the sources
      • getEvents

        public List<Long> getEvents()
        Returns:
        the events
      • getPStorageSet

        public Map<String,​String> getPStorageSet()
        Returns:
        the persistentStorageSet
      • getPStorageDelete

        public List<String> getPStorageDelete()
        Returns:
        the persistentStorageDelete
      • setSources

        public void setSources​(List<Long> sources)
        Parameters:
        sources - the sources to set
      • setEvents

        public void setEvents​(List<Long> events)
        Parameters:
        events - the events to set
      • getTimerCancellations

        public List<String> getTimerCancellations()
        Returns:
        the timerCancellations
      • setTimerCancellations

        public void setTimerCancellations​(List<String> timerCancellations)
        Parameters:
        timerCancellations - the timerCancellations to set
      • setPStorageSet

        public void setPStorageSet​(Map<String,​String> persistentStorageSet)
        Parameters:
        persistentStorageSet - the persistentStorageSet to set
      • setPStorageDelete

        public void setPStorageDelete​(List<String> persistentStorageDelete)
        Parameters:
        persistentStorageDelete - the persistentStorageDelete to set
      • isDisabled

        public boolean isDisabled()
        Check rule's DISABLED flag
        Returns:
        true if DISABLED flag set
      • isSourceInverted

        public boolean isSourceInverted()
        Check rule's NEGATED_SOURCE flag
        Returns:
        true if NEGATED_SOURCE flag set
      • isEventsInverted

        public boolean isEventsInverted()
        Check rule's NEGATED_EVENTS flag
        Returns:
        true if NEGATED_EVENTS flag set
      • getGuid

        public UUID getGuid()
        Returns:
        the guid
      • getRuleNumber

        public int getRuleNumber()
        Get rule number
        Returns:
        rule number
      • setRuleNumber

        public void setRuleNumber​(int ruleNumber)
        Set rule number
        Parameters:
        ruleNumber - to set