private final Integer id;
private final String name;
private final String severity;
+ private final String type;
private final String description;
private final String internalKey;
private final RuleStatus status;
this.id = newRule.id;
this.name = newRule.name;
this.severity = newRule.severity;
+ this.type = newRule.type;
this.description = newRule.description;
this.internalKey = newRule.internalKey;
this.status = newRule.status;
return severity;
}
+ @CheckForNull
+ public String type() {
+ return type;
+ }
+
@Override
public String description() {
return description;
String name;
String description;
String severity = DEFAULT_SEVERITY;
+ String type;
String internalKey;
RuleStatus status = RuleStatus.defaultStatus();
Map<String, NewRuleParam> params = new HashMap<>();
this.severity = StringUtils.defaultIfBlank(severity, DEFAULT_SEVERITY);
return this;
}
+
+ public NewRule setType(@Nullable String type) {
+ this.type = type;
+ return this;
+ }
public NewRule setStatus(@Nullable RuleStatus s) {
this.status = (RuleStatus) ObjectUtils.defaultIfNull(s, RuleStatus.defaultStatus());
}
- private LoadedActiveRule createActiveRuleWithParam(String repositoryKey, String ruleKey, @Nullable String templateRuleKey, String name, @Nullable String severity,
- @Nullable String internalKey, @Nullable String languag, String paramKey, String paramValue) {
+ private LoadedActiveRule createActiveRuleWithParam(String repositoryKey, String ruleKey, @Nullable String templateRuleKey, String name,
+ @Nullable String severity, @Nullable String internalKey, @Nullable String languag, String paramKey, String paramValue) {
LoadedActiveRule r = new LoadedActiveRule();
r.setInternalKey(internalKey);