Clover Coverage Report - KS Contract Documentation Generator 0.0.1-SNAPSHOT
Coverage timestamp: Wed Dec 31 1969 19:00:00 EST
../../../../../../../img/srcFileCovDistChart0.png 0% of files have more coverage
4   107   6   1
4   26   1.5   2
4     1.5  
2    
 
  ValidationResult       Line # 18 0 - 0 0 - -1.0
  ValidationResult.ErrorLevel       Line # 20 4 0% 6 12 0% 0.0
 
No Tests
 
1    /*
2    * Copyright 2011 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.osedu.org/licenses/ECL-2.0
9    *
10    * Unless required by applicable law or agreed to in writing, software
11    * distributed under the License is distributed on an "AS IS" BASIS,
12    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13    * See the License for the specific language governing permissions and
14    * limitations under the License.
15    */
16    package org.kuali.student.contract.model.test.source;
17   
 
18    public interface ValidationResult {
19   
 
20    public enum ErrorLevel {
21   
22    OK(0), WARN(1), ERROR(2);
23    int level;
24   
 
25  0 toggle private ErrorLevel(int level) {
26  0 this.level = level;
27    }
28   
 
29  0 toggle public int getLevel() {
30  0 return level;
31    }
32   
 
33  0 toggle public static ErrorLevel min(ErrorLevel e1, ErrorLevel e2) {
34  0 return e1.ordinal() < e2.ordinal() ? e1 : e2;
35    }
36   
 
37  0 toggle public static ErrorLevel max(ErrorLevel e1, ErrorLevel e2) {
38  0 return e1.ordinal() > e2.ordinal() ? e1 : e2;
39    }
40    }
41   
42   
43    /**
44    * Get ????
45    * <p/>
46    * Type: String
47    * <p/>
48    * ???
49    */
50    public String getMessage();
51   
52    /**
53    * Get ????
54    * <p/>
55    * Type: String
56    * <p/>
57    * ???
58    */
59    public String getElement();
60   
61    /**
62    * Get ????
63    * <p/>
64    * Type: Integer
65    * <p/>
66    * Returns the ValidationResult's error level
67    */
68    public Integer getLevel();
69   
70    /**
71    *
72    * Invalid data causing the error or warning
73    * <p/>
74    * Type: Object
75    * <p/>
76    * @return data causing the error or warning
77    */
78    public Object getInvalidData();
79   
80    /**
81    * Get ????
82    * <p/>
83    * Type: boolean
84    * <p/>
85    * Convenience method. Returns true if getErrorLevel() == ErrorLevel.OK
86    */
87    public boolean isOk();
88   
89    /**
90    * Get ????
91    * <p/>
92    * Type: boolean
93    * <p/>
94    * Convenience method. Returns true if getErrorLevel() == ErrorLevel.WARN
95    */
96    public boolean isWarn();
97   
98    /**
99    * Get ????
100    * <p/>
101    * Type: boolean
102    * <p/>
103    * Convenience method. Returns true if getErrorLevel() == ErrorLevel.ERROR
104    */
105    public boolean isError();
106    }
107