|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.opensymphony.xwork.TextProviderSupport
public class TextProviderSupport
Default TextProvider implementation.
Constructor Summary | |
---|---|
TextProviderSupport(java.lang.Class clazz,
LocaleProvider provider)
Constructor. |
|
TextProviderSupport(java.util.ResourceBundle bundle,
LocaleProvider provider)
Constructor. |
Method Summary | |
---|---|
java.lang.String |
getText(java.lang.String key)
Get a text from the resource bundles associated with this action. |
java.lang.String |
getText(java.lang.String key,
java.util.List args)
Get a text from the resource bundles associated with this action. |
java.lang.String |
getText(java.lang.String key,
java.lang.String defaultValue)
Get a text from the resource bundles associated with this action. |
java.lang.String |
getText(java.lang.String key,
java.lang.String[] args)
Get a text from the resource bundles associated with this action. |
java.lang.String |
getText(java.lang.String key,
java.lang.String defaultValue,
java.util.List args)
Get a text from the resource bundles associated with this action. |
java.lang.String |
getText(java.lang.String key,
java.lang.String defaultValue,
java.util.List args,
OgnlValueStack 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 arg)
Get a text from the resource bundles associated with this action. |
java.lang.String |
getText(java.lang.String key,
java.lang.String defaultValue,
java.lang.String[] args)
Get a text from the resource bundles associated with this action. |
java.lang.String |
getText(java.lang.String key,
java.lang.String defaultValue,
java.lang.String[] args,
OgnlValueStack 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 this action. |
java.util.ResourceBundle |
getTexts(java.lang.String aBundleName)
Get the named bundle. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TextProviderSupport(java.lang.Class clazz, LocaleProvider provider)
clazz
- a clazz to use for reading the resource bundle.provider
- a locale provider.public TextProviderSupport(java.util.ResourceBundle bundle, LocaleProvider provider)
bundle
- the resource bundle.provider
- a locale provider.Method Detail |
---|
public java.lang.String getText(java.lang.String key)
getText
in interface TextProvider
key
- name of text to be found
public java.lang.String getText(java.lang.String key, java.lang.String defaultValue)
getText
in interface TextProvider
key
- name of text to be founddefaultValue
- the default value which will be returned if no text is found
public java.lang.String getText(java.lang.String key, java.lang.String defaultValue, java.lang.String arg)
getText
in interface TextProvider
key
- name of text to be founddefaultValue
- the default value which will be returned if no text is foundarg
- obj to be used in a MessageFormat
message
public java.lang.String getText(java.lang.String key, java.util.List args)
getText
in interface TextProvider
key
- name of text to be foundargs
- a List of args to be used in a MessageFormat message
public java.lang.String getText(java.lang.String key, java.lang.String[] args)
getText
in interface TextProvider
key
- name of text to be foundargs
- an array of 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)
getText
in interface TextProvider
key
- name of text to be founddefaultValue
- the default value which will be returned if no text is foundargs
- a List of 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)
getText
in interface TextProvider
key
- name of text to be founddefaultValue
- the default value which will be returned if no text is foundargs
- an array of 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, OgnlValueStack stack)
MessageFormat
, 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 TextProvider
key
- 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, OgnlValueStack stack)
MessageFormat
, 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 TextProvider
key
- 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 aBundleName)
getTexts
in interface TextProvider
aBundleName
- bundle name
public java.util.ResourceBundle getTexts()
getTexts
in interface TextProvider
|
XWork Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |