1 |
|
package org.kuali.student.contract.model.test.source; |
2 |
|
|
3 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
4 |
|
public class DtoConstants { |
5 |
|
|
6 |
|
public final static String STATE_DRAFT = "Draft"; |
7 |
|
public final static String STATE_SUBMITTED = "Submitted"; |
8 |
|
public final static String STATE_WITHDRAWN = "Withdrawn"; |
9 |
|
public final static String STATE_APPROVED = "Approved"; |
10 |
|
public final static String STATE_NOT_APPROVED = "Not Approved"; |
11 |
|
public final static String STATE_ACTIVE = "Active"; |
12 |
|
public final static String STATE_INACTIVE = "Inactive"; |
13 |
|
public final static String STATE_SUPERSEDED = "Superseded"; |
14 |
|
public final static String STATE_SUSPENDED = "Suspended"; |
15 |
|
public final static String STATE_RETIRED = "Retired"; |
16 |
|
|
17 |
|
|
18 |
|
public static final String DTO_STATE = "DtoState"; |
19 |
|
public static final String DTO_NEXT_STATE = "DtoNextState"; |
20 |
|
|
21 |
|
|
|
|
| 0% |
Uncovered Elements: 43 (43) |
Complexity: 12 |
Complexity Density: 0.55 |
|
22 |
|
public enum DtoState { |
23 |
|
DRAFT, SUBMITTED, APPROVED, ACTIVE, INACTIVE, RETIRED, SUPERSEDED, SAVED, ENROUTE; |
24 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
25 |
0
|
public boolean equalsString(String state){... |
26 |
0
|
if (state != null){ |
27 |
0
|
return this.toString().equals(state.toUpperCase()); |
28 |
|
} |
29 |
|
|
30 |
0
|
return false; |
31 |
|
} |
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
|
36 |
|
|
37 |
|
|
38 |
|
|
39 |
|
@param |
40 |
|
@return |
41 |
|
|
|
|
| 0% |
Uncovered Elements: 29 (29) |
Complexity: 8 |
Complexity Density: 0.53 |
|
42 |
0
|
public static DtoState getNextState(String state){... |
43 |
|
|
44 |
0
|
if (DRAFT.equalsString(state)) { |
45 |
0
|
return SUBMITTED; |
46 |
0
|
} else if (SUBMITTED.equalsString(state)) { |
47 |
0
|
return APPROVED; |
48 |
0
|
} else if (APPROVED.equalsString(state)) { |
49 |
0
|
return ACTIVE; |
50 |
0
|
} else if (ACTIVE.equalsString(state)) { |
51 |
0
|
return INACTIVE; |
52 |
0
|
} else if (INACTIVE.equalsString(state)) { |
53 |
0
|
return RETIRED; |
54 |
|
|
55 |
|
|
56 |
0
|
} else if (SAVED.equalsString(state)) { |
57 |
0
|
return ENROUTE; |
58 |
0
|
} else if (ENROUTE.equalsString(state)) { |
59 |
0
|
return APPROVED; |
60 |
|
} |
61 |
|
|
62 |
|
|
63 |
0
|
return null; |
64 |
|
} |
65 |
|
|
|
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
66 |
0
|
public static String getNextStateAsString(String state){... |
67 |
0
|
DtoState dtoState = getNextState(state); |
68 |
0
|
if (dtoState == null){ |
69 |
0
|
return null; |
70 |
|
} else { |
71 |
0
|
return dtoState.toString(); |
72 |
|
} |
73 |
|
} |
74 |
|
} |
75 |
|
} |