Package com.jk.core.templates
Class JKTemplateUtil
java.lang.Object
com.jk.core.templates.JKTemplateUtil
This class is a utility class for compiling and processing FreeMarker
templates.
- Version:
- 1.0
- Author:
- Dr. Jalal H. Kiswani
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
This compiles and processes a FreeMarker template.protected static freemarker.template.Configuration
This method retrieves or initializes the FreeMarker configuration for template processing.
-
Constructor Details
-
JKTemplateUtil
public JKTemplateUtil()
-
-
Method Details
-
getConfig
This method retrieves or initializes the FreeMarker configuration for template processing.- Parameters:
path
- Specifies the path to the template directory.- Returns:
- the FreeMarker configuration instance.
-
compile
This compiles and processes a FreeMarker template.- Parameters:
path
- Specifies the path to the template directory.templateName
- Specifies the name of the template file.input
- Specifies the input data to be used for template processing.- Returns:
- the compiled and processed template content.
-