1 package org.kuali.ole.batch.keyvalue;
2
3 import org.kuali.ole.OLEConstants;
4 import org.kuali.rice.core.api.util.ConcreteKeyValue;
5 import org.kuali.rice.core.api.util.KeyValue;
6 import org.kuali.rice.krad.keyvalues.KeyValuesBase;
7
8 import java.util.ArrayList;
9 import java.util.Collections;
10 import java.util.Comparator;
11 import java.util.List;
12
13
14
15
16
17
18
19
20 public class OLEBatchProcessInvoiceImportSourceFieldValueFinder extends KeyValuesBase {
21 @Override
22 public List<KeyValue> getKeyValues() {
23 List<KeyValue> keyValues = new ArrayList<KeyValue>();
24 keyValues.add(new ConcreteKeyValue("",""));
25 keyValues.add(new ConcreteKeyValue(OLEConstants.OLEBatchProcess.VENDOR_ITEM_IDENTIFIER, "Vendor Item Identifier"));
26 keyValues.add(new ConcreteKeyValue(OLEConstants.OLEBatchProcess.VENDOR_NUMBER, "Vendor Number"));
27 keyValues.add(new ConcreteKeyValue(OLEConstants.OLEBatchProcess.REQUESTOR, "Requestor"));
28 keyValues.add(new ConcreteKeyValue(OLEConstants.OLEBatchProcess.EBOOK, "E-Book"));
29 keyValues.add(new ConcreteKeyValue(OLEConstants.OLEBatchProcess.LIST_PRICE, "Invoiced Price"));
30 keyValues.add(new ConcreteKeyValue(OLEConstants.OLEBatchProcess.FOREIGN_LIST_PRICE, "Invoiced Foreign Price"));
31 keyValues.add(new ConcreteKeyValue(OLEConstants.OLEBatchProcess.QUANTITY, "Quantity"));
32 keyValues.add(new ConcreteKeyValue(OLEConstants.OLEBatchProcess.BOOK_PLATE, "Book Plate"));
33 keyValues.add(new ConcreteKeyValue(OLEConstants.OLEBatchProcess.INVOICE_NUMBER, "Invoice Number"));
34 keyValues.add(new ConcreteKeyValue(OLEConstants.OLEBatchProcess.INVOICE_DATE, "Invoice Date"));
35
36 keyValues.add(new ConcreteKeyValue(OLEConstants.OLEBatchProcess.ITEM_DESCRIPTION, "Item Description"));
37 keyValues.add(new ConcreteKeyValue(OLEConstants.OLEBatchProcess.ACCOUNT_NUMBER, "Account Number"));
38 keyValues.add(new ConcreteKeyValue(OLEConstants.OLEBatchProcess.OBJECT_CODE, "Object Code"));
39 keyValues.add(new ConcreteKeyValue(OLEConstants.OLEBatchProcess.CURRENCY_TYPE, "Currency Type"));
40 keyValues.add(new ConcreteKeyValue(OLEConstants.OLEBatchProcess.EXCHANGE_RATE, "Exchange Rate"));
41 Collections.sort(keyValues,new Comparator<KeyValue>(){
42 public int compare(KeyValue keyValue1,KeyValue keyValue2){
43 return keyValue1.getValue().compareTo(keyValue2.getValue());
44
45 }
46 });
47 return keyValues;
48
49 }
50 }