Class HandlebarsEngineAdapter

    • Constructor Detail

      • HandlebarsEngineAdapter

        public HandlebarsEngineAdapter()
    • Method Detail

      • getIdentifier

        public String getIdentifier()
        Provides an identifier used to load the adapter. This could be a name, uuid, or any other string.
        Returns:
        A string identifier.
      • findTemplate

        public com.github.jknack.handlebars.io.TemplateSource findTemplate​(TemplatingExecutor generator,
                                                                           String templateFile)
      • getFileExtensions

        public String[] getFileExtensions()
      • handlesFile

        public boolean handlesFile​(String filename)
        Determine if the adapter handles compilation of the file
        Parameters:
        filename - The template filename
        Returns:
        True if the file should be compiled by this adapter, else false.
      • infiniteLoops

        public HandlebarsEngineAdapter infiniteLoops​(boolean infiniteLoops)
        Enable/disable infiniteLoops setting for the Handlebars engine. Enabling this allows for recursive partial inclusion.
        Parameters:
        infiniteLoops - Whether to enable (true) or disable (false)
        Returns:
        this object
      • setPrettyPrint

        public void setPrettyPrint​(boolean prettyPrint)