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