Class ProductConfigRuleFormatTranslatorImpl
java.lang.Object
de.hybris.platform.sap.productconfig.rules.service.impl.ProductConfigRuleFormatTranslatorImpl
- All Implemented Interfaces:
ProductConfigRuleFormatTranslator
public class ProductConfigRuleFormatTranslatorImpl
extends Object
implements ProductConfigRuleFormatTranslator
Default implementation of the
ProductConfigRuleFormatTranslator.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanBeFormattedForService(CsticModel cstic, String value) checks whether a rules value can be formatted so that the configuration engine can apply the value to the runtime configurationformatForRules(CsticModel cstic, String value) format the cstic value so that the rule engine can compare the value to it's rules maintained in backofficeformatForService(CsticModel cstic, String value) format the rules value so that the configuration engine can apply the value to the runtime configurationprotected DecimalFormatOverride this method to use a different decimal format in backoffice UIprotected DecimalFormatOverride this method if you engine use a different decimal formatprotected booleanisNumericValue(CsticModel cstic)
-
Constructor Details
-
ProductConfigRuleFormatTranslatorImpl
public ProductConfigRuleFormatTranslatorImpl()
-
-
Method Details
-
getRulesFormat
Override this method to use a different decimal format in backoffice UI -
getServiceFormat
Override this method if you engine use a different decimal format -
formatForRules
Description copied from interface:ProductConfigRuleFormatTranslatorformat the cstic value so that the rule engine can compare the value to it's rules maintained in backoffice- Specified by:
formatForRulesin interfaceProductConfigRuleFormatTranslator- Parameters:
cstic- the characteristic the value belongs to and which provides the context for translationvalue- the actual value to translate- Returns:
- translated value
-
formatForService
Description copied from interface:ProductConfigRuleFormatTranslatorformat the rules value so that the configuration engine can apply the value to the runtime configuration- Specified by:
formatForServicein interfaceProductConfigRuleFormatTranslator- Parameters:
cstic- the characteristic the value belongs to and which provides the context for translationvalue- the actual value to translate- Returns:
- translated value
-
canBeFormattedForService
Description copied from interface:ProductConfigRuleFormatTranslatorchecks whether a rules value can be formatted so that the configuration engine can apply the value to the runtime configuration- Specified by:
canBeFormattedForServicein interfaceProductConfigRuleFormatTranslator- Parameters:
cstic- the characteristic the value belongs to and which provides the context for translationvalue- the actual value to translate- Returns:
trueonly if the given value can be formatted
-
isNumericValue
-
getNoValueIndicator
- Specified by:
getNoValueIndicatorin interfaceProductConfigRuleFormatTranslator- Returns:
- the string indicating that no value is assigned to a ctsic at all
-