Class ValueFormatTranslatorImpl
java.lang.Object
de.hybris.platform.sap.productconfig.facades.impl.ValueFormatTranslatorImpl
- All Implemented Interfaces:
ValueFormatTranslator
Default implementation of the
ValueFormatTranslator.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DecimalFormatprotected DecimalFormatcreateFormatterForUI(Locale locale) format(CsticModel cstic, String value) Converts a characteristic value into an external format suitable for UI-Display.formatDate(Date date) Format date value from service to UIformatNumeric(String value) Formats numerical value from service to UIprotected Localeprotected static DecimalFormatbooleanisNumericCsticType(CsticModel model) Checks the characteristic model whether it is either of type float or integerConverts a characteristic value into an internal format, which is used by the underlying API's.parseNumeric(String value) Parses numerical value from UI to servicevoidsetI18NService(I18NService i18nService)
-
Constructor Details
-
ValueFormatTranslatorImpl
public ValueFormatTranslatorImpl()
-
-
Method Details
-
initialValue
-
parse
Description copied from interface:ValueFormatTranslatorConverts a characteristic value into an internal format, which is used by the underlying API's.- Specified by:
parsein interfaceValueFormatTranslator- Parameters:
uiType- UI type the characteristic value belongs tovalue- characteristic value in external format- Returns:
- characteristic value in internal format
-
parseNumeric
Description copied from interface:ValueFormatTranslatorParses numerical value from UI to service- Specified by:
parseNumericin interfaceValueFormatTranslator- Parameters:
value- value to be parsed- Returns:
- formatted numerical value
-
formatNumeric
Description copied from interface:ValueFormatTranslatorFormats numerical value from service to UI- Specified by:
formatNumericin interfaceValueFormatTranslator- Parameters:
value- value to be parsed- Returns:
- formatted numerical value
-
formatDate
Description copied from interface:ValueFormatTranslatorFormat date value from service to UI- Specified by:
formatDatein interfaceValueFormatTranslator- Parameters:
date- Date value which should be formatted- Returns:
- the formatted date value
-
getLocale
-
createFormatterForUI
-
createFormatterForService
-
format
Description copied from interface:ValueFormatTranslatorConverts a characteristic value into an external format suitable for UI-Display.- Specified by:
formatin interfaceValueFormatTranslator- Parameters:
cstic- characteristic the value belongs tovalue- characteristic value in internal format- Returns:
- characteristic value in external format
-
isNumericCsticType
Description copied from interface:ValueFormatTranslatorChecks the characteristic model whether it is either of type float or integer- Specified by:
isNumericCsticTypein interfaceValueFormatTranslator- Parameters:
model- characteristic to be checked- Returns:
- true if characteristic is numeric
-
setI18NService
- Parameters:
i18nService- the i18NService to set
-
getI18NService
- Returns:
- the i18NService
-