|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.opensymphony.xwork2.validator.validators.ValidatorSupport
com.opensymphony.xwork2.validator.validators.FieldValidatorSupport
com.opensymphony.xwork2.validator.validators.FieldExpressionValidator
org.nuiton.validator.xwork2.field.NuitonFieldExpressionValidator
public class NuitonFieldExpressionValidator
Nuiton default field validator.
This validator offers askip property that can be used to skip or
not the validator, this property is a OGNL expression.
To use this new field validator support, just now implements the method
validateWhenNotSkip(Object). This method will be invoked only if the skip
parameter is evaluated to false.
| Field Summary | |
|---|---|
protected String |
skip
extra parameter at the very beginning of the validate(Object) method to be able to skip (or not) the
validator execution. |
| Fields inherited from class com.opensymphony.xwork2.validator.validators.ValidatorSupport |
|---|
defaultMessage, log, messageKey |
| Constructor Summary | |
|---|---|
NuitonFieldExpressionValidator()
|
|
| Method Summary | |
|---|---|
protected boolean |
evaluateSkipParameter(Object object)
Evaluate the skip parameter value against the object to validate. |
void |
setSkip(String skip)
Sets the value of the skip parameter. |
void |
validate(Object object)
|
protected void |
validateWhenNotSkip(Object object)
Method to be invoked when skip parameter was not evaludated to true. |
| Methods inherited from class com.opensymphony.xwork2.validator.validators.FieldExpressionValidator |
|---|
getExpression, setExpression |
| Methods inherited from class com.opensymphony.xwork2.validator.validators.FieldValidatorSupport |
|---|
getFieldName, getValidatorType, setFieldName, setValidatorType |
| Methods inherited from class com.opensymphony.xwork2.validator.validators.ValidatorSupport |
|---|
addActionError, addFieldError, conditionalParse, getDefaultMessage, getFieldValue, getMessage, getMessageKey, getMessageParameters, getParse, getValidatorContext, isShortCircuit, setDefaultMessage, setMessageKey, setMessageParameters, setParse, setShortCircuit, setValidatorContext, setValueStack |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.opensymphony.xwork2.validator.Validator |
|---|
getDefaultMessage, getMessage, getMessageKey, getMessageParameters, getValidatorContext, setDefaultMessage, setMessageKey, setMessageParameters, setValidatorContext, setValueStack |
| Field Detail |
|---|
protected String skip
validate(Object) method to be able to skip (or not) the
validator execution.
by default the value is false : it seems fair to want to
validate if the validator is used :D...
| Constructor Detail |
|---|
public NuitonFieldExpressionValidator()
| Method Detail |
|---|
public void setSkip(String skip)
skip parameter.
skip - the new value of the skip parameter
protected void validateWhenNotSkip(Object object)
throws com.opensymphony.xwork2.validator.ValidationException
true.
object - the object to be validated.
com.opensymphony.xwork2.validator.ValidationException - is thrown if there is validation error(s).
public void validate(Object object)
throws com.opensymphony.xwork2.validator.ValidationException
validate in interface com.opensymphony.xwork2.validator.Validatorvalidate in class com.opensymphony.xwork2.validator.validators.FieldExpressionValidatorcom.opensymphony.xwork2.validator.ValidationException
protected boolean evaluateSkipParameter(Object object)
throws com.opensymphony.xwork2.validator.ValidationException
object - the object to validate
com.opensymphony.xwork2.validator.ValidationException - if could not evaluate the parameter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||