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.ArrayList;
19 import java.util.List;
20
21 import org.apache.commons.lang.StringUtils;
22 import org.kuali.ole.fp.businessobject.lookup.AbstractPayeeLookupableHelperServiceImpl;
23 import org.kuali.ole.pdp.PdpPropertyConstants;
24 import org.kuali.rice.kns.lookup.HtmlData;
25 import org.kuali.rice.krad.bo.BusinessObject;
26 import org.kuali.rice.krad.util.KRADConstants;
27
28 public class PayeeACHAccountLookupableHelperServiceImpl extends AbstractPayeeLookupableHelperServiceImpl {
29
30
31
32
33
34 @Override
35 public List<HtmlData> getCustomActionUrls(BusinessObject businessObject, List pkNames) {
36 List<HtmlData> htmlDataList = new ArrayList<HtmlData>();
37 if (allowsMaintenanceEditAction(businessObject)) {
38 htmlDataList.add(getUrlData(businessObject, KRADConstants.MAINTENANCE_EDIT_METHOD_TO_CALL, pkNames));
39 }
40 if (allowsMaintenanceNewOrCopyAction() && allowsMaintenanceEditAction(businessObject)) {
41 htmlDataList.add(getUrlData(businessObject, KRADConstants.MAINTENANCE_COPY_METHOD_TO_CALL, pkNames));
42 }
43 if (allowsMaintenanceDeleteAction(businessObject)) {
44 htmlDataList.add(getUrlData(businessObject, KRADConstants.MAINTENANCE_DELETE_METHOD_TO_CALL, pkNames));
45 }
46 return htmlDataList;
47 }
48
49
50
51
52
53 @Override
54 public HtmlData getInquiryUrl(BusinessObject bo, String propertyName) {
55
56
57 if (!StringUtils.equals(PdpPropertyConstants.PAYEE_NAME, propertyName) || allowsMaintenanceEditAction(bo))
58 return super.getInquiryUrl(bo, propertyName);
59
60
61 return new HtmlData.AnchorHtmlData();
62 }
63 }