|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjaxx.runtime.validator.XWorkBeanValidator<B>
B - type of the bean to validate.public class XWorkBeanValidator<B>
A customized validator for a given bean.
Use the methodvalidate(Object) to obtain the messages detected by
the validator for the given bean.
| Field Summary | |
|---|---|
protected Class<B> |
beanClass
the type of bean to validate |
protected com.opensymphony.xwork2.ActionContext |
context
|
protected String |
contextName
the validation named context (can be null) |
protected static Map<String,List<String>> |
EMPTY_RESULT
|
protected Set<String> |
fieldNames
the list of field names detected for this validator |
protected boolean |
includeDefaultContext
a flag to include or not the default context validators |
protected com.opensymphony.xwork2.validator.DelegatingValidatorContext |
validationContext
|
protected com.opensymphony.xwork2.ValidationAwareSupport |
validationSupport
|
protected com.opensymphony.xwork2.validator.ActionValidatorManager |
validator
|
| Constructor Summary | |
|---|---|
XWorkBeanValidator(Class<B> beanClass,
String contextName)
|
|
XWorkBeanValidator(Class<B> beanClass,
String contextName,
boolean includeDefaultContext)
|
|
XWorkBeanValidator(Class<B> beanClass,
String contextName,
boolean includeDefaultContext,
com.opensymphony.xwork2.util.ValueStack vs)
|
|
XWorkBeanValidator(Class<B> beanClass,
String contextName,
com.opensymphony.xwork2.util.ValueStack vs)
|
|
| Method Summary | |
|---|---|
boolean |
containsField(String fieldName)
Test a the validator contains the field given his name |
Class<B> |
getBeanClass()
|
String |
getContextName()
|
Set<String> |
getFieldNames()
|
com.opensymphony.xwork2.validator.ActionValidatorManager |
getValidator()
|
protected void |
initFields()
update the property fieldNames, says search in XWorks |
boolean |
isIncludeDefaultContext()
|
void |
setContextName(String contextName)
|
void |
setIncludeDefaultContext(boolean includeDefaultContext)
|
String |
toString()
|
Map<String,List<String>> |
validate(B bean)
Valide le bean donné et retourne les messages produits. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final Map<String,List<String>> EMPTY_RESULT
protected final Class<B> beanClass
protected String contextName
protected Set<String> fieldNames
protected boolean includeDefaultContext
protected com.opensymphony.xwork2.ValidationAwareSupport validationSupport
protected com.opensymphony.xwork2.validator.DelegatingValidatorContext validationContext
protected com.opensymphony.xwork2.validator.ActionValidatorManager validator
protected com.opensymphony.xwork2.ActionContext context
| Constructor Detail |
|---|
public XWorkBeanValidator(Class<B> beanClass,
String contextName)
public XWorkBeanValidator(Class<B> beanClass,
String contextName,
com.opensymphony.xwork2.util.ValueStack vs)
public XWorkBeanValidator(Class<B> beanClass,
String contextName,
boolean includeDefaultContext)
public XWorkBeanValidator(Class<B> beanClass,
String contextName,
boolean includeDefaultContext,
com.opensymphony.xwork2.util.ValueStack vs)
| Method Detail |
|---|
public boolean isIncludeDefaultContext()
public Class<B> getBeanClass()
public String getContextName()
public Set<String> getFieldNames()
public com.opensymphony.xwork2.validator.ActionValidatorManager getValidator()
public boolean containsField(String fieldName)
fieldName - the name of the searched field
true if validator contaisn this field,
false otherwisepublic void setIncludeDefaultContext(boolean includeDefaultContext)
public void setContextName(String contextName)
public Map<String,List<String>> validate(B bean)
bean - le bean a valider (il doit etre non null)
public String toString()
toString in class Objectprotected void initFields()
fieldNames, says search in XWorks
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||