Search in sources :

Example 16 with ConcreteKeyValue

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

the class AccountReversionGlobalRule method checkDetailObjectReversionCodeValidity.

/**
 * Tests if the object reversion code is a valid code.
 *
 * @param detail the AccountReversionGlobalDetail to check
 * @return true if it the detail is valid, false if otherwise
 */
public boolean checkDetailObjectReversionCodeValidity(AccountReversionGlobalDetail detail) {
    boolean success = true;
    if (!StringUtils.isBlank(detail.getAccountReversionCode())) {
        boolean foundInList = false;
        // search through the values. Is that right good & healthy?
        for (Object kvPairObj : new ReversionCodeValuesFinder().getKeyValues()) {
            ConcreteKeyValue kvPair = (ConcreteKeyValue) kvPairObj;
            if (kvPair.getKey().toString().equals(detail.getAccountReversionCode())) {
                foundInList = true;
                break;
            }
        }
        if (!foundInList) {
            // we've failed to find the code in the list...FAILED!
            success = false;
            GlobalVariables.getMessageMap().putError("accountReversionCode", CUKFSKeyConstants.ERROR_DOCUMENT_GLOBAL_ACCT_REVERSION_INVALID_ACCT_REVERSION_CODE, new String[] { detail.getAccountReversionCode() });
        }
    }
    return success;
}
Also used : ConcreteKeyValue(org.kuali.kfs.core.api.util.ConcreteKeyValue) PersistableBusinessObject(org.kuali.kfs.krad.bo.PersistableBusinessObject) ReversionCodeValuesFinder(edu.cornell.kfs.coa.businessobject.options.ReversionCodeValuesFinder)

Example 17 with ConcreteKeyValue

use of org.kuali.kfs.core.api.util.ConcreteKeyValue 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 18 with ConcreteKeyValue

use of org.kuali.kfs.core.api.util.ConcreteKeyValue 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)

Example 19 with ConcreteKeyValue

use of org.kuali.kfs.core.api.util.ConcreteKeyValue 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 20 with ConcreteKeyValue

use of org.kuali.kfs.core.api.util.ConcreteKeyValue 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)

Aggregations

ConcreteKeyValue (org.kuali.kfs.core.api.util.ConcreteKeyValue)37 KeyValue (org.kuali.kfs.core.api.util.KeyValue)33 ArrayList (java.util.ArrayList)32 LevelOrganization (edu.cornell.kfs.module.purap.businessobject.LevelOrganization)3 IWantDocument (edu.cornell.kfs.module.purap.document.IWantDocument)2 IWantDocumentService (edu.cornell.kfs.module.purap.document.service.IWantDocumentService)2 PurApFavoriteAccountLineBuilderForIWantDocument (edu.cornell.kfs.module.purap.util.PurApFavoriteAccountLineBuilderForIWantDocument)2 Person (org.kuali.kfs.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 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 FavoriteAccount (edu.cornell.kfs.sys.businessobject.FavoriteAccount)1 FormTypes1099 (edu.cornell.kfs.tax.FormTypes1099)1 Collection (java.util.Collection)1