Package com.microsoft.azure.maven.utils
Class TemplateUtils
- java.lang.Object
-
- com.microsoft.azure.maven.utils.TemplateUtils
-
public class TemplateUtils extends Object
-
-
Constructor Summary
Constructors Modifier Constructor Description privateTemplateUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static Stringeval(String expr, Map<String,Object> variableMap)static BooleanevalBoolean(String expr, Map<String,Object> variableMap)Evaluate the template expression to boolean using a variable map.private static StringevalInline(String expr, Map<String,Object> variableMap)static StringevalPlainText(String expr, Map<String,Object> variableMap)Evaluate the template expression using a variable map.static StringevalText(String expr, Map<String,Object> variableMap)Evaluate the template expression using a variable map.
-
-
-
Method Detail
-
evalBoolean
public static Boolean evalBoolean(String expr, Map<String,Object> variableMap)
Evaluate the template expression to boolean using a variable map.- Parameters:
expr- the expressionvariableMap- the variable map contains all the variables referenced in express- Returns:
- whether the evaluated text is "true" or "false", default to false
-
evalText
public static String evalText(String expr, Map<String,Object> variableMap)
Evaluate the template expression using a variable map.- Parameters:
expr- the expressionvariableMap- the variable map contains all the variables referenced in express- Returns:
- the evaluated text with color applied.
-
evalPlainText
public static String evalPlainText(String expr, Map<String,Object> variableMap)
Evaluate the template expression using a variable map.- Parameters:
expr- the expressionvariableMap- the variable map contains all the variables referenced in express- Returns:
- the evaluated text.
-
-