Class EventProcessingPolicyRule

java.lang.Object
org.netxms.client.events.EventProcessingPolicyRule

public class EventProcessingPolicyRule extends Object
This class represents single rule of event processing policy.
  • Field Details

  • Constructor Details

    • EventProcessingPolicyRule

      public EventProcessingPolicyRule()
      Create empty rule
    • EventProcessingPolicyRule

      public EventProcessingPolicyRule(EventProcessingPolicyRule src)
      Copy constructor
      Parameters:
      src - source rule
    • EventProcessingPolicyRule

      public EventProcessingPolicyRule(NXCPMessage msg, int ruleNumber)
      Create rule from NXCP message.
      Parameters:
      msg - NXCP message
      ruleNumber - this rule number
  • Method Details

    • fillMessage

      public void fillMessage(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
    • getFilterScript

      public String getFilterScript()
      Returns:
      the script
    • setFilterScript

      public void setFilterScript(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
    • getSourceExclusions

      public List<Long> getSourceExclusions()
      Returns:
      the sourceExclusions
    • setSourceExclusions

      public void setSourceExclusions(List<Long> sourceExclusions)
      Parameters:
      sourceExclusions - the sourceExclusions to set
    • getEvents

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

      public List<ActionExecutionConfiguration> getActions()
      Returns:
      the actions
    • 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
    • setActions

      public void setActions(List<ActionExecutionConfiguration> actions)
      Parameters:
      actions - the actions 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
    • isTimeFramesInverted

      public boolean isTimeFramesInverted()
      Check rule's NEGATED_TIME_FRAMES flag
      Returns:
      true if NEGATED_TIME_FRAMES 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
    • getActionScript

      public String getActionScript()
      Returns:
      the actionScript
    • setActionScript

      public void setActionScript(String actionScript)
      Parameters:
      actionScript - the actionScript to set
    • getCustomAttributeStorageSet

      public Map<String,String> getCustomAttributeStorageSet()
      Returns:
      the customAttributeStorageSet
    • setCustomAttributeStorageSet

      public void setCustomAttributeStorageSet(Map<String,String> customAttributeStorageSet)
      Parameters:
      customAttributeStorageSet - the customAttributeStorageSet to set
    • getCustomAttributeStorageDelete

      public List<String> getCustomAttributeStorageDelete()
      Returns:
      the customAttributeStorageDelete
    • setCustomAttributeStorageDelete

      public void setCustomAttributeStorageDelete(List<String> customAttributeStorageDelete)
      Parameters:
      customAttributeStorageDelete - the customAttributeStorageDelete to set
    • getTimeFrames

      public List<TimeFrame> getTimeFrames()
      Returns:
      the timeFrames
    • setTimeFrames

      public void setTimeFrames(List<TimeFrame> timeFrames)
      Parameters:
      timeFrames - the timeFrames to set