1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.student.r2.core.process.dto; |
17 | |
|
18 | |
import java.io.Serializable; |
19 | |
import java.util.ArrayList; |
20 | |
import java.util.List; |
21 | |
|
22 | |
import javax.xml.bind.annotation.XmlAccessType; |
23 | |
import javax.xml.bind.annotation.XmlAccessorType; |
24 | |
import javax.xml.bind.annotation.XmlAnyElement; |
25 | |
import javax.xml.bind.annotation.XmlElement; |
26 | |
import javax.xml.bind.annotation.XmlType; |
27 | |
|
28 | |
import org.kuali.student.r2.common.dto.RelationshipInfo; |
29 | |
import org.kuali.student.r2.common.dto.RichTextInfo; |
30 | |
import org.kuali.student.r2.core.process.infc.Instruction; |
31 | |
|
32 | |
import org.w3c.dom.Element; |
33 | |
|
34 | 0 | @XmlAccessorType(XmlAccessType.FIELD) |
35 | |
@XmlType(name = "InstructionInfo", propOrder = { "id", "typeKey", "stateKey", |
36 | |
"effectiveDate", "expirationDate", |
37 | |
"processKey", "checkKey", |
38 | |
"appliedPopulationKeys", "appliedAtpTypeKeys", |
39 | |
"message", "position", "isWarning", |
40 | |
"continueOnFail", "isExemptable", |
41 | |
"meta", "attributes", |
42 | |
"_futureElements" }) |
43 | |
|
44 | |
public class InstructionInfo extends RelationshipInfo |
45 | |
implements Instruction, Serializable { |
46 | |
|
47 | |
private static final long serialVersionUID = 1L; |
48 | |
|
49 | |
@XmlElement |
50 | |
private String processKey; |
51 | |
|
52 | |
@XmlElement |
53 | |
private String checkKey; |
54 | |
|
55 | |
@XmlElement |
56 | |
private List<String> appliedPopulationKeys; |
57 | |
|
58 | |
@XmlElement |
59 | |
private List<String> appliedAtpTypeKeys; |
60 | |
|
61 | |
@XmlElement |
62 | |
private RichTextInfo message; |
63 | |
|
64 | |
@XmlElement |
65 | |
private Integer position; |
66 | |
|
67 | |
@XmlElement |
68 | |
private Boolean isWarning; |
69 | |
|
70 | |
@XmlElement |
71 | |
private Boolean continueOnFail; |
72 | |
|
73 | |
@XmlElement |
74 | |
private Boolean isExemptable; |
75 | |
|
76 | |
@XmlAnyElement |
77 | |
private List<Element> _futureElements; |
78 | |
|
79 | |
|
80 | |
|
81 | |
|
82 | |
|
83 | 0 | public InstructionInfo() { |
84 | 0 | } |
85 | |
|
86 | |
|
87 | |
|
88 | |
|
89 | |
|
90 | |
|
91 | |
public InstructionInfo(Instruction instruction) { |
92 | 0 | super(instruction); |
93 | |
|
94 | 0 | if (instruction != null) { |
95 | 0 | this.processKey= instruction.getProcessKey(); |
96 | 0 | this.checkKey = instruction.getCheckKey(); |
97 | |
|
98 | 0 | if (instruction.getAppliedPopulationKeys() != null) { |
99 | 0 | this.appliedPopulationKeys = new ArrayList<String>(instruction.getAppliedPopulationKeys()); |
100 | |
} |
101 | |
|
102 | 0 | if (instruction.getAppliedAtpTypeKeys() != null) { |
103 | 0 | this.appliedAtpTypeKeys = new ArrayList<String>(instruction.getAppliedAtpTypeKeys()); |
104 | |
} |
105 | |
|
106 | 0 | this.message = new RichTextInfo(instruction.getMessage()); |
107 | 0 | this.position = instruction.getPosition(); |
108 | 0 | this.isWarning = instruction.getIsWarning(); |
109 | 0 | this.continueOnFail = instruction.getContinueOnFail(); |
110 | 0 | this.isExemptable = instruction.getIsExemptable(); |
111 | |
} |
112 | 0 | } |
113 | |
|
114 | |
@Override |
115 | |
public String getProcessKey() { |
116 | 0 | return this.processKey; |
117 | |
} |
118 | |
|
119 | |
public void setProcessKey(String processKey) { |
120 | 0 | this.processKey = processKey; |
121 | 0 | } |
122 | |
|
123 | |
@Override |
124 | |
public String getCheckKey() { |
125 | 0 | return this.checkKey; |
126 | |
} |
127 | |
|
128 | |
public void setCheckKey(String checkKey) { |
129 | 0 | this.checkKey = checkKey; |
130 | 0 | } |
131 | |
|
132 | |
@Override |
133 | |
public List<String> getAppliedPopulationKeys() { |
134 | 0 | if (this.appliedPopulationKeys == null) { |
135 | 0 | this.appliedPopulationKeys = new ArrayList<String>(); |
136 | |
} |
137 | |
|
138 | 0 | return this.appliedPopulationKeys; |
139 | |
} |
140 | |
|
141 | |
public void setAppliedPopulationKeys(List<String> appliedPopulationKeys) { |
142 | 0 | this.appliedPopulationKeys = appliedPopulationKeys; |
143 | 0 | } |
144 | |
|
145 | |
@Override |
146 | |
public List<String> getAppliedAtpTypeKeys() { |
147 | 0 | if (this.appliedAtpTypeKeys == null) { |
148 | 0 | this.appliedAtpTypeKeys = new ArrayList<String>(); |
149 | |
} |
150 | |
|
151 | 0 | return this.appliedAtpTypeKeys; |
152 | |
} |
153 | |
|
154 | |
public void setAppliedAtpTypeKeys(List<String> appliedAtpTypeKeys) { |
155 | 0 | this.appliedAtpTypeKeys = appliedAtpTypeKeys; |
156 | 0 | } |
157 | |
|
158 | |
@Override |
159 | |
public RichTextInfo getMessage() { |
160 | 0 | return this.message; |
161 | |
} |
162 | |
|
163 | |
public void setMessage(RichTextInfo message) { |
164 | 0 | this.message = message; |
165 | 0 | } |
166 | |
|
167 | |
@Override |
168 | |
public Integer getPosition() { |
169 | 0 | return this.position; |
170 | |
} |
171 | |
|
172 | |
public void setPosition(Integer position) { |
173 | 0 | this.position = position; |
174 | 0 | } |
175 | |
|
176 | |
@Override |
177 | |
public Boolean getIsWarning() { |
178 | 0 | return this.isWarning; |
179 | |
} |
180 | |
|
181 | |
public void setIsWarning(Boolean isWarning) { |
182 | 0 | this.isWarning = isWarning; |
183 | 0 | } |
184 | |
|
185 | |
@Override |
186 | |
public Boolean getContinueOnFail() { |
187 | 0 | return this.continueOnFail; |
188 | |
} |
189 | |
|
190 | |
public void setContinueOnFail(Boolean continueOnFail) { |
191 | 0 | this.continueOnFail = continueOnFail; |
192 | 0 | } |
193 | |
|
194 | |
@Override |
195 | |
public Boolean getIsExemptable() { |
196 | 0 | return this.isExemptable; |
197 | |
} |
198 | |
|
199 | |
public void setIsExemptable(Boolean isExemptable) { |
200 | 0 | this.isExemptable = isExemptable; |
201 | 0 | } |
202 | |
} |