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