1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.pdp.businessobject.lookup;
17
18 import java.util.Properties;
19
20 import org.kuali.ole.pdp.PdpPropertyConstants;
21 import org.kuali.ole.pdp.businessobject.PaymentProcess;
22 import org.kuali.ole.pdp.businessobject.ProcessSummary;
23 import org.kuali.ole.sys.OLEConstants;
24 import org.kuali.rice.kns.lookup.HtmlData;
25 import org.kuali.rice.kns.lookup.HtmlData.AnchorHtmlData;
26 import org.kuali.rice.kns.lookup.KualiLookupableHelperServiceImpl;
27 import org.kuali.rice.krad.bo.BusinessObject;
28 import org.kuali.rice.krad.util.KRADConstants;
29 import org.kuali.rice.krad.util.UrlFactory;
30
31 public class PaymentProcessLookupableHelperService extends KualiLookupableHelperServiceImpl {
32
33
34
35
36
37 @Override
38 public HtmlData getInquiryUrl(BusinessObject bo, String propertyName) {
39 AnchorHtmlData inquiryUrl = (AnchorHtmlData) super.getInquiryUrl(bo, propertyName);
40 PaymentProcess paymentProcess = (PaymentProcess) bo;
41 if (propertyName.equalsIgnoreCase(PdpPropertyConstants.PaymentProcess.PAYMENT_PROCESS_ID)) {
42 Properties params = new Properties();
43 params.put(OLEConstants.DISPATCH_REQUEST_PARAMETER, OLEConstants.SEARCH_METHOD);
44 params.put(OLEConstants.BUSINESS_OBJECT_CLASS_ATTRIBUTE, ProcessSummary.class.getName());
45 params.put(KRADConstants.DOC_FORM_KEY, "88888888");
46 params.put(OLEConstants.HIDE_LOOKUP_RETURN_LINK, "true");
47 params.put(OLEConstants.RETURN_LOCATION_PARAMETER, OLEConstants.MAPPING_PORTAL + ".do");
48 params.put(PdpPropertyConstants.ProcessSummary.PROCESS_SUMMARY_PROCESS_ID, UrlFactory.encode(String.valueOf(paymentProcess.getId())));
49 String url = UrlFactory.parameterizeUrl(KRADConstants.LOOKUP_ACTION, params);
50 inquiryUrl.setHref(url);
51 }
52 return inquiryUrl;
53 }
54
55 }