Interface SystemDataFormatter

All Known Implementing Classes:
AbstractSystemDataFormatter, BasicSystemDataFormatter, LongDateSystemDataFormatter, OrgPolicySystemDataFormatter

public interface SystemDataFormatter
Interface for classes that know how to properly format the values when replacing the parameter references in a specific SystemDataConsumer. Implementations of this interface MUST have a default (public parameterless) constructor.
Author:
Patrick Schmidt
  • Method Details

    • format

      String format(String parameterisedString, Map<String,Serializable> parameterValues)
      Formats the given parameterised string according to the needs of the SystemDataConsumer it is used by.
      Parameters:
      parameterisedString - the parameterised string to be formatted
      parameterValues - map containing values for all parameters referenced in the parameterised string
      Returns:
      the formatted string
      Throws:
      IllegalArgumentException - if a parameter value is missing or doesn't have the correct type (unless the formatter decides to handle these cases differently)
    • format

      String format(String parameterisedString, Map<String,Serializable> parameterValues, Locale locale)
      Formats the given parameterised string according to the needs of the SystemDataConsumer it is used by.
      Parameters:
      parameterisedString - the parameterised string to be formatted
      parameterValues - map containing values for all parameters referenced in the parameterised string
      locale - the locale used to format the string; may be null
      Returns:
      the formatted string
      Throws:
      IllegalArgumentException - if a parameter value is missing or doesn't have the correct type (unless the formatter decides to handle these cases differently)