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 org.slf4j.Logger;
19 import org.slf4j.LoggerFactory;
20 import org.springframework.util.Assert;
21
22
23
24
25 public class ExecutableExecutable implements Executable {
26
27 private static final Logger logger = LoggerFactory.getLogger(ExecutableExecutable.class);
28
29 Executable executable;
30 boolean skip;
31
32 @Override
33 public void execute() {
34 if (skip) {
35 logger.info("Skipping execution - {}", executable.getClass());
36 return;
37 }
38 Assert.notNull(executable);
39 executable.execute();
40 }
41
42 public Executable getExecutable() {
43 return executable;
44 }
45
46 public void setExecutable(Executable executable) {
47 this.executable = executable;
48 }
49
50 public boolean isSkip() {
51 return skip;
52 }
53
54 public void setSkip(boolean skip) {
55 this.skip = skip;
56 }
57 }