| java.lang.Object com.jcorporate.expresso.core.i18n.MessageBundle
MessageBundle | public class MessageBundle extends Object (Code) | | A message bundle handles the messages for a specific combination of
language, country and schema Created on January 21, 2001, 8:43 PM
|
DEFAULT_BUNDLE_NAME | final public static String DEFAULT_BUNDLE_NAME(Code) | | The default bundle name
|
DEFAULT_BUNDLE_PATH | final public static String DEFAULT_BUNDLE_PATH(Code) | | |
MessageBundle | public MessageBundle()(Code) | | Creates new Class
|
getBundleName | public synchronized String getBundleName()(Code) | | Gets the resource bundle name author: Peter Pilgrim, Sun Sep 07 12:16:56
BST 2003
java.lang.String the bundle name |
getBundlePath | public synchronized String getBundlePath()(Code) | | Returns the location of the Messages bundle path as specified by your
schema.
java.lang.String |
getCountry | public String getCountry()(Code) | | Used to get the sub-language country code
the ISO two letter country code. |
getLanguage | public String getLanguage()(Code) | | the language code as a java.lang.String |
getSchema | protected Schema getSchema(String schemaClass)(Code) | | Instantiate & return the schema class given in the current parameter
Parameters: schemaClass - The instantiated schema factory A Schema object instantiated from the class named by the'SchemaClass' parameter throws: IllegalArgumentException - if schema class cannot be instantiated |
getString | public String getString(String stringCode, Object[] args)(Code) | | Formats the string code with the appropriate argument array. Issues warning log if code is not found.
Parameters: stringCode - The string code to retrieve Parameters: args - the formatting arguments for the String The properly formatted string as read from the messages bundle, or the stringCode if not found See Also: java.text.MessageFormat |
getStringFromBundle | protected String getStringFromBundle(Locale ourLocale, String stringCode)(Code) | | Return a string for a specific locale
Parameters: ourLocale - The specified Locale Object Parameters: stringCode - The specified String code The properly formatted string as read from the messages bundle; never null--will throw runtime exception if not found |
getStringFromDefaultSchemaBundle | protected String getStringFromDefaultSchemaBundle(Locale ourLocale, String stringCode)(Code) | | Return a string for a specific locale, using the default (expresso) schema
Parameters: ourLocale - The specified Locale Object Parameters: stringCode - The specified String code The properly formatted string as read from the messages bundle |
getStringOrNull | public String getStringOrNull(String stringCode, Object[] args)(Code) | | Formats the string code with the appropriate argument array. Does NOT issue warning log if code is not found, but rather returns null
Parameters: stringCode - The string code to retrieve Parameters: args - the formatting arguments for the String The properly formatted string as read from the messages bundle, or null if not found See Also: java.text.MessageFormat |
getStringRequired | public String getStringRequired(String stringCode, Object[] args) throws IllegalArgumentException(Code) | | Formats the string code with the appropriate argument array, throwing an exception if
the key does not exist.
Parameters: stringCode - The string code to retrieve Parameters: args - the formatting arguments for the String The properly formatted string as read from the messages bundle throws: IllegalArgumentException - if the given string code doesn't existin the given bundle. See Also: java.text.MessageFormat |
setBundleName | public synchronized void setBundleName(String bundleName)(Code) | | Sets the resource bundle name
Parameters: bundleName - The bundle name to use when retrieving messages |
setBundlePath | public synchronized void setBundlePath(String newBundlePath)(Code) | | Sets the path for the bundle for the specified schema
Parameters: newBundlePath - the bundle path |
setCountry | public synchronized void setCountry(String newCountry)(Code) | | Sets the country for the bundle
Parameters: newCountry - the new two digit country code |
setLanguage | public synchronized void setLanguage(String newLanguage)(Code) | | Sets the language to get the Messages for
Parameters: newLanguage - the new language code |
setSchema | public synchronized void setSchema(String schemaName)(Code) | | Sets the schema so you can get messages from your own apps messages
bundle
Parameters: schemaName - The name of the schema to get the messages from |
|
|