All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.yodlee.sdk.builder.ConfigValidationUtil Maven / Gradle / Ivy

There is a newer version: 1.0.29.beta1
Show newest 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.sdk.builder;

import java.util.ArrayList;
import java.util.List;
import com.yodlee.api.model.validator.Problem;
import com.yodlee.api.model.validator.Validator;
import com.yodlee.sdk.api.exception.ApiException;
import com.yodlee.sdk.api.validators.ApiValidator;
import com.yodlee.sdk.configuration.cobrand.AbstractBaseConfiguration;

public class ConfigValidationUtil {

	private ConfigValidationUtil() {}

	public static void validateConfig(AbstractBaseConfiguration configuration) throws ApiException {
		List configProblems = new ArrayList<>();
		if (configuration == null) {
			configProblems.add(new Problem("Configuration is required", ""));
		} else {
			configProblems.addAll(Validator.validate(configuration));
		}
		ApiValidator.collectProblems(configProblems);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy