1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.oodt.cas.pge.config;
18
19
20 import java.util.List;
21
22
23 import com.google.common.base.Strings;
24 import com.google.common.collect.Lists;
25
26
27
28
29
30
31 public class PgeConfig {
32
33 private List<DynamicConfigFile> dynamicConfigFiles;
34 private List<OutputDir> outputDirs;
35 private Object[] propertyAdderCustomArgs;
36 private String exeDir;
37 private String shellType;
38 private List<String> exeCmds;
39 private FileStagingInfo fileStagingInfo;
40
41 public PgeConfig() {
42 shellType = "sh";
43 outputDirs = Lists.newArrayList();
44 dynamicConfigFiles = Lists.newArrayList();
45 exeCmds = Lists.newArrayList();
46 }
47
48 public void addDynamicConfigFile(DynamicConfigFile dynamicConfigFile) {
49 dynamicConfigFiles.add(dynamicConfigFile);
50 }
51
52 public List<DynamicConfigFile> getDynamicConfigFiles() {
53 return dynamicConfigFiles;
54 }
55
56 public void addOuputDirAndExpressions(OutputDir outputDir) {
57 outputDirs.add(outputDir);
58 }
59
60 public List<OutputDir> getOuputDirs() {
61 return outputDirs;
62 }
63
64 public void setExeDir(String exeDir) {
65 this.exeDir = exeDir;
66 }
67
68 public String getExeDir() {
69 return exeDir;
70 }
71
72 public void setShellType(String shellType) {
73 if (!Strings.isNullOrEmpty(shellType)) {
74 this.shellType = shellType;
75 }
76 }
77
78 public String getShellType() {
79 return shellType;
80 }
81
82 public void setExeCmds(List<String> exeCmds) {
83 this.exeCmds = exeCmds;
84 }
85
86 public List<String> getExeCmds() {
87 return exeCmds;
88 }
89
90 public void setPropertyAdderCustomArgs(Object[] args) {
91 propertyAdderCustomArgs = args;
92 }
93
94 public Object[] getPropertyAdderCustomArgs() {
95 return propertyAdderCustomArgs != null ? propertyAdderCustomArgs
96 : new Object[0];
97 }
98
99 public void setFileStagingInfo(FileStagingInfo fileStagingInfo) {
100 this.fileStagingInfo = fileStagingInfo;
101 }
102
103 public FileStagingInfo getFileStagingInfo() {
104 return fileStagingInfo;
105 }
106 }