Class DefaultLocalizedValueProvider
java.lang.Object
de.hybris.platform.odata2services.converter.DefaultLocalizedValueProvider
- All Implemented Interfaces:
LocalizedValueProvider
Default implementation of the
LocalizedValueProvider-
Constructor Summary
ConstructorsConstructorDescriptionDefaultLocalizedValueProvider(@NotNull IntegrationLocalizationService service) -
Method Summary
Modifier and TypeMethodDescriptionfinal LocalizedValueCreates a localized value that setsnullfor all languages configured in the platform.final LocalizedValuetoLocalizedValue(ConversionParameters parameters) Converts attribute value in theConversionParametersto a localized value based on the Content-Language of the request.final LocalizedValuetoNullLocalizedValue(ConversionParameters parameters) Createsnulllocalized value depending on the conversion context.
-
Constructor Details
-
DefaultLocalizedValueProvider
-
-
Method Details
-
toLocalizedValue
Description copied from interface:LocalizedValueProviderConverts attribute value in theConversionParametersto a localized value based on the Content-Language of the request.- Specified by:
toLocalizedValuein interfaceLocalizedValueProvider- Parameters:
parameters- a conversion context containing a single value for a localized attribute.- Returns:
- localized value of the context attribute
-
getNullLocalizedValueForAllLanguages
Description copied from interface:LocalizedValueProviderCreates a localized value that setsnullfor all languages configured in the platform.- Specified by:
getNullLocalizedValueForAllLanguagesin interfaceLocalizedValueProvider- Returns:
nullvalue for all possible locales.
-
toNullLocalizedValue
Description copied from interface:LocalizedValueProviderCreatesnulllocalized value depending on the conversion context.- Specified by:
toNullLocalizedValuein interfaceLocalizedValueProvider- Parameters:
parameters- parameters providing context for the value conversion.- Returns:
- a
nullvalue for a specific locale, if Content-Language is specified in the request; otherwise creates anullvalue for all possible locales.
-