|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.waveset.msgcat.CustomCatalogSet
Keeps an ordered list of message catalogs. The heirarchy looks something like this:
A default custom catalog: CustomCatalog (_default_custom_catalog) | |-- CustomCatalog.MessageSet (en/US) | | | |-- CustomCatalog.Message | |-- CustomCatalog.Message | |-- ... | |-- CustomCatalog.MessageSet (fr/CA) | | | |-- CustomCatalog.Message | |-- CustomCatalog.Message | |-- ... | |-- ... An ordered list of catalogs (ordered by precedence, LIFO) CustomCatalog (first) | |-- CustomCatalog.MessageSet (en/US) | | | |-- CustomCatalog.Message | |-- CustomCatalog.Message | |-- ... | |-- CustomCatalog.MessageSet (fr/CA) | | | |-- CustomCatalog.Message | |-- CustomCatalog.Message | |-- ... | |-- ... | CustomCatalog (second) | |-- CustomCatalog.MessageSet (en/US) | | | |-- CustomCatalog.Message | |-- CustomCatalog.Message | |-- ... | |-- CustomCatalog.MessageSet (fr/CA) | | | |-- CustomCatalog.Message | |-- CustomCatalog.Message | |-- ... | |-- ...
Field Summary | |
static java.lang.String |
code_id
|
static java.lang.String |
DEFAULT
Used to identify the "default" catalog. |
Constructor Summary | |
CustomCatalogSet()
Default constructor. |
Method Summary | |
static void |
add(CustomCatalog cc)
Add the given catalog to the set of custom catalogs. |
static CustomCatalog[] |
getAll()
Get a list of the custom catalogs in order of precedence. |
static CustomCatalog |
getDefault()
Gets the default custom catalog. |
java.lang.String |
localize(java.lang.String id,
java.lang.Object[] parameters,
java.util.Locale locale)
Attempts to find and localize the message corresponding with the given id for the given locale, using the given parameters if necessary. |
static void |
remove(java.lang.String cc_id)
Remove the given custom catalog. |
static void |
setDefault(CustomCatalog cc)
Set the given catalog as the default. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String code_id
public static final java.lang.String DEFAULT
Constructor Detail |
public CustomCatalogSet()
Method Detail |
public static void setDefault(CustomCatalog cc)
cc
- The catalog to set as default.public static void add(CustomCatalog cc)
cc
- The catalog to add.public static CustomCatalog[] getAll()
public static CustomCatalog getDefault()
public static void remove(java.lang.String cc_id)
cc_id
- Id of the custom catalog.public java.lang.String localize(java.lang.String id, java.lang.Object[] parameters, java.util.Locale locale)
id
- Id of the message to localize.parameters
- Values to use for substitution into the
message placeholders.locale
- The locale to use.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |