1 package org.kuali.ole.deliver.inquiry;
2
3 import org.kuali.ole.OLEConstants;
4 import org.kuali.ole.deliver.bo.OlePatronIngestSummaryRecord;
5 import org.kuali.rice.kns.inquiry.KualiInquirableImpl;
6
7 import java.util.Map;
8
9
10
11
12 public class OlePatronSummaryInquirable extends KualiInquirableImpl {
13 public Object object;
14
15
16
17
18
19
20
21 @Override
22 public Object retrieveDataObject(Map parameters) {
23 object = super.retrieveDataObject(parameters);
24 return object;
25 }
26
27
28
29
30
31
32 public String getUrl() {
33 OlePatronIngestSummaryRecord olePatronIngestSummaryRecord = (OlePatronIngestSummaryRecord) object;
34 String url = OLEConstants.FAILED_PATRON_ATTACHMENT_DOWNLOAD_URL + olePatronIngestSummaryRecord.getOlePatronSummaryId();
35 return url;
36 }
37
38
39
40
41
42
43 public String getFileName() {
44 OlePatronIngestSummaryRecord olePatronIngestSummaryRecord = (OlePatronIngestSummaryRecord) object;
45 if (olePatronIngestSummaryRecord.getPatronFailedCount() != null && olePatronIngestSummaryRecord.getPatronFailedCount() > 0)
46 return olePatronIngestSummaryRecord.getOlePatronSummaryId() + OLEConstants.FAILED_PATRON_RECORD_NAME;
47 else
48 return null;
49 }
50 }