Class TemplateHelpers


  • public class TemplateHelpers
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static TemplateHelpers getInstance()  
      static java.lang.String processFileTemplate​(java.lang.String sourcePath, java.lang.Object variables, java.lang.String targetPath)  
      static java.lang.String processTemplate​(java.lang.String templateString, java.lang.Object variables)  
      • Methods inherited from class java.lang.Object

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

      • TemplateHelpers

        public TemplateHelpers()
      • TemplateHelpers

        public TemplateHelpers​(java.lang.String templatesDirectory)
                        throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • processTemplate

        public static java.lang.String processTemplate​(java.lang.String templateString,
                                                       java.lang.Object variables)
                                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • processFileTemplate

        public static java.lang.String processFileTemplate​(java.lang.String sourcePath,
                                                           java.lang.Object variables,
                                                           java.lang.String targetPath)
                                                    throws java.io.IOException,
                                                           freemarker.template.TemplateException
        Throws:
        java.io.IOException
        freemarker.template.TemplateException