org.kuali.student.common.validator
Class SampCustomValidator

java.lang.Object
  extended by org.kuali.student.common.validator.SampCustomValidator
All Implemented Interfaces:
Validator

public class SampCustomValidator
extends Object
implements Validator

This is a sample Validator used for customized validation. Inject this validator into ValidatorFactory.

Author:
Neerav Agrawal

Field Summary
private  ObjectStructureDefinition objStructure
           
 
Constructor Summary
SampCustomValidator()
           
 
Method Summary
private  String getElementXpath(Stack<String> elementStack)
           
 ObjectStructureDefinition getObjStructure()
           
 void setObjStructure(ObjectStructureDefinition objStructure)
           
private  Map<String,Object> toMap(Constraint c)
           
 List<ValidationResultInfo> validateObject(FieldDefinition field, Object o, ObjectStructureDefinition objStructure, Stack<String> elementStack)
           
 List<ValidationResultInfo> validateObject(Object o, ObjectStructureDefinition objStructure)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

objStructure

private ObjectStructureDefinition objStructure
Constructor Detail

SampCustomValidator

public SampCustomValidator()
Method Detail

validateObject

public List<ValidationResultInfo> validateObject(Object o,
                                                 ObjectStructureDefinition objStructure)
Specified by:
validateObject in interface Validator

getObjStructure

public ObjectStructureDefinition getObjStructure()

setObjStructure

public void setObjStructure(ObjectStructureDefinition objStructure)

validateObject

public List<ValidationResultInfo> validateObject(FieldDefinition field,
                                                 Object o,
                                                 ObjectStructureDefinition objStructure,
                                                 Stack<String> elementStack)
Specified by:
validateObject in interface Validator

getElementXpath

private String getElementXpath(Stack<String> elementStack)

toMap

private Map<String,Object> toMap(Constraint c)


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.