code: protected void demoteSeverity(ValidationPlanResult planResult,
  			Severity maxSeverity) {
  		if (Severity.ERROR.equals(maxSeverity)) {
  			return;
  		}
  		for (ValidationMessage<?> message : planResult.getMessages()) {
  			switch (message.getSeverity()) {
  			case ERROR:
  				message.setSeverity(maxSeverity);
  				break;
  			case WARNING:
  				message.setSeverity(maxSeverity);
  				break;
  			}
  		}
  	}
docs: Demotes of severity to a specified level (maxSeverity) for all messages.
  
  @param planResult a validation result
  @param maxSeverity a maximum severity