Class JavaStringSubstitutor

java.lang.Object
io.jmix.flowui.sys.substitutor.JavaStringSubstitutor
All Implemented Interfaces:
StringSubstitutor

@Component("flowui_StringSubstitutor") public class JavaStringSubstitutor extends Object implements StringSubstitutor
Substitutes variables of a within a string by values. The default definition of a variable is ${variableName}.
  • Constructor Details

    • JavaStringSubstitutor

      public JavaStringSubstitutor()
  • Method Details

    • substitute

      public String substitute(String source, Map<String,Object> valuesMap)
      Description copied from interface: StringSubstitutor
      Substitutes all the occurrences of variables in the given source object with their matching values from the map.
      Specified by:
      substitute in interface StringSubstitutor
      Parameters:
      source - the source text containing the variables to substitute
      valuesMap - the map with the values
      Returns:
      the result of the replace operation