Interface ProductConfigRuleFormatTranslator

All Known Implementing Classes:
ProductConfigRuleFormatTranslatorImpl

public interface ProductConfigRuleFormatTranslator
Translates Characteristic Values from format used in the service layer into the format that the rule service requires to match any rule reliable. For example a unified format has to be used for numeric values to avoid a rule not matching to different formats.
  • Method Details

    • formatForRules

      String formatForRules(CsticModel cstic, String value)
      format the cstic value so that the rule engine can compare the value to it's rules maintained in backoffice
      Parameters:
      cstic - the characteristic the value belongs to and which provides the context for translation
      value - the actual value to translate
      Returns:
      translated value
    • formatForService

      String formatForService(CsticModel cstic, String value)
      format the rules value so that the configuration engine can apply the value to the runtime configuration
      Parameters:
      cstic - the characteristic the value belongs to and which provides the context for translation
      value - the actual value to translate
      Returns:
      translated value
    • canBeFormattedForService

      boolean canBeFormattedForService(CsticModel cstic, String value)
      checks whether a rules value can be formatted so that the configuration engine can apply the value to the runtime configuration
      Parameters:
      cstic - the characteristic the value belongs to and which provides the context for translation
      value - the actual value to translate
      Returns:
      true only if the given value can be formatted
    • getNoValueIndicator

      String getNoValueIndicator()
      Returns:
      the string indicating that no value is assigned to a ctsic at all