1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.sys;
17
18 import java.io.File;
19 import java.util.ArrayList;
20 import java.util.List;
21
22 import org.kuali.ole.sys.batch.dataaccess.FiscalYearMaker;
23 import org.kuali.rice.krad.bo.ModuleConfiguration;
24
25
26
27
28 public class FinancialSystemModuleConfiguration extends ModuleConfiguration {
29 protected List<FiscalYearMaker> fiscalYearMakers;
30 protected List<String> batchFileDirectories;
31
32
33
34
35 public FinancialSystemModuleConfiguration() {
36 super();
37
38 fiscalYearMakers = new ArrayList<FiscalYearMaker>();
39 batchFileDirectories = new ArrayList<String>();
40 }
41
42
43
44
45
46
47 public List<FiscalYearMaker> getFiscalYearMakers() {
48 return fiscalYearMakers;
49 }
50
51
52
53
54
55
56 public void setFiscalYearMakers(List<FiscalYearMaker> fiscalYearMakers) {
57 this.fiscalYearMakers = fiscalYearMakers;
58 }
59
60 public List<String> getBatchFileDirectories() {
61 return batchFileDirectories;
62 }
63
64 public void setBatchFileDirectories(List<String> batchFileDirectories) {
65 if (batchFileDirectories == null) {
66 this.batchFileDirectories = new ArrayList<String>();
67 } else {
68 this.batchFileDirectories = batchFileDirectories;
69 for (String batchFileDirectory : this.batchFileDirectories) {
70 File directory = new File(batchFileDirectory);
71 if ( !directory.exists() ) {
72 if ( !directory.mkdirs() ) {
73 throw new RuntimeException( batchFileDirectory + " does not exist and the server was unable to create it." );
74 }
75 } else {
76 if (!directory.isDirectory()) {
77 throw new RuntimeException(batchFileDirectory + " exists but is not a directory.");
78 }
79 }
80 }
81 }
82 }
83 }