org.apache.bval.routines
Class StandardValidation

java.lang.Object
  extended by org.apache.bval.routines.StandardValidation
All Implemented Interfaces:
Validation

public class StandardValidation
extends Object
implements Validation

Description: This class implements the standard validations for properties! You can subclass this class and replace the implementation in the beanInfo-xml by providing it a validation "standard"


Constructor Summary
StandardValidation()
           
 
Method Summary
static StandardValidation getInstance()
           
 String getValidationId()
          key for this validation in the validation list of the beanInfos
<T extends ValidationListener>
void
validate(ValidationContext<T> context)
          Perform a single validation routine.
protected
<T extends ValidationListener>
void
validateMandatory(ValidationContext<T> context)
           
protected
<T extends ValidationListener>
void
validateMaxLength(ValidationContext<T> context)
           
protected
<T extends ValidationListener>
void
validateMaxValue(ValidationContext<T> context)
           
protected
<T extends ValidationListener>
void
validateMinLength(ValidationContext<T> context)
           
protected
<T extends ValidationListener>
void
validateMinValue(ValidationContext<T> context)
           
protected
<T extends ValidationListener>
void
validateRegExp(ValidationContext<T> context)
           
protected
<T extends ValidationListener>
void
validateTimeLag(ValidationContext<T> context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardValidation

public StandardValidation()
Method Detail

getValidationId

public String getValidationId()
key for this validation in the validation list of the beanInfos


validate

public <T extends ValidationListener> void validate(ValidationContext<T> context)
Description copied from interface: Validation
Perform a single validation routine. Validate the object or property according to the current ValidationContext.

Specified by:
validate in interface Validation
Parameters:
context - - to access the property, value, constraints

validateTimeLag

protected <T extends ValidationListener> void validateTimeLag(ValidationContext<T> context)

validateRegExp

protected <T extends ValidationListener> void validateRegExp(ValidationContext<T> context)

validateMinValue

protected <T extends ValidationListener> void validateMinValue(ValidationContext<T> context)

validateMaxValue

protected <T extends ValidationListener> void validateMaxValue(ValidationContext<T> context)

validateMaxLength

protected <T extends ValidationListener> void validateMaxLength(ValidationContext<T> context)

validateMinLength

protected <T extends ValidationListener> void validateMinLength(ValidationContext<T> context)

validateMandatory

protected <T extends ValidationListener> void validateMandatory(ValidationContext<T> context)

getInstance

public static StandardValidation getInstance()


Copyright © 2010-2014 The Apache Software Foundation. All Rights Reserved.