Clover Coverage Report - Kuali Student 1.2-M2-SNAPSHOT (Aggregated)
Coverage timestamp: Fri Apr 22 2011 04:03:20 EST
../../../../../../img/srcFileCovDistChart10.png 0% of files have more coverage
27   216   25   1.17
4   119   0.93   23
23     1.09  
1    
 
  CluPublicationInfo       Line # 47 27 0% 25 2 96.3% 0.962963
 
  (14)
 
1    /**
2    * Copyright 2010 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   
16    package org.kuali.student.lum.lu.dto;
17   
18    import java.io.Serializable;
19    import java.util.ArrayList;
20    import java.util.Date;
21    import java.util.HashMap;
22    import java.util.List;
23    import java.util.Map;
24   
25    import javax.xml.bind.annotation.XmlAccessType;
26    import javax.xml.bind.annotation.XmlAccessorType;
27    import javax.xml.bind.annotation.XmlAttribute;
28    import javax.xml.bind.annotation.XmlElement;
29    import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
30   
31    import org.kuali.student.common.dto.HasAttributes;
32    import org.kuali.student.common.dto.HasTypeState;
33    import org.kuali.student.common.dto.Idable;
34    import org.kuali.student.common.dto.MetaInfo;
35    import org.kuali.student.core.ws.binding.JaxbAttributeMapListAdapter;
36   
37    /**
38    * Detailed information about publishing a clu.
39    *
40    * @Author KSContractMojo
41    * @Author Kamal
42    * @Since Mon Jan 11 15:21:19 PST 2010
43    * @See <a href="https://test.kuali.org/confluence/display/KULSTU/cluPublicationInfo+Structure+v1.0-rc3">CluPublicationInfo v1.0-rc3</>
44    *
45    */
46    @XmlAccessorType(XmlAccessType.FIELD)
 
47    public class CluPublicationInfo implements Serializable, Idable, HasTypeState, HasAttributes {
48   
49    private static final long serialVersionUID = 1L;
50   
51    @XmlElement
52    private String cluId;
53   
54    @XmlElement
55    private List<FieldInfo> variants;
56   
57    @XmlElement
58    private String startCycle;
59   
60    @XmlElement
61    private String endCycle;
62   
63    @XmlElement
64    private Date effectiveDate;
65   
66    @XmlElement
67    private Date expirationDate;
68   
69    @XmlElement
70    @XmlJavaTypeAdapter(JaxbAttributeMapListAdapter.class)
71    private Map<String, String> attributes;
72   
73    @XmlElement
74    private MetaInfo metaInfo;
75   
76    @XmlAttribute
77    private String type;
78   
79    @XmlAttribute
80    private String state;
81   
82    @XmlAttribute
83    private String id;
84   
85    /**
86    * The identifier for the canonical learning unit which is described by this publication information.
87    */
 
88  87 toggle public String getCluId() {
89  87 return cluId;
90    }
91   
 
92  306 toggle public void setCluId(String cluId) {
93  306 this.cluId = cluId;
94    }
95   
96    /**
97    * Fields in cluInfo whose values are overridden as part of this publication.
98    */
 
99  221 toggle public List<FieldInfo> getVariants() {
100  221 if (variants == null) {
101  58 variants = new ArrayList<FieldInfo>(0);
102    }
103  221 return variants;
104    }
105   
 
106  247 toggle public void setVariants(List<FieldInfo> variants) {
107  247 this.variants = variants;
108    }
109   
110    /**
111    * The start academic time period for when the CLU should be published in this type of usage. Should be less than or equal to endCycle.
112    */
 
113  87 toggle public String getStartCycle() {
114  87 return startCycle;
115    }
116   
 
117  251 toggle public void setStartCycle(String startCycle) {
118  251 this.startCycle = startCycle;
119    }
120   
121    /**
122    * The end academic time period for when the CLU should be published in this type of usage. If specified, should be greater than or equal to startCycle.
123    */
 
124  87 toggle public String getEndCycle() {
125  87 return endCycle;
126    }
127   
 
128  251 toggle public void setEndCycle(String endCycle) {
129  251 this.endCycle = endCycle;
130    }
131   
132    /**
133    * Date and time that this LU publication type became effective. This is a similar concept to the effective date on enumerated values. When an expiration date has been specified, this field must be less than or equal to the expiration date.
134    */
 
135  87 toggle public Date getEffectiveDate() {
136  87 return effectiveDate;
137    }
138   
 
139  251 toggle public void setEffectiveDate(Date effectiveDate) {
140  251 this.effectiveDate = effectiveDate;
141    }
142   
143    /**
144    * Date and time that this LU publication type expires. This is a similar concept to the expiration date on enumerated values. If specified, this should be greater than or equal to the effective date. If this field is not specified, then no expiration date has been currently defined and should automatically be considered greater than the effective date.
145    */
 
146  87 toggle public Date getExpirationDate() {
147  87 return expirationDate;
148    }
149   
 
150  251 toggle public void setExpirationDate(Date expirationDate) {
151  251 this.expirationDate = expirationDate;
152    }
153   
154    /**
155    * List of key/value pairs, typically used for dynamic attributes.
156    */
 
157  83 toggle public Map<String, String> getAttributes() {
158  83 if (attributes == null) {
159  58 attributes = new HashMap<String, String>();
160    }
161  83 return attributes;
162    }
163   
 
164  247 toggle public void setAttributes(Map<String, String> attributes) {
165  247 this.attributes = attributes;
166    }
167   
168    /**
169    * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations.
170    */
 
171  26 toggle public MetaInfo getMetaInfo() {
172  26 return metaInfo;
173    }
174   
 
175  247 toggle public void setMetaInfo(MetaInfo metaInfo) {
176  247 this.metaInfo = metaInfo;
177    }
178   
179    /**
180    * Type of publication for which this information should be used.
181    */
 
182  283 toggle public String getType() {
183  283 return type;
184    }
185   
 
186  306 toggle public void setType(String type) {
187  306 this.type = type;
188    }
189   
190    /**
191    * Current state of the information for this publication type. This value should be constrained to those within the cluPublishingState enumeration. In general, an "active" record for a type indicates that the clu should be published within that media, though that may be further constrained by the cycle information included.
192    */
 
193  87 toggle public String getState() {
194  87 return state;
195    }
196   
 
197  306 toggle public void setState(String state) {
198  306 this.state = state;
199    }
200   
201    /**
202    * Identifier for the publishing information. This is set by the service to be able to determine changes and alterations to the structure as well as provides a handle for searches. This structure is not currently accessible through unique operations, and it is strongly recommended that no external references to this particular identifier be maintained.
203    */
 
204  90 toggle public String getId() {
205  90 return id;
206    }
207   
 
208  247 toggle public void setId(String id) {
209  247 this.id = id;
210    }
211   
 
212  0 toggle @Override
213    public String toString() {
214  0 return "CluPublicationInfo[id=" + id + ", cluId=" + cluId + ", type=" + type + "]";
215    }
216    }