View Javadoc
1   package org.kuali.ole.batch.document;
2   
3   import org.kuali.ole.batch.bo.*;
4   import org.kuali.ole.batch.form.OLEBatchProcessDefinitionForm;
5   import org.kuali.rice.krad.document.TransactionalDocumentBase;
6   import org.kuali.rice.krad.service.KRADServiceLocator;
7   import org.springframework.web.multipart.MultipartFile;
8   
9   import java.util.ArrayList;
10  import java.util.HashMap;
11  import java.util.List;
12  import java.util.Map;
13  
14  /**
15   * Created with IntelliJ IDEA.
16   * User: adityas
17   * Date: 7/11/13
18   * Time: 6:39 PM
19   * To change this template use File | Settings | File Templates.
20   */
21  public class OLEBatchProcessDefinitionDocument extends TransactionalDocumentBase {
22  
23      private String batchProcessId;
24      private String batchProcessName;
25      private String batchProcessProfileName;
26      private String batchProcessType;
27      private String batchProcessKRMSProfile;
28      private String batchProcessProfileId;
29      private OLEBatchProcessProfileBo oleBatchProcessProfileBo;
30      private MultipartFile ingestedFile;
31      private List<OLEBatchProcessIngestFile> oleBatchProcessIngestFiles = new ArrayList<OLEBatchProcessIngestFile>();
32      private String outputFormat="marcxml";
33      private String outputFile;
34      private boolean scheduleCheck;
35      private boolean oneTimeCheck;
36      //private Date oneTimeDate;
37      //private String oneTimeStartTime;
38      private boolean recurringCheck;
39      private boolean scheduleTypeDailyCheck;
40      private boolean scheduleTypeWeeklyCheck;
41      private boolean scheduleTypeMonthlyCheck;
42      //private String startTime;
43      private OLEBatchProcessDefinitionForm form;
44      private String sourceFilePath;
45      private String sourceDirectoryPath;
46      private String sourceFileMask;
47      private String fileFormatId;
48      private String destinationDirectoryPath;
49      private boolean scheduleFlag;
50      private String message;
51      private int chunkSize;
52      private String scheduleType;
53      private String exportType;
54      private boolean linkToJob;
55      private String enteredCronExp;
56      private String user;
57      private String cronOrSchedule;
58      private String emailIds;
59      private String uploadFileName;
60      private boolean rescheduleFlag = true;
61      private boolean fileFlag=false;
62      private boolean continueImportFlag=false;
63      private int maxRecordsInFile;
64      private int maxNumberOfThreads;
65      private boolean runNowFlag = false;
66      private String runNowOrSchedule;
67      private boolean afterSubmitFlag;
68      private String loadIdFromFile = "false";
69      private String processNameHidden;
70      private String processTypeHidden;
71  
72      public String getProcessNameHidden() {
73          return processNameHidden;
74      }
75  
76      public void setProcessNameHidden(String processNameHidden) {
77          this.processNameHidden = processNameHidden;
78      }
79  
80      public String getProcessTypeHidden() {
81          return processTypeHidden;
82      }
83  
84      public void setProcessTypeHidden(String processTypeHidden) {
85          this.processTypeHidden = processTypeHidden;
86      }
87  
88      public boolean isAfterSubmitFlag() {
89          return afterSubmitFlag;
90      }
91  
92      public void setAfterSubmitFlag(boolean afterSubmitFlag) {
93          this.afterSubmitFlag = afterSubmitFlag;
94      }
95  
96      public String getRunNowOrSchedule() {
97          return runNowOrSchedule;
98      }
99  
100     public void setRunNowOrSchedule(String runNowOrSchedule) {
101         this.runNowOrSchedule = runNowOrSchedule;
102     }
103 
104     public int getMaxNumberOfThreads() {
105         return maxNumberOfThreads;
106     }
107 
108     public void setMaxNumberOfThreads(int maxNumberOfThreads) {
109         this.maxNumberOfThreads = maxNumberOfThreads;
110     }
111 
112     public int getMaxRecordsInFile() {
113         return maxRecordsInFile;
114     }
115 
116     public void setMaxRecordsInFile(int maxRecordsInFile) {
117         this.maxRecordsInFile = maxRecordsInFile;
118     }
119 
120     public boolean isContinueImportFlag() {
121         return continueImportFlag;
122     }
123 
124     public void setContinueImportFlag(boolean continueImportFlag) {
125         this.continueImportFlag = continueImportFlag;
126     }
127 
128 
129     public boolean isFileFlag() {
130         return fileFlag;
131     }
132 
133     public void setFileFlag(boolean fileFlag) {
134         this.fileFlag = fileFlag;
135     }
136     private boolean addUnmatchedPatron;
137 
138     public boolean isRescheduleFlag() {
139         return rescheduleFlag;
140     }
141 
142     public void setRescheduleFlag(boolean rescheduleFlag) {
143         this.rescheduleFlag = rescheduleFlag;
144     }
145 
146     public String getUploadFileName() {
147         return uploadFileName;
148     }
149 
150     public void setUploadFileName(String uploadFileName) {
151         this.uploadFileName = uploadFileName;
152     }
153 
154     public String getCronOrSchedule() {
155         return cronOrSchedule;
156     }
157 
158     public void setCronOrSchedule(String cronOrSchedule) {
159         this.cronOrSchedule = cronOrSchedule;
160     }
161 
162     public String getExportType() {
163         return exportType;
164     }
165 
166     public void setExportType(String exportType) {
167         this.exportType = exportType;
168     }
169 
170     public int getChunkSize() {
171         return chunkSize;
172     }
173 
174     public void setChunkSize(int chunkSize) {
175         this.chunkSize = chunkSize;
176     }
177     /*private String scheduleType;
178     private List<String> weekDays;
179     private String weekNumber;
180     private String weekDay;
181     private String monthNumber;*/
182 
183     private MultipartFile marcFile;
184     private MultipartFile ediFile;
185     private String inputFormat;
186     private MultipartFile serialRecordDocumentFile;
187     private MultipartFile serialRecordHistoryFile;
188     private MultipartFile serialRecordTypeFile;
189     private String serialRecordDocumentFileName;
190     private String serialRecordHistoryFileName;
191     private String serialRecordTypeFileName;
192     private String marcFileName;
193     private String ediFileName;
194     private String oneTimeOrRecurring;
195     private OLEBatchProcessScheduleBo oleBatchProcessScheduleBo;
196     private List<OLEBatchProcessScheduleBo> oleBatchProcessScheduleBoList;
197     //private OLEBatchProcessJobDetailsBo oleBatchProcessJobDetailsBo;
198     private List<OLEBatchProcessJobDetailsBo> oleBatchProcessJobDetailsBoList;
199     private OLEBatchProcessProfileBo  batchProcessProfileBo;
200 
201     private Boolean marcOnly;
202 
203     public Boolean getMarcOnly() {
204         return marcOnly;
205     }
206 
207     public void setMarcOnly(Boolean marcOnly) {
208         this.marcOnly = marcOnly;
209     }
210 
211     public String getMarcFileName() {
212         return marcFileName;
213     }
214 
215     public void setMarcFileName(String marcFileName) {
216         this.marcFileName = marcFileName;
217     }
218 
219     public String getEdiFileName() {
220         return ediFileName;
221     }
222 
223     public void setEdiFileName(String ediFileName) {
224         this.ediFileName = ediFileName;
225     }
226 
227     public MultipartFile getIngestedFile() {
228         return ingestedFile;
229     }
230 
231     public void setIngestedFile(MultipartFile ingestedFile) {
232         this.ingestedFile = ingestedFile;
233     }
234 
235     public String getSourceFilePath() {
236         return sourceFilePath;
237     }
238 
239     public void setSourceFilePath(String sourceFilePath) {
240         this.sourceFilePath = sourceFilePath;
241     }
242 
243     public String getSourceDirectoryPath() {
244         return sourceDirectoryPath;
245     }
246 
247     public void setSourceDirectoryPath(String sourceDirectoryPath) {
248         this.sourceDirectoryPath = sourceDirectoryPath;
249     }
250 
251     public String getSourceFileMask() {
252         return sourceFileMask;
253     }
254 
255     public void setSourceFileMask(String sourceFileMask) {
256         this.sourceFileMask = sourceFileMask;
257     }
258 
259     public String getFileFormatId() {
260         return fileFormatId;
261     }
262 
263     public void setFileFormatId(String fileFormatId) {
264         this.fileFormatId = fileFormatId;
265     }
266 
267     public String getDestinationDirectoryPath() {
268         return destinationDirectoryPath;
269     }
270 
271     public void setDestinationDirectoryPath(String destinationDirectoryPath) {
272         this.destinationDirectoryPath = destinationDirectoryPath;
273     }
274 
275     public String getBatchProcessId() {
276         return batchProcessId;
277     }
278 
279     public void setBatchProcessId(String batchProcessId) {
280         this.batchProcessId = batchProcessId;
281     }
282 
283     public String getBatchProcessProfileId() {
284         return batchProcessProfileId;
285     }
286 
287     public void setBatchProcessProfileId(String batchProcessProfileId) {
288         this.batchProcessProfileId = batchProcessProfileId;
289     }
290 
291     public OLEBatchProcessDefinitionForm getForm() {
292         return form;
293     }
294 
295     public void setForm(OLEBatchProcessDefinitionForm form) {
296         this.form = form;
297     }
298 
299     public String getBatchProcessName() {
300         return batchProcessName;
301     }
302 
303     public void setBatchProcessName(String batchProcessName) {
304         this.batchProcessName = batchProcessName;
305     }
306 
307     public String getBatchProcessProfileName() {
308         return batchProcessProfileName;
309     }
310 
311     public void setBatchProcessProfileName(String batchProcessProfileName) {
312         this.batchProcessProfileName = batchProcessProfileName;
313     }
314 
315     public String getBatchProcessType() {
316         return batchProcessType;
317     }
318 
319     public void setBatchProcessType(String batchProcessType) {
320         this.batchProcessType = batchProcessType;
321     }
322 
323     public String getBatchProcessKRMSProfile() {
324         return batchProcessKRMSProfile;
325     }
326 
327     public void setBatchProcessKRMSProfile(String batchProcessKRMSProfile) {
328         this.batchProcessKRMSProfile = batchProcessKRMSProfile;
329     }
330 
331     public OLEBatchProcessProfileBo getOleBatchProcessProfileBo() {
332         return oleBatchProcessProfileBo;
333     }
334 
335     public void setOleBatchProcessProfileBo(OLEBatchProcessProfileBo oleBatchProcessProfileBo) {
336         this.oleBatchProcessProfileBo = oleBatchProcessProfileBo;
337     }
338 
339     public List<OLEBatchProcessIngestFile> getOleBatchProcessIngestFiles() {
340         return oleBatchProcessIngestFiles;
341     }
342 
343     public void setOleBatchProcessIngestFiles(List<OLEBatchProcessIngestFile> oleBatchProcessIngestFiles) {
344         this.oleBatchProcessIngestFiles = oleBatchProcessIngestFiles;
345     }
346 
347     public String getOutputFormat() {
348         return outputFormat;
349     }
350 
351     public void setOutputFormat(String outputFormat) {
352         this.outputFormat = outputFormat;
353     }
354 
355     public String getOutputFile() {
356         return outputFile;
357     }
358 
359     public void setOutputFile(String outputFile) {
360         this.outputFile = outputFile;
361     }
362 
363     public boolean isScheduleCheck() {
364         return scheduleCheck;
365     }
366 
367     public void setScheduleCheck(boolean scheduleCheck) {
368         this.scheduleCheck = scheduleCheck;
369     }
370 
371     public boolean isOneTimeCheck() {
372         return oneTimeCheck;
373     }
374 
375     public void setOneTimeCheck(boolean oneTimeCheck) {
376         this.oneTimeCheck = oneTimeCheck;
377     }
378 
379     public boolean isRecurringCheck() {
380         return recurringCheck;
381     }
382 
383     public void setRecurringCheck(boolean recurringCheck) {
384         this.recurringCheck = recurringCheck;
385     }
386 
387     public boolean isScheduleTypeDailyCheck() {
388         return scheduleTypeDailyCheck;
389     }
390 
391     public void setScheduleTypeDailyCheck(boolean scheduleTypeDailyCheck) {
392         this.scheduleTypeDailyCheck = scheduleTypeDailyCheck;
393     }
394 
395     public boolean isScheduleTypeWeeklyCheck() {
396         return scheduleTypeWeeklyCheck;
397     }
398 
399     public void setScheduleTypeWeeklyCheck(boolean scheduleTypeWeeklyCheck) {
400         this.scheduleTypeWeeklyCheck = scheduleTypeWeeklyCheck;
401     }
402 
403     public boolean isScheduleTypeMonthlyCheck() {
404         return scheduleTypeMonthlyCheck;
405     }
406 
407     public void setScheduleTypeMonthlyCheck(boolean scheduleTypeMonthlyCheck) {
408         this.scheduleTypeMonthlyCheck = scheduleTypeMonthlyCheck;
409     }
410 
411     public boolean isScheduleFlag() {
412         return scheduleFlag;
413     }
414 
415     public void setScheduleFlag(boolean scheduleFlag) {
416         this.scheduleFlag = scheduleFlag;
417     }
418 
419     public String getMessage() {
420         return message;
421     }
422 
423     public void setMessage(String message) {
424         this.message = message;
425     }
426 
427     public MultipartFile getMarcFile() {
428         return marcFile;
429     }
430 
431     public void setMarcFile(MultipartFile marcFile) {
432         this.marcFile = marcFile;
433     }
434 
435     public MultipartFile getEdiFile() {
436         return ediFile;
437     }
438 
439     public void setEdiFile(MultipartFile ediFile) {
440         this.ediFile = ediFile;
441     }
442 
443     public OLEBatchProcessScheduleBo getOleBatchProcessScheduleBo() {
444         return oleBatchProcessScheduleBo;
445     }
446 
447     public void setOleBatchProcessScheduleBo(OLEBatchProcessScheduleBo oleBatchProcessScheduleBo) {
448         this.oleBatchProcessScheduleBo = oleBatchProcessScheduleBo;
449     }
450 
451     public List<OLEBatchProcessScheduleBo> getOleBatchProcessScheduleBoList() {
452         return oleBatchProcessScheduleBoList;
453     }
454 
455     public void setOleBatchProcessScheduleBoList(List<OLEBatchProcessScheduleBo> oleBatchProcessScheduleBoList) {
456         this.oleBatchProcessScheduleBoList = oleBatchProcessScheduleBoList;
457     }
458 
459     public OLEBatchProcessProfileBo getBatchProcessProfileBo() {
460         return batchProcessProfileBo;
461     }
462 
463     public void setBatchProcessProfileBo(OLEBatchProcessProfileBo batchProcessProfileBo) {
464         this.batchProcessProfileBo = batchProcessProfileBo;
465     }
466 
467     public String getScheduleType() {
468         return scheduleType;
469     }
470 
471     public void setScheduleType(String scheduleType) {
472         this.scheduleType = scheduleType;
473     }
474 
475     public String getOneTimeOrRecurring() {
476         return oneTimeOrRecurring;
477     }
478 
479     public void setOneTimeOrRecurring(String oneTimeOrRecurring) {
480         this.oneTimeOrRecurring = oneTimeOrRecurring;
481     }
482 
483     public List<OLEBatchProcessJobDetailsBo> getOleBatchProcessJobDetailsBoList() {
484         return oleBatchProcessJobDetailsBoList;
485     }
486 
487     public void setOleBatchProcessJobDetailsBoList(List<OLEBatchProcessJobDetailsBo> oleBatchProcessJobDetailsBoList) {
488         this.oleBatchProcessJobDetailsBoList = oleBatchProcessJobDetailsBoList;
489     }
490 
491     public boolean isLinkToJob() {
492         return linkToJob;
493     }
494 
495     public void setLinkToJob(boolean linkToJob) {
496         this.linkToJob = linkToJob;
497     }
498 
499     public String getEnteredCronExp() {
500         return enteredCronExp;
501     }
502 
503     public void setEnteredCronExp(String enteredCronExp) {
504         this.enteredCronExp = enteredCronExp;
505     }
506 
507     public String getUser() {
508         return user;
509     }
510 
511     public void setUser(String user) {
512         this.user = user;
513     }
514 
515     public String getEmailIds() {
516         return emailIds;
517     }
518 
519     public void setEmailIds(String emailIds) {
520         this.emailIds = emailIds;
521     }
522 
523     public MultipartFile getSerialRecordDocumentFile() {
524         return serialRecordDocumentFile;
525     }
526 
527     public void setSerialRecordDocumentFile(MultipartFile serialRecordDocumentFile) {
528         this.serialRecordDocumentFile = serialRecordDocumentFile;
529     }
530 
531     public MultipartFile getSerialRecordHistoryFile() {
532         return serialRecordHistoryFile;
533     }
534 
535     public void setSerialRecordHistoryFile(MultipartFile serialRecordHistoryFile) {
536         this.serialRecordHistoryFile = serialRecordHistoryFile;
537     }
538 
539     public MultipartFile getSerialRecordTypeFile() {
540         return serialRecordTypeFile;
541     }
542 
543     public void setSerialRecordTypeFile(MultipartFile serialRecordTypeFile) {
544         this.serialRecordTypeFile = serialRecordTypeFile;
545     }
546 
547     public String getInputFormat() {
548         return inputFormat;
549     }
550 
551     public void setInputFormat(String inputFormat) {
552         this.inputFormat = inputFormat;
553     }
554 
555     public String getSerialRecordDocumentFileName() {
556         return serialRecordDocumentFileName;
557     }
558 
559     public void setSerialRecordDocumentFileName(String serialRecordDocumentFileName) {
560         this.serialRecordDocumentFileName = serialRecordDocumentFileName;
561     }
562 
563     public String getSerialRecordHistoryFileName() {
564         return serialRecordHistoryFileName;
565     }
566 
567     public void setSerialRecordHistoryFileName(String serialRecordHistoryFileName) {
568         this.serialRecordHistoryFileName = serialRecordHistoryFileName;
569     }
570 
571     public String getSerialRecordTypeFileName() {
572         return serialRecordTypeFileName;
573     }
574 
575     public void setSerialRecordTypeFileName(String serialRecordTypeFileName) {
576         this.serialRecordTypeFileName = serialRecordTypeFileName;
577     }
578 
579     public boolean isAddUnmatchedPatron() {
580         return addUnmatchedPatron;
581     }
582 
583     public void setAddUnmatchedPatron(boolean addUnmatchedPatron) {
584         this.addUnmatchedPatron = addUnmatchedPatron;
585     }
586 
587     public boolean isRunNowFlag() {
588         return runNowFlag;
589     }
590 
591     public void setRunNowFlag(boolean runNowFlag) {
592         this.runNowFlag = runNowFlag;
593     }
594 
595     public String getLoadIdFromFile() {
596         if (batchProcessProfileId != null) {
597             Map ids = new HashMap();
598             ids.put("batchProcessProfileId", batchProcessProfileId);
599             OLEBatchProcessProfileFilterCriteriaBo oleBatchProcessProfileFilterCriteriaBo = KRADServiceLocator.getBusinessObjectService().findByPrimaryKey(OLEBatchProcessProfileFilterCriteriaBo.class, ids);
600             if (oleBatchProcessProfileFilterCriteriaBo != null) {
601                 if (("LocalId_display").equalsIgnoreCase(oleBatchProcessProfileFilterCriteriaBo.getFilterFieldName())) {
602                     loadIdFromFile = "true";
603                 }
604             } else {
605                 loadIdFromFile = "false";
606             }
607         }
608         return loadIdFromFile;
609     }
610 
611     public void setLoadIdFromFile(String loadIdFromFile) {
612         this.loadIdFromFile = loadIdFromFile;
613     }
614 }