Class TemplateVariablesParser

java.lang.Object
es.kukenan.smartfi.microservice.communication.utils.TemplateVariablesParser

public class TemplateVariablesParser extends Object
Utility class for parser variables in a String.
  • Constructor Details

    • TemplateVariablesParser

      public TemplateVariablesParser()
  • Method Details

    • parseVariables

      public static String parseVariables(String text, Map<String,Object> variables)
      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

      public static String formatAmount(Double amount)
      Convert "." caracter to "," in types Doubles to refactor format.
      Parameters:
      amount - an amount.
      Returns:
      String data with change of formate.