final List<Constraint> selectedConstraints = new ArrayList<>();
if (constraintNames != null) {
for (String constraintName : constraintNames) {
Constraint concept = ruleSet.getConstraints().get(constraintName);
if (concept == null) {
throw new RuleSetResolverException("The constraint '" + constraintName + "' is not defined.");
}
selectedConstraints.add(concept);
}
}
return selectedConstraints;