Class HandlebarsTemplateCompiler

  • All Implemented Interfaces:
    TemplateCompiler

    public class HandlebarsTemplateCompiler
    extends Object
    implements TemplateCompiler
    Template compiler implementation that uses Handlebarsto compile a template.
    Since:
    0.1.2
    Author:
    nandorholozsnyak
    • Constructor Detail

      • HandlebarsTemplateCompiler

        public HandlebarsTemplateCompiler()
    • Method Detail

      • compileTemplate

        public String compileTemplate​(String templatePath,
                                      TemplateData templateData)
                               throws DocumentGenerationException
        Description copied from interface: TemplateCompiler
        Compiles the template with the given template data.

        If the template is not found an exception must be raised.

        Specified by:
        compileTemplate in interface TemplateCompiler
        Parameters:
        templatePath - path to the template that the compiler can understand and work with.
        templateData - template data.
        Returns:
        templated populated and compiled with the given template data.
        Throws:
        DocumentGenerationException - when the template compiler occurs an error.