public class DefaultLocalizedValuesService extends Object implements LocalizedValuesService
LocalizedValuesService| Constructor and Description |
|---|
DefaultLocalizedValuesService() |
| Modifier and Type | Method and Description |
|---|---|
CockpitLocaleService |
getCockpitLocaleService() |
Object |
getCurrentValue(Locale currentLocale,
Map<Locale,Object> values)
Returns value from given map for given key
|
String |
getLanguageLabelKey(Locale locale)
Builds language label key based on given locale
|
Locale |
getSelectedLocaleOrDefault(Map<Locale,Object> values)
Retrieves the first locale from the map if only one element is present
Otherwise it returns default locale
|
void |
setCockpitLocaleService(CockpitLocaleService cockpitLocaleService) |
public String getLanguageLabelKey(Locale locale)
LocalizedValuesServicegetLanguageLabelKey in interface LocalizedValuesServicelocale - an localized object to usepublic Locale getSelectedLocaleOrDefault(Map<Locale,Object> values)
LocalizedValuesServicegetSelectedLocaleOrDefault in interface LocalizedValuesServicevalues - from which to retrieve localepublic Object getCurrentValue(Locale currentLocale, Map<Locale,Object> values)
LocalizedValuesServicegetCurrentValue in interface LocalizedValuesServicecurrentLocale - key based on which value is retrievedvalues - map from which value is retrievedpublic CockpitLocaleService getCockpitLocaleService()
public void setCockpitLocaleService(CockpitLocaleService cockpitLocaleService)
Copyright © 2018. All rights reserved.