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.kuali.common.util.service.DefaultSpringService;
19 import org.kuali.common.util.service.SpringContext;
20 import org.kuali.common.util.service.SpringService;
21 import org.slf4j.Logger;
22 import org.slf4j.LoggerFactory;
23
24 public class SpringContextLoaderExecutable implements Executable {
25
26 private static final Logger logger = LoggerFactory.getLogger(SpringContextLoaderExecutable.class);
27
28 SpringService service = new DefaultSpringService();
29 SpringContext context;
30 boolean skip;
31
32 @Override
33 public void execute() {
34 if (skip) {
35 logger.info("Skipping execution");
36 } else {
37 service.load(context);
38 }
39 }
40
41 public SpringService getService() {
42 return service;
43 }
44
45 public void setService(SpringService service) {
46 this.service = service;
47 }
48
49 public SpringContext getContext() {
50 return context;
51 }
52
53 public void setContext(SpringContext context) {
54 this.context = context;
55 }
56
57 public boolean isSkip() {
58 return skip;
59 }
60
61 public void setSkip(boolean skip) {
62 this.skip = skip;
63 }
64 }