Package gorsat

Class FreemarkerQueryUtilities

java.lang.Object
gorsat.FreemarkerQueryUtilities

public class FreemarkerQueryUtilities extends Object
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.TemplateException
      Returns 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 file
      fileResolver - FileReader instance used for the current execution
      queryEval - Query evaluator based on the current session, for using gor queries within freemarker syntax
      reportName - Name of the report being generated
      parameterMap - 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 found
      freemarker.template.TemplateException - Internal freemarker error