1 package org.kuali.student.r1.common.assembly.data;
2
3 import java.util.ArrayList;
4 import java.util.List;
5 import java.util.Map;
6
7 import javax.xml.bind.annotation.XmlElement;
8 import javax.xml.bind.annotation.XmlElementWrapper;
9
10 import org.kuali.student.r1.common.dictionary.dto.CommonLookup;
11 import org.kuali.student.r1.common.search.dto.SortDirection;
12
13 @Deprecated
14 public class UILookupData extends CommonLookup {
15
16 private static final long serialVersionUID = 1L;
17
18 private String id;
19 private String name;
20 private String desc;
21 private String title;
22
23 @XmlElement(name = "result")
24 @XmlElementWrapper
25 private List<LookupResultMetadata> results;
26
27 private LookupQosMetadata qosMetadata;
28
29 private String resultDisplayKey;
30
31 private String resultSortKey;
32
33 private Integer minQuerySize;
34
35
36 private SortDirection sortDirection;
37
38
39
40
41
42 public enum Usage {
43 DEFAULT, ADVANCED, CUSTOM, ADVANCED_CUSTOM
44 }
45
46 private Usage usage;
47
48
49 public enum Widget {
50 NO_WIDGET, SUGGEST_BOX, ADVANCED_LIGHTBOX, DROP_DOWN, BUTTON, CHECKBOX_LIST, RADIO
51 }
52
53 private Widget widget;
54
55 public enum WidgetOption {
56 ADVANCED_LIGHTBOX_PREVIEW_MODE, ADVANCED_LIGHTBOX_ACTION_LABEL
57 }
58
59 private Map<WidgetOption, String> widgetOptions;
60
61 public Map<WidgetOption, String> getWidgetOptions() {
62 return widgetOptions;
63 }
64
65 public void setWidgetOptions(Map<WidgetOption, String> widgetOptions) {
66 this.widgetOptions = widgetOptions;
67 }
68
69 public String getWidgetOptionValue(WidgetOption widgetOption) {
70 if (widgetOptions == null)
71 return null;
72 return widgetOptions.get(widgetOption);
73 }
74
75 public String getName() {
76 return name;
77 }
78
79 public void setName(String name) {
80 this.name = name;
81 }
82
83 public String getDesc() {
84 return desc;
85 }
86
87 public void setDesc(String desc) {
88 this.desc = desc;
89 }
90
91 public String getTitle() {
92 return title;
93 }
94
95 public void setTitle(String title) {
96 this.title = title;
97 }
98
99 public List<LookupResultMetadata> getResults() {
100 if (results == null) {
101 results = new ArrayList<LookupResultMetadata>();
102 }
103 return results;
104 }
105
106 public void setResults(List<LookupResultMetadata> results) {
107 this.results = results;
108 }
109
110 public String getResultDisplayKey() {
111 return resultDisplayKey;
112 }
113
114 public void setResultDisplayKey(String resultDisplayKey) {
115 this.resultDisplayKey = resultDisplayKey;
116 }
117
118 public String getResultSortKey() {
119 return resultSortKey;
120 }
121
122 public void setResultSortKey(String resultSortKey) {
123 this.resultSortKey = resultSortKey;
124 }
125
126 public LookupQosMetadata getQosMetadata() {
127 return qosMetadata;
128 }
129
130 public void setQosMetadata(LookupQosMetadata qosMetadata) {
131 this.qosMetadata = qosMetadata;
132 }
133
134 public String getId() {
135 return id;
136 }
137
138 public void setId(String id) {
139 this.id = id;
140 }
141
142 public Usage getUsage() {
143 return usage;
144 }
145
146 public void setUsage(Usage usage) {
147 this.usage = usage;
148 }
149
150 public Widget getWidget() {
151 return widget;
152 }
153
154 public void setWidget(Widget widget) {
155 this.widget = widget;
156 }
157
158 public Integer getMinQuerySize() {
159 return minQuerySize;
160 }
161
162 public void setMinQuerySize(Integer minQuerySize) {
163 this.minQuerySize = minQuerySize;
164 }
165
166 public String toString() {
167 StringBuffer sb = new StringBuffer();
168 sb.append(id);
169 sb.append(",");
170 sb.append(",");
171 sb.append(name);
172 sb.append(",");
173 sb.append(desc);
174 return sb.toString();
175 }
176
177 public SortDirection getSortDirection() {
178 return sortDirection;
179 }
180
181 public void setSortDirection(SortDirection sortDirection) {
182 this.sortDirection = sortDirection;
183 }
184
185 }