break;
case LogEvent.AFTER_RULEFLOW_GROUP_DEACTIVATED:
beforeEvents.pop();
break;
case LogEvent.BEFORE_PACKAGE_ADDED:
RuleBaseLogEvent ruleBaseEvent = (RuleBaseLogEvent) inEvent;
event.setString("Package added: " + ruleBaseEvent.getPackageName());
if (!beforeEvents.isEmpty()) {
((Event) beforeEvents.peek()).addSubEvent(event);
} else {
events.add(event);
}
beforeEvents.push(event);
break;
case LogEvent.AFTER_PACKAGE_ADDED:
beforeEvents.pop();
break;
case LogEvent.BEFORE_PACKAGE_REMOVED:
ruleBaseEvent = (RuleBaseLogEvent) inEvent;
event.setString("Package removed: " + ruleBaseEvent.getPackageName());
if (!beforeEvents.isEmpty()) {
((Event) beforeEvents.peek()).addSubEvent(event);
} else {
events.add(event);
}
beforeEvents.push(event);
break;
case LogEvent.AFTER_PACKAGE_REMOVED:
beforeEvents.pop();
break;
case LogEvent.BEFORE_RULE_ADDED:
ruleBaseEvent = (RuleBaseLogEvent) inEvent;
event.setString("Rule added: " + ruleBaseEvent.getRuleName());
if (!beforeEvents.isEmpty()) {
((Event) beforeEvents.peek()).addSubEvent(event);
} else {
events.add(event);
}
beforeEvents.push(event);
break;
case LogEvent.AFTER_RULE_ADDED:
if (!beforeEvents.isEmpty()) {
Event beforeEvent = (Event) beforeEvents.pop();
beforeEvent.addSubEvents(newActivations);
newActivations.clear();
}
break;
case LogEvent.BEFORE_RULE_REMOVED:
ruleBaseEvent = (RuleBaseLogEvent) inEvent;
event.setString("Rule removed: " + ruleBaseEvent.getRuleName());
if (!beforeEvents.isEmpty()) {
((Event) beforeEvents.peek()).addSubEvent(event);
} else {
events.add(event);
}