Fields Summary |
---|
public static final String | NOT_INITIALIZED_MSGField NOT_INITIALIZED_MSG |
private static String | defaultLanguageCodeField defaultLanguageCode |
private static String | defaultCountryCodeField defaultCountryCode |
private static ResourceBundle | resourceBundleField resourceBundle |
private static boolean | alreadyInitializedField alreadyInitialized |
private static String | _languageCodeField _languageCode |
private static String | _countryCodeField _countryCode |
Methods Summary |
---|
public static java.lang.String | getExceptionMessage(java.lang.String msgID)Method getExceptionMessage
try {
String s = resourceBundle.getString(msgID);
return s;
} catch (Throwable t) {
if (com.sun.org.apache.xml.internal.security.Init.isInitialized()) {
return "No message with ID \"" + msgID
+ "\" found in resource bundle \""
+ Constants.exceptionMessagesResourceBundleBase + "\"";
}
return I18n.NOT_INITIALIZED_MSG;
}
|
public static java.lang.String | getExceptionMessage(java.lang.String msgID, java.lang.Exception originalException)Method getExceptionMessage
try {
Object exArgs[] = { originalException.getMessage() };
String s = MessageFormat.format(resourceBundle.getString(msgID),
exArgs);
return s;
} catch (Throwable t) {
if (com.sun.org.apache.xml.internal.security.Init.isInitialized()) {
return "No message with ID \"" + msgID
+ "\" found in resource bundle \""
+ Constants.exceptionMessagesResourceBundleBase
+ "\". Original Exception was a "
+ originalException.getClass().getName() + " and message "
+ originalException.getMessage();
}
return I18n.NOT_INITIALIZED_MSG;
}
|
public static java.lang.String | getExceptionMessage(java.lang.String msgID, java.lang.Object[] exArgs)Method getExceptionMessage
try {
String s = MessageFormat.format(resourceBundle.getString(msgID),
exArgs);
return s;
} catch (Throwable t) {
if (com.sun.org.apache.xml.internal.security.Init.isInitialized()) {
return "No message with ID \"" + msgID
+ "\" found in resource bundle \""
+ Constants.exceptionMessagesResourceBundleBase + "\"";
}
return I18n.NOT_INITIALIZED_MSG;
}
|
public static java.lang.String | translate(java.lang.String message, java.lang.Object[] args)Method translate
translates a message ID into an internationalized String, see alse
XMLSecurityException.getExceptionMEssage() . The strings are
stored in the ResourceBundle , which is identified in
exceptionMessagesResourceBundleBase
return getExceptionMessage(message, args);
|
public static java.lang.String | translate(java.lang.String message)Method translate
translates a message ID into an internationalized String, see alse
XMLSecurityException.getExceptionMEssage()
return getExceptionMessage(message);
|