org.javalid.core.validator
Class DateBeforeValidatorImpl
java.lang.Object
org.javalid.core.validator.AbstractJavalidValidatorImpl<DateBefore>
org.javalid.core.validator.DateBeforeValidatorImpl
- All Implemented Interfaces:
- JavalidValidator<DateBefore>
public class DateBeforeValidatorImpl
- extends AbstractJavalidValidatorImpl<DateBefore>
Validator implementation for the @DateBefore annotation.
- Since:
- 1.2
- Version:
- 1.0
- Author:
- M.Reuvers
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DateBeforeValidatorImpl
public DateBeforeValidatorImpl()
doValidate
public java.util.List<ValidationMessage> doValidate(DateBefore annotation,
java.lang.Object value,
java.lang.String path,
JvConfigurationWrapper config)
- Specified by:
doValidate in class AbstractJavalidValidatorImpl<DateBefore>
requiresComplexCall
public boolean requiresComplexCall()
- Description copied from interface:
JavalidValidator
- Returns true if this validator requires the current annotation validator to fullfill its
validation (and all extra info).
Normal validators must return false. In that case the default validate(..) method
is called. If false is returned, the validateComplex(..) method is called.
- Specified by:
requiresComplexCall in interface JavalidValidator<DateBefore>- Overrides:
requiresComplexCall in class AbstractJavalidValidatorImpl<DateBefore>
- Returns:
- True if it intends to do complex validation
validateComplex
public java.util.List<ValidationMessage> validateComplex(DateBefore annotation,
java.lang.Object value,
java.lang.String path,
JvConfigurationWrapper config,
ComplexValidationInfo info)
- Description copied from interface:
JavalidValidator
- This the complex variant for validation and is called by the framework
if requiresComplexCall is set to true. The framework delivers an extra
parameter with a lot of extra validation information then.
- Specified by:
validateComplex in interface JavalidValidator<DateBefore>- Overrides:
validateComplex in class AbstractJavalidValidatorImpl<DateBefore>
- Parameters:
annotation - The annotation it is aboutvalue - The value to validatepath - The framework gives the full path for this value you are validating, thus
you can use it directly in the ValidationMessage as path.config - Wrapper containing public configuration info (such as reflectionsupport, beanlookup, can be used if needed)info - Information object about the current validation. Careful with using it! Know what you are doing.
- Returns:
- List with ValidationMessage when validation fails, if no error returns an EMPTY list (not NULL!!!)