Class LocalizedInstantEditorLabelProvider
- java.lang.Object
-
- com.hybris.cockpitng.editor.instant.labelprovider.impl.AbstractInstantEditorLabelProvider
-
- com.hybris.cockpitng.editor.instant.labelprovider.impl.LocalizedInstantEditorLabelProvider
-
- All Implemented Interfaces:
InstantEditorLabelProvider,org.springframework.core.Ordered
public class LocalizedInstantEditorLabelProvider extends AbstractInstantEditorLabelProvider
-
-
Constructor Summary
Constructors Constructor Description LocalizedInstantEditorLabelProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanHandle(java.lang.String editorType)Method used to determine if label provider is able to convert the value of underlying editor.protected java.lang.ObjectextractValueForLocale(java.util.Map<java.util.Locale,java.lang.Object> values, java.util.Locale locale)protected java.util.Optional<InstantEditorLabelProvider>findLabelProvider(java.lang.String editorType)protected CockpitLocaleServicegetCockpitLocaleService()protected java.util.List<InstantEditorLabelProvider>getInstantEditorLabelProviders()java.lang.StringgetLabel(java.lang.String editorType, java.lang.Object value)Method converting passed value to its string representationvoidsetCockpitLocaleService(CockpitLocaleService cockpitLocaleService)voidsetInstantEditorLabelProviders(java.util.List<InstantEditorLabelProvider> instantEditorLabelProviders)-
Methods inherited from class com.hybris.cockpitng.editor.instant.labelprovider.impl.AbstractInstantEditorLabelProvider
getOrder, setOrder
-
-
-
-
Method Detail
-
canHandle
public boolean canHandle(java.lang.String editorType)
Description copied from interface:InstantEditorLabelProviderMethod used to determine if label provider is able to convert the value of underlying editor. When deciding which label provider should be used, the first returningtruefrom this method is choosen.- Parameters:
editorType- type of underlying editor as returned byEditor.getType()- Returns:
- if this label provider is able to convert underlying editor's value
-
getLabel
public java.lang.String getLabel(java.lang.String editorType, java.lang.Object value)Description copied from interface:InstantEditorLabelProviderMethod converting passed value to its string representation- Parameters:
editorType- type of underlying editor as returned byEditor.getType()value- underlying editor's value to convert- Returns:
- string representation of
value
-
extractValueForLocale
protected java.lang.Object extractValueForLocale(java.util.Map<java.util.Locale,java.lang.Object> values, java.util.Locale locale)
-
findLabelProvider
protected java.util.Optional<InstantEditorLabelProvider> findLabelProvider(java.lang.String editorType)
-
getCockpitLocaleService
protected CockpitLocaleService getCockpitLocaleService()
-
setCockpitLocaleService
public void setCockpitLocaleService(CockpitLocaleService cockpitLocaleService)
-
getInstantEditorLabelProviders
protected java.util.List<InstantEditorLabelProvider> getInstantEditorLabelProviders()
-
setInstantEditorLabelProviders
@Autowired public void setInstantEditorLabelProviders(java.util.List<InstantEditorLabelProvider> instantEditorLabelProviders)
-
-