| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.tapestry5.validator.AbstractValidator<C,T>
public abstract class AbstractValidator<C,T>
Base class for constructing a Validator.
| Constructor Summary | |
|---|---|
protected  | 
AbstractValidator(Class<C> constraintType,
                                   Class<T> valueType,
                                   String messageKey)
 | 
| Method Summary | |
|---|---|
 Class<C> | 
getConstraintType()
Returns the type of constraint value used with this validator.  | 
 String | 
getMessageKey()
Returns the message key, within the validation messages, normally used by this validator.  | 
 Class<T> | 
getValueType()
Returns the value type associated with this validator.  | 
 boolean | 
isRequired()
Return false, which is correct for the vast majority of validators.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Methods inherited from interface org.apache.tapestry5.Validator | 
|---|
render, validate | 
| Constructor Detail | 
|---|
protected AbstractValidator(Class<C> constraintType,
                            Class<T> valueType,
                            String messageKey)
| Method Detail | 
|---|
public final Class<C> getConstraintType()
Validator
getConstraintType in interface Validator<C,T>public final Class<T> getValueType()
ValidatorValidator.validate(Field, Object, MessageFormatter, Object)
 will only be invoked when the value is assignable to the validator's value type.
getValueType in interface Validator<C,T>public final String getMessageKey()
ValidatorMessageFormatter passed to Validator.validate(Field, Object, MessageFormatter, Object) (unless
 overridden).
getMessageKey in interface Validator<C,T>public boolean isRequired()
Required
 overrides this to true.F
isRequired in interface Validator<C,T>
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||