View Javadoc

1   /**
2    * Copyright 2013 The Kuali Foundation Licensed under the
3    * Educational Community License, Version 2.0 (the "License"); you may
4    * not use this file except in compliance with the License. You may
5    * obtain a copy of the License at
6    *
7    * http://www.osedu.org/licenses/ECL-2.0
8    *
9    * Unless required by applicable law or agreed to in writing,
10   * software distributed under the License is distributed on an "AS IS"
11   * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12   * or implied. See the License for the specific language governing
13   * permissions and limitations under the License.
14   *
15   * Created by cmuller on 5/22/13
16   */
17  package org.kuali.student.enrollment.class2.courseoffering.dto;
18  
19  /**
20   * This class is a wrapper for a State Propagation Test table item
21   *
22   * @author Kuali Student Team
23   */
24  public class StatePropagationWrapper {
25      private String socState;
26      private String aoFrom;
27      private String aoTo;
28      private String secondAoState;
29      private String expected;
30      private String actual;
31      private String status;
32      private boolean green;
33      private boolean red;
34  
35  
36      public StatePropagationWrapper(String socState, String aoFrom, String aoTo, String secondAoState, String expected, String actual, String status) {
37          this.socState = socState;
38          this.aoFrom = aoFrom;
39          this.aoTo = aoTo;
40          this.expected = expected;
41          this.actual = actual;
42          this.status= status;
43          this.secondAoState=secondAoState;
44          if(this.status.equals("pass")){
45              this.green=true;
46          } else if(this.status.equals("fail")){
47              this.red=true;
48          }
49      }
50  
51      public StatePropagationWrapper() {
52          this.socState = "";
53          this.aoFrom = "";
54          this.aoTo = "";
55          this.expected = "";
56          this.actual = "";
57          if(expected.equals(actual)){
58              this.status="Pass";
59          } else {
60              this.status="Fail";
61          }
62      }
63  
64      public String getSocState() {
65          return socState;
66      }
67  
68      public void setSocState(String socState) {
69          this.socState = socState;
70      }
71  
72      public String getAoFrom() {
73          return aoFrom;
74      }
75  
76      public void setAoFrom(String aoFrom) {
77          this.aoFrom = aoFrom;
78      }
79  
80      public String getAoTo() {
81          return aoTo;
82      }
83  
84      public void setAoTo(String aoTo) {
85          this.aoTo = aoTo;
86      }
87  
88      public String getExpected() {
89          return expected;
90      }
91  
92      public void setExpected(String expected) {
93          this.expected = expected;
94          if(expected.equals(actual)){
95              this.status="Pass";
96          } else {
97              this.status="Fail";
98          }
99      }
100 
101     public String getActual() {
102         return actual;
103     }
104 
105     public void setActual(String actual) {
106         this.actual = actual;
107         if(expected.equals(actual)){
108             this.status="Pass";
109         } else {
110             this.status="Fail";
111         }
112     }
113     public String getStatus() {
114         return status;
115     }
116 
117     public void setStatus(String status) {
118         this.status = status;
119     }
120 
121     public boolean isGreen() {
122         return green;
123     }
124 
125     public void setGreen(boolean green) {
126         this.green = green;
127     }
128 
129     public boolean isRed() {
130         return red;
131     }
132 
133     public void setRed(boolean red) {
134         this.red = red;
135     }
136 
137     public String getSecondAoState() {
138         return secondAoState;
139     }
140 
141     public void setSecondAoState(String secondAoState) {
142         this.secondAoState = secondAoState;
143     }
144 
145 }