Search in sources :

Example 16 with Template

use of io.quarkus.qute.Template in project quarkus-openapi-generator by quarkiverse.

the class QuteTemplatingEngineAdapter method cacheTemplates.

public void cacheTemplates(TemplatingExecutor executor) {
    for (String templateId : INCLUDE_TEMPLATES) {
        Template incTemplate = engine.getTemplate(templateId);
        if (incTemplate == null) {
            incTemplate = engine.parse(executor.getFullTemplateContents(templateId));
            engine.putTemplate(templateId, incTemplate);
        }
    }
}
Also used : Template(io.quarkus.qute.Template)

Aggregations

Template (io.quarkus.qute.Template)16 HashMap (java.util.HashMap)8 Mail (io.quarkus.mailer.Mail)7 ServiceExecutionError (io.automatiko.engine.api.workflow.ServiceExecutionError)6 TemplateInstance (io.quarkus.qute.TemplateInstance)4 Path (java.nio.file.Path)4 IOException (java.io.IOException)3 TemplateEngine (dev.jbang.util.TemplateEngine)2 Util (dev.jbang.util.Util)2 BufferedWriter (java.io.BufferedWriter)2 File (java.io.File)2 Files (java.nio.file.Files)2 Optional (java.util.Optional)2 Collectors (java.util.stream.Collectors)2 CommandLine (picocli.CommandLine)2 Cache (dev.jbang.Cache)1 Settings (dev.jbang.Settings)1 CP_SEPARATOR (dev.jbang.Settings.CP_SEPARATOR)1 TemplateProperty (dev.jbang.catalog.TemplateProperty)1 ExitException (dev.jbang.cli.ExitException)1