org.javalid.core.validator
Class DateAfterValidatorImpl

java.lang.Object
  extended by org.javalid.core.validator.AbstractJavalidValidatorImpl<DateAfter>
      extended by org.javalid.core.validator.DateAfterValidatorImpl
All Implemented Interfaces:
JavalidValidator<DateAfter>

public class DateAfterValidatorImpl
extends AbstractJavalidValidatorImpl<DateAfter>

Validator implementation for the @DateAfter annotation.

Since:
1.2
Version:
1.0
Author:
M.Reuvers

Constructor Summary
DateAfterValidatorImpl()
           
 
Method Summary
 java.util.List<ValidationMessage> doValidate(DateAfter annotation, java.lang.Object value, java.lang.String path, JvConfigurationWrapper config)
           
 boolean requiresComplexCall()
          Returns true if this validator requires the current annotation validator to fullfill its validation (and all extra info).
 java.util.List<ValidationMessage> validateComplex(DateAfter annotation, java.lang.Object value, java.lang.String path, JvConfigurationWrapper config, ComplexValidationInfo info)
          This the complex variant for validation and is called by the framework if requiresComplexCall is set to true.
 
Methods inherited from class org.javalid.core.validator.AbstractJavalidValidatorImpl
checkIsSingleExpression, validate, validationMustBeAppliedToGroup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateAfterValidatorImpl

public DateAfterValidatorImpl()
Method Detail

doValidate

public java.util.List<ValidationMessage> doValidate(DateAfter annotation,
                                                    java.lang.Object value,
                                                    java.lang.String path,
                                                    JvConfigurationWrapper config)
Specified by:
doValidate in class AbstractJavalidValidatorImpl<DateAfter>

validateComplex

public java.util.List<ValidationMessage> validateComplex(DateAfter 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<DateAfter>
Overrides:
validateComplex in class AbstractJavalidValidatorImpl<DateAfter>
Parameters:
annotation - The annotation it is about
value - The value to validate
path - 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!!!)

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<DateAfter>
Overrides:
requiresComplexCall in class AbstractJavalidValidatorImpl<DateAfter>
Returns:
True if it intends to do complex validation