activeRule.setInheritance(inheritance.name());
}
dao.update(dbSession, activeRule);
for (Map.Entry<String, String> param : change.getParameters().entrySet()) {
ActiveRuleParamDto activeRuleParamDto = context.activeRuleParamsAsMap().get(param.getKey());
if (activeRuleParamDto == null) {
// did not exist
if (param.getValue() != null) {
activeRuleParamDto = ActiveRuleParamDto.createFor(context.ruleParamsByKeys().get(param.getKey()));
activeRuleParamDto.setValue(param.getValue());
dao.addParam(dbSession, activeRule, activeRuleParamDto);
}
} else {
if (param.getValue() != null) {
activeRuleParamDto.setValue(param.getValue());
dao.updateParam(dbSession, activeRule, activeRuleParamDto);
} else {
dao.deleteParam(dbSession, activeRule, activeRuleParamDto);
}
}