Search in sources :

Example 21 with ConcreteKeyValue

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

the class InvoiceFrequencyValuesFinder method getKeyValues.

public List<KeyValue> getKeyValues() {
    KeyValuesService boService = SpringContext.getBean(KeyValuesService.class);
    Collection<InvoiceFrequency> invoiceFrequencyCodes = boService.findAll(InvoiceFrequency.class);
    List<KeyValue> invoiceFrequencyKeyLabels = new ArrayList<KeyValue>();
    for (Iterator<InvoiceFrequency> iter = invoiceFrequencyCodes.iterator(); iter.hasNext(); ) {
        InvoiceFrequency element = (InvoiceFrequency) iter.next();
        if (element.isActive()) {
            // only show active invoice types
            invoiceFrequencyKeyLabels.add(new ConcreteKeyValue(element.getInvoiceFrequencyCode(), element.getInvoiceFrequencyCode()));
        }
    }
    return invoiceFrequencyKeyLabels;
}
Also used : KeyValuesService(org.kuali.kfs.krad.service.KeyValuesService) ConcreteKeyValue(org.kuali.rice.core.api.util.ConcreteKeyValue) KeyValue(org.kuali.rice.core.api.util.KeyValue) ConcreteKeyValue(org.kuali.rice.core.api.util.ConcreteKeyValue) InvoiceFrequency(edu.cornell.kfs.module.cg.businessobject.InvoiceFrequency) ArrayList(java.util.ArrayList)

Example 22 with ConcreteKeyValue

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

the class PaymentMethodValuesFinder method getKeyValues.

/*
     * @see org.kuali.keyvalues.KeyValuesFinder#getKeyValues()
     */
public List<KeyValue> getKeyValues() {
    Collection<PaymentMethod> paymentMethods = getBusinessObjectService().findMatchingOrderBy(PaymentMethod.class, getFilterCriteria(), "paymentMethodName", true);
    List<KeyValue> labels = new ArrayList<KeyValue>(paymentMethods.size());
    for (PaymentMethod pm : paymentMethods) {
        labels.add(new ConcreteKeyValue(pm.getPaymentMethodCode(), pm.getPaymentMethodCode() + " - " + pm.getPaymentMethodName()));
    }
    return labels;
}
Also used : ConcreteKeyValue(org.kuali.rice.core.api.util.ConcreteKeyValue) KeyValue(org.kuali.rice.core.api.util.KeyValue) ConcreteKeyValue(org.kuali.rice.core.api.util.ConcreteKeyValue) ArrayList(java.util.ArrayList) PaymentMethod(edu.cornell.kfs.fp.businessobject.PaymentMethod)

Example 23 with ConcreteKeyValue

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

the class ScheduleTypeKeyValuesFinder method getKeyValues.

@Override
public List<KeyValue> getKeyValues() {
    List<KeyValue> chartKeyLabels = new ArrayList<KeyValue>();
    chartKeyLabels.add(new ConcreteKeyValue("", ""));
    chartKeyLabels.add(new ConcreteKeyValue(CuFPConstants.ScheduledSourceAccountingLineConstants.ScheduleTypes.DAILY.name, "Daily"));
    chartKeyLabels.add(new ConcreteKeyValue(CuFPConstants.ScheduledSourceAccountingLineConstants.ScheduleTypes.BIWEEKLY.name, "Bi-Weekly"));
    chartKeyLabels.add(new ConcreteKeyValue(CuFPConstants.ScheduledSourceAccountingLineConstants.ScheduleTypes.MONTHLY.name, "Monthly"));
    chartKeyLabels.add(new ConcreteKeyValue(CuFPConstants.ScheduledSourceAccountingLineConstants.ScheduleTypes.YEARLY.name, "Yearly"));
    return chartKeyLabels;
}
Also used : ConcreteKeyValue(org.kuali.rice.core.api.util.ConcreteKeyValue) KeyValue(org.kuali.rice.core.api.util.KeyValue) ConcreteKeyValue(org.kuali.rice.core.api.util.ConcreteKeyValue) ArrayList(java.util.ArrayList)

