com.yodlee.api.model.validator.Validator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of yodlee-api-model-beta Show documentation
Show all versions of yodlee-api-model-beta Show documentation
Yodlee API Model Beta is the stage version
/**
* Copyright (c) 2019 Yodlee, Inc. All Rights Reserved.
*
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
package com.yodlee.api.model.validator;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import javax.validation.ConstraintViolation;
import javax.validation.Validation;
import javax.validation.ValidatorFactory;
public class Validator {
public static List validate(final Object modelComponent) {
final List problems = new ArrayList<>();
if (modelComponent != null) {
final Set> constraintViolations =
APIModelValidatorFactory.SINGLE_INSTANCE.getValidator().validate(modelComponent);
if (!constraintViolations.isEmpty()) {
for (ConstraintViolation
© 2015 - 2024 Weber Informatics LLC | Privacy Policy