Search in sources :

Example 26 with ConcreteKeyValue

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

the class CollegeLevelOrganizationValuesFinder method getKeyValues.

public List<KeyValue> getKeyValues() {
    List<KeyValue> keyValues = new ArrayList<KeyValue>();
    IWantDocumentService iWantDocumentService = SpringContext.getBean(IWantDocumentService.class);
    List<LevelOrganization> cLevelOrganizations = iWantDocumentService.getCLevelOrganizations();
    keyValues.add(new ConcreteKeyValue("", ""));
    if (cLevelOrganizations != null) {
        for (LevelOrganization cLevelOrganization : cLevelOrganizations) {
            keyValues.add(new ConcreteKeyValue(cLevelOrganization.getCode(), cLevelOrganization.getCodeAndDescription()));
        }
    }
    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) LevelOrganization(edu.cornell.kfs.module.purap.businessobject.LevelOrganization) ArrayList(java.util.ArrayList) IWantDocumentService(edu.cornell.kfs.module.purap.document.service.IWantDocumentService)

Example 27 with ConcreteKeyValue

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

the class OrderCompletedValuesFinder method getKeyValues.

public List<KeyValue> getKeyValues() {
    List<KeyValue> keyValues = new ArrayList<KeyValue>();
    keyValues.add(new ConcreteKeyValue("N", "I have <b>NOT</b> placed the order. (Click <b>approve</b> to submit to the FTC/BSC for processing) &nbsp; &nbsp; &nbsp;"));
    keyValues.add(new ConcreteKeyValue("Y", "I <b>HAVE</b> placed the order via pcard/eshop etc. (Click <b>approve</b> to finalize the order)"));
    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)

Example 28 with ConcreteKeyValue

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

the class CUConfidentialAttachmentTypeValuesFinder method getKeyValues.

@Override
public List<KeyValue> getKeyValues() {
    List<KeyValue> keyValues = new ArrayList<KeyValue>();
    keyValues.add(new ConcreteKeyValue(ConfidentialAttachmentTypeCodes.NON_CONFIDENTIAL_ATTACHMENT_TYPE, CUKFSConstants.NON_CONFIDENTIAL_ATTACHMENT_TYPE_LABEL));
    keyValues.add(new ConcreteKeyValue(ConfidentialAttachmentTypeCodes.CONFIDENTIAL_ATTACHMENT_TYPE, ConfidentialAttachmentTypeCodes.CONFIDENTIAL_ATTACHMENT_TYPE));
    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)

Example 29 with ConcreteKeyValue

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

the class TaxFpPaymentReasonValuesFinder method getKeyValues.

@SuppressWarnings("unchecked")
@Override
public List<KeyValue> getKeyValues() {
    List<KeyValue> keyValues = super.getKeyValues();
    keyValues.set(0, new ConcreteKeyValue(CUTaxConstants.ANY_OR_NONE_PAYMENT_REASON, "Any/None"));
    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)

Example 30 with ConcreteKeyValue

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

the class IWantDocumentAction method execute.

/**
 * @see org.kuali.kfs.kns.web.struts.action.KualiAction#execute(org.apache.struts.action.ActionMapping,
 * org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest,
 * javax.servlet.http.HttpServletResponse)
 */
@Override
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
    ActionForward actionForward = super.execute(mapping, form, request, response);
    IWantDocumentForm documentForm = (IWantDocumentForm) form;
    IWantDocument iWantDoc = documentForm.getIWantDocument();
    if (documentForm != null && documentForm.getDocument() != null) {
        iWantDoc.setExplanation(iWantDoc.getDocumentHeader().getExplanation());
        // populate department drop down
        if (!documentForm.getPreviousSelectedOrg().equalsIgnoreCase(((IWantDocument) documentForm.getDocument()).getCollegeLevelOrganization())) {
            String cLevelOrg = ((IWantDocument) documentForm.getDocument()).getCollegeLevelOrganization();
            documentForm.getDeptOrgKeyLabels().clear();
            documentForm.getDeptOrgKeyLabels().add(new ConcreteKeyValue("", "Please Select"));
            if (StringUtils.isNotEmpty(cLevelOrg)) {
                IWantDocumentService iWantDocumentService = SpringContext.getBean(IWantDocumentService.class);
                List<LevelOrganization> dLevelOrgs = iWantDocumentService.getDLevelOrganizations(cLevelOrg);
                // Get the list of chart+org combos to forcibly exclude from the drop-down, if any.
                String routingChart = ((IWantDocument) documentForm.getDocument()).getRoutingChart();
                Collection<String> dLevelExcludesList = getParameterService().getParameterValuesAsString(PurapConstants.PURAP_NAMESPACE, KRADConstants.DetailTypes.DOCUMENT_DETAIL_TYPE, IWANT_DEPT_ORGS_TO_EXCLUDE_PARM);
                Set<String> dLevelExcludes = new HashSet<String>((dLevelExcludesList != null) ? dLevelExcludesList : Collections.<String>emptyList());
                for (LevelOrganization levelOrganization : dLevelOrgs) {
                    // Add each department-level org to the drop-down as long as it is not marked for exclusion.
                    if (!dLevelExcludes.contains(routingChart + "=" + levelOrganization.getCode())) {
                        documentForm.getDeptOrgKeyLabels().add(new ConcreteKeyValue(levelOrganization.getCode(), levelOrganization.getCodeAndDescription()));
                    }
                }
            }
        }
        setupDocumentMessages(documentForm.getStep());
    }
    return actionForward;
}
Also used : ConcreteKeyValue(org.kuali.rice.core.api.util.ConcreteKeyValue) LevelOrganization(edu.cornell.kfs.module.purap.businessobject.LevelOrganization) ActionForward(org.apache.struts.action.ActionForward) IWantDocument(edu.cornell.kfs.module.purap.document.IWantDocument) PurApFavoriteAccountLineBuilderForIWantDocument(edu.cornell.kfs.module.purap.util.PurApFavoriteAccountLineBuilderForIWantDocument) IWantDocumentService(edu.cornell.kfs.module.purap.document.service.IWantDocumentService) HashSet(java.util.HashSet)

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