Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
NotificationContentType |
|
| 1.0;1 |
1 | /* | |
2 | * Copyright 2007-2008 The Kuali Foundation | |
3 | * | |
4 | * Licensed under the Educational Community License, Version 2.0 (the "License"); | |
5 | * you may not use this file except in compliance with the License. | |
6 | * You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.opensource.org/licenses/ecl2.php | |
9 | * | |
10 | * Unless required by applicable law or agreed to in writing, software | |
11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | * See the License for the specific language governing permissions and | |
14 | * limitations under the License. | |
15 | */ | |
16 | package org.kuali.rice.ken.bo; | |
17 | ||
18 | import org.apache.commons.lang.builder.ToStringBuilder; | |
19 | ||
20 | import javax.persistence.Column; | |
21 | import javax.persistence.Entity; | |
22 | import javax.persistence.Id; | |
23 | import javax.persistence.Table; | |
24 | import javax.persistence.Transient; | |
25 | ||
26 | /** | |
27 | * This class represents the different types of Notification content that the system can handle. | |
28 | * For example, and instance of content type could be "Alert" or "Event". | |
29 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
30 | */ | |
31 | @Entity | |
32 | @Table(name="KREN_CNTNT_TYP_T") | |
33 | public class NotificationContentType { | |
34 | @Id | |
35 | @Column(name="CNTNT_TYP_ID") | |
36 | private Long id; | |
37 | @Column(name="NM", nullable=false) | |
38 | private String name; | |
39 | 0 | @Transient |
40 | private boolean current = true; | |
41 | 0 | @Transient |
42 | private Integer version = Integer.valueOf(0); | |
43 | @Column(name="DESC_TXT", nullable=false) | |
44 | private String description; | |
45 | @Column(name="NMSPC_CD", nullable=false) | |
46 | private String namespace; | |
47 | @Column(name="XSD", nullable=false, length=4096) | |
48 | private String xsd; | |
49 | @Column(name="XSL", nullable=false, length=4096) | |
50 | private String xsl; | |
51 | ||
52 | /** | |
53 | * Constructs a NotificationContentType instance. | |
54 | */ | |
55 | 0 | public NotificationContentType() { |
56 | 0 | } |
57 | ||
58 | /** | |
59 | * Gets the description attribute. | |
60 | * @return Returns the description. | |
61 | */ | |
62 | public String getDescription() { | |
63 | 0 | return description; |
64 | } | |
65 | ||
66 | /** | |
67 | * Sets the description attribute value. | |
68 | * @param description The description to set. | |
69 | */ | |
70 | public void setDescription(String description) { | |
71 | 0 | this.description = description; |
72 | 0 | } |
73 | ||
74 | /** | |
75 | * Gets the id attribute. | |
76 | * @return Returns the id. | |
77 | */ | |
78 | public Long getId() { | |
79 | 0 | return id; |
80 | } | |
81 | ||
82 | /** | |
83 | * Sets the id attribute value. | |
84 | * @param id The id to set. | |
85 | */ | |
86 | public void setId(Long id) { | |
87 | 0 | this.id = id; |
88 | 0 | } |
89 | ||
90 | /** | |
91 | * Gets the name attribute. | |
92 | * @return Returns the name. | |
93 | */ | |
94 | public String getName() { | |
95 | 0 | return name; |
96 | } | |
97 | ||
98 | /** | |
99 | * @return whether this is the current version | |
100 | */ | |
101 | public boolean isCurrent() { | |
102 | 0 | return this.current; |
103 | } | |
104 | ||
105 | /** | |
106 | * @param current whether this is the current version | |
107 | */ | |
108 | public void setCurrent(boolean current) { | |
109 | 0 | this.current = current; |
110 | 0 | } |
111 | ||
112 | /** | |
113 | * @return the version | |
114 | */ | |
115 | public Integer getVersion() { | |
116 | 0 | return this.version; |
117 | } | |
118 | ||
119 | /** | |
120 | * @param version the version to set | |
121 | */ | |
122 | public void setVersion(Integer version) { | |
123 | 0 | this.version = version; |
124 | 0 | } |
125 | ||
126 | /** | |
127 | * Sets the name attribute value. | |
128 | * @param name The name to set. | |
129 | */ | |
130 | public void setName(String name) { | |
131 | 0 | this.name = name; |
132 | 0 | } |
133 | ||
134 | /** | |
135 | * Gets the namespace attribute. | |
136 | * @return Returns the namespace. | |
137 | */ | |
138 | public String getNamespace() { | |
139 | 0 | return namespace; |
140 | } | |
141 | ||
142 | /** | |
143 | * Sets the namespace attribute value. | |
144 | * @param namespace The namespace to set. | |
145 | */ | |
146 | public void setNamespace(String namespace) { | |
147 | 0 | this.namespace = namespace; |
148 | 0 | } |
149 | ||
150 | /** | |
151 | * Gets the xsd attribute. The value of this field is used to validate a notification's content field dynamically. | |
152 | * @return Returns the xsd. | |
153 | */ | |
154 | public String getXsd() { | |
155 | 0 | return xsd; |
156 | } | |
157 | ||
158 | /** | |
159 | * Sets the xsd attribute value. The value of this field is used to validate a notification's content field dynamically. | |
160 | * @param xsd The xsd to set. | |
161 | */ | |
162 | public void setXsd(String xsd) { | |
163 | 0 | this.xsd = xsd; |
164 | 0 | } |
165 | ||
166 | /** | |
167 | * Gets the xsl attribute. The value of this field is used to render a notification's contents dynamically. | |
168 | * @return Returns the xsl. | |
169 | */ | |
170 | public String getXsl() { | |
171 | 0 | return xsl; |
172 | } | |
173 | ||
174 | /** | |
175 | * Sets the xsl attribute value. The value of this field is used to render a notification's contents dynamically. | |
176 | * @param xsl The xsl to set. | |
177 | */ | |
178 | public void setXsl(String xsl) { | |
179 | 0 | this.xsl = xsl; |
180 | 0 | } |
181 | ||
182 | /** | |
183 | * Returns readable representation of the object | |
184 | * @see java.lang.Object#toString() | |
185 | */ | |
186 | public String toString() { | |
187 | 0 | return new ToStringBuilder(this).append("id", id) |
188 | .append("name", name) | |
189 | .append("namespace", namespace) | |
190 | .append("version", version) | |
191 | .append("current", current) | |
192 | .toString(); | |
193 | } | |
194 | } |