Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
DocumentSearchForm |
|
| 0.0;0 |
1 | /* | |
2 | * Copyright 2005-2007 The Kuali Foundation | |
3 | * | |
4 | * | |
5 | * Licensed under the Educational Community License, Version 2.0 (the "License"); | |
6 | * you may not use this file except in compliance with the License. | |
7 | * You may obtain a copy of the License at | |
8 | * | |
9 | * http://www.opensource.org/licenses/ecl2.php | |
10 | * | |
11 | * Unless required by applicable law or agreed to in writing, software | |
12 | * distributed under the License is distributed on an "AS IS" BASIS, | |
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
14 | * See the License for the specific language governing permissions and | |
15 | * limitations under the License. | |
16 | */ | |
17 | package org.kuali.rice.kew.docsearch.web; | |
18 | ||
19 | import org.apache.struts.action.ActionForm; | |
20 | import org.kuali.rice.kns.web.struts.form.KualiForm; | |
21 | ||
22 | ||
23 | /** | |
24 | * Struts form for document search action | |
25 | * | |
26 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
27 | */ | |
28 | 0 | public class DocumentSearchForm extends KualiForm { |
29 | //FIXME: delete this class when doc search is fully moved over | |
30 | ||
31 | // private static final long serialVersionUID = 8680419749805107805L; | |
32 | // private static final org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(DocumentSearchForm.class); | |
33 | //// private DocSearchCriteriaDTO criteria = new DocSearchCriteriaDTO(); | |
34 | // private DocumentSearchCriteriaProcessor criteriaProcessor = new StandardDocumentSearchCriteriaProcessor(); | |
35 | // | |
36 | // private String searchTarget; | |
37 | // private String searchIdValue; | |
38 | // private String searchLabelValue; | |
39 | // private String backIdPropName; | |
40 | // private String backLabelPropName; | |
41 | // private String backURL; | |
42 | // private String searchAction; | |
43 | // private String action; | |
44 | // | |
45 | // private String returnAction; | |
46 | // private String namedSearch = ""; | |
47 | // private String lookupableImplServiceName; | |
48 | // private String conversionFields = ""; | |
49 | // private String methodToCall = ""; | |
50 | // private String quickFinderLookupable; | |
51 | // private String lookupType; | |
52 | // private List searchableAttributeRows; | |
53 | // private List searchableAttributeColumns; | |
54 | // private List propertyFields; | |
55 | // | |
56 | // private boolean headerBarEnabled = true; | |
57 | // private boolean searchCriteriaEnabled = true; | |
58 | // private boolean initiatorUser = false; | |
59 | // private String searchableAttributes = ""; | |
60 | // | |
61 | // public DocumentSearchForm() { | |
62 | // super(); | |
63 | // searchableAttributeRows = new ArrayList<DocumentSearchRow>(); | |
64 | // searchableAttributeColumns = new ArrayList(); | |
65 | // propertyFields = new ArrayList(); | |
66 | // } | |
67 | // | |
68 | // public DocumentSearchCriteriaProcessor getCriteriaProcessor() { | |
69 | // return this.criteriaProcessor; | |
70 | // } | |
71 | // | |
72 | // public void setCriteriaProcessor(DocumentSearchCriteriaProcessor criteriaProcessor) { | |
73 | // this.criteriaProcessor = criteriaProcessor; | |
74 | // } | |
75 | // | |
76 | // public DocSearchCriteriaDTO getCriteria() { | |
77 | // if (this.criteriaProcessor == null) { | |
78 | // return null; | |
79 | // } | |
80 | // return this.criteriaProcessor.getDocSearchCriteriaDTO(); | |
81 | // } | |
82 | // | |
83 | //// public void setCriteria(DocSearchCriteriaDTO criteria) { | |
84 | //// if (criteria == null) { | |
85 | //// throw new RuntimeException("Criteria should never be null"); | |
86 | //// } | |
87 | //// this.criteriaProcessor.setDocSearchCriteriaDTO(criteria); | |
88 | //// } | |
89 | //// | |
90 | // public void setDocTypeFullName(String docTypeFullName) { | |
91 | // getCriteria().setDocTypeFullName(docTypeFullName); | |
92 | // } | |
93 | // | |
94 | // public String getDocTypeFullName() { | |
95 | // return getCriteria().getDocTypeFullName(); | |
96 | // } | |
97 | // | |
98 | // public void clearSearchableAttributeProperties() { | |
99 | // searchableAttributeRows = new ArrayList<DocumentSearchRow>(); | |
100 | // searchableAttributeColumns = new ArrayList(); | |
101 | // propertyFields = new ArrayList(); | |
102 | // } | |
103 | // | |
104 | // public void checkForAdditionalFields() { | |
105 | // DocumentType documentType = getDocumentType(); | |
106 | // if (documentType != null) { | |
107 | // List<SearchableAttribute> searchableAttributes = documentType.getSearchableAttributes(); | |
108 | // // we only want to initialize the searchable attribute fields, rows, | |
109 | // // and columns if this is the first time that they are being | |
110 | // // displayed | |
111 | // // on the form, therefore we check that each of the lists is empty. | |
112 | // // Originally, this code was clearing these lists out on every | |
113 | // // entry to the DocumentSearch screen which would only work in the | |
114 | // // case of a post of the entire form. In the case of lookups, this | |
115 | // // would result in the searchable attribute field values being | |
116 | // // cleared out, this fix resolves EN-122. | |
117 | // if (searchableAttributeRows.isEmpty() && searchableAttributeColumns.isEmpty() && propertyFields.isEmpty()) { | |
118 | // Set alreadyProcessedFieldKeys = new HashSet(); | |
119 | // for (SearchableAttribute searchableAttribute : searchableAttributes) { | |
120 | // List<DocumentSearchRow> searchRows = searchableAttribute.getSearchingRows( | |
121 | // DocSearchUtils.getDocumentSearchContext("", documentType.getName(), "")); | |
122 | // if (searchRows == null) { | |
123 | // continue; | |
124 | // } | |
125 | // for (DocumentSearchRow row : searchRows) { | |
126 | // for (org.kuali.rice.kns.web.ui.Field field : row.getFields()) { | |
127 | // DocumentSearchField dsField = (DocumentSearchField)field; | |
128 | // if (!Utilities.isEmpty(dsField.getPropertyName())) { | |
129 | // if (dsField.MULTI_VALUE_FIELD_TYPES.contains(dsField.getFieldType())) { | |
130 | // SearchAttributeFormContainer newFormContainer = new SearchAttributeFormContainer(); | |
131 | // newFormContainer.setKey(dsField.getPropertyName()); | |
132 | // newFormContainer.setValues(dsField.getPropertyValues()); | |
133 | // propertyFields.add(newFormContainer); | |
134 | // } else { | |
135 | // propertyFields.add(new SearchAttributeFormContainer(dsField.getPropertyName(), dsField.getPropertyValue())); | |
136 | // } | |
137 | // | |
138 | // } | |
139 | // // TODO delyea - check this... do we need it still? | |
140 | // if ( (dsField.getSavablePropertyName() == null) || (!alreadyProcessedFieldKeys.contains(dsField.getSavablePropertyName())) ) { | |
141 | // if (dsField.isColumnVisible()) { | |
142 | // for (Iterator iter = dsField.SEARCH_RESULT_DISPLAYABLE_FIELD_TYPES.iterator(); iter.hasNext();) { | |
143 | // String displayableFieldType = (String) iter.next(); | |
144 | // if (dsField.getFieldType().equals(displayableFieldType)) { | |
145 | // searchableAttributeColumns.add(new DocumentSearchColumn(field.getFieldLabel(), DocumentSearchColumn.COLUMN_IS_SORTABLE_VALUE, "searchableAttribute(" + dsField.getSavablePropertyName() + ").label")); | |
146 | // if (dsField.getSavablePropertyName() != null) { | |
147 | // alreadyProcessedFieldKeys.add(dsField.getSavablePropertyName()); | |
148 | // } | |
149 | // break; | |
150 | // } | |
151 | // } | |
152 | // } | |
153 | // } | |
154 | // } | |
155 | // addSearchableAttributeRow(row); | |
156 | // } | |
157 | // } | |
158 | // // update any potential propertyFields to hold data already in searchable attributes | |
159 | // setupPropertyFieldsUsingCriteria(); | |
160 | // } else { | |
161 | // updateSearchableAttributeData(documentType, searchableAttributes); | |
162 | // } | |
163 | // } | |
164 | // } | |
165 | // | |
166 | // /** | |
167 | // * Updates the field valid values since they aren't submitted with the form. | |
168 | // * | |
169 | // */ | |
170 | // private void updateSearchableAttributeData(DocumentType documentType, List<SearchableAttribute> searchableAttributes) { | |
171 | // // searchableAttributeRows is a List containing rows from all attributes, so we need to keep a global row count | |
172 | // int totalRowIndex = 0; | |
173 | // for (SearchableAttribute searchableAttribute : searchableAttributes) { | |
174 | // List<DocumentSearchRow> rows = searchableAttribute.getSearchingRows(DocSearchUtils.getDocumentSearchContext("", documentType.getName(), "")); | |
175 | // for (DocumentSearchRow row : rows) { | |
176 | // DocumentSearchRow existingRow = (DocumentSearchRow)getSearchableAttributeRows().get(totalRowIndex++); | |
177 | // int fieldIndex = 0; | |
178 | // for (org.kuali.rice.kns.web.ui.Field field : row.getFields()) { | |
179 | // // get existing field | |
180 | // org.kuali.rice.kns.web.ui.Field existingField = existingRow.getFields().get(fieldIndex++); | |
181 | // // now update the valid values | |
182 | // existingField.setFieldValidValues(field.getFieldValidValues()); | |
183 | // } | |
184 | // } | |
185 | // } | |
186 | // | |
187 | // } | |
188 | // | |
189 | // public void addSearchableAttributesToCriteria() { | |
190 | // DocSearchUtils.addSearchableAttributesToCriteria(getCriteria(), propertyFields, getSearchableAttributes()); | |
191 | // setSearchableAttributes(null); | |
192 | //// DocumentType docType = getDocumentType(); | |
193 | //// if (docType == null) { | |
194 | //// return; | |
195 | //// } | |
196 | //// getCriteria().getSearchableAttributes().clear(); | |
197 | //// Map<String,SearchAttributeCriteriaComponent> urlParameterSearchAttributesByFormKey = new HashMap<String,SearchAttributeCriteriaComponent>(); | |
198 | //// if (!StringUtils.isBlank(getSearchableAttributes())) { | |
199 | //// List<SearchAttributeCriteriaComponent> components = DocSearchUtils.buildSearchableAttributesFromString(getSearchableAttributes(), docType.getName()); | |
200 | //// for (SearchAttributeCriteriaComponent component : components) { | |
201 | //// urlParameterSearchAttributesByFormKey.put(component.getFormKey(), component); | |
202 | //// getCriteria().addSearchableAttribute(component); | |
203 | //// } | |
204 | //// setSearchableAttributes(null); | |
205 | //// } | |
206 | //// if (!propertyFields.isEmpty()) { | |
207 | //// Map criteriaComponentsByFormKey = new HashMap(); | |
208 | //// for (SearchableAttribute searchableAttribute : docType.getSearchableAttributes()) { | |
209 | //// for (Row row : searchableAttribute.getSearchingRows()) { | |
210 | //// for (Field field : row.getFields()) { | |
211 | //// SearchableAttributeValue searchableAttributeValue = DocSearchUtils.getSearchableAttributeValueByDataTypeString(field.getFieldDataType()); | |
212 | //// SearchAttributeCriteriaComponent sacc = new SearchAttributeCriteriaComponent(field.getPropertyName(),null,field.getSavablePropertyName(),searchableAttributeValue); | |
213 | //// sacc.setRangeSearch(field.isMemberOfRange()); | |
214 | //// sacc.setAllowWildcards(field.isAllowingWildcards()); | |
215 | //// sacc.setAutoWildcardBeginning(field.isAutoWildcardAtBeginning()); | |
216 | //// sacc.setAutoWildcardEnd(field.isAutoWildcardAtEnding()); | |
217 | //// sacc.setCaseSensitive(field.isCaseSensitive()); | |
218 | //// sacc.setSearchInclusive(field.isInclusive()); | |
219 | //// sacc.setLookupableFieldType(field.getFieldType()); | |
220 | //// sacc.setSearchable(field.isSearchable()); | |
221 | //// sacc.setCanHoldMultipleValues(Field.MULTI_VALUE_FIELD_TYPES.contains(field.getFieldType())); | |
222 | //// criteriaComponentsByFormKey.put(field.getPropertyName(), sacc); | |
223 | //// } | |
224 | //// } | |
225 | //// } | |
226 | //// for (Iterator iterator = propertyFields.iterator(); iterator.hasNext();) { | |
227 | //// SearchAttributeFormContainer propertyField = (SearchAttributeFormContainer) iterator.next(); | |
228 | //// SearchAttributeCriteriaComponent sacc = (SearchAttributeCriteriaComponent) criteriaComponentsByFormKey.get(propertyField.getKey()); | |
229 | //// if (sacc != null) { | |
230 | //// if (sacc.getSearchableAttributeValue() == null) { | |
231 | //// String errorMsg = "Searchable attribute with form field key " + sacc.getFormKey() + " does not have a valid SearchableAttributeValue"; | |
232 | //// LOG.error("addSearchableAttributesToCriteria() " + errorMsg); | |
233 | //// throw new RuntimeException(errorMsg); | |
234 | //// } | |
235 | //// // if the url parameter has already set up the search attribute change the propertyField | |
236 | //// if (urlParameterSearchAttributesByFormKey.containsKey(sacc.getFormKey())) { | |
237 | //// setupPropertyField(urlParameterSearchAttributesByFormKey.get(sacc.getFormKey())); | |
238 | //// } else { | |
239 | //// if ( (Field.CHECKBOX_YES_NO.equals(sacc.getLookupableFieldType())) && (!propertyField.isValueSet()) ) { | |
240 | //// // value was not set on the form so we must use the alternate value which for checkbox is the 'unchecked' value | |
241 | //// sacc.setValue(propertyField.getAlternateValue()); | |
242 | //// } else if (Field.MULTI_VALUE_FIELD_TYPES.contains(sacc.getLookupableFieldType())) { | |
243 | //// // set the multivalue lookup indicator | |
244 | //// sacc.setCanHoldMultipleValues(true); | |
245 | //// if (propertyField.getValues() == null) { | |
246 | //// sacc.setValues(new ArrayList<String>()); | |
247 | //// } else { | |
248 | //// sacc.setValues(Arrays.asList(propertyField.getValues())); | |
249 | //// } | |
250 | //// } else { | |
251 | //// sacc.setValue(propertyField.getValue()); | |
252 | //// } | |
253 | //// getCriteria().addSearchableAttribute(sacc); | |
254 | //// } | |
255 | //// } | |
256 | //// } | |
257 | //// } | |
258 | // } | |
259 | // | |
260 | // public void setupPropertyFieldsUsingCriteria() { | |
261 | // for (Iterator iter = getCriteria().getSearchableAttributes().iterator(); iter.hasNext();) { | |
262 | // SearchAttributeCriteriaComponent searchableAttribute = (SearchAttributeCriteriaComponent) iter.next(); | |
263 | // DocSearchUtils.setupPropertyField(searchableAttribute, propertyFields); | |
264 | //// setupPropertyField(searchableAttribute); | |
265 | // } | |
266 | // } | |
267 | // | |
268 | //// public void setupPropertyField(SearchAttributeCriteriaComponent searchableAttribute) { | |
269 | //// SearchAttributeFormContainer propertyField = getPropertyField(searchableAttribute.getFormKey()); | |
270 | //// if (propertyField != null) { | |
271 | //// propertyField.setValue(searchableAttribute.getValue()); | |
272 | //// if (searchableAttribute.getValues() != null) { | |
273 | //// propertyField.setValues(searchableAttribute.getValues().toArray(new String[searchableAttribute.getValues().size()])); | |
274 | //// } | |
275 | //// } | |
276 | //// } | |
277 | //// | |
278 | // public String getDocTypeDisplayName() { | |
279 | // DocumentType docType = getDocumentType(); | |
280 | // if (docType != null) { | |
281 | // return docType.getLabel(); | |
282 | // } | |
283 | // return null; | |
284 | // } | |
285 | // | |
286 | // private DocumentType getDocumentType() { | |
287 | // if ( (getCriteria() != null) && (getCriteria().getDocTypeFullName() != null && !"".equals(getCriteria().getDocTypeFullName())) ) { | |
288 | // return ((DocumentTypeService) KEWServiceLocator.getService(KEWServiceLocator.DOCUMENT_TYPE_SERVICE)).findByName(getCriteria().getDocTypeFullName()); | |
289 | // } | |
290 | // return null; | |
291 | // } | |
292 | // | |
293 | // public String getRouteLogPopup() { | |
294 | // return new Boolean(Utilities.getKNSParameterBooleanValue(KEWConstants.KEW_NAMESPACE, KNSConstants.DetailTypes.DOCUMENT_SEARCH_DETAIL_TYPE, KEWConstants.DOCUMENT_SEARCH_ROUTE_LOG_POPUP_IND)).toString(); | |
295 | // } | |
296 | // | |
297 | // public String getDocumentPopup() { | |
298 | // return new Boolean(Utilities.getKNSParameterBooleanValue(KEWConstants.KEW_NAMESPACE, KNSConstants.DetailTypes.DOCUMENT_SEARCH_DETAIL_TYPE, KEWConstants.DOCUMENT_SEARCH_DOCUMENT_POPUP_IND)).toString(); | |
299 | // } | |
300 | // | |
301 | // public void setInitiator(String initiator) { | |
302 | // getCriteria().setInitiator(initiator); | |
303 | // } | |
304 | // | |
305 | // public void setApprover(String approver) { | |
306 | // getCriteria().setApprover(approver); | |
307 | // } | |
308 | // | |
309 | // public void setViewer(String viewer) { | |
310 | // getCriteria().setViewer(viewer); | |
311 | // } | |
312 | // | |
313 | // /* | |
314 | // * the super user search methods used to live here but were moved to the criteria so search | |
315 | // * context could be saved along with search data. I kept these methods here to minimize impact on jsp. | |
316 | // * Feel free to remove this call through methods and modify the jsp. | |
317 | // */ | |
318 | // public String getSuperUserSearch() { | |
319 | // return getCriteria().getSuperUserSearch(); | |
320 | // } | |
321 | // | |
322 | // public void setSuperUserSearch(String superUserSearch) { | |
323 | // getCriteria().setSuperUserSearch(superUserSearch); | |
324 | // } | |
325 | // | |
326 | // public void setSearchTarget(String searchTarget) { | |
327 | // this.searchTarget = searchTarget; | |
328 | // } | |
329 | // | |
330 | // public String getSearchTarget() { | |
331 | // return searchTarget; | |
332 | // } | |
333 | // | |
334 | // public void setSearchIdValue(String searchIdValue) { | |
335 | // this.searchIdValue = searchIdValue; | |
336 | // } | |
337 | // | |
338 | // public String getSearchIdValue() { | |
339 | // return searchIdValue; | |
340 | // } | |
341 | // | |
342 | // public void setSearchLabelValue(String searchLabelValue) { | |
343 | // this.searchLabelValue = searchLabelValue; | |
344 | // } | |
345 | // | |
346 | // public String getSearchLabelValue() { | |
347 | // return searchLabelValue; | |
348 | // } | |
349 | // | |
350 | // public void setBackIdPropName(String backIdPropName) { | |
351 | // this.backIdPropName = backIdPropName; | |
352 | // } | |
353 | // | |
354 | // public String getBackIdPropName() { | |
355 | // return backIdPropName; | |
356 | // } | |
357 | // | |
358 | // public void setBackLabelPropName(String backLabelPropName) { | |
359 | // this.backLabelPropName = backLabelPropName; | |
360 | // } | |
361 | // | |
362 | // public String getBackLabelPropName() { | |
363 | // return backLabelPropName; | |
364 | // } | |
365 | // | |
366 | // public void setBackURL(String backURL) { | |
367 | // this.backURL = backURL; | |
368 | // } | |
369 | // | |
370 | // public String getBackURL() { | |
371 | // return backURL; | |
372 | // } | |
373 | // | |
374 | // public void setSearchAction(String searchAction) { | |
375 | // this.searchAction = searchAction; | |
376 | // } | |
377 | // | |
378 | // public String getSearchAction() { | |
379 | // return searchAction; | |
380 | // } | |
381 | // | |
382 | // public void setAction(String action) { | |
383 | // this.action = action; | |
384 | // } | |
385 | // | |
386 | // public String getAction() { | |
387 | // return action; | |
388 | // } | |
389 | // | |
390 | // /* | |
391 | // * the IsAdvancedSearch methods used to live here but were moved to the crieteria so search | |
392 | // * context could be saved along with search data. I kept these methods here to minimize impact on jsp. | |
393 | // * Feel free to remove this call through methods and modify the jsp. | |
394 | // */ | |
395 | // public String getIsAdvancedSearch() { | |
396 | // return getCriteria().getIsAdvancedSearch(); | |
397 | // } | |
398 | // | |
399 | // public void setIsAdvancedSearch(String string) { | |
400 | // getCriteria().setIsAdvancedSearch(string); | |
401 | // } | |
402 | // | |
403 | // public String getReturnAction() { | |
404 | // return returnAction; | |
405 | // } | |
406 | // | |
407 | // public void setReturnAction(String returnAction) { | |
408 | // this.returnAction = returnAction; | |
409 | // } | |
410 | // | |
411 | // public void setFromDateCreated(String fromDateCreated) { | |
412 | // getCriteria().setFromDateCreated(fromDateCreated); | |
413 | // } | |
414 | // | |
415 | // public void setToDateCreated(String toDateCreated) { | |
416 | // getCriteria().setToDateCreated(toDateCreated); | |
417 | // } | |
418 | // | |
419 | // public String getFromDateCreated() { | |
420 | // return getCriteria().getFromDateCreated(); | |
421 | // } | |
422 | // | |
423 | // public String getToDateCreated() { | |
424 | // return getCriteria().getToDateCreated(); | |
425 | // } | |
426 | // | |
427 | // public void setFromDateLastModified(String fromDateLastModified) { | |
428 | // getCriteria().setFromDateLastModified(fromDateLastModified); | |
429 | // } | |
430 | // | |
431 | // public void setToDateLastModified(String toDateLastModified) { | |
432 | // getCriteria().setToDateLastModified(toDateLastModified); | |
433 | // } | |
434 | // | |
435 | // public String getFromDateLastModified() { | |
436 | // return getCriteria().getFromDateLastModified(); | |
437 | // } | |
438 | // | |
439 | // public String getToDateLastModified() { | |
440 | // return getCriteria().getToDateLastModified(); | |
441 | // } | |
442 | // | |
443 | // public void setFromDateApproved(String fromDateApproved) { | |
444 | // getCriteria().setFromDateApproved(fromDateApproved); | |
445 | // } | |
446 | // | |
447 | // public void setToDateApproved(String toDateApproved) { | |
448 | // getCriteria().setToDateApproved(toDateApproved); | |
449 | // } | |
450 | // | |
451 | // public String getFromDateApproved() { | |
452 | // return getCriteria().getFromDateApproved(); | |
453 | // } | |
454 | // | |
455 | // public String getToDateApproved() { | |
456 | // return getCriteria().getToDateApproved(); | |
457 | // } | |
458 | // | |
459 | // public void setFromDateFinalized(String fromDateFinalized) { | |
460 | // getCriteria().setFromDateFinalized(fromDateFinalized); | |
461 | // } | |
462 | // | |
463 | // public void setToDateFinalized(String toDateFinalized) { | |
464 | // getCriteria().setToDateFinalized(toDateFinalized); | |
465 | // } | |
466 | // | |
467 | // public String getFromDateFinalized() { | |
468 | // return getCriteria().getFromDateFinalized(); | |
469 | // } | |
470 | // | |
471 | // public String getToDateFinalized() { | |
472 | // return getCriteria().getToDateFinalized(); | |
473 | // } | |
474 | // | |
475 | // | |
476 | // | |
477 | // public String getNamedSearch() { | |
478 | // return namedSearch; | |
479 | // } | |
480 | // | |
481 | // public void setNamedSearch(String namedSearch) { | |
482 | // this.namedSearch = namedSearch; | |
483 | // } | |
484 | // | |
485 | // public String getLookupableImplServiceName() { | |
486 | // return lookupableImplServiceName; | |
487 | // } | |
488 | // | |
489 | // public void setLookupableImplServiceName(String lookupableImplServiceName) { | |
490 | // this.lookupableImplServiceName = lookupableImplServiceName; | |
491 | // } | |
492 | // | |
493 | // /** | |
494 | // * @param conversionFields | |
495 | // * The conversionFields to set. | |
496 | // */ | |
497 | // public void setConversionFields(String conversionFields) { | |
498 | // this.conversionFields = conversionFields; | |
499 | // } | |
500 | // | |
501 | // /** | |
502 | // * @return Returns the conversionFields. | |
503 | // */ | |
504 | // public String getConversionFields() { | |
505 | // return conversionFields; | |
506 | // } | |
507 | // | |
508 | // public String getMethodToCall() { | |
509 | // return methodToCall; | |
510 | // } | |
511 | // | |
512 | // public void setMethodToCall(String methodToCall) { | |
513 | // this.methodToCall = methodToCall; | |
514 | // } | |
515 | // | |
516 | // public String getQuickFinderLookupable() { | |
517 | // return quickFinderLookupable; | |
518 | // } | |
519 | // | |
520 | // public void setQuickFinderLookupable(String quickFinderLookupable) { | |
521 | // this.quickFinderLookupable = quickFinderLookupable; | |
522 | // } | |
523 | // | |
524 | // public String getLookupType() { | |
525 | // return lookupType; | |
526 | // } | |
527 | // | |
528 | // public void setLookupType(String lookupType) { | |
529 | // this.lookupType = lookupType; | |
530 | // } | |
531 | // | |
532 | // public List<DocumentSearchRow> getProcessedSearchableAttributeRows() { | |
533 | // if (isAdvancedSearch()) { | |
534 | // return this.criteriaProcessor.processSearchableAttributeRowsForAdvancedSearch(getSearchableAttributeRows()); | |
535 | // } else { | |
536 | // return this.criteriaProcessor.processSearchableAttributeRowsForBasicSearch(getSearchableAttributeRows()); | |
537 | // } | |
538 | // } | |
539 | // | |
540 | // public void setSearchableAttributeRows(List searchableAttributeRows) { | |
541 | // this.searchableAttributeRows = searchableAttributeRows; | |
542 | // } | |
543 | // | |
544 | // public List getSearchableAttributeRows() { | |
545 | // return this.searchableAttributeRows; | |
546 | // } | |
547 | // | |
548 | // public void addSearchableAttributeRow(DocumentSearchRow row) { | |
549 | // getSearchableAttributeRows().add(row); | |
550 | // } | |
551 | // | |
552 | // public DocumentSearchRow getSearchableAttributeRow(int index) { | |
553 | // while (getSearchableAttributeRows().size() <= index) { | |
554 | // DocumentSearchRow row = new DocumentSearchRow(new ArrayList<org.kuali.rice.kns.web.ui.Field>()); | |
555 | // getSearchableAttributeRows().add(row); | |
556 | // } | |
557 | // return (DocumentSearchRow) getSearchableAttributeRows().get(index); | |
558 | // } | |
559 | // | |
560 | // public void setSearchableAttributeRow(int index, DocumentSearchRow row) { | |
561 | // getSearchableAttributeRows().set(index, row); | |
562 | // } | |
563 | // | |
564 | // /** | |
565 | // * @param searchableAttributeColumns | |
566 | // * The searchableAttributeColumns to set. | |
567 | // */ | |
568 | // public void setSearchableAttributeColumns(List searchableAttributeColumns) { | |
569 | // this.searchableAttributeColumns = searchableAttributeColumns; | |
570 | // } | |
571 | // | |
572 | // /** | |
573 | // * @return Returns the searchableAttributeColumns. | |
574 | // */ | |
575 | // public List getSearchableAttributeColumns() { | |
576 | // return searchableAttributeColumns; | |
577 | // } | |
578 | // | |
579 | // public void addSearchableAttributeColumn(DocumentSearchColumn column) { | |
580 | // searchableAttributeColumns.add(column); | |
581 | // } | |
582 | // | |
583 | // public DocumentSearchColumn getSearchableAttributeColumn(int index) { | |
584 | // while (getSearchableAttributeColumns().size() <= index) { | |
585 | // DocumentSearchColumn column = new DocumentSearchColumn("", "", ""); | |
586 | // getSearchableAttributeColumns().add(column); | |
587 | // } | |
588 | // return (DocumentSearchColumn) getSearchableAttributeColumns().get(index); | |
589 | // } | |
590 | // | |
591 | // public void setSearchableAttributeColumn(int index, DocumentSearchColumn column) { | |
592 | // searchableAttributeColumns.set(index, column); | |
593 | // } | |
594 | // | |
595 | // /** | |
596 | // * @param propertyFields | |
597 | // * The propertyFields to set. | |
598 | // */ | |
599 | // public void setPropertyFields(List propertyFields) { | |
600 | // this.propertyFields = propertyFields; | |
601 | // } | |
602 | // | |
603 | // /** | |
604 | // * @return Returns the propertyFields. | |
605 | // */ | |
606 | // public List getPropertyFields() { | |
607 | // return propertyFields; | |
608 | // } | |
609 | // | |
610 | // public void addPropertyField(SearchAttributeFormContainer attributeContainer) { | |
611 | // propertyFields.add(attributeContainer); | |
612 | // } | |
613 | // | |
614 | // public SearchAttributeFormContainer getPropertyField(int index) { | |
615 | // while (getPropertyFields().size() <= index) { | |
616 | // SearchAttributeFormContainer attributeContainer = new SearchAttributeFormContainer(); | |
617 | // addPropertyField(attributeContainer); | |
618 | // } | |
619 | // return (SearchAttributeFormContainer) getPropertyFields().get(index); | |
620 | // } | |
621 | // | |
622 | // public SearchAttributeFormContainer getPropertyField(String key) { | |
623 | // if (StringUtils.isBlank(key)) { | |
624 | // return null; | |
625 | // } | |
626 | // for (Iterator iter = propertyFields.iterator(); iter.hasNext();) { | |
627 | // SearchAttributeFormContainer container = (SearchAttributeFormContainer) iter.next(); | |
628 | // if (key.equals(container.getKey())) { | |
629 | // return container; | |
630 | // } | |
631 | // } | |
632 | // return null; | |
633 | // } | |
634 | // | |
635 | // public void setPropertyField(int index, SearchAttributeFormContainer attributeContainer) { | |
636 | // propertyFields.set(index, attributeContainer); | |
637 | // } | |
638 | // | |
639 | // public boolean isAdvancedSearch() { | |
640 | // return (StringUtils.equals(DocSearchCriteriaDTO.ADVANCED_SEARCH_INDICATOR_STRING,getCriteria().getIsAdvancedSearch())); | |
641 | // } | |
642 | // | |
643 | // public StandardDocSearchCriteriaManager getDocumentSearchCriteriaManager() { | |
644 | // if (isAdvancedSearch()) { | |
645 | // return this.criteriaProcessor.getAdvancedSearchManager(); | |
646 | // } else { | |
647 | // return this.criteriaProcessor.getBasicSearchManager(); | |
648 | // } | |
649 | // } | |
650 | // | |
651 | // public boolean isHeaderBarEnabled() { | |
652 | // return headerBarEnabled; | |
653 | // } | |
654 | // | |
655 | // public void setHeaderBarEnabled(boolean headerBarEnabled) { | |
656 | // this.headerBarEnabled = headerBarEnabled; | |
657 | // } | |
658 | // | |
659 | // public boolean isSearchCriteriaEnabled() { | |
660 | // return searchCriteriaEnabled; | |
661 | // } | |
662 | // | |
663 | // public void setSearchCriteriaEnabled(boolean searchCriteriaEnabled) { | |
664 | // this.searchCriteriaEnabled = searchCriteriaEnabled; | |
665 | // } | |
666 | // | |
667 | // public boolean isShowSearchCriteria() { | |
668 | // if (!isSearchCriteriaEnabled()) { | |
669 | // return false; | |
670 | // } | |
671 | // if (isAdvancedSearch()) { | |
672 | // return this.criteriaProcessor.isAdvancedSearchCriteriaDisplayed(); | |
673 | // } else { | |
674 | // return this.criteriaProcessor.isBasicSearchCriteriaDisplayed(); | |
675 | // } | |
676 | // } | |
677 | // | |
678 | // public boolean isShowHeaderBar() { | |
679 | // if (!isHeaderBarEnabled()) { | |
680 | // return false; | |
681 | // } | |
682 | // return this.criteriaProcessor.isHeaderBarDisplayed(); | |
683 | // } | |
684 | // | |
685 | // public String getSearchableAttributes() { | |
686 | // return searchableAttributes; | |
687 | // } | |
688 | // | |
689 | // public void setSearchableAttributes(String secureAttributes) { | |
690 | // this.searchableAttributes = secureAttributes; | |
691 | // } | |
692 | // | |
693 | // public boolean isInitiatorUser() { | |
694 | // return initiatorUser; | |
695 | // } | |
696 | // | |
697 | // public void setInitiatorUser(boolean secureInitiatorSearch) { | |
698 | // this.initiatorUser = secureInitiatorSearch; | |
699 | // } | |
700 | ||
701 | } |