01: /*
02: * Created on 12 Sep 2007
03: */
04: package uk.org.ponder.springutil.validator;
05:
06: /** Root class of a Validator which is capable of being parsed from a
07: * compact String representation. If it does not implement any further
08: * mixins, it is assumed to be a Spring validator requires no argument.
09: * That is, a validator which is either present or absent on a field.
10: * @author Antranig Basman (antranig@caret.cam.ac.uk)
11: *
12: */
13:
14: public interface ValidatorFactory {
15: /** Returns the name of the dispensed validator **/
16: public String getName();
17:
18: /** Returns the priority of the validator. If there are multiple potential
19: * validation failures, only those with the lowest priority number
20: * will be reported.
21: */
22: public int getPriority();
23:
24: /** Returns an instance of the validator, of one of the types recognised
25: * by the system.
26: */
27: public Object getValidator();
28:
29: }
|