Class MailVariableParser

java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.forms.helper.MailVariableParser
All Implemented Interfaces:
LogEnabled, Component

public class MailVariableParser extends AbstractLogEnabled implements Component
The parser for mail variables
  • Field Details

    • ROLE

      public static final String ROLE
      Avalon ROLE.
  • Constructor Details

  • Method Details

    • replaceText

      public String replaceText(String expression, Function<String,String> function) throws PatternException
      Check expression for variables inside '{}' and replace them with their processed value
      Parameters:
      expression - the epression to check
      function - the function processing the variables
      Returns:
      the expression with replaced variable
      Throws:
      PatternException - exception when braces are in a wrong space