org.iscreen.validators
Class NullValidator

java.lang.Object
  extended by org.iscreen.BaseValidator
      extended by org.iscreen.validators.NullValidator
All Implemented Interfaces:
Validator

public class NullValidator
extends BaseValidator

The NullValidator checks a single value and ensures that it's not null.

Author:
Shellman, Dan

Field Summary
 
Fields inherited from class org.iscreen.BaseValidator
defaultFailure
 
Constructor Summary
NullValidator()
          Default constructor.
 
Method Summary
 void validate(ValidatorContext context, java.lang.Object beanToValidate)
          This is the method that's called to validate the "bean-to-validate." Use the passed in ValidatorContext to report validation failures, etc.
 
Methods inherited from class org.iscreen.BaseValidator
constructBeanToValidate, getDefaultFailure, getStringValue, setDefaultFailure
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullValidator

public NullValidator()
Default constructor.

Method Detail

validate

public void validate(ValidatorContext context,
                     java.lang.Object beanToValidate)
Description copied from interface: Validator
This is the method that's called to validate the "bean-to-validate." Use the passed in ValidatorContext to report validation failures, etc. The passed-in "bean-to-validate" is the same instance returned from the call to constructBeanToValidate(), but with all of the appropriate properties set (based upon the configured mapping).

Parameters:
context - The ValidatorContext, which is used to report failures.
beanToValidate - The JavaBean to validate.