1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.common.util.execute;
17
18 import java.util.List;
19
20 import org.kuali.common.util.CollectionUtils;
21 import org.slf4j.Logger;
22 import org.slf4j.LoggerFactory;
23
24
25
26
27 public class ExecutablesExecutable implements Executable {
28
29 private static final Logger logger = LoggerFactory.getLogger(ExecutablesExecutable.class);
30
31 List<Executable> executables;
32 boolean skip;
33
34 @Override
35 public void execute() {
36 if (skip) {
37 logger.info("Skipping execution of {} executables", CollectionUtils.toEmptyList(executables).size());
38 return;
39 }
40 for (Executable executable : executables) {
41 executable.execute();
42 }
43 }
44
45 public List<Executable> getExecutables() {
46 return executables;
47 }
48
49 public void setExecutables(List<Executable> executables) {
50 this.executables = executables;
51 }
52
53 public boolean isSkip() {
54 return skip;
55 }
56
57 public void setSkip(boolean skip) {
58 this.skip = skip;
59 }
60
61 }