org.japano.action
Interface Validator

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
ListValidator, RangeValidator, RegExValidator

public interface Validator
extends java.io.Serializable

Interface for validating a single named HTTP parameter. Implementations should provide thread safety for the case of a single validator instance validating values in multiple concurrent threads. Implementating instances are serialized to persist action configuration.

Version:
$Id: Validator.java,v 1.3 2005/09/27 21:30:50 fforw Exp $ SourceForge.net Logo
Author:
Sven Helmberger ( sven dot helmberger at gmx dot de )

Method Summary
 java.lang.String validate(java.lang.String name, java.lang.String value)
          Validates the value and returns it.
 

Method Detail

validate

java.lang.String validate(java.lang.String name,
                          java.lang.String value)
                          throws InvalidParameterException
Validates the value and returns it. The validator may modify the value to correct simple errors.

Parameters:
name - parameter name
value - parameter value to validate.
Returns:
the value which may be modified.
Throws:
InvalidParameterException - if the value is invalid.