org.kuali.common.util.validate
Class MatchDeclaringClassFieldsValidator

java.lang.Object
  extended by org.kuali.common.util.validate.MatchDeclaringClassFieldsValidator
All Implemented Interfaces:
javax.validation.ConstraintValidator<MatchDeclaringClassFields,Object>

public class MatchDeclaringClassFieldsValidator
extends Object
implements javax.validation.ConstraintValidator<MatchDeclaringClassFields,Object>


Constructor Summary
MatchDeclaringClassFieldsValidator()
           
 
Method Summary
protected  List<String> checkForDuplicateFieldNames(FieldDetail... details)
           
protected  List<String> checkForMatchingTypes(FieldDetail main, FieldDetail other)
           
protected  List<String> checkForMissingFields(FieldDetail declaringClass, FieldDetail instance)
           
protected  List<String> getDuplicatedFieldNameErrors(Class<?> type, Set<String> duplicates)
           
protected  Set<String> getDuplicatedFieldNames(Set<Field> fields)
           
protected  FieldDetail getFieldDetail(Class<?> type)
           
protected  void handleErrors(javax.validation.ConstraintValidatorContext constraintContext, List<String> errors)
           
 void initialize(MatchDeclaringClassFields constraintAnnotation)
           
 boolean isValid(Object instance, javax.validation.ConstraintValidatorContext constraintContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MatchDeclaringClassFieldsValidator

public MatchDeclaringClassFieldsValidator()
Method Detail

initialize

public void initialize(MatchDeclaringClassFields constraintAnnotation)
Specified by:
initialize in interface javax.validation.ConstraintValidator<MatchDeclaringClassFields,Object>

isValid

public boolean isValid(Object instance,
                       javax.validation.ConstraintValidatorContext constraintContext)
Specified by:
isValid in interface javax.validation.ConstraintValidator<MatchDeclaringClassFields,Object>

checkForMatchingTypes

protected List<String> checkForMatchingTypes(FieldDetail main,
                                             FieldDetail other)

checkForMissingFields

protected List<String> checkForMissingFields(FieldDetail declaringClass,
                                             FieldDetail instance)

getFieldDetail

protected FieldDetail getFieldDetail(Class<?> type)

checkForDuplicateFieldNames

protected List<String> checkForDuplicateFieldNames(FieldDetail... details)

getDuplicatedFieldNameErrors

protected List<String> getDuplicatedFieldNameErrors(Class<?> type,
                                                    Set<String> duplicates)

getDuplicatedFieldNames

protected Set<String> getDuplicatedFieldNames(Set<Field> fields)

handleErrors

protected void handleErrors(javax.validation.ConstraintValidatorContext constraintContext,
                            List<String> errors)


Copyright © 2010–2014 The Kuali Foundation. All rights reserved.