Search in sources :

Example 6 with KeyValue

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

the class AgencyOriginValuesFinder method getKeyValues.

@Override
public List<KeyValue> getKeyValues() {
    Collection<AgencyOrigin> agencyOrigins = keyValuesService.findAllOrderBy(AgencyOrigin.class, KFSPropertyConstants.CODE, false);
    List<KeyValue> keyValues = new ArrayList<>();
    keyValues.add(new ConcreteKeyValue(KFSConstants.EMPTY_STRING, KFSConstants.EMPTY_STRING));
    agencyOrigins.stream().map(agencyOrigin -> new ConcreteKeyValue(agencyOrigin.getCode(), agencyOrigin.getName())).forEach(keyValues::add);
    return keyValues;
}
Also used : ConcreteKeyValue(org.kuali.kfs.core.api.util.ConcreteKeyValue) List(java.util.List) KeyValue(org.kuali.kfs.core.api.util.KeyValue) KeyValuesBase(org.kuali.kfs.krad.keyvalues.KeyValuesBase) ConcreteKeyValue(org.kuali.kfs.core.api.util.ConcreteKeyValue) Collection(java.util.Collection) KFSPropertyConstants(org.kuali.kfs.sys.KFSPropertyConstants) AgencyOrigin(edu.cornell.kfs.module.cg.businessobject.AgencyOrigin) KFSConstants(org.kuali.kfs.sys.KFSConstants) KeyValuesService(org.kuali.kfs.krad.service.KeyValuesService) ArrayList(java.util.ArrayList) KeyValue(org.kuali.kfs.core.api.util.KeyValue) ConcreteKeyValue(org.kuali.kfs.core.api.util.ConcreteKeyValue) AgencyOrigin(edu.cornell.kfs.module.cg.businessobject.AgencyOrigin) ArrayList(java.util.ArrayList)

Example 7 with KeyValue

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

the class InvoiceTypeValuesFinder method getKeyValues.

public List<KeyValue> getKeyValues() {
    Collection<InvoiceType> invoiceTypeCodes = keyValuesService.findAll(InvoiceType.class);
    List<KeyValue> invoiceTypeKeyLabels = new ArrayList<KeyValue>();
    for (Iterator<InvoiceType> iter = invoiceTypeCodes.iterator(); iter.hasNext(); ) {
        InvoiceType element = (InvoiceType) iter.next();
        if (element.isActive()) {
            invoiceTypeKeyLabels.add(new ConcreteKeyValue(element.getInvoiceTypeCode(), element.getInvoiceTypeCode()));
        }
    }
    return invoiceTypeKeyLabels;
}
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) InvoiceType(edu.cornell.kfs.module.cg.businessobject.InvoiceType)

Example 8 with KeyValue

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

the class DepartmentLevelOrganizationValuesFinder method getKeyValues.

public List<KeyValue> getKeyValues() {
    List<KeyValue> keyValues = new ArrayList<KeyValue>();
    keyValues.add(new ConcreteKeyValue("", ""));
    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 9 with KeyValue

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

the class AmountOrPercentValuesFinder 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(CUPurapConstants.AMOUNT, "Amount"));
    keyValues.add(new ConcreteKeyValue(CUPurapConstants.PERCENT, "Percent"));
    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 10 with KeyValue

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

the class YesNoValuesFinder method getKeyValues.

public List<KeyValue> getKeyValues() {
    List<KeyValue> keyValues = new ArrayList<>();
    keyValues.add(new ConcreteKeyValue("N", "No"));
    keyValues.add(new ConcreteKeyValue("Y", "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)

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