nl.knowlogy.validation.validators
Class BasePropertyValidator

java.lang.Object
  extended by nl.knowlogy.validation.validators.BasePropertyValidator
All Implemented Interfaces:
PropertyValidation
Direct Known Subclasses:
AllowedValuesValidator, CustomPropertyValidator, IsNotBlankValidator, IsRequiredValidator, IsValidValidator, MaxLengthValidator, MaxSizeValidator, MinLengthValidator, MinSizeValidator, PatternValidator

public abstract class BasePropertyValidator
extends Object
implements PropertyValidation

Base class for property validators. Subclass this class for building specific validators.

Author:
Robert

Field Summary
protected static org.apache.log4j.Logger logger
           
 
Constructor Summary
BasePropertyValidator(String propertyName)
           
 
Method Summary
abstract  String getDefaultErrorCode()
           
 String getErrorCode()
          Returns a specific errorcode, if setted, otherwise the defaulterrorcode.
 String getPropertyName()
          Returns the propertyName from the property which this propertyValidation is validating.
 void setErrorCode(String value)
           
 void setPropertyName(String value)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface nl.knowlogy.validation.PropertyValidation
doValidatePropertyValue
 

Field Detail

logger

protected static final org.apache.log4j.Logger logger
Constructor Detail

BasePropertyValidator

public BasePropertyValidator(String propertyName)
Method Detail

getPropertyName

public String getPropertyName()
Description copied from interface: PropertyValidation
Returns the propertyName from the property which this propertyValidation is validating.

Specified by:
getPropertyName in interface PropertyValidation
Returns:
the propertyName from the property which this propertyValidation is validating.

setPropertyName

public void setPropertyName(String value)

getErrorCode

public String getErrorCode()
Returns a specific errorcode, if setted, otherwise the defaulterrorcode. Each subclass must specify the defaultErrorCode.

Returns:
a specific errorcode, if setted, otherwise the defaulterrorcode.

setErrorCode

public void setErrorCode(String value)

getDefaultErrorCode

public abstract String getDefaultErrorCode()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2007. All Rights Reserved.