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 Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean canBeFormattedForService​(CsticModel cstic, java.lang.String value)
      checks whether a rules value can be formatted so that the configuration engine can apply the value to the runtime configuration
      java.lang.String formatForRules​(CsticModel cstic, java.lang.String value)
      format the cstic value so that the rule engine can compare the value to it's rules maintained in backoffice
      java.lang.String formatForService​(CsticModel cstic, java.lang.String value)
      format the rules value so that the configuration engine can apply the value to the runtime configuration
      java.lang.String getNoValueIndicator()  
    • Method Detail

      • formatForRules

        java.lang.String formatForRules​(CsticModel cstic,
                                        java.lang.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

        java.lang.String formatForService​(CsticModel cstic,
                                          java.lang.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,
                                         java.lang.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

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