1 package org.kuali.ole.batch.impl;
2
3 import org.apache.log4j.Logger;
4 import org.kuali.ole.batch.export.BatchProcessExportData;
5 import org.kuali.ole.batch.ingest.*;
6
7
8
9
10
11
12
13
14 public class BatchProcessFactory {
15 private static final Logger LOG = Logger.getLogger(BatchProcessFactory.class);
16
17
18
19
20
21
22
23 public static OLEBatchProcess createProcess(String processType) {
24 if (processType == null) {
25 LOG.error("::Process Type is NULL Cannot create Batch process::");
26 throw new RuntimeException("::Process Type is NULL Cannot create Batch process::");
27 }
28 if (processType.equalsIgnoreCase("Location Import")) {
29 return new BatchProcessLocationIngest();
30 } else if (processType.equals("Patron Import")) {
31 return new BatchProcessPatronIngest();
32 } else if (processType.equals("Order Record Import")) {
33 return new BatchProcessOrderIngest();
34 } else if (processType.equals("Batch Export")) {
35 return new BatchProcessExportData();
36 } else if (processType.equals("Invoice Import")) {
37 return new BatchProcessInvoiceIngest();
38 } else if (processType.equals("Batch Delete")) {
39 return new BatchProcessDeleteData();
40 } else if (processType.equals("Bib Import")) {
41 return new BatchProcessBibImport();
42 } else if (processType.equals("Claim Report")) {
43 return new OLEBatchProcessClaimReport();
44 } else if (processType.equals("Serial Record Import")) {
45 return new OLEBatchProcessSerialRecordImport();
46 } else {
47 return null;
48 }
49 }
50 }