1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
package org.kuali.rice.ksb.messaging.web; |
18 | |
|
19 | |
import java.sql.Timestamp; |
20 | |
import java.util.ArrayList; |
21 | |
import java.util.Collection; |
22 | |
import java.util.List; |
23 | |
|
24 | |
import org.apache.commons.beanutils.ConvertUtils; |
25 | |
import org.apache.struts.action.ActionForm; |
26 | |
import org.kuali.rice.core.util.KeyValue; |
27 | |
import org.kuali.rice.core.util.SqlTimestampConverter; |
28 | |
import org.kuali.rice.ksb.messaging.PersistedMessageBO; |
29 | |
import org.kuali.rice.ksb.util.CodeTranslator; |
30 | |
|
31 | |
|
32 | |
|
33 | |
|
34 | |
|
35 | |
|
36 | |
|
37 | |
public class MessageQueueForm extends ActionForm { |
38 | |
|
39 | |
private static final long serialVersionUID = -247925603792980036L; |
40 | |
public static final int DEFAULT_MAX_ROWS = 1000; |
41 | |
public static final int DEFAULT_PAGE_SIZE = 100; |
42 | |
|
43 | 0 | private int maxRows = DEFAULT_MAX_ROWS; |
44 | 0 | private int pageSize = DEFAULT_PAGE_SIZE; |
45 | |
private Long messageId; |
46 | 0 | private String methodToCall = ""; |
47 | |
private Collection<PersistedMessageBO> messageQueueRows; |
48 | |
private String showEdit; |
49 | |
private String command; |
50 | |
private PersistedMessageBO messageQueueFromDatabase; |
51 | |
private PersistedMessageBO messageQueueFromForm; |
52 | |
private String newQueueDate; |
53 | |
private String existingQueueDate; |
54 | |
private String ipAddress; |
55 | |
|
56 | |
|
57 | |
private String routeQueueIdFilter; |
58 | |
private String serviceNameFilter; |
59 | |
private String applicationIdFilter; |
60 | |
private String queueStatusFilter; |
61 | |
private String ipNumberFilter; |
62 | |
private String value1Filter; |
63 | |
private String value2Filter; |
64 | |
private String filterApplied; |
65 | |
|
66 | 0 | private Integer maxMessageFetcherMessages = Integer.valueOf(50); |
67 | |
|
68 | |
private String myIpAddress; |
69 | |
private String myApplicationId; |
70 | |
private String messagePersistence; |
71 | |
private String messageDelivery; |
72 | |
private String messageOff; |
73 | 0 | private List<KeyValue> ipAddresses = new ArrayList<KeyValue>(); |
74 | |
|
75 | |
static { |
76 | 0 | ConvertUtils.register(new SqlTimestampConverter(), Timestamp.class); |
77 | 0 | } |
78 | |
|
79 | 0 | public MessageQueueForm() { |
80 | 0 | messageQueueFromForm = new PersistedMessageBO(); |
81 | 0 | maxRows = DEFAULT_MAX_ROWS; |
82 | 0 | pageSize = DEFAULT_PAGE_SIZE; |
83 | 0 | } |
84 | |
|
85 | |
public String getRouteQueueStatusLabel(String statusCode) { |
86 | 0 | return CodeTranslator.getRouteQueueStatusLabel(statusCode); |
87 | |
} |
88 | |
|
89 | |
public String getMethodToCall() { |
90 | 0 | return methodToCall; |
91 | |
} |
92 | |
|
93 | |
public void setMethodToCall(String methodToCall) { |
94 | 0 | this.methodToCall = methodToCall; |
95 | 0 | } |
96 | |
|
97 | |
public Long getMessageId() { |
98 | 0 | return messageId; |
99 | |
} |
100 | |
|
101 | |
public void setMessageId(Long routeQueueId) { |
102 | 0 | this.messageId = routeQueueId; |
103 | 0 | } |
104 | |
|
105 | |
public Collection<PersistedMessageBO> getMessageQueueRows() { |
106 | 0 | return messageQueueRows; |
107 | |
} |
108 | |
|
109 | |
public void setMessageQueueRows(Collection<PersistedMessageBO> routeQueueRows) { |
110 | 0 | this.messageQueueRows = routeQueueRows; |
111 | 0 | } |
112 | |
|
113 | |
public int getMessageQueueRowsSize() { |
114 | 0 | if (messageQueueRows == null) { |
115 | 0 | return 0; |
116 | |
} |
117 | 0 | return messageQueueRows.size(); |
118 | |
} |
119 | |
|
120 | |
public String getCommand() { |
121 | 0 | return command; |
122 | |
} |
123 | |
|
124 | |
public void setCommand(String command) { |
125 | 0 | this.command = command; |
126 | 0 | } |
127 | |
|
128 | |
public PersistedMessageBO getMessageQueueFromDatabase() { |
129 | 0 | return messageQueueFromDatabase; |
130 | |
} |
131 | |
|
132 | |
public void setMessageQueueFromDatabase(PersistedMessageBO existingRouteQueue) { |
133 | 0 | this.messageQueueFromDatabase = existingRouteQueue; |
134 | 0 | } |
135 | |
|
136 | |
public PersistedMessageBO getMessageQueueFromForm() { |
137 | 0 | return messageQueueFromForm; |
138 | |
} |
139 | |
|
140 | |
public void setMessageQueueFromForm(PersistedMessageBO routeQueue) { |
141 | 0 | this.messageQueueFromForm = routeQueue; |
142 | 0 | } |
143 | |
|
144 | |
public String getShowEdit() { |
145 | 0 | return showEdit; |
146 | |
} |
147 | |
|
148 | |
public void setShowEdit(String showEdit) { |
149 | 0 | this.showEdit = showEdit; |
150 | 0 | } |
151 | |
|
152 | |
public String getExistingQueueDate() { |
153 | 0 | return existingQueueDate; |
154 | |
} |
155 | |
|
156 | |
public void setExistingQueueDate(String existingQueueDate) { |
157 | 0 | this.existingQueueDate = existingQueueDate; |
158 | 0 | } |
159 | |
|
160 | |
public String getNewQueueDate() { |
161 | 0 | return newQueueDate; |
162 | |
} |
163 | |
|
164 | |
public void setNewQueueDate(String newQueueDate) { |
165 | 0 | this.newQueueDate = newQueueDate; |
166 | 0 | } |
167 | |
|
168 | |
public int getMaxRows() { |
169 | 0 | return maxRows; |
170 | |
} |
171 | |
|
172 | |
public void setMaxRows(int maxRows) { |
173 | 0 | this.maxRows = maxRows; |
174 | 0 | } |
175 | |
|
176 | |
public int getPageSize() { |
177 | 0 | return this.pageSize; |
178 | |
} |
179 | |
|
180 | |
public void setPageSize(int pageSize) { |
181 | 0 | this.pageSize = pageSize; |
182 | 0 | } |
183 | |
|
184 | |
|
185 | |
|
186 | |
|
187 | |
public String getIpNumberFilter() { |
188 | 0 | return ipNumberFilter; |
189 | |
} |
190 | |
|
191 | |
|
192 | |
|
193 | |
|
194 | |
public void setIpNumberFilter(String ipNumberFilter) { |
195 | 0 | this.ipNumberFilter = ipNumberFilter; |
196 | 0 | } |
197 | |
|
198 | |
|
199 | |
|
200 | |
|
201 | |
public String getApplicationIdFilter() { |
202 | 0 | return applicationIdFilter; |
203 | |
} |
204 | |
|
205 | |
|
206 | |
|
207 | |
|
208 | |
public void setApplicationIdFilter(String applicationIdFilter) { |
209 | 0 | this.applicationIdFilter = applicationIdFilter; |
210 | 0 | } |
211 | |
|
212 | |
|
213 | |
|
214 | |
|
215 | |
public String getQueueStatusFilter() { |
216 | 0 | return queueStatusFilter; |
217 | |
} |
218 | |
|
219 | |
|
220 | |
|
221 | |
|
222 | |
public void setQueueStatusFilter(String queueStatusFilter) { |
223 | 0 | this.queueStatusFilter = queueStatusFilter; |
224 | 0 | } |
225 | |
|
226 | |
|
227 | |
|
228 | |
|
229 | |
public String getServiceNameFilter() { |
230 | 0 | return serviceNameFilter; |
231 | |
} |
232 | |
|
233 | |
|
234 | |
|
235 | |
|
236 | |
public void setServiceNameFilter(String serviceNameFilter) { |
237 | 0 | this.serviceNameFilter = serviceNameFilter; |
238 | 0 | } |
239 | |
|
240 | |
|
241 | |
|
242 | |
|
243 | |
public String getFilterApplied() { |
244 | 0 | return filterApplied; |
245 | |
} |
246 | |
|
247 | |
|
248 | |
|
249 | |
|
250 | |
public void setFilterApplied(String filterApplied) { |
251 | 0 | this.filterApplied = filterApplied; |
252 | 0 | } |
253 | |
|
254 | |
public String getRouteQueueIdFilter() { |
255 | 0 | return this.routeQueueIdFilter; |
256 | |
} |
257 | |
|
258 | |
public void setRouteQueueIdFilter(String messageIdFilter) { |
259 | 0 | this.routeQueueIdFilter = messageIdFilter; |
260 | 0 | } |
261 | |
|
262 | |
public String getValue1Filter() { |
263 | 0 | return this.value1Filter; |
264 | |
} |
265 | |
|
266 | |
public void setValue1Filter(String value1Filter) { |
267 | 0 | this.value1Filter = value1Filter; |
268 | 0 | } |
269 | |
|
270 | |
public String getValue2Filter() { |
271 | 0 | return this.value2Filter; |
272 | |
} |
273 | |
|
274 | |
public void setValue2Filter(String value2Filter) { |
275 | 0 | this.value2Filter = value2Filter; |
276 | 0 | } |
277 | |
|
278 | |
public List<KeyValue> getIpAddresses() { |
279 | 0 | return this.ipAddresses; |
280 | |
} |
281 | |
|
282 | |
public void setIpAddresses(List<KeyValue> ipAddresses) { |
283 | 0 | this.ipAddresses = ipAddresses; |
284 | 0 | } |
285 | |
|
286 | |
public String getIpAddress() { |
287 | 0 | return this.ipAddress; |
288 | |
} |
289 | |
|
290 | |
public void setIpAddress(String ipAddress) { |
291 | 0 | this.ipAddress = ipAddress; |
292 | 0 | } |
293 | |
|
294 | |
public Integer getMaxMessageFetcherMessages() { |
295 | 0 | return this.maxMessageFetcherMessages; |
296 | |
} |
297 | |
|
298 | |
public void setMaxMessageFetcherMessages(Integer maxMessageFetcherMessages) { |
299 | 0 | this.maxMessageFetcherMessages = maxMessageFetcherMessages; |
300 | 0 | } |
301 | |
|
302 | |
public String getMyIpAddress() { |
303 | 0 | return this.myIpAddress; |
304 | |
} |
305 | |
|
306 | |
public void setMyIpAddress(String myIpAddress) { |
307 | 0 | this.myIpAddress = myIpAddress; |
308 | 0 | } |
309 | |
|
310 | |
public String getMyApplicationId() { |
311 | 0 | return this.myApplicationId; |
312 | |
} |
313 | |
|
314 | |
public void setMyApplicationId(String myApplicationId) { |
315 | 0 | this.myApplicationId = myApplicationId; |
316 | 0 | } |
317 | |
|
318 | |
public String getMessageDelivery() { |
319 | 0 | return this.messageDelivery; |
320 | |
} |
321 | |
|
322 | |
public void setMessageDelivery(String messageDelivery) { |
323 | 0 | this.messageDelivery = messageDelivery; |
324 | 0 | } |
325 | |
|
326 | |
public String getMessageOff() { |
327 | 0 | return this.messageOff; |
328 | |
} |
329 | |
|
330 | |
public void setMessageOff(String messageOff) { |
331 | 0 | this.messageOff = messageOff; |
332 | 0 | } |
333 | |
|
334 | |
public String getMessagePersistence() { |
335 | 0 | return this.messagePersistence; |
336 | |
} |
337 | |
|
338 | |
public void setMessagePersistence(String messagePersistence) { |
339 | 0 | this.messagePersistence = messagePersistence; |
340 | 0 | } |
341 | |
|
342 | |
|
343 | |
} |