Search in sources :

Example 1 with BusinessObject

use of org.kuali.kfs.krad.bo.BusinessObject in project cu-kfs by CU-CommunityApps.

the class KualiInquiryAction method showAllTabs.

@Override
public ActionForward showAllTabs(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
    // KULRICE-2852: Overrides showAllTabs() so that it also calls the populateSections() method.
    InquiryForm inquiryForm = (InquiryForm) form;
    if (inquiryForm.getBusinessObjectClassName() == null) {
        LOG.error("Business object name not given.");
        throw new RuntimeException("Business object name not given.");
    }
    BusinessObject bo = retrieveBOFromInquirable(inquiryForm);
    checkBO(bo);
    populateSections(mapping, request, inquiryForm, bo);
    return super.showAllTabs(mapping, form, request, response);
}
Also used : BusinessObject(org.kuali.kfs.krad.bo.BusinessObject) InquiryForm(org.kuali.kfs.kns.web.struts.form.InquiryForm)

Example 2 with BusinessObject

use of org.kuali.kfs.krad.bo.BusinessObject in project cu-kfs by CU-CommunityApps.

the class KualiInquiryAction method toggleTab.

@Override
public ActionForward toggleTab(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
    InquiryForm inquiryForm = (InquiryForm) form;
    if (inquiryForm.getBusinessObjectClassName() == null) {
        LOG.error("Business object name not given.");
        throw new RuntimeException("Business object name not given.");
    }
    BusinessObject bo = retrieveBOFromInquirable(inquiryForm);
    checkBO(bo);
    populateSections(mapping, request, inquiryForm, bo);
    return super.toggleTab(mapping, form, request, response);
}
Also used : BusinessObject(org.kuali.kfs.krad.bo.BusinessObject) InquiryForm(org.kuali.kfs.kns.web.struts.form.InquiryForm)

Example 3 with BusinessObject

use of org.kuali.kfs.krad.bo.BusinessObject in project cu-kfs by CU-CommunityApps.

the class KualiInquiryAction method continueWithInquiry.

public ActionForward continueWithInquiry(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
    InquiryForm inquiryForm = (InquiryForm) form;
    if (inquiryForm.getBusinessObjectClassName() == null) {
        LOG.error("Business object name not given.");
        throw new RuntimeException("Business object name not given.");
    }
    BusinessObject bo = retrieveBOFromInquirable(inquiryForm);
    checkBO(bo);
    populateSections(mapping, request, inquiryForm, bo);
    return mapping.findForward(KFSConstants.MAPPING_BASIC);
}
Also used : BusinessObject(org.kuali.kfs.krad.bo.BusinessObject) InquiryForm(org.kuali.kfs.kns.web.struts.form.InquiryForm)

Example 4 with BusinessObject

use of org.kuali.kfs.krad.bo.BusinessObject in project cu-kfs by CU-CommunityApps.

the class CuDisbursementPayeeLookupableHelperServiceImpl method getVendorsAsPayees.

protected List<DisbursementPayee> getVendorsAsPayees(Map<String, String> fieldValues) {
    List<DisbursementPayee> payeeList = new ArrayList<DisbursementPayee>();
    Map<String, String> fieldsForLookup = this.getVendorFieldValues(fieldValues);
    vendorLookupable.setBusinessObjectClass(VendorDetail.class);
    vendorLookupable.validateSearchParameters(fieldsForLookup);
    List<? extends BusinessObject> vendorList = vendorLookupable.getSearchResults(fieldsForLookup);
    for (BusinessObject vendor : vendorList) {
        VendorDetail vendorDetail = (VendorDetail) vendor;
        CuDisbursementPayee payee = getPayeeFromVendor(vendorDetail, fieldValues);
        payeeList.add(payee);
    }
    return payeeList;
}
Also used : VendorDetail(org.kuali.kfs.vnd.businessobject.VendorDetail) CuDisbursementPayee(edu.cornell.kfs.fp.businessobject.CuDisbursementPayee) ArrayList(java.util.ArrayList) CuDisbursementPayee(edu.cornell.kfs.fp.businessobject.CuDisbursementPayee) DisbursementPayee(org.kuali.kfs.fp.businessobject.DisbursementPayee) BusinessObject(org.kuali.kfs.krad.bo.BusinessObject)

Example 5 with BusinessObject

use of org.kuali.kfs.krad.bo.BusinessObject in project cu-kfs by CU-CommunityApps.

the class CuBatchExtractServiceImplTest method findMatching.

private <T extends BusinessObject> Collection<T> findMatching(InvocationOnMock invocation) {
    Class<T> boClass = invocation.getArgument(0);
    Map<String, ?> criteria = invocation.getArgument(1);
    if (criteria.size() == 1) {
        String documentNumber = (String) criteria.get(CamsPropertyConstants.DOCUMENT_NUMBER);
        if (StringUtils.isNotBlank(documentNumber)) {
            BusinessObject matchingObject = findMatchingDocument(documentNumber);
            if (matchingObject != null && boClass.isAssignableFrom(matchingObject.getClass())) {
                return Collections.singletonList(boClass.cast(matchingObject));
            }
        }
    }
    return Collections.emptyList();
}
Also used : BusinessObject(org.kuali.kfs.krad.bo.BusinessObject)

Aggregations

BusinessObject (org.kuali.kfs.krad.bo.BusinessObject)19 InquiryForm (org.kuali.kfs.kns.web.struts.form.InquiryForm)8 ArrayList (java.util.ArrayList)3 HashMap (java.util.HashMap)3 Inquirable (org.kuali.kfs.kns.inquiry.Inquirable)2 DisbursementVoucherBatchDefault (com.rsmart.kuali.kfs.fp.businessobject.DisbursementVoucherBatchDefault)1 CuDisbursementPayee (edu.cornell.kfs.fp.businessobject.CuDisbursementPayee)1 Method (java.lang.reflect.Method)1 Map (java.util.Map)1 Account (org.kuali.kfs.coa.businessobject.Account)1 DocumentDictionaryService (org.kuali.kfs.datadictionary.legacy.DocumentDictionaryService)1 DisbursementPayee (org.kuali.kfs.fp.businessobject.DisbursementPayee)1 DocumentAttributeString (org.kuali.kfs.kew.api.document.attribute.DocumentAttributeString)1 WorkflowException (org.kuali.kfs.kew.api.exception.WorkflowException)1 BusinessObjectEntry (org.kuali.kfs.kns.datadictionary.BusinessObjectEntry)1 DocumentEntry (org.kuali.kfs.kns.datadictionary.DocumentEntry)1 LookupableHelperService (org.kuali.kfs.kns.lookup.LookupableHelperService)1 Field (org.kuali.kfs.kns.web.ui.Field)1 Row (org.kuali.kfs.kns.web.ui.Row)1 Exporter (org.kuali.kfs.krad.bo.Exporter)1