org.jwarp.service.param
Interface IValidator

All Superinterfaces:
IConfigurable
All Known Implementing Classes:
AValidator

public interface IValidator
extends IConfigurable

Interface for a parameter validator: allows customized parameter validation. Typically validators are used for complex parameter value validation (such as testing if an id exists in a database) within the process of the validation of set of parameters.

Version:
1.0
Author:
Anatole Tresch, Martin Schaefer

Method Summary
 IValidator getNextValidator()
          Get the next validator.
 void setNextValidator(IValidator validator)
          Set an additional validator as next validator to call when calling this validator.
 void validate(java.lang.Object contents)
          Customized parameter validations
 
Methods inherited from interface org.jwarp.service.configuration.IConfigurable
configure
 

Method Detail

validate

public void validate(java.lang.Object contents)
              throws ParameterException
Customized parameter validations
Parameters:
contents - The content of the parameter to be validated
The - parameters value
Returns:
false if validation fails
Throws:
ParameterException - if validation fails. This exception contains also the reason why the validation failed.

setNextValidator

public void setNextValidator(IValidator validator)
Set an additional validator as next validator to call when calling this validator.
Parameters:
validator - The validator

getNextValidator

public IValidator getNextValidator()
Get the next validator.
Returns:
The next validator

©   O R C A   S y s t e m s