Search in sources :

Example 1 with ConfigDecodingException

use of com.epam.pipeline.exception.ConfigDecodingException in project cloud-pipeline by epam.

the class PipelineVersionManager method createConfigVO.

private PipelineSourceItemVO createConfigVO(List<ConfigurationEntry> currentConfigurations, String updatedConfig, String message) {
    String configContent;
    try {
        configContent = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(currentConfigurations);
    } catch (JsonProcessingException e) {
        throw new ConfigDecodingException(updatedConfig, e);
    }
    PipelineSourceItemVO source = new PipelineSourceItemVO();
    source.setPath(CONFIG_FILE_NAME);
    source.setContents(configContent);
    source.setComment(message);
    return source;
}
Also used : PipelineSourceItemVO(com.epam.pipeline.controller.vo.PipelineSourceItemVO) ConfigDecodingException(com.epam.pipeline.exception.ConfigDecodingException) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException)

Aggregations

PipelineSourceItemVO (com.epam.pipeline.controller.vo.PipelineSourceItemVO)1 ConfigDecodingException (com.epam.pipeline.exception.ConfigDecodingException)1 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)1