1 package org.kuali.ole.describe.inquiry;
2
3 import org.kuali.ole.OLEConstants;
4 import org.kuali.ole.describe.bo.OleLocationIngestSummaryRecord;
5 import org.kuali.rice.kns.inquiry.KualiInquirableImpl;
6
7 import java.util.Map;
8
9
10
11
12 public class OleLocationSummaryInquirable 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 OleLocationIngestSummaryRecord oleLocationIngestSummaryRecord = (OleLocationIngestSummaryRecord) object;
34 String url = OLEConstants.FAILED_LOCATION_ATTACHMENT_DOWNLOAD_URL + oleLocationIngestSummaryRecord.getOleLocationSummaryId();
35 return url;
36 }
37
38
39
40
41
42
43 public String getFileName() {
44 OleLocationIngestSummaryRecord oleLocationIngestSummaryRecord = (OleLocationIngestSummaryRecord) object;
45 if (oleLocationIngestSummaryRecord.getOleLocationFailedCount() != null && oleLocationIngestSummaryRecord.getOleLocationFailedCount() > 0)
46 return oleLocationIngestSummaryRecord.getOleLocationSummaryId() + OLEConstants.FAILED_LOCATION_RECORD_NAME;
47 else
48 return null;
49 }
50 }