1 package org.kuali.ole.factory;
2
3 import org.kuali.ole.OLEConstants;
4 import org.kuali.ole.pojo.bib.BibliographicRecord;
5 import org.kuali.ole.pojo.edi.LineItemOrder;
6 import org.kuali.ole.service.OverlayFileReaderService;
7
8 import java.util.HashMap;
9
10
11
12
13
14
15
16 public class OverlayFileReaderFactory {
17
18 private OverlayFileReaderService overlayMrcFileReaderService;
19 private OverlayFileReaderService overlayEdiFileReaderService;
20
21 public OverlayFileReaderService getOverlayMrcFileReaderService() {
22 return overlayMrcFileReaderService;
23 }
24
25 public void setOverlayMrcFileReaderService(OverlayFileReaderService overlayMrcFileReaderService) {
26 this.overlayMrcFileReaderService = overlayMrcFileReaderService;
27 }
28
29 public OverlayFileReaderService getOverlayEdiFileReaderService() {
30 return overlayEdiFileReaderService;
31 }
32
33 public void setOverlayEdiFileReaderService(OverlayFileReaderService overlayEdiFileReaderService) {
34 this.overlayEdiFileReaderService = overlayEdiFileReaderService;
35 }
36
37 public OverlayFileReaderService getOverlayFileReaderService(String fileType,HashMap<String,Object> objects){
38 if(fileType!=null && fileType.equalsIgnoreCase(OLEConstants.EDI)){
39 overlayEdiFileReaderService.setObject(objects.get(fileType));
40 return overlayEdiFileReaderService;
41 }else if (fileType!=null && fileType.equalsIgnoreCase(OLEConstants.MRC)){
42 overlayMrcFileReaderService.setObject(objects.get(fileType));
43 return overlayMrcFileReaderService;
44 }
45 return null;
46 }
47
48 }