Package org.apache.pinot.spi.utils
Class GroovyTemplateUtils
- java.lang.Object
-
- org.apache.pinot.spi.utils.GroovyTemplateUtils
-
public class GroovyTemplateUtils extends Object
-
-
Method Summary
Modifier and Type Method Description static Map<String,Object>getDefaultContextMap()Construct default template context: today : today's date in format `yyyy-MM-dd`, example value: '2020-05-06' yesterday : yesterday's date in format `yyyy-MM-dd`, example value: '2020-05-06'static Map<String,Object>getTemplateContext(List<String> values)static StringrenderTemplate(String template)static StringrenderTemplate(String template, Map<String,Object> newContext)
-
-
-
Method Detail
-
renderTemplate
public static String renderTemplate(String template, Map<String,Object> newContext) throws IOException, ClassNotFoundException
- Throws:
IOExceptionClassNotFoundException
-
getDefaultContextMap
public static Map<String,Object> getDefaultContextMap()
Construct default template context: today : today's date in format `yyyy-MM-dd`, example value: '2020-05-06' yesterday : yesterday's date in format `yyyy-MM-dd`, example value: '2020-05-06'
-
renderTemplate
public static String renderTemplate(String template) throws IOException, ClassNotFoundException
- Throws:
IOExceptionClassNotFoundException
-
-