|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.opensymphony.xwork2.DefaultTextProvider
public class DefaultTextProvider
DefaultTextProvider gets texts from only the default resource bundles associated with the LocalizedTextUtil.
LocalizedTextUtil.addDefaultResourceBundle(String),
Serialized Form| Constructor Summary | |
|---|---|
DefaultTextProvider()
|
|
| Method Summary | |
|---|---|
java.lang.String |
getText(java.lang.String key)
Gets a message based on a message key, or null if no message is found. |
java.lang.String |
getText(java.lang.String key,
java.util.List<?> args)
Gets a message based on a key using the supplied args, as defined in MessageFormat, or null if no message is found. |
java.lang.String |
getText(java.lang.String key,
java.lang.String defaultValue)
Gets a message based on a key, or, if the message is not found, a supplied default value is returned. |
java.lang.String |
getText(java.lang.String key,
java.lang.String[] args)
Gets a message based on a key using the supplied args, as defined in MessageFormat, or null if no message is found. |
java.lang.String |
getText(java.lang.String key,
java.lang.String defaultValue,
java.util.List<?> args)
Gets a message based on a key using the supplied args, as defined in MessageFormat, or, if the message is not found, a supplied
default value is returned. |
java.lang.String |
getText(java.lang.String key,
java.lang.String defaultValue,
java.util.List<?> args,
ValueStack stack)
Gets a message based on a key using the supplied args, as defined in MessageFormat, or, if the message is not found, a supplied
default value is returned. |
java.lang.String |
getText(java.lang.String key,
java.lang.String defaultValue,
java.lang.String obj)
Gets a message based on a key using the supplied obj, as defined in MessageFormat, or, if the message is not found, a supplied
default value is returned. |
java.lang.String |
getText(java.lang.String key,
java.lang.String defaultValue,
java.lang.String[] args)
Gets a message based on a key using the supplied args, as defined in MessageFormat, or, if the message is not found, a supplied
default value is returned. |
java.lang.String |
getText(java.lang.String key,
java.lang.String defaultValue,
java.lang.String[] args,
ValueStack stack)
Gets a message based on a key using the supplied args, as defined in MessageFormat, or, if the message is not found, a supplied
default value is returned. |
java.util.ResourceBundle |
getTexts()
Get the resource bundle associated with the implementing class (usually an action). |
java.util.ResourceBundle |
getTexts(java.lang.String bundleName)
Get the named bundle, such as "com/acme/Foo". |
boolean |
hasKey(java.lang.String key)
Checks if a message key exists. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultTextProvider()
| Method Detail |
|---|
public boolean hasKey(java.lang.String key)
TextProvider
hasKey in interface TextProviderkey - message key to check for
public java.lang.String getText(java.lang.String key)
TextProvider
getText in interface TextProviderkey - the resource bundle key that is to be searched for
public java.lang.String getText(java.lang.String key,
java.lang.String defaultValue)
TextProvider
getText in interface TextProviderkey - the resource bundle key that is to be searched fordefaultValue - the default value which will be returned if no message is found
public java.lang.String getText(java.lang.String key,
java.util.List<?> args)
TextProviderMessageFormat, or null if no message is found.
getText in interface TextProviderkey - the resource bundle key that is to be searched forargs - a list args to be used in a MessageFormat message
public java.lang.String getText(java.lang.String key,
java.lang.String[] args)
TextProviderMessageFormat, or null if no message is found.
getText in interface TextProviderkey - the resource bundle key that is to be searched forargs - an array args to be used in a MessageFormat message
public java.lang.String getText(java.lang.String key,
java.lang.String defaultValue,
java.util.List<?> args)
TextProviderMessageFormat, or, if the message is not found, a supplied
default value is returned.
getText in interface TextProviderkey - the resource bundle key that is to be searched fordefaultValue - the default value which will be returned if no message is foundargs - a list args to be used in a MessageFormat message
public java.lang.String getText(java.lang.String key,
java.lang.String defaultValue,
java.lang.String[] args)
TextProviderMessageFormat, or, if the message is not found, a supplied
default value is returned.
getText in interface TextProviderkey - the resource bundle key that is to be searched fordefaultValue - the default value which will be returned if no message is foundargs - an array args to be used in a MessageFormat message
public java.lang.String getText(java.lang.String key,
java.lang.String defaultValue,
java.lang.String obj)
TextProviderMessageFormat, or, if the message is not found, a supplied
default value is returned.
getText in interface TextProviderkey - the resource bundle key that is to be searched fordefaultValue - the default value which will be returned if no message is foundobj - obj to be used in a MessageFormat message
public java.lang.String getText(java.lang.String key,
java.lang.String defaultValue,
java.util.List<?> args,
ValueStack stack)
TextProviderMessageFormat, or, if the message is not found, a supplied
default value is returned. Instead of using the value stack in the ActionContext
this version of the getText() method uses the provided value stack.
getText in interface TextProviderkey - the resource bundle key that is to be searched fordefaultValue - the default value which will be returned if no message is foundargs - a list args to be used in a MessageFormat messagestack - the value stack to use for finding the text
public java.lang.String getText(java.lang.String key,
java.lang.String defaultValue,
java.lang.String[] args,
ValueStack stack)
TextProviderMessageFormat, or, if the message is not found, a supplied
default value is returned. Instead of using the value stack in the ActionContext
this version of the getText() method uses the provided value stack.
getText in interface TextProviderkey - the resource bundle key that is to be searched fordefaultValue - the default value which will be returned if no message is foundargs - an array args to be used in a MessageFormat messagestack - the value stack to use for finding the text
public java.util.ResourceBundle getTexts(java.lang.String bundleName)
TextProvider
getTexts in interface TextProviderbundleName - the name of the resource bundle, such as "com/acme/Foo".
public java.util.ResourceBundle getTexts()
TextProvider
getTexts in interface TextProvider
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||