|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jcorporate.expresso.core.i18n.MessageBundle
A message bundle handles the messages for a specific combination of language, country and schema Created on January 21, 2001, 8:43 PM
| Field Summary | |
static String |
DEFAULT_BUNDLE_NAME
The default bundle name |
static String |
DEFAULT_BUNDLE_PATH
|
| Constructor Summary | |
MessageBundle()
Creates new Class |
|
| Method Summary | |
String |
getBundleName()
Gets the resource bundle name author: Peter Pilgrim, Sun Sep 07 12:16:56 BST 2003 |
String |
getBundlePath()
Returns the location of the Messages bundle path as specified by your schema. |
String |
getCountry()
Used to get the sub-language country code |
String |
getLanguage()
|
protected Schema |
getSchema(String schemaClass)
Instantiate & return the schema class given in the current parameter |
String |
getString(String stringCode,
Object[] args)
Formats the string code with the appropriate argument array. |
protected String |
getStringFromBundle(Locale ourLocale,
String stringCode)
Return a string for a specific locale |
protected String |
getStringFromDefaultSchemaBundle(Locale ourLocale,
String stringCode)
Return a string for a specific locale, using the default (expresso) schema |
String |
getStringOrNull(String stringCode,
Object[] args)
Formats the string code with the appropriate argument array. |
String |
getStringRequired(String stringCode,
Object[] args)
Formats the string code with the appropriate argument array, throwing an exception if the key does not exist. |
void |
setBundleName(String bundleName)
Sets the resource bundle name |
void |
setBundlePath(String newBundlePath)
Sets the path for the bundle for the specified schema |
void |
setCountry(String newCountry)
Sets the country for the bundle |
void |
setLanguage(String newLanguage)
Sets the language to get the Messages for |
void |
setSchema(String schemaName)
Sets the schema so you can get messages from your own apps messages bundle |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String DEFAULT_BUNDLE_NAME
public static final String DEFAULT_BUNDLE_PATH
| Constructor Detail |
public MessageBundle()
| Method Detail |
public void setBundleName(String bundleName)
bundleName - The bundle name to use when retrieving messagespublic String getBundleName()
public void setBundlePath(String newBundlePath)
newBundlePath - the bundle pathpublic String getBundlePath()
public void setCountry(String newCountry)
newCountry - the new two digit country codepublic String getCountry()
public void setLanguage(String newLanguage)
newLanguage - the new language codepublic String getLanguage()
public void setSchema(String schemaName)
schemaName - The name of the schema to get the messages from
public String getString(String stringCode,
Object[] args)
stringCode - The string code to retrieveargs - the formatting arguments for the String
MessageFormat
public String getStringRequired(String stringCode,
Object[] args)
throws IllegalArgumentException
stringCode - The string code to retrieveargs - the formatting arguments for the String
IllegalArgumentException - if the given string code doesn't exist
in the given bundle.MessageFormatprotected Schema getSchema(String schemaClass)
schemaClass - The instantiated schema factory
IllegalArgumentException - if schema class cannot be instantiated
protected String getStringFromBundle(Locale ourLocale,
String stringCode)
ourLocale - The specified Locale ObjectstringCode - The specified String code
protected String getStringFromDefaultSchemaBundle(Locale ourLocale,
String stringCode)
ourLocale - The specified Locale ObjectstringCode - The specified String code
public String getStringOrNull(String stringCode,
Object[] args)
stringCode - The string code to retrieveargs - the formatting arguments for the String
MessageFormat
|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||