1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 package info.magnolia.ui.api.action;
35
36 import info.magnolia.annotation.deprecation.MgnlDeprecated;
37 import info.magnolia.commands.CommandsManager;
38
39 import java.util.HashMap;
40 import java.util.Map;
41
42 import org.apache.commons.lang3.builder.ToStringBuilder;
43
44
45
46
47 public class CommandActionDefinition extends ConfiguredActionDefinition {
48
49 private String command;
50 private String catalog = CommandsManager.DEFAULT_CATALOG;
51 private boolean asynchronous = false;
52 private int delay = 1;
53 private boolean isParallel = true;
54 private int timeToWait = 5000;
55 private boolean notifyUser = true;
56 private boolean alwaysShowSuccessMessage = false;
57
58 private Map<String, Object> params = new HashMap<String, Object>();
59
60 public String getCommand() {
61 return command;
62 }
63
64 public void setCommand(String command) {
65 this.command = command;
66 }
67
68
69
70
71 public String getCatalog() {
72 return catalog;
73 }
74
75 public void setCatalog(String catalog) {
76 this.catalog = catalog;
77 }
78
79 public void setParams(Map<String, Object> params) {
80 this.params = params;
81 }
82
83 public Map<String, Object> getParams() {
84 return params;
85 }
86
87 @Override
88 public String toString() {
89 return ToStringBuilder.reflectionToString(this);
90 }
91
92
93
94
95 public boolean isAsynchronous() {
96 return asynchronous;
97 }
98
99 public void setAsynchronous(boolean asynchronous) {
100 this.asynchronous = asynchronous;
101 }
102
103
104
105
106
107
108 public int getDelay() {
109 return delay;
110 }
111
112 public void setDelay(int delay) {
113 this.delay = delay;
114 }
115
116
117
118
119
120
121
122 @Deprecated
123 public boolean isParallel() {
124 return isParallel;
125 }
126
127
128
129
130 @MgnlDeprecated(since = "6.2", description = "This property is not supported in new framework. Any action can be executed in parallel. Use scheduler module instead to run non parallel jobs.")
131 @Deprecated
132 public void setParallel(boolean isParallel) {
133 this.isParallel = isParallel;
134 }
135
136
137
138
139
140
141 public int getTimeToWait() {
142 return timeToWait;
143 }
144
145 public void setTimeToWait(int timeToWait) {
146 this.timeToWait = timeToWait;
147 }
148
149
150
151
152
153
154 public boolean isNotifyUser() {
155 return notifyUser;
156 }
157
158 public void setNotifyUser(boolean notifyUser) {
159 this.notifyUser = notifyUser;
160 }
161
162
163
164
165 public boolean isAlwaysShowSuccessMessage() {
166 return alwaysShowSuccessMessage;
167 }
168
169 public void setAlwaysShowSuccessMessage(boolean alwaysShowSuccessMessage) {
170 this.alwaysShowSuccessMessage = alwaysShowSuccessMessage;
171 }
172 }