Class StringSubstitutorUtil
- java.lang.Object
-
- com.evolveum.midpoint.util.template.StringSubstitutorUtil
-
public class StringSubstitutorUtil extends Object
Utility methods for string substitution needs in midPoint. Uses Apache Commons Text StringSubstitutor. (Of course, you can - and perhaps should - call StringSubstitutor directly in the code. Here we provide some commonly-used methods that require custom configuration of the substitutor.)
-
-
Constructor Summary
Constructors Constructor Description StringSubstitutorUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
simpleExpand(String template, Map<String,String> replacements)
Evaluates a template against set of replacement mappings.
-
-
-
Method Detail
-
simpleExpand
public static String simpleExpand(String template, @NotNull Map<String,String> replacements)
Evaluates a template against set of replacement mappings. The string(s) to be matched are denoted by "{key}" sequence(s). This is a legacy method. We should use the "$" sign in the future.- Parameters:
template
- Template e.g. "{masterTaskName} ({index})"replacements
- Map of e.g. "masterTaskName" -> "Reconciliation", "index" -> "1"- Returns:
- resolved template, e.g. "Reconciliation (1)"
-
-