Package org.ametys.plugins.forms.helper
Class MailVariableParser
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.forms.helper.MailVariableParser
- All Implemented Interfaces:
LogEnabled
,Component
The parser for mail variables
-
Field Summary
-
Constructor Summary
-
Method Summary
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
Avalon ROLE.
-
-
Constructor Details
-
MailVariableParser
public MailVariableParser()
-
-
Method Details
-
replaceText
public String replaceText(String expression, Function<String, String> function) throws PatternExceptionCheck expression for variables inside '{}' and replace them with their processed value- Parameters:
expression
- the epression to checkfunction
- the function processing the variables- Returns:
- the expression with replaced variable
- Throws:
PatternException
- exception when braces are in a wrong space
-