1 package org.kuali.ole.location.inquiry;
2
3 import org.kuali.ole.OLEConstants;
4 import org.kuali.ole.location.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 @Override
21 public Object retrieveDataObject(Map parameters) {
22 object= super.retrieveDataObject(parameters);
23 return object;
24 }
25
26
27
28
29
30 public String getUrl(){
31 OleLocationIngestSummaryRecord oleLocationIngestSummaryRecord=(OleLocationIngestSummaryRecord)object;
32 String url= OLEConstants.FAILED_LOCATION_ATTACHMENT_DOWNLOAD_URL+oleLocationIngestSummaryRecord.getOleLocationSummaryId();
33 return url;
34 }
35
36
37
38
39
40 public String getFileName(){
41 OleLocationIngestSummaryRecord oleLocationIngestSummaryRecord=(OleLocationIngestSummaryRecord)object;
42 if(oleLocationIngestSummaryRecord.getOleLocationFailedCount()!=null && oleLocationIngestSummaryRecord.getOleLocationFailedCount()>0)
43 return oleLocationIngestSummaryRecord.getOleLocationSummaryId()+OLEConstants.FAILED_LOCATION_RECORD_NAME;
44 else
45 return null;
46 }
47 }