if (editedDirective == null && waf.getLastWafRuleDirective() != null) {
editedDirective = waf.getLastWafRuleDirective();
}
RealTimeProtectionGeneratorFactory factory = new RealTimeProtectionGeneratorFactory(
wafRuleDao, wafRuleDirectiveDao);
RealTimeProtectionGenerator generator = factory.getTracker(waf.getWafType().getName());
if (generator != null) {
if (editedDirective == null) {
editedDirective = generator.getDefaultDirective(waf);
}