use of org.jaffa.modules.messaging.components.queueviewer.ui.QueueViewerComponent in project jaffa-framework by jaffa-projects.
the class QueueListComponent method viewMessages.
public FormKey viewMessages(String queue, MessageModeEnum messageMode) throws ApplicationExceptions, FrameworkException {
QueueViewerComponent viewComponent = (QueueViewerComponent) run("Jaffa.Messaging.QueueViewer");
viewComponent.setReturnToFormKey(getResultsFormKey());
viewComponent.setQueue(queue);
viewComponent.setMessageMode(messageMode);
viewComponent.addQueueViewerListener(new IQueueViewerListener() {
public void processDone(EventObject source) throws ApplicationExceptions, FrameworkException {
displayResults();
}
});
return viewComponent.display();
}
use of org.jaffa.modules.messaging.components.queueviewer.ui.QueueViewerComponent in project jaffa-framework by jaffa-projects.
the class TaskFinderComponent method viewFailedTasks.
/**
* Calls the Jaffa.Messaging.QueueViewer component for viewing the failed tasks.
* @throws ApplicationExceptions This will be thrown in case any invalid data has been set.
* @throws FrameworkException Indicates some system error.
* @return The FormKey for the QueueViewer screen.
*/
public FormKey viewFailedTasks(String scheduledTaskId, Object businessObject) throws ApplicationExceptions, FrameworkException {
// Create a filter with the input scheduledTaskId
String filter = new StringBuilder(JmsBrowser.HEADER_SCHEDULED_TASK_ID).append('=').append('\'').append(scheduledTaskId).append('\'').toString();
// Figure out the appropriate queueName based on the businessObject, so that the QueueViewer displays the relevant columns
String queueName = null;
if (businessObject != null) {
try {
MessageInfo messageInfo = ConfigurationService.getInstance().getMessageInfo(businessObject.getClass().getName());
if (messageInfo != null)
queueName = messageInfo.getQueueName();
} catch (ClassNotFoundException e) {
// do nothing
}
}
// Instantiate the QueueViewer
QueueViewerComponent viewComponent = (QueueViewerComponent) run("Jaffa.Messaging.QueueViewer");
viewComponent.setFilter(filter);
if (queueName != null) {
viewComponent.setQueue(queueName);
viewComponent.setMessageMode(MessageModeEnum.ERROR);
}
viewComponent.setReturnToFormKey(FormKey.getCloseBrowserFormKey());
return viewComponent.display();
}
Aggregations