01: /*
02: * Copyright 2007 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.kuali.workflow.module.purap.docsearch;
17:
18: import java.util.ArrayList;
19: import java.util.List;
20:
21: import edu.iu.uis.eden.docsearch.DocumentSearchResult;
22: import edu.iu.uis.eden.lookupable.Column;
23:
24: public class PurchaseOrderDocumentSearchResultProcessor extends
25: PurApDocumentSearchResultProcessor {
26:
27: /**
28: * @see edu.iu.uis.eden.docsearch.StandardDocumentSearchResultProcessor#addSearchableAttributeColumnUsingKey(java.util.List,
29: * java.lang.String, java.lang.String, java.lang.Boolean, java.lang.Boolean)
30: */
31: @Override
32: protected void addSearchableAttributeColumnUsingKey(
33: List<Column> columns, String key, String label,
34: Boolean sortableOverride, Boolean defaultSortable) {
35: if ("purchaseOrderDocumentFiscalPostingYear".equals(key)) {
36: addColumnUsingKey(columns,
37: DocumentSearchResult.PROPERTY_NAME_DATE_CREATED);
38: }
39: super .addSearchableAttributeColumnUsingKey(columns, key, label,
40: sortableOverride, defaultSortable);
41: }
42:
43: /**
44: * @see org.kuali.workflow.module.purap.docsearch.KualiPurApDocumentSearchResultProcessor#getDocumentSpecificCustomColumns()
45: */
46: @Override
47: public List<Column> getDocumentSpecificCustomColumns() {
48: List<Column> columns = new ArrayList<Column>();
49: List<String> searchableAttributeFieldNames = new ArrayList<String>();
50: searchableAttributeFieldNames
51: .add("purchaseOrderDocumentPurchaseOrderId");
52: searchableAttributeFieldNames
53: .add("purchaseOrderDocumentStatusDescription");
54: searchableAttributeFieldNames
55: .add("purchaseOrderDocumentContractManagerName");
56: searchableAttributeFieldNames
57: .add("purapDocumentOrgDisplayValue");
58: searchableAttributeFieldNames.add("documentHeaderDescription");
59: searchableAttributeFieldNames.add("documentTotalAmount");
60: searchableAttributeFieldNames
61: .add("purchaseOrderDocumentVendorName");
62: searchableAttributeFieldNames
63: .add("purchaseOrderDocumentFiscalPostingYear");
64: addSearchableAttributeColumnsBasedOnFields(columns,
65: getSearchCriteria(), searchableAttributeFieldNames);
66: addColumnUsingKey(columns,
67: DocumentSearchResult.PROPERTY_NAME_DOC_TYPE_LABEL);
68: return columns;
69: }
70:
71: }
|