Class TemplateConfiguration


  • @Singleton
    public class TemplateConfiguration
    extends Object
    The base configuration for the Freemarker template engine.
    • Constructor Detail

      • TemplateConfiguration

        @Inject
        public TemplateConfiguration()
        Default constructor.
    • Method Detail

      • init

        public void init​(String basePath)
        Initialize Freemarker.
        Parameters:
        basePath - The base path for the templates.
      • getTemplate

        public freemarker.template.Template getTemplate​(String templateName)
                                                 throws CluecumberException
        Retrieve a template by template name.
        Parameters:
        templateName - The template name without file extension.
        Returns:
        The Template instance.
        Throws:
        CluecumberException - Thrown on missing or wrong templates.s