Clover Coverage Report - Kuali Student 1.1.0-M10-SNAPSHOT (Aggregated)
Coverage timestamp: Fri Dec 17 2010 05:04:51 EST
../../../../../../img/srcFileCovDistChart5.png 46% of files have more coverage
46   216   35   1.44
6   143   0.76   8
32     1.09  
4    
 
  LookupMetadata       Line # 23 46 0% 35 42 50% 0.5
  LookupMetadata.Usage       Line # 50 0 - 0 0 - -1.0
  LookupMetadata.Widget       Line # 57 0 - 0 0 - -1.0
  LookupMetadata.WidgetOption       Line # 62 0 - 0 0 - -1.0
 
  (4)
 
1    /**
2    * Copyright 2010 The Kuali Foundation Licensed under the
3    * Educational Community License, Version 2.0 (the "License"); you may
4    * not use this file except in compliance with the License. You may
5    * obtain a copy of the License at
6    *
7    * http://www.osedu.org/licenses/ECL-2.0
8    *
9    * Unless required by applicable law or agreed to in writing,
10    * software distributed under the License is distributed on an "AS IS"
11    * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12    * or implied. See the License for the specific language governing
13    * permissions and limitations under the License.
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    public class LookupMetadata implements Serializable {
24   
25    private static final long serialVersionUID = 1L;
26   
27    private String id; //unique ID of this lookup
28    private String searchTypeId; //id of search type defined in search xml
29    private String name; //name of this search
30    private String desc;
31    private String title; //advanced search window 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    // how a search criteria will be used. ADVANCED_CUSTOM is shown on both advanced
48    // and custom screens of the advanced search lightbox
49    //TODO is DEFAULT needed? it has 0 references
 
50    public enum Usage {
51    DEFAULT, ADVANCED, CUSTOM, ADVANCED_CUSTOM
52    }
53   
54    private Usage usage;
55   
56    //TODO BUTTON has 0 references. Is it needed?
 
57    public enum Widget {
58    NO_WIDGET, SUGGEST_BOX, ADVANCED_LIGHTBOX, DROP_DOWN, BUTTON, CHECKBOX_LIST, RADIO
59    }
60    private Widget widget;
61   
 
62    public enum WidgetOption {
63    ADVANCED_LIGHTBOX_PREVIEW_MODE, ADVANCED_LIGHTBOX_ACTION_LABEL
64    }
65   
66    private Map<WidgetOption, String> widgetOptions;
67   
 
68  2 toggle public Map<WidgetOption, String> getWidgetOptions() {
69  2 return widgetOptions;
70    }
71   
 
72  0 toggle public void setWidgetOptions(Map<WidgetOption, String> widgetOptions) {
73  0 this.widgetOptions = widgetOptions;
74    }
75   
 
76  0 toggle public String getWidgetOptionValue(WidgetOption widgetOption) {
77  0 if (widgetOptions == null) return null;
78  0 return widgetOptions.get(widgetOption);
79    }
80   
 
81  2 toggle public String getName() {
82  2 return name;
83    }
84   
 
85  32 toggle public void setName(String name) {
86  32 this.name = name;
87    }
88   
 
89  0 toggle public String getDesc() {
90  0 return desc;
91    }
92   
 
93  32 toggle public void setDesc(String desc) {
94  32 this.desc = desc;
95    }
96   
 
97  0 toggle public String getTitle() {
98  0 return title;
99    }
100   
 
101  21 toggle public void setTitle(String title) {
102  21 this.title = title;
103    }
104   
 
105  4 toggle public List<LookupParamMetadata> getParams() {
106  4 if (params == null) {
107  0 params = new ArrayList<LookupParamMetadata>();
108    }
109  4 return params;
110    }
111   
 
112  29 toggle public void setParams(List<LookupParamMetadata> params) {
113  29 this.params = params;
114    }
115   
 
116  0 toggle public List<LookupResultMetadata> getResults() {
117  0 if (results == null) {
118  0 results = new ArrayList<LookupResultMetadata>();
119    }
120  0 return results;
121    }
122   
 
123  32 toggle public void setResults(List<LookupResultMetadata> results) {
124  32 this.results = results;
125    }
126   
 
127  6 toggle public String getSearchTypeId() {
128  6 return searchTypeId;
129    }
130   
 
131  32 toggle public void setSearchTypeId(String searchTypeId) {
132  32 this.searchTypeId = searchTypeId;
133    }
134   
 
135  0 toggle public String getResultReturnKey() {
136  0 return resultReturnKey;
137    }
138   
 
139  32 toggle public void setResultReturnKey(String resultReturnKey) {
140  32 this.resultReturnKey = resultReturnKey;
141    }
142   
 
143  0 toggle public String getResultDisplayKey() {
144  0 return resultDisplayKey;
145    }
146   
 
147  32 toggle public void setResultDisplayKey(String resultDisplayKey) {
148  32 this.resultDisplayKey = resultDisplayKey;
149    }
150   
 
151  0 toggle public String getResultSortKey() {
152  0 return resultSortKey;
153    }
154   
 
155  32 toggle public void setResultSortKey(String resultSortKey) {
156  32 this.resultSortKey = resultSortKey;
157    }
158   
 
159  0 toggle public LookupQosMetadata getQosMetadata() {
160  0 return qosMetadata;
161    }
162   
 
163  21 toggle public void setQosMetadata(LookupQosMetadata qosMetadata) {
164  21 this.qosMetadata = qosMetadata;
165    }
166   
 
167  0 toggle public String getSearchParamIdKey() {
168  0 return searchParamIdKey;
169    }
170   
 
171  21 toggle public void setSearchParamIdKey(String searchParamIdKey) {
172  21 this.searchParamIdKey = searchParamIdKey;
173    }
174   
 
175  2 toggle public String getId() {
176  2 return id;
177    }
178   
 
179  32 toggle public void setId(String id) {
180  32 this.id = id;
181    }
182   
183    /**
184    * @deprecated not used so eventually want to remove
185    */
 
186  0 toggle public Usage getUsage() {
187  0 return usage;
188    }
189   
190    /**
191    * @deprecated not used so eventually want to remove
192    */
 
193  23 toggle public void setUsage(Usage usage) {
194  23 this.usage = usage;
195    }
196   
 
197  4 toggle public Widget getWidget() {
198  4 return widget;
199    }
200   
 
201  21 toggle public void setWidget(Widget widget) {
202  21 this.widget = widget;
203    }
204   
 
205  0 toggle 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    }