}
private ActiveRules load(ProjectReferentials ref) {
ActiveRulesBuilder builder = new ActiveRulesBuilder();
for (ActiveRule activeRule : ref.activeRules()) {
NewActiveRule newActiveRule = builder.create(RuleKey.of(activeRule.repositoryKey(), activeRule.ruleKey()));
newActiveRule.setName(activeRule.name());
newActiveRule.setSeverity(activeRule.severity());
newActiveRule.setLanguage(activeRule.language());
newActiveRule.setInternalKey(activeRule.internalKey());
// load parameters
for (Entry<String, String> param : activeRule.params().entrySet()) {
newActiveRule.setParam(param.getKey(), param.getValue());
}
newActiveRule.activate();
}
return builder.build();
}