use of org.sonar.api.config.PropertyFieldDefinition in project sonarqube by SonarSource.
the class SetAction method checkFieldType.
private static void checkFieldType(SetRequest request, PropertyDefinition definition, ListMultimap<String, String> valuesByFieldKeys) {
for (PropertyFieldDefinition fieldDefinition : definition.fields()) {
for (String value : valuesByFieldKeys.get(fieldDefinition.key())) {
PropertyDefinition.Result result = fieldDefinition.validate(value);
checkRequest(result.isValid(), "Error when validating setting with key '%s'. Field '%s' has incorrect value '%s'.", request.getKey(), fieldDefinition.key(), value);
}
}
}
Aggregations