Search in sources :

Example 1 with BusinessEventLogFinderOutDto

use of org.jaffa.modules.messaging.components.businesseventlogfinder.dto.BusinessEventLogFinderOutDto in project jaffa-framework by jaffa-projects.

the class MessageViewerTx method buildBusinessEventLogDto.

/**
 * Obtains the related business event logs.
 */
private void buildBusinessEventLogDto(MessageViewerInDto input, MessageViewerOutDto output, Message message) throws FrameworkException, ApplicationExceptions, JMSException {
    BusinessEventLogFinderInDto inputDto = new BusinessEventLogFinderInDto();
    inputDto.setMessageId(message.getStringProperty(JmsBrowser.HEADER_ORIGINAL_MESSAGE_ID) != null ? new StringCriteriaField(CriteriaField.RELATIONAL_EQUALS, message.getStringProperty(JmsBrowser.HEADER_ORIGINAL_MESSAGE_ID)) : new StringCriteriaField(CriteriaField.RELATIONAL_EQUALS, message.getJMSMessageID()));
    inputDto.setMaxRecords(new Integer(10));
    inputDto.setOrderByFields(new OrderByField[] { new OrderByField(BusinessEventLogMeta.LOGGED_ON, Boolean.FALSE) });
    BusinessEventLogFinderOutDto businessEventLogFinderOutDto = new BusinessEventLogFinderTx().find(inputDto);
    output.setBusinessEventLog(businessEventLogFinderOutDto);
}
Also used : BusinessEventLogFinderTx(org.jaffa.modules.messaging.components.businesseventlogfinder.tx.BusinessEventLogFinderTx) OrderByField(org.jaffa.components.finder.OrderByField) BusinessEventLogFinderOutDto(org.jaffa.modules.messaging.components.businesseventlogfinder.dto.BusinessEventLogFinderOutDto) BusinessEventLogFinderInDto(org.jaffa.modules.messaging.components.businesseventlogfinder.dto.BusinessEventLogFinderInDto) StringCriteriaField(org.jaffa.components.finder.StringCriteriaField)

Example 2 with BusinessEventLogFinderOutDto

use of org.jaffa.modules.messaging.components.businesseventlogfinder.dto.BusinessEventLogFinderOutDto in project jaffa-framework by jaffa-projects.

the class BusinessEventLogFinderForm method populateRows.

// .//GEN-END:_doValidate_2_be
// .//GEN-BEGIN:_populateRows_1_be
/**
 * This will populate the input GridModel with the data in the finderOutDto of the Component.
 * @param rows The GridModel object to populate.
 */
public void populateRows(GridModel rows) {
    rows.clearRows();
    BusinessEventLogFinderOutDto outputDto = (BusinessEventLogFinderOutDto) ((BusinessEventLogFinderComponent) getComponent()).getFinderOutDto();
    if (outputDto != null) {
        GridModelRow row;
        for (int i = 0; i < outputDto.getRowsCount(); i++) {
            BusinessEventLogFinderOutRowDto rowDto = outputDto.getRows(i);
            row = rows.newRow();
            row.addElement("logId", rowDto.getLogId());
            row.addElement("correlationType", rowDto.getCorrelationType());
            row.addElement("correlationKey1", rowDto.getCorrelationKey1());
            row.addElement("correlationKey2", rowDto.getCorrelationKey2());
            row.addElement("correlationKey3", rowDto.getCorrelationKey3());
            row.addElement("scheduledTaskId", rowDto.getScheduledTaskId());
            row.addElement("messageId", rowDto.getMessageId());
            row.addElement("loggedOn", rowDto.getLoggedOn());
            row.addElement("loggedBy", rowDto.getLoggedBy());
            row.addElement("processName", rowDto.getProcessName());
            row.addElement("subProcessName", rowDto.getSubProcessName());
            row.addElement("messageType", rowDto.getMessageType());
            row.addElement("messageText", rowDto.getMessageText());
            row.addElement("sourceClass", rowDto.getSourceClass());
            row.addElement("sourceMethod", rowDto.getSourceMethod());
            row.addElement("sourceLine", rowDto.getSourceLine());
            row.addElement("stackTrace", rowDto.getStackTrace());
        // .//GEN-END:_populateRows_1_be
        // Add custom code for the row //GEN-FIRST:_populateRows_1
        // .//GEN-LAST:_populateRows_1
        // .//GEN-BEGIN:_populateRows_2_be
        }
    }
}
Also used : BusinessEventLogFinderOutDto(org.jaffa.modules.messaging.components.businesseventlogfinder.dto.BusinessEventLogFinderOutDto) BusinessEventLogFinderOutRowDto(org.jaffa.modules.messaging.components.businesseventlogfinder.dto.BusinessEventLogFinderOutRowDto)

Example 3 with BusinessEventLogFinderOutDto

