public class LocaleUtility extends java.lang.Object implements GlobalPropertyListener
| Modifier and Type | Field and Description | 
|---|---|
static java.util.Locale | 
DEFAULT_LOCALE
Deprecated. 
 
use  
getDefaultLocale() now | 
| Constructor and Description | 
|---|
LocaleUtility()  | 
| Modifier and Type | Method and Description | 
|---|---|
static boolean | 
areCompatible(java.util.Locale lhs,
             java.util.Locale rhs)
Compatible is a looser matching than that provided by Locale.equals(). 
 | 
static java.util.Locale | 
fromSpecification(java.lang.String localeSpecification)
Creates a locale based on a string specification. 
 | 
static java.util.Locale | 
getDefaultLocale()
Gets the default locale specified as a global property. 
 | 
static java.util.Set<java.util.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(java.lang.String propertyName)
Called after a global property is deleted 
 | 
static boolean | 
isValid(java.util.Locale locale)
Checks if specified locale object is valid 
 | 
boolean | 
supportsPropertyName(java.lang.String propertyName)
Asks this listener whether it wants to be notified about the given property name 
 | 
@Deprecated public static final java.util.Locale DEFAULT_LOCALE
getDefaultLocale() nowpublic static java.util.Locale getDefaultLocale()
public static boolean areCompatible(java.util.Locale lhs,
                                    java.util.Locale rhs)
lhs - left hand side Localerhs - right hand side Localepublic static java.util.Locale fromSpecification(java.lang.String localeSpecification)
localeSpecification - encoded locale specificationpublic static java.util.Set<java.util.Locale> getLocalesInOrder()
public void globalPropertyChanged(GlobalProperty newValue)
GlobalPropertyListenerglobalPropertyChanged in interface GlobalPropertyListenernewValue - the new value of the property that was just savedpublic void globalPropertyDeleted(java.lang.String propertyName)
GlobalPropertyListenerglobalPropertyDeleted in interface GlobalPropertyListenerpropertyName - the name of the property that was just deletedpublic boolean supportsPropertyName(java.lang.String propertyName)
GlobalPropertyListenersupportsPropertyName in interface GlobalPropertyListenerpublic static boolean isValid(java.util.Locale locale)
locale - object for validationCopyright © 2018 OpenMRS Inc.. All Rights Reserved.