|
Anyframe Web | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.struts.util.MessageResources
org.apache.struts.util.PropertyMessageResources
anyframe.web.struts.util.DefaultPropertyMessageResources
public class DefaultPropertyMessageResources
Concrete subclass of MessageResources that reads message keys
and corresponding strings from named property resources in the same manner
that java.util.PropertyResourceBundle does. The
base property defines the base property resource name, and
must be specified.
IMPLEMENTATION NOTE - This class trades memory for speed by caching all messages located via generalizing the Locale under the original locale as well. This results in specific messages being stored in the message cache more than once, but improves response time on subsequent requests for the same locale + key combination.
| Field Summary |
|---|
| Fields inherited from class org.apache.struts.util.PropertyMessageResources |
|---|
locales, log, messages |
| Fields inherited from class org.apache.struts.util.MessageResources |
|---|
config, defaultFactory, defaultLocale, factory, formats, returnNull |
| Constructor Summary | |
|---|---|
DefaultPropertyMessageResources(org.apache.struts.util.MessageResourcesFactory factory,
java.lang.String config,
boolean returnNull)
Construct a new PropertyMessageResources according to the specified parameters. |
|
| Method Summary | |
|---|---|
java.lang.String |
getCharset()
|
java.lang.String |
getMessage(java.util.Locale locale,
java.lang.String key)
Returns a text message for the specified key, for the default Locale. |
void |
setCharset(java.lang.String string)
|
| Methods inherited from class org.apache.struts.util.PropertyMessageResources |
|---|
loadLocale, setMode |
| Methods inherited from class org.apache.struts.util.MessageResources |
|---|
escape, getConfig, getFactory, getMessage, getMessage, getMessage, getMessage, getMessage, getMessage, getMessage, getMessage, getMessage, getMessage, getMessage, getMessageResources, getReturnNull, isEscape, isPresent, isPresent, localeKey, log, log, messageKey, messageKey, setEscape, setReturnNull |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultPropertyMessageResources(org.apache.struts.util.MessageResourcesFactory factory,
java.lang.String config,
boolean returnNull)
factory - The MessageResourcesFactory that created usconfig - The configuration parameter for this MessageResourcesreturnNull - The returnNull property we should initialize with| Method Detail |
|---|
public java.lang.String getMessage(java.util.Locale locale,
java.lang.String key)
returnNull
property is set. Otherwise, an appropriate error message will be
returned.
This method must be implemented by a concrete subclass.
getMessage in class org.apache.struts.util.PropertyMessageResourceslocale - The requested message Locale, or null for the
system default Localekey - The message key to look up
public java.lang.String getCharset()
public void setCharset(java.lang.String string)
string -
|
Anyframe Web | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||