1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.select.businessobject.inquiry;
17
18 import org.kuali.ole.OLEConstants;
19 import org.kuali.ole.deliver.bo.OLEPatronEntityViewBo;
20 import org.kuali.ole.deliver.bo.OleBorrowerType;
21 import org.kuali.ole.deliver.bo.OLEPatronEntityViewBo;
22 import org.kuali.ole.sys.businessobject.inquiry.KfsInquirableImpl;
23 import org.kuali.rice.kim.impl.identity.name.EntityNameBo;
24 import org.kuali.rice.kns.lookup.HtmlData;
25 import org.kuali.rice.kns.lookup.HtmlData.AnchorHtmlData;
26 import org.kuali.rice.krad.bo.BusinessObject;
27 import java.util.*;
28
29 public class OlePatronDocumentInquirableImpl extends KfsInquirableImpl {
30
31 @Override
32 public HtmlData getInquiryUrl(BusinessObject businessObject, String attributeName, boolean forceInquiry) {
33 AnchorHtmlData htmlData = new AnchorHtmlData();
34 if (businessObject instanceof OLEPatronEntityViewBo && attributeName.equals(OLEConstants.REQUESTOR_PATRON_ID) ) {
35 OLEPatronEntityViewBo olePatronEntityViewBo = (OLEPatronEntityViewBo)businessObject;
36 String patronId = olePatronEntityViewBo.getPatronId();
37 olePatronEntityViewBo.setRequestorPatronId(patronId);
38 String href = OLEConstants.ASSIGN_REQUESTOR_INQUIRY + patronId;
39 href = "kr/" + href;
40 htmlData.setHref(href);
41 return htmlData;
42 }
43 else {
44 OLEPatronEntityViewBo oleRequestorPatronDocument = (OLEPatronEntityViewBo)businessObject;
45 String patronId = oleRequestorPatronDocument.getPatronId();
46 oleRequestorPatronDocument.setRequestorPatronId(patronId);
47 }
48 return htmlData;
49 }
50
51 }