public String render()

in src/main/java/com/epam/digital/data/platform/excerpt/worker/service/FreemarkerHtmlRenderer.java [43:60]


  public String render(ExcerptTemplate excerptTemplate, Object jsonData) {
    try (var htmlReport = new StringWriter()) {
      var template = new Template(excerptTemplate.getTemplateName(),
          excerptTemplate.getTemplate(), freemarker);
      template.process(jsonData, htmlReport);
      return htmlReport.toString();
    } catch (TemplateException e) {
      log.error("Template to html conversion exception", e);
      throw new ExcerptProcessingException(FAILED, "Template to HTML conversion fails");
    } catch (IOException e) {
      log.error("Template to html conversion IOException", e);
      throw new ExcerptProcessingException(FAILED,
          "IOException occurred while converting template to HTML");
    } catch (Exception e) {
      log.error("Template to html conversion Exception", e);
      throw new ExcerptProcessingException(FAILED, "Template to HTML conversion fails");
    }
  }