예제 #1
0
 /** Rule was activated */
 public void activated(int profileId, int activeRuleId, String userName) {
   ActiveRule activeRule = getSession().getEntity(ActiveRule.class, activeRuleId);
   RulesProfile profile = getSession().getEntity(RulesProfile.class, profileId);
   ruleEnabled(profile, activeRule, userName);
   // Notify child profiles
   activatedOrChanged(profileId, activeRuleId, userName);
 }
예제 #2
0
  /** Rule severity was changed */
  public void ruleSeverityChanged(
      int profileId,
      int activeRuleId,
      RulePriority oldSeverity,
      RulePriority newSeverity,
      String userName) {
    ActiveRule activeRule = getSession().getEntity(ActiveRule.class, activeRuleId);
    RulesProfile profile = getSession().getEntity(RulesProfile.class, profileId);

    ruleSeverityChanged(profile, activeRule.getRule(), oldSeverity, newSeverity, userName);

    // Notify child profiles
    activatedOrChanged(profileId, activeRuleId, userName);
  }
예제 #3
0
  /** Rule param was changed */
  public void ruleParamChanged(
      int profileId,
      int activeRuleId,
      String paramKey,
      String oldValue,
      String newValue,
      String userName) {
    ActiveRule activeRule = getSession().getEntity(ActiveRule.class, activeRuleId);
    RulesProfile profile = getSession().getEntity(RulesProfile.class, profileId);

    ruleParamChanged(profile, activeRule.getRule(), paramKey, oldValue, newValue, userName);

    // Notify child profiles
    activatedOrChanged(profileId, activeRuleId, userName);
  }