public class LocaleUtility extends Object implements GlobalPropertyListener
| Modifier and Type | Field and Description | 
|---|---|
| static Locale | DEFAULT_LOCALEDeprecated. 
 use  getDefaultLocale()now | 
| Constructor and Description | 
|---|
| LocaleUtility() | 
| Modifier and Type | Method and Description | 
|---|---|
| static boolean | areCompatible(Locale lhs,
             Locale rhs)Compatible is a looser matching than that provided by Locale.equals(). | 
| static Locale | fromSpecification(String localeSpecification)Creates a locale based on a string specification. | 
| static Locale | getDefaultLocale()Gets the default locale specified as a global property. | 
| static Set<Locale> | getLocalesInOrder()Utility method that returns a collection of all openmrs system locales,
 the set includes the current logged in user's preferred locale if any is
 set, the default locale, allowed locales in the order they are specified
 in the 'allowed.locale.list' global property and 'en' at the very end of
 the set if it isn't yet among them. | 
| void | globalPropertyChanged(GlobalProperty newValue)Called after a global property is created or updated | 
| void | globalPropertyDeleted(String propertyName)Called after a global property is deleted | 
| boolean | supportsPropertyName(String propertyName)Asks this listener whether it wants to be notified about the given property name | 
@Deprecated public static final Locale DEFAULT_LOCALE
getDefaultLocale() nowpublic static Locale getDefaultLocale()
public static boolean areCompatible(Locale lhs, Locale rhs)
lhs - left hand side Localerhs - right hand side Localepublic static Locale fromSpecification(String localeSpecification)
localeSpecification - encoded locale specificationpublic static Set<Locale> getLocalesInOrder()
public void globalPropertyChanged(GlobalProperty newValue)
GlobalPropertyListenerglobalPropertyChanged in interface GlobalPropertyListenernewValue - the new value of the property that was just savedpublic void globalPropertyDeleted(String propertyName)
GlobalPropertyListenerglobalPropertyDeleted in interface GlobalPropertyListenerpropertyName - the name of the property that was just deletedpublic boolean supportsPropertyName(String propertyName)
GlobalPropertyListenersupportsPropertyName in interface GlobalPropertyListenerCopyright © 2018 OpenMRS LLC.. All Rights Reserved.