1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.kns.web.ui;
17
18 import org.kuali.rice.core.web.format.Formatter;
19 import org.kuali.rice.kns.lookup.HtmlData;
20 import org.kuali.rice.kns.lookup.HtmlData.AnchorHtmlData;
21 import org.kuali.rice.kns.lookup.HtmlData.MultipleAnchorHtmlData;
22
23 import java.util.ArrayList;
24 import java.util.Comparator;
25 import java.util.List;
26
27
28
29
30
31
32
33
34 @Deprecated
35 public class Column implements java.io.Serializable, PropertyRenderingConfigElement {
36 private static final long serialVersionUID = -5916942413570667803L;
37 private String columnTitle;
38 private String sortable = "true";
39 private String propertyName;
40 private String propertyValue;
41 private Object unformattedPropertyValue;
42 private String propertyURL;
43 private HtmlData columnAnchor;
44 private Formatter formatter;
45 private Comparator comparator;
46 private boolean escapeXMLValue=true;
47
48 private String alternateDisplayPropertyName;
49 private String additionalDisplayPropertyName;
50
51 private boolean total;
52
53
54
55
56 private Comparator valueComparator;
57
58
59
60
61
62 private int maxLength;
63
64 public Column() {
65 }
66
67 public Column(String columnTitle, String propertyName) {
68 this.columnTitle = columnTitle;
69 this.propertyName = propertyName;
70 }
71
72 public Column(String columnTitle, String sortable, String propertyName) {
73 this.columnTitle = columnTitle;
74 this.sortable = sortable;
75 this.propertyName = propertyName;
76 }
77
78 public Column(String columnTitle, String sortable, String propertyName, Comparator comparator) {
79 this(columnTitle, sortable, propertyName);
80 this.comparator = comparator;
81 }
82
83 public Column(String columnTitle, String propertyName, Formatter formatter) {
84 this.columnTitle = columnTitle;
85 this.propertyName = propertyName;
86 this.formatter = formatter;
87 }
88
89
90
91
92 public Comparator getComparator() {
93 return comparator;
94 }
95
96
97
98
99
100 public void setComparator(Comparator comparator) {
101 this.comparator = comparator;
102 }
103
104
105
106
107
108 public String getColumnTitle() {
109 return columnTitle;
110 }
111
112
113
114
115
116 public void setColumnTitle(String columnTitle) {
117 this.columnTitle = columnTitle;
118 }
119
120
121
122
123
124 public String getPropertyName() {
125 return propertyName;
126 }
127
128
129
130
131
132 public void setPropertyName(String propertyName) {
133 this.propertyName = propertyName;
134 }
135
136
137
138
139
140 public String getSortable() {
141 return sortable;
142 }
143
144
145
146
147
148 public void setSortable(String sortable) {
149 this.sortable = sortable;
150 }
151
152
153
154
155
156 public String getPropertyURL() {
157 return propertyURL;
158 }
159
160
161
162
163
164 public void setPropertyURL(String propertyURL) {
165 this.propertyURL = propertyURL;
166 }
167
168
169
170
171 public HtmlData getColumnAnchor() {
172 return this.columnAnchor;
173 }
174
175 public boolean isMultipleAnchors(){
176 return this.columnAnchor instanceof MultipleAnchorHtmlData;
177 }
178
179 public List<AnchorHtmlData> getColumnAnchors(){
180 if(isMultipleAnchors())
181 return ((MultipleAnchorHtmlData)this.columnAnchor).getAnchorHtmlData();
182 List<AnchorHtmlData> htmlData = new ArrayList<AnchorHtmlData>();
183 htmlData.add((AnchorHtmlData)columnAnchor);
184 return htmlData;
185 }
186
187 public int getNumberOfColumnAnchors(){
188 return getColumnAnchors().size();
189 }
190
191
192
193
194 public void setColumnAnchor(HtmlData columnAnchor) {
195 this.columnAnchor = columnAnchor;
196 if(columnAnchor!=null)
197 setPropertyURL(((AnchorHtmlData)columnAnchor).getHref());
198 }
199
200
201
202
203 public String getPropertyValue() {
204 return propertyValue;
205 }
206
207
208
209
210
211 public void setPropertyValue(String propertyValue) {
212 this.propertyValue = propertyValue;
213 }
214
215
216
217
218 public Formatter getFormatter() {
219 return formatter;
220 }
221
222
223
224
225
226 public void setFormatter(Formatter formatter) {
227 this.formatter = formatter;
228 }
229
230 public Comparator getValueComparator() {
231 return valueComparator;
232 }
233
234 public void setValueComparator(Comparator valueComparator) {
235 this.valueComparator = valueComparator;
236 }
237
238
239
240
241
242
243 public int getMaxLength() {
244 return maxLength;
245 }
246
247
248
249
250
251
252 public void setMaxLength(int maxColumnLength) {
253 this.maxLength = maxColumnLength;
254 }
255
256
257
258
259 public boolean isEscapeXMLValue() {
260 return this.escapeXMLValue;
261 }
262
263
264
265
266 public void setEscapeXMLValue(boolean escapeXMLValue) {
267 this.escapeXMLValue = escapeXMLValue;
268 }
269
270 public String getAlternateDisplayPropertyName() {
271 return this.alternateDisplayPropertyName;
272 }
273
274 public void setAlternateDisplayPropertyName(String alternateDisplayPropertyName) {
275 this.alternateDisplayPropertyName = alternateDisplayPropertyName;
276 }
277
278 public String getAdditionalDisplayPropertyName() {
279 return this.additionalDisplayPropertyName;
280 }
281
282 public void setAdditionalDisplayPropertyName(String additionalDisplayPropertyName) {
283 this.additionalDisplayPropertyName = additionalDisplayPropertyName;
284 }
285
286 public boolean isTotal() {
287 return this.total;
288 }
289
290 public void setTotal(boolean total) {
291 this.total = total;
292 }
293
294 public Object getUnformattedPropertyValue() {
295 return this.unformattedPropertyValue;
296 }
297
298 public void setUnformattedPropertyValue(Object unformattedPropertyValue) {
299 this.unformattedPropertyValue = unformattedPropertyValue;
300 }
301
302 }