use of org.jaffa.modules.messaging.components.businesseventlogfinder.dto.BusinessEventLogFinderOutDto in project jaffa-framework by jaffa-projects.

the class MessageViewerForm method populateRelatedBusinessEventLog.

private void populateRelatedBusinessEventLog(GridModel rows) {
    rows.clearRows();
    MessageViewerOutDto outputDto = ((MessageViewerComponent) getComponent()).getMessageViewerOutDto();
    if (outputDto != null) {
        BusinessEventLogFinderOutDto businessEventLogOutDto = outputDto.getBusinessEventLog();
        if (businessEventLogOutDto != null) {
            GridModelRow row;
            for (int i = 0; i < businessEventLogOutDto.getRowsCount(); i++) {
                BusinessEventLogFinderOutRowDto rowDto = businessEventLogOutDto.getRows(i);
                row = rows.newRow();
                row.addElement("logId", rowDto.getLogId());
                row.addElement("messageId", rowDto.getMessageId());
                row.addElement("loggedOn", rowDto.getLoggedOn());
                row.addElement("processName", rowDto.getProcessName());
                row.addElement("subProcessName", rowDto.getSubProcessName());
                row.addElement("messageType", rowDto.getMessageType());
                row.addElement("messageText", rowDto.getMessageText());
            }
        }
    }
}
Also used : MessageViewerOutDto(org.jaffa.modules.messaging.components.messageviewer.dto.MessageViewerOutDto) BusinessEventLogFinderOutDto(org.jaffa.modules.messaging.components.businesseventlogfinder.dto.BusinessEventLogFinderOutDto) BusinessEventLogFinderOutRowDto(org.jaffa.modules.messaging.components.businesseventlogfinder.dto.BusinessEventLogFinderOutRowDto) GridModelRow(org.jaffa.presentation.portlet.widgets.model.GridModelRow)

Example 4 with BusinessEventLogFinderOutDto

use of org.jaffa.modules.messaging.components.businesseventlogfinder.dto.BusinessEventLogFinderOutDto in project jaffa-framework by jaffa-projects.

the class MessageViewerForm method getMoreRecordsExist.

/**
 * Getter for property moreRecordsExist.
 * @return Value of property moreRecordsExist.
 */
public boolean getMoreRecordsExist() {
    MessageViewerOutDto outputDto = ((MessageViewerComponent) getComponent()).getMessageViewerOutDto();
    BusinessEventLogFinderOutDto businessEventLogOutDto = outputDto.getBusinessEventLog();
    if (outputDto != null && businessEventLogOutDto != null && businessEventLogOutDto.getMoreRecordsExist() != null)
        return businessEventLogOutDto.getMoreRecordsExist().booleanValue();
    else
        return false;
}
Also used : MessageViewerOutDto(org.jaffa.modules.messaging.components.messageviewer.dto.MessageViewerOutDto) BusinessEventLogFinderOutDto(org.jaffa.modules.messaging.components.businesseventlogfinder.dto.BusinessEventLogFinderOutDto)

Example 5 with BusinessEventLogFinderOutDto

use of org.jaffa.modules.messaging.components.businesseventlogfinder.dto.BusinessEventLogFinderOutDto in project jaffa-framework by jaffa-projects.

the class BusinessEventLogFinderTx method buildDto.

