Search in sources :

Example 1 with ApplicationValidationErrors

use of com.netflix.spinnaker.front50.validator.ApplicationValidationErrors in project front50 by spinnaker.

the class ApplicationService method validate.

private void validate(Application application) {
    ApplicationValidationErrors errors = new ApplicationValidationErrors(application);
    validators.forEach(v -> v.validate(application, errors));
    if (errors.hasErrors()) {
        throw new ValidationException(errors);
    }
}
Also used : ValidationException(com.netflix.spinnaker.front50.exception.ValidationException) ApplicationValidationErrors(com.netflix.spinnaker.front50.validator.ApplicationValidationErrors)

Aggregations

ValidationException (com.netflix.spinnaker.front50.exception.ValidationException)1 ApplicationValidationErrors (com.netflix.spinnaker.front50.validator.ApplicationValidationErrors)1