Search in sources :

Example 11 with KeyValue

use of org.kuali.kfs.core.api.util.KeyValue in project cu-kfs by CU-CommunityApps.

the class RequisitionAttachmentTypeValuesFinder method getKeyValues.

public List<KeyValue> getKeyValues() {
    List<KeyValue> keyValues = new ArrayList<KeyValue>();
    keyValues.add(new ConcreteKeyValue(CUPurapConstants.AttachemntToVendorIndicators.DONT_SEND_TO_VENDOR, "No"));
    keyValues.add(new ConcreteKeyValue(CUPurapConstants.AttachemntToVendorIndicators.SEND_TO_VENDOR, "Yes"));
    return keyValues;
}
Also used : ConcreteKeyValue(org.kuali.kfs.core.api.util.ConcreteKeyValue) KeyValue(org.kuali.kfs.core.api.util.KeyValue) ConcreteKeyValue(org.kuali.kfs.core.api.util.ConcreteKeyValue) ArrayList(java.util.ArrayList)

Example 12 with KeyValue

use of org.kuali.kfs.core.api.util.KeyValue in project cu-kfs by CU-CommunityApps.

the class PayeeAchAccountExtractStatusValuesFinder method getKeyValues.

public List<KeyValue> getKeyValues() {
    List<KeyValue> keyValues = new ArrayList<>();
    keyValues.add(new ConcreteKeyValue(CUPdpConstants.PayeeAchAccountExtractStatuses.OPEN, CUPdpConstants.PayeeAchAccountExtractStatuses.OPEN));
    keyValues.add(new ConcreteKeyValue(CUPdpConstants.PayeeAchAccountExtractStatuses.CANCELED, CUPdpConstants.PayeeAchAccountExtractStatuses.CANCELED));
    keyValues.add(new ConcreteKeyValue(CUPdpConstants.PayeeAchAccountExtractStatuses.PROCESSED, CUPdpConstants.PayeeAchAccountExtractStatuses.PROCESSED));
    return keyValues;
}
Also used : ConcreteKeyValue(org.kuali.kfs.core.api.util.ConcreteKeyValue) KeyValue(org.kuali.kfs.core.api.util.KeyValue) ConcreteKeyValue(org.kuali.kfs.core.api.util.ConcreteKeyValue) ArrayList(java.util.ArrayList)

Example 13 with KeyValue

use of org.kuali.kfs.core.api.util.KeyValue in project cu-kfs by CU-CommunityApps.

the class PaymentWorksCustomAttributeValueToUseValuesFinder method getKeyValues.

@Override
public List<KeyValue> getKeyValues() {
    List<KeyValue> keyValueList = new ArrayList<KeyValue>();
    keyValueList.add(new ConcreteKeyValue(PaymentWorksConstants.CustomAttributeValueToUse.FIELD_VALUE, PaymentWorksConstants.CustomAttributeValueToUse.FIELD_VALUE));
    keyValueList.add(new ConcreteKeyValue(PaymentWorksConstants.CustomAttributeValueToUse.FILE, PaymentWorksConstants.CustomAttributeValueToUse.FILE));
    return keyValueList;
}
Also used : ConcreteKeyValue(org.kuali.kfs.core.api.util.ConcreteKeyValue) KeyValue(org.kuali.kfs.core.api.util.KeyValue) ConcreteKeyValue(org.kuali.kfs.core.api.util.ConcreteKeyValue) ArrayList(java.util.ArrayList)

Example 14 with KeyValue

use of org.kuali.kfs.core.api.util.KeyValue in project cu-kfs by CU-CommunityApps.

the class FavoriteAccountValuesFinder method getKeyValues.

