1
2
3
4
5
6 package org.kuali.student.r2.common.datadictionary;
7
8 import java.util.List;
9 import org.kuali.student.r2.common.dto.ContextInfo;
10 import org.kuali.student.r2.common.dto.ValidationResultInfo;
11 import org.kuali.student.r2.common.exceptions.InvalidParameterException;
12 import org.kuali.student.r2.common.exceptions.MissingParameterException;
13 import org.kuali.student.r2.common.exceptions.OperationFailedException;
14 import org.kuali.student.r2.common.exceptions.PermissionDeniedException;
15
16
17
18
19
20 public interface DataDictionaryValidator {
21
22 public static enum ValidationType {
23 FULL_VALIDATION, SKIP_REQUREDNESS_VALIDATIONS;
24
25 public static ValidationType fromString (String str)
26 throws InvalidParameterException {
27 for (ValidationType vt : ValidationType.values()) {
28 if (vt.name().equals(str)) {
29 return vt;
30 }
31 }
32 throw new InvalidParameterException ("validationType");
33 }
34 }
35
36
37
38
39
40
41
42
43
44
45
46 public List<ValidationResultInfo> validate (ValidationType validationType, Object info, ContextInfo context)
47 throws OperationFailedException, MissingParameterException, InvalidParameterException, PermissionDeniedException;
48 }