org.kuali.student.contract.model.validation
Class DictionaryValidator

java.lang.Object
  extended by org.kuali.student.contract.model.validation.DictionaryValidator
All Implemented Interfaces:
ModelValidator

public class DictionaryValidator
extends Object
implements ModelValidator

This validates a single dictinoary entry

Author:
nwright

Field Summary
private  Dictionary dict
           
private  Collection errors
           
private  ModelFinder finder
           
private  DictionaryModel model
           
 
Constructor Summary
DictionaryValidator(Dictionary dict, DictionaryModel model)
           
 
Method Summary
private  void addError(String msg)
           
private  Constraint findConstraint(String id)
           
private  Field findField()
           
private  List<Constraint> getAllConstraints()
           
private  List<Constraint> getAllNamedConstraints()
           
private  String getConstraintId(Constraint cons)
           
private  List<Constraint> getDictionaryAdditionalConstraints()
           
private  List<Constraint> getFieldNamedConstraints()
           
 Collection<String> validate()
           
private  void validateComplexConstraint(Constraint cons)
           
private  void validateForDuplicates()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dict

private Dictionary dict

model

private DictionaryModel model

finder

private ModelFinder finder

errors

private Collection errors
Constructor Detail

DictionaryValidator

public DictionaryValidator(Dictionary dict,
                           DictionaryModel model)
Method Detail

validate

public Collection<String> validate()
Specified by:
validate in interface ModelValidator

getAllConstraints

private List<Constraint> getAllConstraints()

getAllNamedConstraints

private List<Constraint> getAllNamedConstraints()

getFieldNamedConstraints

private List<Constraint> getFieldNamedConstraints()

getDictionaryAdditionalConstraints

private List<Constraint> getDictionaryAdditionalConstraints()

findConstraint

private Constraint findConstraint(String id)

findField

private Field findField()

getConstraintId

private String getConstraintId(Constraint cons)

validateComplexConstraint

private void validateComplexConstraint(Constraint cons)

validateForDuplicates

private void validateForDuplicates()

addError

private void addError(String msg)


Copyright © 2007-2012 The Kuali Foundation. All Rights Reserved.