nl.knowlogy.validation.validators
Class IsValidValidator

java.lang.Object
  extended by nl.knowlogy.validation.validators.BasePropertyValidator
      extended by nl.knowlogy.validation.validators.IsValidValidator
All Implemented Interfaces:
PropertyValidation

public class IsValidValidator
extends BasePropertyValidator

The IsValidValidator validates properties which are not returning default types (like Integer, Long, String etc) but user defined classes or arrays/collections of user defined classes.

These instances are validated, if exists, with the use of the Validatable interface, otherwise with ValidationEngine instance.

Author:
Robert
See Also:
ValidationEngine, Validatable

Field Summary
 
Fields inherited from class nl.knowlogy.validation.validators.BasePropertyValidator
logger
 
Constructor Summary
IsValidValidator(ClassValidator classValidator, String propertyName)
           
IsValidValidator(ClassValidator classValidator, String propertyName, String errorCode)
           
 
Method Summary
 void doValidatePropertyValue(Object toValidate, Object propertyValue, Messages messages)
          Validates the property value of object obj.
 void doValidatePropertyValue(Object toValidate, Object propertyValue, String group, Messages messages)
           
 String getDefaultErrorCode()
           
 String toString()
           
 
Methods inherited from class nl.knowlogy.validation.validators.BasePropertyValidator
getErrorCode, getPropertyName, setErrorCode, setPropertyName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IsValidValidator

public IsValidValidator(ClassValidator classValidator,
                        String propertyName)

IsValidValidator

public IsValidValidator(ClassValidator classValidator,
                        String propertyName,
                        String errorCode)
Method Detail

getDefaultErrorCode

public String getDefaultErrorCode()
Specified by:
getDefaultErrorCode in class BasePropertyValidator

doValidatePropertyValue

public void doValidatePropertyValue(Object toValidate,
                                    Object propertyValue,
                                    Messages messages)
Description copied from interface: PropertyValidation
Validates the property value of object obj. In case of any validation errors, an they are added to the errors object.

messages - errors object to which any validation errors are added.

doValidatePropertyValue

public void doValidatePropertyValue(Object toValidate,
                                    Object propertyValue,
                                    String group,
                                    Messages messages)

toString

public String toString()
Overrides:
toString in class BasePropertyValidator


Copyright © 2007. All Rights Reserved.