1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.student.core.assembly.data; |
17 | |
|
18 | |
import java.io.Serializable; |
19 | |
import java.util.ArrayList; |
20 | |
import java.util.List; |
21 | |
import java.util.Map; |
22 | |
|
23 | 21 | public class LookupMetadata implements Serializable { |
24 | |
|
25 | |
private static final long serialVersionUID = 1L; |
26 | |
|
27 | |
private String id; |
28 | |
private String searchTypeId; |
29 | |
private String name; |
30 | |
private String desc; |
31 | |
private String title; |
32 | |
|
33 | |
private List<LookupParamMetadata> params; |
34 | |
|
35 | |
private List<LookupResultMetadata> results; |
36 | |
|
37 | |
private LookupQosMetadata qosMetadata; |
38 | |
|
39 | |
private String searchParamIdKey; |
40 | |
|
41 | |
private String resultReturnKey; |
42 | |
|
43 | |
private String resultDisplayKey; |
44 | |
|
45 | |
private String resultSortKey; |
46 | |
|
47 | |
|
48 | |
|
49 | |
|
50 | 16 | public enum Usage { |
51 | 1 | DEFAULT, ADVANCED, CUSTOM, ADVANCED_CUSTOM |
52 | |
} |
53 | |
|
54 | |
private Usage usage; |
55 | |
|
56 | |
|
57 | 19 | public enum Widget { |
58 | 1 | NO_WIDGET, SUGGEST_BOX, ADVANCED_LIGHTBOX, DROP_DOWN, BUTTON, CHECKBOX_LIST, RADIO |
59 | |
} |
60 | |
private Widget widget; |
61 | |
|
62 | 21 | public enum WidgetOption { |
63 | 0 | ADVANCED_LIGHTBOX_PREVIEW_MODE, ADVANCED_LIGHTBOX_ACTION_LABEL |
64 | |
} |
65 | |
|
66 | |
private Map<WidgetOption, String> widgetOptions; |
67 | |
|
68 | |
public Map<WidgetOption, String> getWidgetOptions() { |
69 | 2 | return widgetOptions; |
70 | |
} |
71 | |
|
72 | |
public void setWidgetOptions(Map<WidgetOption, String> widgetOptions) { |
73 | 0 | this.widgetOptions = widgetOptions; |
74 | 0 | } |
75 | |
|
76 | |
public String getWidgetOptionValue(WidgetOption widgetOption) { |
77 | 0 | if (widgetOptions == null) return null; |
78 | 0 | return widgetOptions.get(widgetOption); |
79 | |
} |
80 | |
|
81 | |
public String getName() { |
82 | 2 | return name; |
83 | |
} |
84 | |
|
85 | |
public void setName(String name) { |
86 | 21 | this.name = name; |
87 | 21 | } |
88 | |
|
89 | |
public String getDesc() { |
90 | 0 | return desc; |
91 | |
} |
92 | |
|
93 | |
public void setDesc(String desc) { |
94 | 21 | this.desc = desc; |
95 | 21 | } |
96 | |
|
97 | |
public String getTitle() { |
98 | 0 | return title; |
99 | |
} |
100 | |
|
101 | |
public void setTitle(String title) { |
102 | 10 | this.title = title; |
103 | 10 | } |
104 | |
|
105 | |
public List<LookupParamMetadata> getParams() { |
106 | 4 | if (params == null) { |
107 | 0 | params = new ArrayList<LookupParamMetadata>(); |
108 | |
} |
109 | 4 | return params; |
110 | |
} |
111 | |
|
112 | |
public void setParams(List<LookupParamMetadata> params) { |
113 | 18 | this.params = params; |
114 | 18 | } |
115 | |
|
116 | |
public List<LookupResultMetadata> getResults() { |
117 | 0 | if (results == null) { |
118 | 0 | results = new ArrayList<LookupResultMetadata>(); |
119 | |
} |
120 | 0 | return results; |
121 | |
} |
122 | |
|
123 | |
public void setResults(List<LookupResultMetadata> results) { |
124 | 21 | this.results = results; |
125 | 21 | } |
126 | |
|
127 | |
public String getSearchTypeId() { |
128 | 6 | return searchTypeId; |
129 | |
} |
130 | |
|
131 | |
public void setSearchTypeId(String searchTypeId) { |
132 | 21 | this.searchTypeId = searchTypeId; |
133 | 21 | } |
134 | |
|
135 | |
public String getResultReturnKey() { |
136 | 0 | return resultReturnKey; |
137 | |
} |
138 | |
|
139 | |
public void setResultReturnKey(String resultReturnKey) { |
140 | 21 | this.resultReturnKey = resultReturnKey; |
141 | 21 | } |
142 | |
|
143 | |
public String getResultDisplayKey() { |
144 | 0 | return resultDisplayKey; |
145 | |
} |
146 | |
|
147 | |
public void setResultDisplayKey(String resultDisplayKey) { |
148 | 21 | this.resultDisplayKey = resultDisplayKey; |
149 | 21 | } |
150 | |
|
151 | |
public String getResultSortKey() { |
152 | 0 | return resultSortKey; |
153 | |
} |
154 | |
|
155 | |
public void setResultSortKey(String resultSortKey) { |
156 | 21 | this.resultSortKey = resultSortKey; |
157 | 21 | } |
158 | |
|
159 | |
public LookupQosMetadata getQosMetadata() { |
160 | 0 | return qosMetadata; |
161 | |
} |
162 | |
|
163 | |
public void setQosMetadata(LookupQosMetadata qosMetadata) { |
164 | 10 | this.qosMetadata = qosMetadata; |
165 | 10 | } |
166 | |
|
167 | |
public String getSearchParamIdKey() { |
168 | 0 | return searchParamIdKey; |
169 | |
} |
170 | |
|
171 | |
public void setSearchParamIdKey(String searchParamIdKey) { |
172 | 10 | this.searchParamIdKey = searchParamIdKey; |
173 | 10 | } |
174 | |
|
175 | |
public String getId() { |
176 | 2 | return id; |
177 | |
} |
178 | |
|
179 | |
public void setId(String id) { |
180 | 21 | this.id = id; |
181 | 21 | } |
182 | |
|
183 | |
|
184 | |
|
185 | |
|
186 | |
public Usage getUsage() { |
187 | 0 | return usage; |
188 | |
} |
189 | |
|
190 | |
|
191 | |
|
192 | |
|
193 | |
public void setUsage(Usage usage) { |
194 | 21 | this.usage = usage; |
195 | 21 | } |
196 | |
|
197 | |
public Widget getWidget() { |
198 | 4 | return widget; |
199 | |
} |
200 | |
|
201 | |
public void setWidget(Widget widget) { |
202 | 10 | this.widget = widget; |
203 | 10 | } |
204 | |
|
205 | |
public String toString(){ |
206 | 0 | StringBuffer sb = new StringBuffer(); |
207 | 0 | sb.append(id); |
208 | 0 | sb.append(","); |
209 | 0 | sb.append(searchTypeId); |
210 | 0 | sb.append(","); |
211 | 0 | sb.append(name); |
212 | 0 | sb.append(","); |
213 | 0 | sb.append(desc); |
214 | 0 | return sb.toString(); |
215 | |
} |
216 | |
} |