public final class Localizer extends Object
String text = (String) getObject(Localizer.MESSAGE_BODY,"123456")
returns the text for message 123456. Convenience methods are also provided. For instance, the getBody("123456") call is equivalent to the above getObject() call. For log messages, two properties files are generated. One for basic catalog data and one for detailed text. Refer to L10nLookup for information on retrieving detailed vs. basic localization data.
Modifier and Type | Field and Description |
---|---|
static String |
ACTION |
static String |
CAUSE |
static String |
DIAGNOSTIC_VOLUME |
static String |
EXCLUDE_PARTITIONED |
static String |
I18N_PACKAGE |
static String |
L10N_PACKAGE |
static String |
MESSAGE_BODY |
static String |
MESSAGE_DETAIL |
static String[] |
NON_SERVER_SEVERITIES |
static String |
PREFIX |
static String |
PREFIX_DELIM |
static String[] |
SERVER_SEVERITIES |
static String |
SEVERITY |
static String |
STACKTRACE |
static String |
SUBSYSTEM |
static String |
VERSION |
Constructor and Description |
---|
Localizer(ResourceBundle rb) |
Modifier and Type | Method and Description |
---|---|
String |
get(String id)
locate text associated with the passed message id.
|
String |
getAction(String id)
Lookup up message action for message, "id".
|
String |
getBody(String id)
Lookup up message text for log message, "id".
|
ResourceBundle |
getBundle()
Returns underlying resource bundle
|
String |
getCause(String id)
Lookup up message cause for message, "id".
|
String |
getDetail(String id)
Lookup up message detail for log message, "id".
|
String |
getDiagnosticVolume(String id)
Lookup DiagnosticVolume for message, "id"
|
String |
getI18nPackage()
Returns the i18n package associated with this Localizer.
|
String |
getL10nPackage()
Returns the l10n package associated with this Localizer.
|
Object |
getObject(String key,
int id)
Returns an Object in a Localizer bundle matching the key and the
specified message id.
|
Object |
getObject(String key,
String id)
Returns an Object in a Localizer bundle matching the key and the
specified message id.
|
String |
getPrefix()
Returns the prefix associated with this Localizer.
|
int |
getSeverity(String id)
Lookup up severity for message, "id".
|
boolean |
getStackTrace(String id)
Lookup stack trace option for message, "id".
|
String |
getString(String key,
int id)
Returns an String in a Localizer bundle matching the key and the
specified message id.
|
String |
getString(String key,
String id)
Returns a String-ified version of a value from a Localizer bundle matching the key and the
specified message id.
|
String |
getSubSystem()
Returns the subsystem associated with this Localizer.
|
String |
getVersion() |
public static final String VERSION
public static final String L10N_PACKAGE
public static final String I18N_PACKAGE
public static final String SUBSYSTEM
public static final String PREFIX
public static final String SEVERITY
public static final String MESSAGE_BODY
public static final String MESSAGE_DETAIL
public static final String CAUSE
public static final String ACTION
public static final String STACKTRACE
public static final String DIAGNOSTIC_VOLUME
public static final String EXCLUDE_PARTITIONED
public static final String[] SERVER_SEVERITIES
public static final String[] NON_SERVER_SEVERITIES
public static final String PREFIX_DELIM
public Localizer(ResourceBundle rb)
public ResourceBundle getBundle()
public String getVersion() throws MissingResourceException
MissingResourceException
public String getL10nPackage() throws MissingResourceException
MissingResourceException
public String getI18nPackage() throws MissingResourceException
MissingResourceException
public String getSubSystem() throws MissingResourceException
MissingResourceException
public String getPrefix()
public Object getObject(String key, String id) throws MissingResourceException
key
- Element of a message definition.id
- Message id.MissingResourceException
- There is no entry in the Localizer for key/id.public Object getObject(String key, int id) throws MissingResourceException
key
- Element of a message definition.id
- Message id.MissingResourceException
- There is no entry in the Localizer for key/id.public String getString(String key, String id) throws MissingResourceException
key
- Element of a message definition.id
- Message id.MissingResourceException
- There is no entry in the Localizer for key/id.public String getString(String key, int id) throws MissingResourceException
key
- Element of a message definition.id
- Message id.MissingResourceException
- There is no entry in the Localizer for key/id.public String get(String id)
public String getBody(String id)
public String getDetail(String id)
public String getCause(String id)
public String getAction(String id)
public int getSeverity(String id)
public boolean getStackTrace(String id)