Class TemplateVariablesParser
java.lang.Object
es.kukenan.smartfi.microservice.communication.utils.TemplateVariablesParser
Utility class for parser variables in a String.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringformatAmount(Double amount) Convert "." caracter to "," in types Doubles to refactor format.static StringparseVariables(String text, Map<String, Object> variables) Parse the given text looking for any variable reference and replacing it by the proper value.
-
Constructor Details
-
TemplateVariablesParser
public TemplateVariablesParser()
-
-
Method Details
-
parseVariables
Parse the given text looking for any variable reference and replacing it by the proper value.- Parameters:
text- the text.variables- the variable map.- Returns:
- the result of replacing variable references in the template.
-
formatAmount
Convert "." caracter to "," in types Doubles to refactor format.- Parameters:
amount- an amount.- Returns:
- String data with change of formate.
-