Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
CredentialTypeInfo |
|
| 1.0833333333333333;1.083 |
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.lrc.dto; | |
17 | ||
18 | import java.io.Serializable; | |
19 | import java.util.Date; | |
20 | import java.util.HashMap; | |
21 | import java.util.Map; | |
22 | ||
23 | import javax.xml.bind.annotation.XmlAccessType; | |
24 | import javax.xml.bind.annotation.XmlAccessorType; | |
25 | import javax.xml.bind.annotation.XmlAttribute; | |
26 | import javax.xml.bind.annotation.XmlElement; | |
27 | import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; | |
28 | ||
29 | import org.kuali.student.common.dto.HasAttributes; | |
30 | import org.kuali.student.common.dto.Idable; | |
31 | import org.kuali.student.core.ws.binding.JaxbAttributeMapListAdapter; | |
32 | ||
33 | /** | |
34 | * Detailed information about a single credential type. | |
35 | * | |
36 | * @Author KSContractMojo | |
37 | * @Author lindholm | |
38 | * @Since Tue Apr 21 13:47:12 PDT 2009 | |
39 | * @See <a href="https://test.kuali.org/confluence/display/KULSTU/credentialTypeInfo+Structure">CredentialTypeInfo</> | |
40 | * | |
41 | */ | |
42 | @XmlAccessorType(XmlAccessType.FIELD) | |
43 | 0 | public class CredentialTypeInfo implements Serializable, Idable, HasAttributes { |
44 | ||
45 | private static final long serialVersionUID = 1L; | |
46 | ||
47 | @XmlElement | |
48 | private String name; | |
49 | ||
50 | @XmlElement | |
51 | private String desc; | |
52 | ||
53 | @XmlElement | |
54 | private Date effectiveDate; | |
55 | ||
56 | @XmlElement | |
57 | private Date expirationDate; | |
58 | ||
59 | @XmlElement | |
60 | @XmlJavaTypeAdapter(JaxbAttributeMapListAdapter.class) | |
61 | private Map<String, String> attributes; | |
62 | ||
63 | @XmlAttribute(name="key") | |
64 | private String id; | |
65 | ||
66 | /** | |
67 | * Friendly name of the credential type | |
68 | */ | |
69 | public String getName() { | |
70 | 0 | return name; |
71 | } | |
72 | ||
73 | public void setName(String name) { | |
74 | 0 | this.name = name; |
75 | 0 | } |
76 | ||
77 | /** | |
78 | * Narrative description of the credential type | |
79 | */ | |
80 | public String getDesc() { | |
81 | 0 | return desc; |
82 | } | |
83 | ||
84 | public void setDesc(String desc) { | |
85 | 0 | this.desc = desc; |
86 | 0 | } |
87 | ||
88 | /** | |
89 | * Date and time that this credential 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. | |
90 | */ | |
91 | public Date getEffectiveDate() { | |
92 | 0 | return effectiveDate; |
93 | } | |
94 | ||
95 | public void setEffectiveDate(Date effectiveDate) { | |
96 | 0 | this.effectiveDate = effectiveDate; |
97 | 0 | } |
98 | ||
99 | /** | |
100 | * Date and time that this credential 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. | |
101 | */ | |
102 | public Date getExpirationDate() { | |
103 | 0 | return expirationDate; |
104 | } | |
105 | ||
106 | public void setExpirationDate(Date expirationDate) { | |
107 | 0 | this.expirationDate = expirationDate; |
108 | 0 | } |
109 | ||
110 | /** | |
111 | * List of key/value pairs, typically used for dynamic attributes. | |
112 | */ | |
113 | public Map<String, String> getAttributes() { | |
114 | 0 | if (attributes == null) { |
115 | 0 | attributes = new HashMap<String, String>(); |
116 | } | |
117 | 0 | return attributes; |
118 | } | |
119 | ||
120 | public void setAttributes(Map<String, String> attributes) { | |
121 | 0 | this.attributes = attributes; |
122 | 0 | } |
123 | ||
124 | /** | |
125 | * Unique identifier for a credential type. | |
126 | */ | |
127 | public String getId() { | |
128 | 0 | return id; |
129 | } | |
130 | ||
131 | public void setId(String id) { | |
132 | 0 | this.id = id; |
133 | 0 | } |
134 | } |