Class MustacheTemplateEngine

  • All Implemented Interfaces:
    org.wso2.msf4j.template.TemplateEngine

    public class MustacheTemplateEngine
    extends java.lang.Object
    implements org.wso2.msf4j.template.TemplateEngine
    Wrapper for mustache template engine that implements org.wso2.msf4j.template.TemplateEngine.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static MustacheTemplateEngine instance()  
      java.lang.String render​(java.lang.String view, java.lang.Object model)
      Render a given model from a given template.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • render

        public java.lang.String render​(java.lang.String view,
                                       java.lang.Object model)
        Render a given model from a given template.
        Specified by:
        render in interface org.wso2.msf4j.template.TemplateEngine
        Parameters:
        view - name of the template file in resources/templates directory
        model - model to be rendered from the template
        Returns:
        rendered template