View Javadoc
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   * Created with IntelliJ IDEA.
11   * User: ?
12   * Date: 2/23/13
13   * Time: 2:50 PM
14   * To change this template use File | Settings | File Templates.
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  }