public class HapiLocalizer extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
UNKNOWN_I18N_KEY_MESSAGE |
| Constructor and Description |
|---|
HapiLocalizer() |
HapiLocalizer(String... theBundleNames) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addMessage(String theKey,
String theMessage)
Subclasses may use this to add hardcoded messages
|
Set<String> |
getAllKeys() |
String |
getFormatString(String theQualifiedKey) |
String |
getMessage(Class<?> theType,
String theKey,
Object... theParameters) |
String |
getMessage(String theQualifiedKey,
Object... theParameters) |
String |
getMessageSanitized(Class<?> theType,
String theKey,
Object... theParameters)
Create the message and sanitize parameters using
|
protected void |
init() |
static void |
setOurFailOnMissingMessage(boolean ourFailOnMissingMessage)
This global setting causes the localizer to fail if any attempts
are made to retrieve a key that does not exist.
|
static String |
toKey(Class<?> theType,
String theKey) |
public static final String UNKNOWN_I18N_KEY_MESSAGE
public HapiLocalizer()
public HapiLocalizer(String... theBundleNames)
protected void addMessage(String theKey, String theMessage)
public Set<String> getAllKeys()
public String getFormatString(String theQualifiedKey)
UNKNOWN_I18N_KEY_MESSAGE if not foundpublic String getMessage(Class<?> theType, String theKey, Object... theParameters)
public String getMessageSanitized(Class<?> theType, String theKey, Object... theParameters)
public String getMessage(String theQualifiedKey, Object... theParameters)
protected void init()
public static void setOurFailOnMissingMessage(boolean ourFailOnMissingMessage)
Copyright © 2014–2019 University Health Network. All rights reserved.