import java.util.List;
import java.util.Optional;
import org.onap.oom.certservice.postprocessor.configuration.path.env.EnvReader;
-import org.onap.oom.certservice.postprocessor.configuration.exception.CertificatesPathsValidationException;
import org.onap.oom.certservice.postprocessor.configuration.exception.ConfigurationException;
import org.onap.oom.certservice.postprocessor.configuration.model.AppConfiguration;
import org.onap.oom.certservice.postprocessor.configuration.model.EnvVariable;
this.pathsSplitter = pathsSplitter;
}
- public AppConfiguration createConfiguration()
- throws ConfigurationException, CertificatesPathsValidationException {
-
+ public AppConfiguration createConfiguration() {
List<String> truststoresPaths = getPaths(TRUSTSTORES_PATHS);
List<String> truststoresPasswordsPaths = getPaths(TRUSTSTORES_PASSWORDS_PATHS);
List<String> sourceKeystorePaths = getPaths(KEYSTORE_SOURCE_PATHS);
destinationKeystorePaths);
}
- private List<String> getPaths(EnvVariable envVariable) throws ConfigurationException {
+ private List<String> getPaths(EnvVariable envVariable) {
Optional<String> envValue = envReader.getEnv(envVariable.name());
isMandatoryEnvPresent(envVariable, envValue);
return envValue.isPresent() ? pathsSplitter.getValidatedPaths(envVariable, envValue) : Collections.emptyList();
}
private void ensureSameSize(List<String> firstList, List<String> secondList, String firstListEnvName,
- String secondListEnvName) throws ConfigurationException {
+ String secondListEnvName) {
if (firstList.size() != secondList.size()) {
throw new ConfigurationException(
"Size of " + firstListEnvName