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
validate
public void validate(java.lang.Object contents)
throws ParameterException
- Customized parameter validations
- Parameters:
contents - The content of the parameter to be validatedThe - 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