1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.sys.batch;
17
18 import java.util.Date;
19
20 import org.apache.commons.lang.StringUtils;
21 import org.kuali.ole.sys.OLEConstants;
22 import org.kuali.ole.sys.batch.service.LockModuleService;
23
24
25
26
27 public class LockModuleStep extends AbstractStep{
28
29 private boolean lockModule;
30 private LockModuleService lockModuleService;
31 private String namespaceCode;
32
33 public boolean execute(String jobName, Date jobRunDate)
34 throws InterruptedException {
35 String openStr = "lock";
36 if(!lockModule) {
37 openStr = "unlock";
38 }
39 lockModuleService.lockModule(namespaceCode, lockModule);
40 return true;
41 }
42
43
44
45
46
47 public boolean isLockModule() {
48 return lockModule;
49 }
50
51
52
53
54
55 public void setLockModule(boolean lockModule) {
56 this.lockModule = lockModule;
57 }
58
59 public LockModuleService getLockModuleService() {
60 return lockModuleService;
61 }
62
63 public void setLockModuleService(LockModuleService lockModuleService) {
64 this.lockModuleService = lockModuleService;
65 }
66
67 public String getNamespaceCode() {
68 return namespaceCode;
69 }
70
71 public void setNamespaceCode(String namespaceCode) {
72 this.namespaceCode = namespaceCode;
73 }
74
75 }