Class DefaultLocalizedValueProvider
- java.lang.Object
-
- de.hybris.platform.odata2services.converter.DefaultLocalizedValueProvider
-
- All Implemented Interfaces:
LocalizedValueProvider
public class DefaultLocalizedValueProvider extends java.lang.Object implements LocalizedValueProvider
Default implementation of theLocalizedValueProvider
-
-
Constructor Summary
Constructors Constructor Description DefaultLocalizedValueProvider(@NotNull IntegrationLocalizationService service)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LocalizedValuegetNullLocalizedValueForAllLanguages()Creates a localized value that setsnullfor all languages configured in the platform.LocalizedValuetoLocalizedValue(ConversionParameters parameters)Converts attribute value in theConversionParametersto a localized value based on the Content-Language of the request.LocalizedValuetoNullLocalizedValue(ConversionParameters parameters)Createsnulllocalized value depending on the conversion context.
-
-
-
Constructor Detail
-
DefaultLocalizedValueProvider
public DefaultLocalizedValueProvider(@NotNull @NotNull IntegrationLocalizationService service)
-
-
Method Detail
-
toLocalizedValue
public final LocalizedValue toLocalizedValue(ConversionParameters parameters)
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
public final LocalizedValue 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
public final LocalizedValue toNullLocalizedValue(ConversionParameters parameters)
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.
-
-