paramsByActiveRule.put(activeRuleDto.getId(), activeRuleParamDto);
}
}
- // TODO ruleRegistry.bulkIndexActiveRules(activeRuleDtos, paramsByActiveRule);
+ // TODO use RuleActivator to benefit from changelog and preview cache cleanup
}
private void processValidationMessages(ValidationMessages messages, QProfileResult result) {
.setExampleValue("java:MyProfile");
}
- private void bulkActivate(Request request, Response response) throws Exception {
+ private void bulkActivate(Request request, Response response) {
BulkChangeResult result = profileService.bulkActivate(
SearchAction.createRuleQuery(ruleService.newRuleQuery(), request),
request.mandatoryParam(PROFILE_KEY),
writeResponse(result, response);
}
- private void bulkDeactivate(Request request, Response response) throws Exception {
+ private void bulkDeactivate(Request request, Response response) {
BulkChangeResult result = profileService.bulkDeactivate(
SearchAction.createRuleQuery(ruleService.newRuleQuery(), request),
request.mandatoryParam(PROFILE_KEY));
.setExampleValue("squid:AvoidCycles");
}
- private void activate(Request request, Response response) throws Exception {
+ private void activate(Request request, Response response) {
RuleKey ruleKey = readRuleKey(request);
RuleActivation activation = new RuleActivation(ruleKey);
activation.setSeverity(request.param(SEVERITY));
service.activate(request.mandatoryParam(PROFILE_KEY), activation);
}
- private void deactivate(Request request, Response response) throws Exception {
+ private void deactivate(Request request, Response response) {
RuleKey ruleKey = readRuleKey(request);
service.deactivate(ActiveRuleKey.of(request.mandatoryParam(PROFILE_KEY), ruleKey));
}