1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.kuali.student.enrollment.class2.courseoffering.dto;
18
19
20
21
22
23
24 public class RGStateWrapper {
25
26 private String ao1;
27 private String ao2;
28 private String ao3;
29 private String rgFrom;
30 private String rgTo;
31 private String expected;
32 private String actual;
33
34 public RGStateWrapper(String aoList, String expected, String actual) {
35 ao1 = aoList.substring(0,1);
36 if(ao1.equals("O")){
37 ao1="Offered";
38 } else if(ao1.equals("X")) {
39 ao1="Not Offered";
40 }
41 ao2 = aoList.substring(1,2);
42 if(ao2.equals("O")){
43 ao2="Offered";
44 } else if(ao2.equals("X")) {
45 ao2="Not Offered";
46 }
47 ao3 = aoList.substring(2,3);
48 if(ao3.equals("O")){
49 ao3="Offered";
50 } else if(ao3.equals("X")) {
51 ao3="Not Offered";
52 }
53 this.expected = expected;
54 this.actual = actual;
55 if(this.expected.equals(this.actual)){
56 this.status="pass";
57 } else {
58 this.status="fail";
59 }
60 if(this.status.equals("pass")){
61 this.green=true;
62 } else if(this.status.equals("fail")){
63 this.red=true;
64 }
65 }
66
67 public RGStateWrapper(String rgFrom, String rgTo, String expected, String actual) {
68 this.rgFrom=rgFrom;
69 this.rgTo=rgTo;
70 this.expected = expected;
71 this.actual = actual;
72 if(this.expected.equals(this.actual)){
73 this.status="pass";
74 } else {
75 this.status="fail";
76 }
77 if(this.status.equals("pass")){
78 this.green=true;
79 } else if(this.status.equals("fail")){
80 this.red=true;
81 }
82 }
83
84 public RGStateWrapper() {
85 this.ao1 = "";
86 this.ao2 = "";
87 this.ao3 = "";
88 this.rgFrom="";
89 this.rgTo="";
90 this.expected = "";
91 this.actual = "";
92 if(expected.equals(actual)){
93 this.status="Pass";
94 } else {
95 this.status="Fail";
96 }
97 }
98
99 public String getAo1() {
100 return ao1;
101 }
102
103 public void setAo1(String ao1) {
104 this.ao1 = ao1;
105 }
106
107 public String getAo2() {
108 return ao2;
109 }
110
111 public void setAo2(String ao2) {
112 this.ao2 = ao2;
113 }
114
115 public String getAo3() {
116 return ao3;
117 }
118
119 public void setAo3(String ao3) {
120 this.ao3 = ao3;
121 }
122
123 public String getRgFrom() {
124 return rgFrom;
125 }
126
127 public void setRgFrom(String rgFrom) {
128 this.rgFrom = rgFrom;
129 }
130
131 public String getRgTo() {
132 return rgTo;
133 }
134
135 public void setRgTo(String rgTo) {
136 this.rgTo = rgTo;
137 }
138
139 public String getExpected() {
140 return expected;
141 }
142
143 public void setExpected(String expected) {
144 this.expected = expected;
145 }
146
147 public String getActual() {
148 return actual;
149 }
150
151 public void setActual(String actual) {
152 this.actual = actual;
153 }
154
155 public String getStatus() {
156 return status;
157 }
158
159 public void setStatus(String status) {
160 this.status = status;
161 }
162
163 public boolean isGreen() {
164 return green;
165 }
166
167 public void setGreen(boolean green) {
168 this.green = green;
169 }
170
171 public boolean isRed() {
172 return red;
173 }
174
175 public void setRed(boolean red) {
176 this.red = red;
177 }
178
179 private String status;
180 private boolean green;
181 private boolean red;
182
183
184
185
186 }