// .//GEN-END:_buildCriteria_3_be
// .//GEN-BEGIN:_buildDto_1_be
private BusinessEventLogFinderOutDto buildDto(UOW uow, Collection results, BusinessEventLogFinderInDto input) throws UOWException {
    BusinessEventLogFinderOutDto output = new BusinessEventLogFinderOutDto();
    int maxRecords = input.getMaxRecords() != null ? input.getMaxRecords().intValue() : 0;
    int counter = 0;
    for (Iterator i = results.iterator(); i.hasNext(); ) {
        if (++counter > maxRecords && maxRecords > 0) {
            output.setMoreRecordsExist(Boolean.TRUE);
            break;
        }
        BusinessEventLogFinderOutRowDto row = new BusinessEventLogFinderOutRowDto();
        BusinessEventLog businessEventLog = (BusinessEventLog) i.next();
        // .//GEN-END:_buildDto_1_be
        // Add custom code before all the setters //GEN-FIRST:_buildDto_1
        // .//GEN-LAST:_buildDto_1
        // .//GEN-BEGIN:_buildDto_LogId_1_be
        row.setLogId(businessEventLog.getLogId());
        // .//GEN-END:_buildDto_LogId_1_be
        // .//GEN-BEGIN:_buildDto_CorrelationType_1_be
        row.setCorrelationType(businessEventLog.getCorrelationType());
        // .//GEN-END:_buildDto_CorrelationType_1_be
        // .//GEN-BEGIN:_buildDto_CorrelationKey1_1_be
        row.setCorrelationKey1(businessEventLog.getCorrelationKey1());
        // .//GEN-END:_buildDto_CorrelationKey1_1_be
        // .//GEN-BEGIN:_buildDto_CorrelationKey2_1_be
        row.setCorrelationKey2(businessEventLog.getCorrelationKey2());
        // .//GEN-END:_buildDto_CorrelationKey2_1_be
        // .//GEN-BEGIN:_buildDto_CorrelationKey3_1_be
        row.setCorrelationKey3(businessEventLog.getCorrelationKey3());
        // .//GEN-END:_buildDto_CorrelationKey3_1_be
        // .//GEN-BEGIN:_buildDto_ScheduledTaskId_1_be
        row.setScheduledTaskId(businessEventLog.getScheduledTaskId());
        // .//GEN-END:_buildDto_ScheduledTaskId_1_be
        // .//GEN-BEGIN:_buildDto_MessageId_1_be
        row.setMessageId(businessEventLog.getMessageId());
        // .//GEN-END:_buildDto_MessageId_1_be
        // .//GEN-BEGIN:_buildDto_LoggedOn_1_be
        row.setLoggedOn(businessEventLog.getLoggedOn());
        // .//GEN-END:_buildDto_LoggedOn_1_be
        // .//GEN-BEGIN:_buildDto_LoggedBy_1_be
        row.setLoggedBy(businessEventLog.getLoggedBy());
        // .//GEN-END:_buildDto_LoggedBy_1_be
        // .//GEN-BEGIN:_buildDto_ProcessName_1_be
        row.setProcessName(businessEventLog.getProcessName());
        // .//GEN-END:_buildDto_ProcessName_1_be
        // .//GEN-BEGIN:_buildDto_SubProcessName_1_be
        row.setSubProcessName(businessEventLog.getSubProcessName());
        // .//GEN-END:_buildDto_SubProcessName_1_be
        // .//GEN-BEGIN:_buildDto_MessageType_1_be
        row.setMessageType(businessEventLog.getMessageType());
        // .//GEN-END:_buildDto_MessageType_1_be
        // .//GEN-BEGIN:_buildDto_MessageText_1_be
        row.setMessageText(businessEventLog.getMessageText());
        // .//GEN-END:_buildDto_MessageText_1_be
        // .//GEN-BEGIN:_buildDto_SourceClass_1_be
        row.setSourceClass(businessEventLog.getSourceClass());
        // .//GEN-END:_buildDto_SourceClass_1_be
        // .//GEN-BEGIN:_buildDto_SourceMethod_1_be
        row.setSourceMethod(businessEventLog.getSourceMethod());
        // .//GEN-END:_buildDto_SourceMethod_1_be
        // .//GEN-BEGIN:_buildDto_SourceLine_1_be
        row.setSourceLine(businessEventLog.getSourceLine());
        // .//GEN-END:_buildDto_SourceLine_1_be
        // .//GEN-BEGIN:_buildDto_StackTrace_1_be
        row.setStackTrace(businessEventLog.getStackTrace());
        // .//GEN-END:_buildDto_StackTrace_1_be
        // Add custom code to pass values to the dto //GEN-FIRST:_buildDto_2
        // .//GEN-LAST:_buildDto_2
        // .//GEN-BEGIN:_buildDto_3_be
        output.addRows(row);
    }
    return output;
}
Also used : BusinessEventLog(org.jaffa.modules.messaging.domain.BusinessEventLog) BusinessEventLogFinderOutDto(org.jaffa.modules.messaging.components.businesseventlogfinder.dto.BusinessEventLogFinderOutDto) BusinessEventLogFinderOutRowDto(org.jaffa.modules.messaging.components.businesseventlogfinder.dto.BusinessEventLogFinderOutRowDto)

Aggregations

BusinessEventLogFinderOutDto (org.jaffa.modules.messaging.components.businesseventlogfinder.dto.BusinessEventLogFinderOutDto)7 BusinessEventLogFinderOutRowDto (org.jaffa.modules.messaging.components.businesseventlogfinder.dto.BusinessEventLogFinderOutRowDto)4 MessageViewerOutDto (org.jaffa.modules.messaging.components.messageviewer.dto.MessageViewerOutDto)2 GridModelRow (org.jaffa.presentation.portlet.widgets.model.GridModelRow)2 OrderByField (org.jaffa.components.finder.OrderByField)1 StringCriteriaField (org.jaffa.components.finder.StringCriteriaField)1 BusinessEventLogFinderInDto (org.jaffa.modules.messaging.components.businesseventlogfinder.dto.BusinessEventLogFinderInDto)1 BusinessEventLogFinderTx (org.jaffa.modules.messaging.components.businesseventlogfinder.tx.BusinessEventLogFinderTx)1 BusinessEventLog (org.jaffa.modules.messaging.domain.BusinessEventLog)1 AtomicCriteria (org.jaffa.persistence.AtomicCriteria)1 Criteria (org.jaffa.persistence.Criteria)1 UOW (org.jaffa.persistence.UOW)1