org.openmrs.validator
Class PersonAttributeTypeValidator

java.lang.Object
  extended by org.openmrs.validator.PersonAttributeTypeValidator
All Implemented Interfaces:
org.springframework.validation.Validator

@Handler(supports=PersonAttributeType.class,
         order=50)
public class PersonAttributeTypeValidator
extends java.lang.Object
implements org.springframework.validation.Validator

Validates the PersonAttributeType class.

Since:
1.5

Constructor Summary
PersonAttributeTypeValidator()
           
 
Method Summary
 boolean supports(java.lang.Class c)
           
 void validate(java.lang.Object obj, org.springframework.validation.Errors errors)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersonAttributeTypeValidator

public PersonAttributeTypeValidator()
Method Detail

supports

public boolean supports(java.lang.Class c)
Specified by:
supports in interface org.springframework.validation.Validator
See Also:
Validator.supports(java.lang.Class)

validate

public void validate(java.lang.Object obj,
                     org.springframework.validation.Errors errors)
Specified by:
validate in interface org.springframework.validation.Validator
See Also:
Validator.validate(java.lang.Object, org.springframework.validation.Errors)
Expected behavior:
fail validation if name is null, fail validation if name already in use, pass validation if all fields are correct

OpenMRS-1.7.x

Generated Apr 27 2012 10:06 PM. NOTE - these libraries are in active development and subject to change