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);
}
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);
}
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);
}
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;
}
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();
}
Aggregations