01: package org.conform;
02:
03: import java.io.Serializable;
04:
05: /**
06: * A validator is used to validate data, that might have been provided by a user or supplied as part of a service call.
07: */
08: public interface Validator extends Serializable {
09:
10: /**
11: * Validate and optionally normalize user input.
12: * @param value the value to be validated
13: * @return the possibly normalized value
14: * @throws ValidationException if the value does not comply
15: */
16: Object validate(Object value) throws ValidationException;
17: }
|