Example 24 with ConcreteKeyValue

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

the class CuLocaleValuesFinder method getKeyValues.

/**
 * @see org.kuali.kfs.krad.keyvalues.KeyValuesFinder#getKeyValues()
 */
public List<KeyValue> getKeyValues() {
    List<KeyValue> keyValues = new ArrayList<KeyValue>();
    keyValues.add(new ConcreteKeyValue(KFSConstants.EMPTY_STRING, KFSConstants.EMPTY_STRING));
    // In this case, the source map is a "linked" one, so we can rely on consistent iteration order.
    for (Map.Entry<String, String> locale : CUVendorConstants.LOCALES_LABEL_MAP.entrySet()) {
        keyValues.add(new ConcreteKeyValue(locale.getKey(), locale.getValue()));
    }
    return keyValues;
}
Also used : ConcreteKeyValue(org.kuali.rice.core.api.util.ConcreteKeyValue) KeyValue(org.kuali.rice.core.api.util.KeyValue) ConcreteKeyValue(org.kuali.rice.core.api.util.ConcreteKeyValue) ArrayList(java.util.ArrayList) Map(java.util.Map)

Example 25 with ConcreteKeyValue

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

the class AttachmentDescriptionValuesFinder method getKeyValues.

/**
 * @see org.kuali.kfs.kns.lookup.keyvalues.KeyValuesFinder#getKeyValues()
 */
public List<KeyValue> getKeyValues() {
    List<KeyValue> keyValues = new ArrayList<KeyValue>();
    keyValues.add(new ConcreteKeyValue("Note", "Note"));
    keyValues.add(new ConcreteKeyValue("Quote", "Quote"));
    keyValues.add(new ConcreteKeyValue("Invoice", "Invoice"));
    keyValues.add(new ConcreteKeyValue("Contract/Agreement", "Contract/Agreement"));
    keyValues.add(new ConcreteKeyValue("Sole Source", "Sole Source"));
    keyValues.add(new ConcreteKeyValue("Specifications", "Specifications"));
    keyValues.add(new ConcreteKeyValue("Other", "Other"));
    return keyValues;
}
Also used : ConcreteKeyValue(org.kuali.rice.core.api.util.ConcreteKeyValue) KeyValue(org.kuali.rice.core.api.util.KeyValue) ConcreteKeyValue(org.kuali.rice.core.api.util.ConcreteKeyValue) ArrayList(java.util.ArrayList)

Aggregations

ConcreteKeyValue (org.kuali.rice.core.api.util.ConcreteKeyValue)30 ArrayList (java.util.ArrayList)25 KeyValue (org.kuali.rice.core.api.util.KeyValue)24 KeyValuesService (org.kuali.kfs.krad.service.KeyValuesService)7 LevelOrganization (edu.cornell.kfs.module.purap.businessobject.LevelOrganization)3 IWantDocumentService (edu.cornell.kfs.module.purap.document.service.IWantDocumentService)3 IWantDocument (edu.cornell.kfs.module.purap.document.IWantDocument)2 PurApFavoriteAccountLineBuilderForIWantDocument (edu.cornell.kfs.module.purap.util.PurApFavoriteAccountLineBuilderForIWantDocument)2 List (java.util.List)2 Person (org.kuali.rice.kim.api.identity.Person)2 CheckReconSource (com.rsmart.kuali.kfs.cr.businessobject.CheckReconSource)1 ReversionCategory (edu.cornell.kfs.coa.businessobject.ReversionCategory)1 ReversionCodeValuesFinder (edu.cornell.kfs.coa.businessobject.options.ReversionCodeValuesFinder)1 PaymentMethod (edu.cornell.kfs.fp.businessobject.PaymentMethod)1 InvoiceFrequency (edu.cornell.kfs.module.cg.businessobject.InvoiceFrequency)1 InvoiceType (edu.cornell.kfs.module.cg.businessobject.InvoiceType)1 FavoriteAccount (edu.cornell.kfs.sys.businessobject.FavoriteAccount)1 Collection (java.util.Collection)1 Comparator (java.util.Comparator)1 HashSet (java.util.HashSet)1