org.javalid.core.validator
Class DateEqualValidatorImpl

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

public class DateEqualValidatorImpl
extends AbstractJavalidValidatorImpl<DateEqual>

Validator implementation for the @DateEqual annotation.

Since:
1.2
Version:
1.0
Author:
M.Reuvers

Constructor Summary
DateEqualValidatorImpl()
           
 
Method Summary
 java.util.List<ValidationMessage> doValidate(DateEqual 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(DateEqual 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

DateEqualValidatorImpl

public DateEqualValidatorImpl()
Method Detail

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

validateComplex

public java.util.List<ValidationMessage> validateComplex(DateEqual 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<DateEqual>
Overrides:
validateComplex in class AbstractJavalidValidatorImpl<DateEqual>
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!!!)

doValidate

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