public BpmnFileInputsValidator()

in src/main/java/com/epam/digital/data/platform/registry/regulation/validation/cli/validator/bpmn/BpmnFileInputsValidator.java [115:130]


  public BpmnFileInputsValidator(String elementTemplatePath, List<String> defaultRoles) {
    this.defaultRoles = defaultRoles;
    var jsonFile = new File(elementTemplatePath);

    var objectMapper = new Jackson2ObjectMapperBuilder()
        .failOnUnknownProperties(false)
        .build();

    try {
      elementTemplates = objectMapper.readValue(jsonFile, new ElementTemplateListTypeReference())
          .stream()
          .collect(Collectors.toMap(ElementTemplate::getId, Function.identity()));
    } catch (IOException e) {
      throw new IllegalStateException("During reading elementTemplates file occurred error.", e);
    }
  }