01: package org.jreform;
02:
03: import java.util.Set;
04:
05: import javax.servlet.http.HttpServletRequest;
06:
07: /**
08: * @author armandino (at) gmail.com
09: */
10: public interface HttpServletRequestValidator {
11: /**
12: * Validates the passed in {@link HttpServletRequest}.
13: */
14: public boolean validate(HttpServletRequest req);
15:
16: /**
17: * Returns <code>true</code> if the object being validated is valid.
18: */
19: public boolean isValid();
20:
21: /**
22: * Returns a set of error keys describing validation errors
23: * or an empty set if the object has not been validated or
24: * validation was successful.
25: */
26: public Set<String> getErrors();
27:
28: }
|