Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
CluResultInfo |
|
| 1.0526315789473684;1.053 |
1 | /** | |
2 | * Copyright 2010 The Kuali Foundation | |
3 | * | |
4 | * Licensed under the Educational Community License, Version 2.0 (the | |
5 | * "License"); you may not use this file except in compliance with the | |
6 | * License. You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.opensource.org/licenses/ecl1.php | |
9 | * | |
10 | * Unless required by applicable law or agreed to in writing, | |
11 | * software distributed under the License is distributed on an "AS IS" | |
12 | * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | |
13 | * or implied. See the License for the specific language governing | |
14 | * permissions and limitations under the License. | |
15 | */ | |
16 | ||
17 | package org.kuali.student.lum.lu.dto; | |
18 | ||
19 | import org.kuali.student.core.dto.HasTypeState; | |
20 | import org.kuali.student.core.dto.Idable; | |
21 | import org.kuali.student.core.dto.MetaInfo; | |
22 | import org.kuali.student.core.dto.RichTextInfo; | |
23 | ||
24 | import javax.xml.bind.annotation.XmlAccessType; | |
25 | import javax.xml.bind.annotation.XmlAccessorType; | |
26 | import javax.xml.bind.annotation.XmlAttribute; | |
27 | import javax.xml.bind.annotation.XmlElement; | |
28 | import java.io.Serializable; | |
29 | import java.util.ArrayList; | |
30 | import java.util.Date; | |
31 | import java.util.List; | |
32 | ||
33 | ||
34 | /** | |
35 | * Information about a CLU result. | |
36 | * | |
37 | * @Author Kamal | |
38 | * @Since Mon Jan 11 15:21:27 PST 2010 | |
39 | */ | |
40 | @XmlAccessorType(XmlAccessType.FIELD) | |
41 | 0 | public class CluResultInfo implements Serializable, Idable, HasTypeState { |
42 | ||
43 | private static final long serialVersionUID = 1L; | |
44 | ||
45 | @XmlElement | |
46 | private RichTextInfo desc; | |
47 | ||
48 | @XmlElement | |
49 | private String cluId; | |
50 | ||
51 | @XmlElement | |
52 | private List<ResultOptionInfo> resultOptions; | |
53 | ||
54 | @XmlElement | |
55 | private Date effectiveDate; | |
56 | ||
57 | @XmlElement | |
58 | private Date expirationDate; | |
59 | ||
60 | @XmlElement | |
61 | private MetaInfo metaInfo; | |
62 | ||
63 | @XmlAttribute | |
64 | private String type; | |
65 | ||
66 | @XmlAttribute | |
67 | private String state; | |
68 | ||
69 | @XmlAttribute | |
70 | private String id; | |
71 | ||
72 | ||
73 | /** | |
74 | * Narrative description of the CLU result. | |
75 | */ | |
76 | ||
77 | public RichTextInfo getDesc() { | |
78 | 0 | return desc; |
79 | } | |
80 | ||
81 | public void setDesc(RichTextInfo desc) { | |
82 | 0 | this.desc = desc; |
83 | 0 | } |
84 | ||
85 | ||
86 | /** | |
87 | * The cluId to which the CLU Result is linked. Unique identifier | |
88 | * for a Canonical Learning Unit (CLU). | |
89 | */ | |
90 | ||
91 | public String getCluId() { | |
92 | 0 | return cluId; |
93 | } | |
94 | ||
95 | public void setCluId(String cluId) { | |
96 | 0 | this.cluId = cluId; |
97 | 0 | } |
98 | ||
99 | ||
100 | /** | |
101 | * List of learning result option information. | |
102 | */ | |
103 | ||
104 | public List<ResultOptionInfo> getResultOptions() { | |
105 | 0 | if (resultOptions == null) { |
106 | 0 | resultOptions = new ArrayList<ResultOptionInfo>(0); |
107 | } | |
108 | ||
109 | 0 | return resultOptions; |
110 | } | |
111 | ||
112 | public void setResultOptions(List<ResultOptionInfo> resultOptions) { | |
113 | 0 | this.resultOptions = resultOptions; |
114 | 0 | } |
115 | ||
116 | ||
117 | /** | |
118 | * Date and time that this CLU result became effective. This is a | |
119 | * similar concept to the effective date on enumerated | |
120 | * values. When an expiration date has been specified, this field | |
121 | * must be less than or equal to the expiration date. | |
122 | */ | |
123 | public Date getEffectiveDate() { | |
124 | 0 | return effectiveDate; |
125 | } | |
126 | ||
127 | public void setEffectiveDate(Date effectiveDate) { | |
128 | 0 | this.effectiveDate = effectiveDate; |
129 | 0 | } |
130 | ||
131 | ||
132 | /** | |
133 | * Date and time that this CLU result expires. This is a similar | |
134 | * concept to the expiration date on enumerated values. If | |
135 | * specified, this must be greater than or equal to the effective | |
136 | * date. If this field is not specified, then no expiration date | |
137 | * has been currently defined and should automatically be | |
138 | * considered greater than the effective date. | |
139 | */ | |
140 | ||
141 | public Date getExpirationDate() { | |
142 | 0 | return expirationDate; |
143 | } | |
144 | ||
145 | public void setExpirationDate(Date expirationDate) { | |
146 | 0 | this.expirationDate = expirationDate; |
147 | 0 | } |
148 | ||
149 | ||
150 | /** | |
151 | * Create and last update info for the structure. This is optional | |
152 | * and treated as read only since the data is set by the internals | |
153 | * of the service during maintenance operations. | |
154 | */ | |
155 | ||
156 | public MetaInfo getMetaInfo() { | |
157 | 0 | return metaInfo; |
158 | } | |
159 | ||
160 | public void setMetaInfo(MetaInfo metaInfo) { | |
161 | 0 | this.metaInfo = metaInfo; |
162 | 0 | } |
163 | ||
164 | ||
165 | /** | |
166 | * Unique identifier for a clu learning result object type. | |
167 | */ | |
168 | ||
169 | public String getType() { | |
170 | 0 | return type; |
171 | } | |
172 | ||
173 | public void setType(String type) { | |
174 | 0 | this.type = type; |
175 | 0 | } |
176 | ||
177 | ||
178 | /** | |
179 | * The current status of the CLU Result. The values for this field | |
180 | * are constrained to those in the cluResultState enumeration. A | |
181 | * separate setup operation does not exist for retrieval of the | |
182 | * meta data around this value. | |
183 | */ | |
184 | ||
185 | public String getState() { | |
186 | 0 | return state; |
187 | } | |
188 | ||
189 | public void setState(String state) { | |
190 | 0 | this.state = state; |
191 | 0 | } |
192 | ||
193 | ||
194 | /** | |
195 | * Unique identifier for a CLU result. This is optional, due to | |
196 | * the identifier being set at the time of creation. Once the | |
197 | * result set has been created, this should be seen as required. | |
198 | */ | |
199 | ||
200 | public String getId() { | |
201 | 0 | return id; |
202 | } | |
203 | ||
204 | public void setId(String id) { | |
205 | 0 | this.id = id; |
206 | 0 | } |
207 | ||
208 | @Override | |
209 | public String toString() { | |
210 | 0 | return "CluResultInfo[id=" + id + ", cluId=" + cluId + ", type=" + type + "]"; |
211 | } | |
212 | } |