001package org.kuali.ole.batch.keyvalue; 002 003import org.kuali.ole.OLEConstants; 004import org.kuali.rice.core.api.util.ConcreteKeyValue; 005import org.kuali.rice.core.api.util.KeyValue; 006import org.kuali.rice.krad.keyvalues.KeyValuesBase; 007 008import java.util.ArrayList; 009import java.util.Collections; 010import java.util.Comparator; 011import java.util.List; 012 013/** 014 * Created with IntelliJ IDEA. 015 * User: sheiksalahudeenm 016 * Date: 8/1/13 017 * Time: 2:32 PM 018 * To change this template use File | Settings | File Templates. 019 */ 020public class OLEBatchProcessInvoiceImportSourceFieldValueFinder extends KeyValuesBase { 021 @Override 022 public List<KeyValue> getKeyValues() { 023 List<KeyValue> keyValues = new ArrayList<KeyValue>(); 024 keyValues.add(new ConcreteKeyValue("","")); 025 keyValues.add(new ConcreteKeyValue(OLEConstants.OLEBatchProcess.VENDOR_ITEM_IDENTIFIER, "Vendor Item Identifier")); 026 keyValues.add(new ConcreteKeyValue(OLEConstants.OLEBatchProcess.VENDOR_NUMBER, "Vendor Number")); 027 keyValues.add(new ConcreteKeyValue(OLEConstants.OLEBatchProcess.REQUESTOR, "Requestor")); 028 keyValues.add(new ConcreteKeyValue(OLEConstants.OLEBatchProcess.EBOOK, "E-Book")); 029 keyValues.add(new ConcreteKeyValue(OLEConstants.OLEBatchProcess.LIST_PRICE, "Invoiced Price")); 030 keyValues.add(new ConcreteKeyValue(OLEConstants.OLEBatchProcess.FOREIGN_LIST_PRICE, "Invoiced Foreign Price")); 031 keyValues.add(new ConcreteKeyValue(OLEConstants.OLEBatchProcess.QUANTITY, "Quantity")); 032 keyValues.add(new ConcreteKeyValue(OLEConstants.OLEBatchProcess.BOOK_PLATE, "Book Plate")); 033 keyValues.add(new ConcreteKeyValue(OLEConstants.OLEBatchProcess.INVOICE_NUMBER, "Invoice Number")); 034 keyValues.add(new ConcreteKeyValue(OLEConstants.OLEBatchProcess.INVOICE_DATE, "Invoice Date")); 035 //keyValues.add(new ConcreteKeyValue(OLEConstants.OLEBatchProcess.ITEM_CHART_CODE, "Chart Code")); 036 keyValues.add(new ConcreteKeyValue(OLEConstants.OLEBatchProcess.ITEM_DESCRIPTION, "Item Description")); 037 keyValues.add(new ConcreteKeyValue(OLEConstants.OLEBatchProcess.ACCOUNT_NUMBER, "Account Number")); 038 keyValues.add(new ConcreteKeyValue(OLEConstants.OLEBatchProcess.OBJECT_CODE, "Object Code")); 039 keyValues.add(new ConcreteKeyValue(OLEConstants.OLEBatchProcess.CURRENCY_TYPE, "Currency Type")); 040 keyValues.add(new ConcreteKeyValue(OLEConstants.OLEBatchProcess.EXCHANGE_RATE, "Exchange Rate")); 041 Collections.sort(keyValues,new Comparator<KeyValue>(){ 042 public int compare(KeyValue keyValue1,KeyValue keyValue2){ 043 return keyValue1.getValue().compareTo(keyValue2.getValue()); 044 045 } 046 }); 047 return keyValues; 048 049 } 050}