|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.opensymphony.xwork.validator.CompositeTextProvider
public class CompositeTextProvider
This is a composite TextProvider
that takes in an array or List
of TextProvider
s, it will
consult each of them in order to get a composite result. To know how each method behaves, please refer to the
javadoc for each methods.
Constructor Summary | |
---|---|
CompositeTextProvider(List textProviders)
Instantiates a CompositeTextProvider with some predefined textProviders . |
|
CompositeTextProvider(TextProvider[] textProviders)
Instantiates a CompositeTextProvider with some predefined textProviders . |
Method Summary | |
---|---|
String |
getText(String key)
It will consult each TextProvider s and return the first valid message for this
key |
String |
getText(String key,
List args)
It will consult each TextProvider s and return the first valid message for this
key . |
String |
getText(String key,
String defaultValue)
It will consult each TextProvider s and return the first valid message for this
key before returning defaultValue if every else fails. |
String |
getText(String key,
String[] args)
It will consult each TextProvider s and return the first valid message for this
key . |
String |
getText(String key,
String defaultValue,
List args)
It will consult each TextProvider s and return the first valid message for this
key , before returining defaultValue |
String |
getText(String key,
String defaultValue,
List args,
OgnlValueStack stack)
It will consult each TextProvider s and return the first valid message for this
key , before returining defaultValue |
String |
getText(String key,
String defaultValue,
String obj)
It will consult each TextProvider s and return the first valid message for this
key , before returining defaultValue
if every else fails. |
String |
getText(String key,
String defaultValue,
String[] args)
It will consult each TextProvider s and return the first valid message for this
key , before returining defaultValue . |
String |
getText(String key,
String defaultValue,
String[] args,
OgnlValueStack stack)
It will consult each TextProvider s and return the first valid message for this
key , before returining defaultValue |
ResourceBundle |
getTexts()
It will consult each TextProvider s and return the first non-null ResourceBundle . |
ResourceBundle |
getTexts(String bundleName)
It will consult each TextProvider s and return the first non-null ResourceBundle . |
boolean |
hasKey(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 CompositeTextProvider(List textProviders)
CompositeTextProvider
with some predefined textProviders
.
textProviders
- public CompositeTextProvider(TextProvider[] textProviders)
CompositeTextProvider
with some predefined textProviders
.
textProviders
- Method Detail |
---|
public boolean hasKey(String key)
TextProvider
hasKey
in interface TextProvider
key
-
com.opensymphony.xwork.TextProvider#hasKey(String)}
It will consult each individual {@link TextProvider}s and return true if either one of the
{@link TextProvider} has such a key>
else false.
public String getText(String key)
TextProvider
s and return the first valid message for this
key
getText
in interface TextProvider
key
-
com.opensymphony.xwork.TextProvider#getText(String)}
public String getText(String key, String defaultValue)
TextProvider
s and return the first valid message for this
key
before returning defaultValue
if every else fails.
getText
in interface TextProvider
key
- defaultValue
-
com.opensymphony.xwork.TextProvider#getText(String, String)}
public String getText(String key, String defaultValue, String obj)
TextProvider
s and return the first valid message for this
key
, before returining defaultValue
if every else fails.
getText
in interface TextProvider
key
- defaultValue
- obj
-
com.opensymphony.xwork.TextProvider#getText(String, String, String)}
public String getText(String key, List args)
TextProvider
s and return the first valid message for this
key
.
getText
in interface TextProvider
key
- args
-
com.opensymphony.xwork.TextProvider#getText(String, java.util.List)}
public String getText(String key, String[] args)
TextProvider
s and return the first valid message for this
key
.
getText
in interface TextProvider
key
- args
-
com.opensymphony.xwork.TextProvider#getText(String, String[])}
public String getText(String key, String defaultValue, List args)
TextProvider
s and return the first valid message for this
key
, before returining defaultValue
getText
in interface TextProvider
key
- defaultValue
- args
-
com.opensymphony.xwork.TextProvider#getText#getText(String, String, java.util.List)}
public String getText(String key, String defaultValue, String[] args)
TextProvider
s and return the first valid message for this
key
, before returining defaultValue
.
getText
in interface TextProvider
key
- defaultValue
- args
-
com.opensymphony.xwork.TextProvider#getText(String, String, String[])}
public String getText(String key, String defaultValue, List args, OgnlValueStack stack)
TextProvider
s and return the first valid message for this
key
, before returining defaultValue
getText
in interface TextProvider
key
- defaultValue
- args
- stack
-
com.opensymphony.xwork.TextProvider#getText(String, String, java.util.List, com.opensymphony.xwork.util.OgnlValueStack)}
public String getText(String key, String defaultValue, String[] args, OgnlValueStack stack)
TextProvider
s and return the first valid message for this
key
, before returining defaultValue
getText
in interface TextProvider
key
- defaultValue
- args
- stack
-
com.opensymphony.xwork.TextProvider#getText(String, String, String[], com.opensymphony.xwork.util.OgnlValueStack)}
public ResourceBundle getTexts(String bundleName)
TextProvider
s and return the first non-null ResourceBundle
.
getTexts
in interface TextProvider
bundleName
-
TextProvider#getTexts(String)}
public ResourceBundle getTexts()
TextProvider
s and return the first non-null ResourceBundle
.
getTexts
in interface TextProvider
TextProvider#getTexts()}
|
WebWork Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |