public class FilterUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ADMIN_USERNAME |
static String |
LOCALE_ATTRIBUTE |
static String |
REMEMBER_ATTRIBUTE |
Modifier and Type | Method and Description |
---|---|
static String |
getGlobalPropertyValue(String globalPropertyName)
Gets the value of a global Property as a string from the database using sql, this method is
useful when you want to get a value of a global property before the application context has
been setup
|
static Integer |
getUserIdByName(String userNameOrSystemId,
Connection connection)
This is a utility method that can be used for retrieving user id by given user name and sql
connection
|
static String |
readSystemDefaultLocale(Connection connection)
This method uses passed in connection to load system default locale.
|
static String |
restoreLocale(String username)
Tries to retrieve location parameter.
|
static boolean |
storeLocale(String locale)
Stores selected by user locale into DB as admin's user property and as system default locale
|
public static final String LOCALE_ATTRIBUTE
public static final String REMEMBER_ATTRIBUTE
public static final String ADMIN_USERNAME
public static String restoreLocale(String username)
username
- the name of the administrative user whose default locale property will be
restoredpublic static String readSystemDefaultLocale(Connection connection)
connection
- (optional) the jdbc connection to be used for extracting default localepublic static boolean storeLocale(String locale)
locale
- the selected by user languagepublic static Integer getUserIdByName(String userNameOrSystemId, Connection connection) throws SQLException
userNameOrSystemId
- the name of userconnection
- the java sql connection to useSQLException
public static String getGlobalPropertyValue(String globalPropertyName)
globalPropertyName
- the name of the global propertyCopyright © 2024 OpenMRS Inc.. All rights reserved.