use of com.sequenceiq.environment.parameters.v1.converter.EnvironmentParametersConverter in project cloudbreak by hortonworks.
the class ParametersService method saveParameters.
public BaseParameters saveParameters(Environment environment, ParametersDto parametersDto) {
BaseParameters savedParameters = null;
if (parametersDto != null) {
LOGGER.debug("Saving parameters for environment. Parameters: {}", parametersDto);
EnvironmentParametersConverter environmentParametersConverter = environmentParamsConverterMap.get(getCloudPlatform(environment));
if (environmentParametersConverter != null) {
BaseParameters parameters = environmentParametersConverter.convert(environment, parametersDto);
parameters.setId(getIfNotNull(parametersDto, ParametersDto::getId));
parameters.setAccountId(environment.getAccountId());
savedParameters = save(parameters);
}
}
return savedParameters;
}
Aggregations