Search in sources :

Example 1 with KeyValue

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

the class CheckReconSrcValuesFinder method getKeyValues.

public List<KeyValue> getKeyValues() {
    Collection<CheckReconSource> sources = keyValuesService.findAll(CheckReconSource.class);
    List<KeyValue> srcKeyLabels = new ArrayList<KeyValue>();
    srcKeyLabels.add(new ConcreteKeyValue("", ""));
    for (CheckReconSource src : sources) {
        srcKeyLabels.add(new ConcreteKeyValue(src.getSourceCode(), src.getSourceName()));
    }
    return srcKeyLabels;
}
Also used : ConcreteKeyValue(org.kuali.kfs.core.api.util.ConcreteKeyValue) CheckReconSource(com.rsmart.kuali.kfs.cr.businessobject.CheckReconSource) KeyValue(org.kuali.kfs.core.api.util.KeyValue) ConcreteKeyValue(org.kuali.kfs.core.api.util.ConcreteKeyValue) ArrayList(java.util.ArrayList)

Example 2 with KeyValue

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

the class CuCheckingSavingsValuesFinder method getKeyValues.

/**
 * Creates a simple list of static values for either checking or savings
 */
public List<KeyValue> getKeyValues() {
    List<KeyValue> keyValues = new ArrayList<KeyValue>();
    keyValues.add(new ConcreteKeyValue(BankAccountTypes.PERSONAL_CHECKING, "Personal Checking (" + BankAccountTypes.PERSONAL_CHECKING + ")"));
    keyValues.add(new ConcreteKeyValue(BankAccountTypes.PERSONAL_SAVINGS, "Personal Savings (" + BankAccountTypes.PERSONAL_SAVINGS + ")"));
    keyValues.add(new ConcreteKeyValue(BankAccountTypes.CORPORATE_CHECKING, "Corporate Checking (" + BankAccountTypes.CORPORATE_CHECKING + ")"));
    keyValues.add(new ConcreteKeyValue(BankAccountTypes.CORPORATE_SAVINGS, "Corporate Savings (" + BankAccountTypes.CORPORATE_SAVINGS + ")"));
    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 3 with KeyValue

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

the class ReversionCodeValuesFinder method getKeyValues.

/**
 * This is a static list of {@link OrganizationReversionCode}s
 * <ul>
 * <li>"A", "A - CF +/- bal in same account"</li>
 * <li>"C1", "C1 - CF budget then CF + and R -"</li>
 * <li>"C2", "C2 - Don't CF budget then CF + and R -"</li>
 * <li>"N1", "N1 - CF budget then R + and CF -"</li>
 * <li>"N2", "N2 - Don't CF budget then R + and CF -"</li>
 * <li>"R1", "R1 - CF budget then R Remaining"</li>
 * <li>"R2", "R2 - Don't CF budget then R Remaining"</li>
 * </ul>
 *
 * @see org.kuali.kfs.kns.lookup.keyvalues.KeyValuesFinder#getKeyValues()
 */
public List getKeyValues() {
    List<KeyValue> keyValues = new ArrayList<KeyValue>();
    keyValues.add(new ConcreteKeyValue("", ""));
    keyValues.add(new ConcreteKeyValue("A", "A - CF +/- bal in same account"));
    keyValues.add(new ConcreteKeyValue("CA", "CA - Revert cash balance"));
    keyValues.add(new ConcreteKeyValue("C1", "C1 - CF budget then CF + and R -"));
    keyValues.add(new ConcreteKeyValue("C2", "C2 - Don't CF budget then CF + and R -"));
    keyValues.add(new ConcreteKeyValue("N1", "N1 - CF budget then R + and CF -"));
    keyValues.add(new ConcreteKeyValue("N2", "N2 - Don't CF budget then R + and CF -"));
    keyValues.add(new ConcreteKeyValue("R1", "R1 - CF budget then R Remaining"));
    keyValues.add(new ConcreteKeyValue("R2", "R2 - Don't CF budget then R Remaining"));
    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 4 with KeyValue

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

the class CuCurrencyTypeValuesFinder method getKeyValues.

public List<KeyValue> getKeyValues() {
    List<KeyValue> keyValues = new ArrayList();
    keyValues.add(new ConcreteKeyValue(CuFPConstants.CURRENCY_CODE_U, CuFPConstants.CURRENCY_US_DOLLAR));
    keyValues.add(new ConcreteKeyValue(CuFPConstants.CURRENCY_CODE_C, CuFPConstants.CURRENCY_US_DOLLAR_TO_FOREIGN));
    keyValues.add(new ConcreteKeyValue(CuFPConstants.CURRENCY_CODE_F, CuFPConstants.CURRENCY_FOREIGN));
    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 5 with KeyValue

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

the class SecurityGroupTabValuesFinder method getKeyValues.

@Override
public List<KeyValue> getKeyValues() {
    List<KeyValue> keyValues = new ArrayList<KeyValue>();
    Long securityGroupID = null;
    KualiForm form = KNSGlobalVariables.getKualiForm();
    if ((form != null) && (form instanceof KualiDocumentFormBase)) {
        Document doc = ((KualiDocumentFormBase) form).getDocument();
        if (doc instanceof MaintenanceDocument) {
            SecurityProvisioning securityProvisioning = (SecurityProvisioning) ((MaintenanceDocument) doc).getDocumentDataObject();
            securityGroupID = securityProvisioning.getSecurityGroupId();
        }
    }
    Collection<SecurityGroupTab> tabs;
    if (securityGroupID != null) {
        Map<String, Object> map = new HashMap<String, Object>();
        map.put(KSRPropertyConstants.SECURITY_GROUP_ID, securityGroupID);
        tabs = SpringContext.getBean(BusinessObjectService.class).findMatching(SecurityGroupTab.class, map);
        for (SecurityGroupTab tab : tabs) {
            keyValues.add(new ConcreteKeyValue(tab.getTabId().toString(), tab.getTabOrder() + " - " + tab.getTabName()));
        }
    }
    return keyValues;
}
Also used : ConcreteKeyValue(org.kuali.kfs.core.api.util.ConcreteKeyValue) SecurityGroupTab(edu.cornell.kfs.ksr.businessobject.SecurityGroupTab) ConcreteKeyValue(org.kuali.kfs.core.api.util.ConcreteKeyValue) KeyValue(org.kuali.kfs.core.api.util.KeyValue) MaintenanceDocument(org.kuali.kfs.kns.document.MaintenanceDocument) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) MaintenanceDocument(org.kuali.kfs.kns.document.MaintenanceDocument) Document(org.kuali.kfs.krad.document.Document) SecurityProvisioning(edu.cornell.kfs.ksr.businessobject.SecurityProvisioning) KualiDocumentFormBase(org.kuali.kfs.kns.web.struts.form.KualiDocumentFormBase) KualiForm(org.kuali.kfs.kns.web.struts.form.KualiForm)

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