Clover Coverage Report - KS Common Impl 1.2-M6-SNAPSHOT
Coverage timestamp: Sun Sep 11 2011 06:20:14 EDT
../../../../../../img/srcFileCovDistChart5.png 35% of files have more coverage
50   239   39   1.39
6   158   0.78   9
36     1.08  
4    
 
  LookupMetadata       Line # 25 50 0% 39 46 50% 0.5
  LookupMetadata.Usage       Line # 57 0 - 0 0 - -1.0
  LookupMetadata.Widget       Line # 64 0 - 0 0 - -1.0
  LookupMetadata.WidgetOption       Line # 69 0 - 0 0 - -1.0
 
  (3)
 
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.common.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    import org.kuali.student.common.search.dto.SortDirection;
24   
 
25    public class LookupMetadata implements Serializable {
26   
27    private static final long serialVersionUID = 1L;
28   
29    private String id; //unique ID of this lookup
30    private String searchTypeId; //id of search type defined in search xml
31    private String name; //name of this search
32    private String desc;
33    private String title; //advanced search window title
34   
35    private List<LookupParamMetadata> params;
36   
37    private List<LookupResultMetadata> results;
38   
39    private LookupQosMetadata qosMetadata;
40   
41    private String searchParamIdKey;
42   
43    private String resultReturnKey;
44   
45    private String resultDisplayKey;
46   
47    private String resultSortKey;
48   
49    private Integer minQuerySize; //min size of request query before starting search
50   
51    // how a search criteria will be used. ADVANCED_CUSTOM is shown on both advanced
52    // and custom screens of the advanced search lightbox
53    //TODO is DEFAULT needed? it has 0 references
54   
55    private SortDirection sortDirection;
56   
 
57    public enum Usage {
58    DEFAULT, ADVANCED, CUSTOM, ADVANCED_CUSTOM
59    }
60   
61    private Usage usage;
62   
63    //TODO BUTTON has 0 references. Is it needed?
 
64    public enum Widget {
65    NO_WIDGET, SUGGEST_BOX, ADVANCED_LIGHTBOX, DROP_DOWN, BUTTON, CHECKBOX_LIST, RADIO
66    }
67    private Widget widget;
68   
 
69    public enum WidgetOption {
70    ADVANCED_LIGHTBOX_PREVIEW_MODE, ADVANCED_LIGHTBOX_ACTION_LABEL
71    }
72   
73    private Map<WidgetOption, String> widgetOptions;
74   
 
75  2 toggle public Map<WidgetOption, String> getWidgetOptions() {
76  2 return widgetOptions;
77    }
78   
 
79  0 toggle public void setWidgetOptions(Map<WidgetOption, String> widgetOptions) {
80  0 this.widgetOptions = widgetOptions;
81    }
82   
 
83  0 toggle public String getWidgetOptionValue(WidgetOption widgetOption) {
84  0 if (widgetOptions == null) return null;
85  0 return widgetOptions.get(widgetOption);
86    }
87   
 
88  2 toggle public String getName() {
89  2 return name;
90    }
91   
 
92  21 toggle public void setName(String name) {
93  21 this.name = name;
94    }
95   
 
96  0 toggle public String getDesc() {
97  0 return desc;
98    }
99   
 
100  21 toggle public void setDesc(String desc) {
101  21 this.desc = desc;
102    }
103   
 
104  0 toggle public String getTitle() {
105  0 return title;
106    }
107   
 
108  10 toggle public void setTitle(String title) {
109  10 this.title = title;
110    }
111   
 
112  4 toggle public List<LookupParamMetadata> getParams() {
113  4 if (params == null) {
114  0 params = new ArrayList<LookupParamMetadata>();
115    }
116  4 return params;
117    }
118   
 
119  18 toggle public void setParams(List<LookupParamMetadata> params) {
120  18 this.params = params;
121    }
122   
 
123  0 toggle public List<LookupResultMetadata> getResults() {
124  0 if (results == null) {
125  0 results = new ArrayList<LookupResultMetadata>();
126    }
127  0 return results;
128    }
129   
 
130  21 toggle public void setResults(List<LookupResultMetadata> results) {
131  21 this.results = results;
132    }
133   
 
134  6 toggle public String getSearchTypeId() {
135  6 return searchTypeId;
136    }
137   
 
138  21 toggle public void setSearchTypeId(String searchTypeId) {
139  21 this.searchTypeId = searchTypeId;
140    }
141   
 
142  0 toggle public String getResultReturnKey() {
143  0 return resultReturnKey;
144    }
145   
 
146  21 toggle public void setResultReturnKey(String resultReturnKey) {
147  21 this.resultReturnKey = resultReturnKey;
148    }
149   
 
150  0 toggle public String getResultDisplayKey() {
151  0 return resultDisplayKey;
152    }
153   
 
154  21 toggle public void setResultDisplayKey(String resultDisplayKey) {
155  21 this.resultDisplayKey = resultDisplayKey;
156    }
157   
 
158  0 toggle public String getResultSortKey() {
159  0 return resultSortKey;
160    }
161   
 
162  21 toggle public void setResultSortKey(String resultSortKey) {
163  21 this.resultSortKey = resultSortKey;
164    }
165   
 
166  0 toggle public LookupQosMetadata getQosMetadata() {
167  0 return qosMetadata;
168    }
169   
 
170  10 toggle public void setQosMetadata(LookupQosMetadata qosMetadata) {
171  10 this.qosMetadata = qosMetadata;
172    }
173   
 
174  0 toggle public String getSearchParamIdKey() {
175  0 return searchParamIdKey;
176    }
177   
 
178  10 toggle public void setSearchParamIdKey(String searchParamIdKey) {
179  10 this.searchParamIdKey = searchParamIdKey;
180    }
181   
 
182  2 toggle public String getId() {
183  2 return id;
184    }
185   
 
186  21 toggle public void setId(String id) {
187  21 this.id = id;
188    }
189   
190    /**
191    * @deprecated not used so eventually want to remove
192    */
 
193  0 toggle public Usage getUsage() {
194  0 return usage;
195    }
196   
197    /**
198    * @deprecated not used so eventually want to remove
199    */
 
200  21 toggle public void setUsage(Usage usage) {
201  21 this.usage = usage;
202    }
203   
 
204  4 toggle public Widget getWidget() {
205  4 return widget;
206    }
207   
 
208  10 toggle public void setWidget(Widget widget) {
209  10 this.widget = widget;
210    }
211   
 
212  0 toggle public Integer getMinQuerySize() {
213  0 return minQuerySize;
214    }
215   
 
216  10 toggle public void setMinQuerySize(Integer minQuerySize) {
217  10 this.minQuerySize = minQuerySize;
218    }
219   
 
220  0 toggle public String toString(){
221  0 StringBuffer sb = new StringBuffer();
222  0 sb.append(id);
223  0 sb.append(",");
224  0 sb.append(searchTypeId);
225  0 sb.append(",");
226  0 sb.append(name);
227  0 sb.append(",");
228  0 sb.append(desc);
229  0 return sb.toString();
230    }
231   
 
232  0 toggle public SortDirection getSortDirection() {
233  0 return sortDirection;
234    }
235   
 
236  10 toggle public void setSortDirection(SortDirection sortDirection) {
237  10 this.sortDirection = sortDirection;
238    }
239    }