Methods Summary |
---|
public static synchronized com.sun.enterprise.admin.util.SOMLocalStringsManager | getManager(java.lang.String packageName)Returns a local string manager for the given package name.
SOMLocalStringsManager mgr = (SOMLocalStringsManager) managers.get(packageName);
if (mgr == null) {
mgr = new SOMLocalStringsManager(packageName);
try {
managers.put(packageName, mgr);
} catch (Exception e) {
// do nothing
}
}
return mgr;
|
public static synchronized com.sun.enterprise.admin.util.SOMLocalStringsManager | getManager(java.lang.Class callerClass)Returns a local string manager for the given package name.
try {
int dotIdx = callerClass.getName().lastIndexOf(".");
if (dotIdx != -1) {
String pkgName = callerClass.getName().substring(0, dotIdx);
return getManager(pkgName);
} else {
// class does not belong to any pkg
String pkgName = callerClass.getName();
return getManager(pkgName);
}
} catch (Exception e) {
// Return default manager, and not null, so as to avoid
// null pointer exception in the calling method.
return getManager(DEFAULT_PACKAGE_NAME);
}
|
public java.lang.String | getString(java.lang.String key, java.lang.String defaultFormat, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)Convenience method - getString() overriding for fixed number of formatting arguments.
return getString(key, defaultFormat, (new Object[]{arg1, arg2, arg3}));
|
public java.lang.String | getString(java.lang.String key)Get a localized string.
return super.getString(key, key); // key itself will act as default value,
//instead of some string like "No local strings found"
|
public java.lang.String | getString(java.lang.String key, java.lang.String defaultValue)Get a localized string.
return super.getString(key, defaultValue);
|
public java.lang.String | getString(java.lang.String key, java.lang.Object[] args)Get a local string and format the arguments accordingly.
return super.getString(key, key, args);
|
public java.lang.String | getString(java.lang.String key, java.lang.String defaultFormat, java.lang.Object[] args)Get a local string and format the arguments accordingly.
return super.getString(key, defaultFormat, args);
|
public java.lang.String | getString(java.lang.String key, java.lang.String defaultFormat, java.lang.Object arg1)Convenience method - getString() overriding for fixed number of formatting arguments.
return getString(key, defaultFormat, (new Object[]{arg1}));
|
public java.lang.String | getString(java.lang.String key, java.lang.String defaultFormat, java.lang.Object arg1, java.lang.Object arg2)Convenience method - getString() overriding for fixed number of formatting arguments.
return getString(key, defaultFormat, (new Object[]{arg1, arg2}));
|