Class MarkupTemplateEngine


  • public class MarkupTemplateEngine
    extends TemplateEngine
    A template engine which leverages StreamingMarkupBuilder to generate XML/XHTML.
    • Constructor Detail

      • MarkupTemplateEngine

        public MarkupTemplateEngine()
      • MarkupTemplateEngine

        public MarkupTemplateEngine​(java.lang.ClassLoader parentLoader,
                                    TemplateConfiguration tplConfig)
      • MarkupTemplateEngine

        public MarkupTemplateEngine​(java.lang.ClassLoader parentLoader,
                                    java.io.File templateDirectory,
                                    TemplateConfiguration tplConfig)
        Convenience constructor to build a template engine which searches for templates into a directory
        Parameters:
        templateDirectory - directory where to find templates
        tplConfig - template engine configuration
    • Method Detail

      • createTypeCheckedModelTemplate

        public Template createTypeCheckedModelTemplate​(java.lang.String source,
                                                       java.util.Map<java.lang.String,​java.lang.String> modelTypes)
                                                throws CompilationFailedException,
                                                       java.lang.ClassNotFoundException,
                                                       java.io.IOException
        Throws:
        CompilationFailedException
        java.lang.ClassNotFoundException
        java.io.IOException
      • createTypeCheckedModelTemplate

        public Template createTypeCheckedModelTemplate​(java.lang.String source,
                                                       java.lang.String sourceName,
                                                       java.util.Map<java.lang.String,​java.lang.String> modelTypes)
                                                throws CompilationFailedException,
                                                       java.lang.ClassNotFoundException,
                                                       java.io.IOException
        Throws:
        CompilationFailedException
        java.lang.ClassNotFoundException
        java.io.IOException
      • createTypeCheckedModelTemplate

        public Template createTypeCheckedModelTemplate​(java.io.Reader reader,
                                                       java.util.Map<java.lang.String,​java.lang.String> modelTypes)
                                                throws CompilationFailedException,
                                                       java.lang.ClassNotFoundException,
                                                       java.io.IOException
        Throws:
        CompilationFailedException
        java.lang.ClassNotFoundException
        java.io.IOException
      • createTypeCheckedModelTemplate

        public Template createTypeCheckedModelTemplate​(java.io.Reader reader,
                                                       java.lang.String sourceName,
                                                       java.util.Map<java.lang.String,​java.lang.String> modelTypes)
                                                throws CompilationFailedException,
                                                       java.lang.ClassNotFoundException,
                                                       java.io.IOException
        Throws:
        CompilationFailedException
        java.lang.ClassNotFoundException
        java.io.IOException
      • createTypeCheckedModelTemplateByPath

        public Template createTypeCheckedModelTemplateByPath​(java.lang.String templatePath,
                                                             java.util.Map<java.lang.String,​java.lang.String> modelTypes)
                                                      throws CompilationFailedException,
                                                             java.lang.ClassNotFoundException,
                                                             java.io.IOException
        Throws:
        CompilationFailedException
        java.lang.ClassNotFoundException
        java.io.IOException
      • createTypeCheckedModelTemplate

        public Template createTypeCheckedModelTemplate​(java.net.URL resource,
                                                       java.util.Map<java.lang.String,​java.lang.String> modelTypes)
                                                throws CompilationFailedException,
                                                       java.lang.ClassNotFoundException,
                                                       java.io.IOException
        Throws:
        CompilationFailedException
        java.lang.ClassNotFoundException
        java.io.IOException
      • resolveTemplate

        public java.net.URL resolveTemplate​(java.lang.String templatePath)
                                     throws java.io.IOException
        Throws:
        java.io.IOException