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