Package gorsat
Class FreemarkerQueryUtilities
java.lang.Object
gorsat.FreemarkerQueryUtilities
Helper functions to parse and create reports with the freemarker parsing engine.
-
Method Details
-
requestQuery
public static Optional<String> requestQuery(String resource, org.gorpipe.gor.model.FileReader fileResolver, org.gorpipe.gor.model.QueryEvaluator queryEval, String reportName, Map<String, String> parameterMap, String cacheDir) throws IOException, freemarker.template.TemplateExceptionReturns a gor query from the input resource file. The gor query is fully resolved and freemarker placeholders are fully replaced by the input parameterMap.- Parameters:
resource- Path to freemarker yml filefileResolver- FileReader instance used for the current executionqueryEval- Query evaluator based on the current session, for using gor queries within freemarker syntaxreportName- Name of the report being generatedparameterMap- Map og parameters and their corresponding values.cacheDir- Current cache directory- Returns:
- Fully resolved gor query from the input yml file
- Throws:
IOException- Yml file not foundfreemarker.template.TemplateException- Internal freemarker error
-