1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.student.r2.common.datadictionary;
17
18 import java.util.List;
19 import org.kuali.rice.krad.service.DictionaryValidationService;
20 import org.kuali.rice.krad.datadictionary.validation.result.DictionaryValidationResult;
21 import org.kuali.student.r2.common.dto.ContextInfo;
22 import org.kuali.student.r2.common.dto.ValidationResultInfo;
23 import org.kuali.student.r2.common.exceptions.InvalidParameterException;
24 import org.kuali.student.r2.common.exceptions.MissingParameterException;
25 import org.kuali.student.r2.common.exceptions.OperationFailedException;
26 import org.kuali.student.r2.common.exceptions.PermissionDeniedException;
27
28
29
30
31
32
33
34
35
36 public class RiceDataDictionaryValidatorImplDoesNotWorkButShould implements DataDictionaryValidator {
37
38 private DictionaryValidationService riceService;
39
40 public RiceDataDictionaryValidatorImplDoesNotWorkButShould() {
41 }
42
43
44 public RiceDataDictionaryValidatorImplDoesNotWorkButShould(DictionaryValidationService riceService) {
45 this.riceService = riceService;
46 }
47
48 public DictionaryValidationService getRiceService() {
49 return riceService;
50 }
51
52 public void setRiceService(DictionaryValidationService riceService) {
53 this.riceService = riceService;
54 }
55
56 @Override
57 public List<ValidationResultInfo> validate(ValidationType validationType, Object info, ContextInfo context)
58 throws OperationFailedException, MissingParameterException, InvalidParameterException, PermissionDeniedException {
59 boolean doOptionalProcessing = true;
60
61
62 if (validationType.equals(DataDictionaryValidator.ValidationType.SKIP_REQUREDNESS_VALIDATIONS)) {
63 doOptionalProcessing = false;
64 }
65 DictionaryValidationResult dvr = riceService.validate(info);
66 Rice2ValidationResultConverter converter = new Rice2ValidationResultConverter ();
67 List<ValidationResultInfo> vrs = converter.convert(dvr);
68 return vrs;
69 }
70 }