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