org.apache.turbine.services.intake.validator
Interface Validator

All Known Implementing Classes:
DefaultValidator, FileValidator

public interface Validator

Validator api.

Version:
$Id: Validator.java,v 1.1.1.1 2001/08/16 05:08:59 jvanzyl Exp $
Author:
Method Summary
 void assertValidity(java.lang.String testValue)
          Determine whether a testValue meets the criteria specified in the constraints defined for this validator
 java.lang.String getMessage()
          Get the last error message resulting from invalid input.
 boolean isValid(java.lang.String testValue)
          Determine whether a testValue meets the criteria specified in the constraints defined for this validator
 

Method Detail

isValid

public boolean isValid(java.lang.String testValue)
Determine whether a testValue meets the criteria specified in the constraints defined for this validator
Parameters:
testValue - a String to be tested
Returns:
true if valid, false otherwise

assertValidity

public void assertValidity(java.lang.String testValue)
                    throws ValidationException
Determine whether a testValue meets the criteria specified in the constraints defined for this validator
Parameters:
testValue - a String to be tested
Throws:
ValidationException - containing an error message if the testValue did not pass the validation tests.

getMessage

public java.lang.String getMessage()
Get the last error message resulting from invalid input.
Returns:
a String message, or the empty String "".


Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.