public List<KeyValue> getKeyValues() {
    List<KeyValue> keyValues = new ArrayList<KeyValue>();
    List<FavoriteAccount> favoriteAccounts = getUserFavoriteAccounts();
    keyValues.add(new ConcreteKeyValue("", ""));
    if (CollectionUtils.isNotEmpty(favoriteAccounts)) {
        Collections.sort(favoriteAccounts, new Comparator() {

            public int compare(Object o1, Object o2) {
                FavoriteAccount accountFirst = (FavoriteAccount) o1;
                FavoriteAccount accountSecond = (FavoriteAccount) o2;
                if (accountFirst.getPrimaryInd() && !accountSecond.getPrimaryInd()) {
                    return -1;
                } else if (!accountFirst.getPrimaryInd() && accountSecond.getPrimaryInd()) {
                    return 1;
                }
                if (StringUtils.equals(accountFirst.getDescription(), accountSecond.getDescription())) {
                    return accountFirst.getAccountNumber().compareTo(accountSecond.getAccountNumber());
                } else if (StringUtils.isBlank(accountFirst.getDescription())) {
                    // Be aware case comparison.
                    return -1;
                } else if (StringUtils.isBlank(accountSecond.getDescription())) {
                    return 1;
                } else {
                    return accountFirst.getDescription().compareTo(accountSecond.getDescription());
                }
            }
        });
        for (FavoriteAccount account : favoriteAccounts) {
            keyValues.add(new ConcreteKeyValue(account.getAccountLineIdentifier().toString(), getAccountingLineDescription(account)));
        }
    }
    return keyValues;
}
Also used : ConcreteKeyValue(org.kuali.kfs.core.api.util.ConcreteKeyValue) FavoriteAccount(edu.cornell.kfs.sys.businessobject.FavoriteAccount) ConcreteKeyValue(org.kuali.kfs.core.api.util.ConcreteKeyValue) KeyValue(org.kuali.kfs.core.api.util.KeyValue) ArrayList(java.util.ArrayList) Comparator(java.util.Comparator)

Example 15 with KeyValue

use of org.kuali.kfs.core.api.util.KeyValue in project cu-kfs by CU-CommunityApps.

the class FormType1099ValuesFinder method getKeyValues.

@Override
public List<KeyValue> getKeyValues() {
    List<KeyValue> keyValues = new ArrayList<KeyValue>();
    keyValues.add(new ConcreteKeyValue(StringUtils.EMPTY, StringUtils.EMPTY));
    for (FormTypes1099 type : FormTypes1099.values()) {
        keyValues.add(new ConcreteKeyValue(type.formCode, type.formDescription));
    }
    return keyValues;
}
Also used : ConcreteKeyValue(org.kuali.kfs.core.api.util.ConcreteKeyValue) KeyValue(org.kuali.kfs.core.api.util.KeyValue) ConcreteKeyValue(org.kuali.kfs.core.api.util.ConcreteKeyValue) ArrayList(java.util.ArrayList) FormTypes1099(edu.cornell.kfs.tax.FormTypes1099)

Aggregations

KeyValue (org.kuali.kfs.core.api.util.KeyValue)35 ConcreteKeyValue (org.kuali.kfs.core.api.util.ConcreteKeyValue)34 ArrayList (java.util.ArrayList)33 List (java.util.List)2 CheckReconSource (com.rsmart.kuali.kfs.cr.businessobject.CheckReconSource)1 ReversionCategory (edu.cornell.kfs.coa.businessobject.ReversionCategory)1 PaymentMethod (edu.cornell.kfs.fp.businessobject.PaymentMethod)1 SecurityGroupTab (edu.cornell.kfs.ksr.businessobject.SecurityGroupTab)1 SecurityProvisioning (edu.cornell.kfs.ksr.businessobject.SecurityProvisioning)1 AgencyOrigin (edu.cornell.kfs.module.cg.businessobject.AgencyOrigin)1 InvoiceFrequency (edu.cornell.kfs.module.cg.businessobject.InvoiceFrequency)1 InvoiceType (edu.cornell.kfs.module.cg.businessobject.InvoiceType)1 LevelOrganization (edu.cornell.kfs.module.purap.businessobject.LevelOrganization)1 FavoriteAccount (edu.cornell.kfs.sys.businessobject.FavoriteAccount)1 FavoriteAccountValuesFinder (edu.cornell.kfs.sys.businessobject.options.FavoriteAccountValuesFinder)1 FormTypes1099 (edu.cornell.kfs.tax.FormTypes1099)1 Collection (java.util.Collection)1 Comparator (java.util.Comparator)1 HashMap (java.util.HashMap)1 LinkedHashMap (java.util.LinkedHashMap)1