Class MustacheEngineAdapter

    • Constructor Detail

      • MustacheEngineAdapter

        public MustacheEngineAdapter()
    • Method Detail

      • getIdentifier

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

        public String compileTemplate​(TemplatingExecutor executor,
                                      Map<String,​Object> bundle,
                                      String templateFile)
                               throws IOException
        Compiles a template into a string
        Specified by:
        compileTemplate in interface TemplatingEngineAdapter
        Parameters:
        executor - From where we can fetch the templates content (e.g. an instance of DefaultGenerator)
        bundle - The map of values to pass to the template
        templateFile - The name of the template (e.g. model.mustache )
        Returns:
        the processed template result
        Throws:
        IOException - an error occurred in the template processing
      • getCompiler

        public com.samskivert.mustache.Mustache.Compiler getCompiler()
      • setCompiler

        public void setCompiler​(com.samskivert.mustache.Mustache.Compiler compiler)