Search in sources :

Example 1 with PrinterOutputTypeViewerInDto

use of org.jaffa.modules.printing.components.printeroutputtypeviewer.dto.PrinterOutputTypeViewerInDto in project jaffa-framework by jaffa-projects.

the class PrinterOutputTypeViewerComponent method doInquiry.

// .//GEN-END:_display_2_be
// .//GEN-BEGIN:_inquiry_1_be
private void doInquiry() throws ApplicationExceptions, FrameworkException {
    PrinterOutputTypeViewerInDto inputDto = new PrinterOutputTypeViewerInDto();
    // .//GEN-END:_inquiry_1_be
    // Add custom code before building the input dto //GEN-FIRST:_inquiry_1
    // .//GEN-LAST:_inquiry_1
    // .//GEN-BEGIN:_inquiry_2_be
    inputDto.setOutputType(m_outputType);
    inputDto.setHeaderDto(createHeaderDto());
    // create the Tx
    if (m_tx == null)
        m_tx = (IPrinterOutputTypeViewer) Factory.createObject(IPrinterOutputTypeViewer.class);
    // .//GEN-END:_inquiry_2_be
    // Add custom code before invoking the Tx //GEN-FIRST:_inquiry_2
    // .//GEN-LAST:_inquiry_2
    // .//GEN-BEGIN:_inquiry_3_be
    // now get the details
    m_outputDto = m_tx.read(inputDto);
    // uncache the widgets
    getUserSession().getWidgetCache(getComponentId()).clear();
    // throw an exception if the output is null
    if (m_outputDto == null) {
        ApplicationExceptions appExps = new ApplicationExceptions();
        appExps.add(new DomainObjectNotFoundException(PrinterOutputTypeMeta.getLabelToken()));
        throw appExps;
    }
}
Also used : IPrinterOutputTypeViewer(org.jaffa.modules.printing.components.printeroutputtypeviewer.IPrinterOutputTypeViewer) PrinterOutputTypeViewerInDto(org.jaffa.modules.printing.components.printeroutputtypeviewer.dto.PrinterOutputTypeViewerInDto) ApplicationExceptions(org.jaffa.exceptions.ApplicationExceptions) DomainObjectNotFoundException(org.jaffa.exceptions.DomainObjectNotFoundException)

Aggregations

ApplicationExceptions (org.jaffa.exceptions.ApplicationExceptions)1 DomainObjectNotFoundException (org.jaffa.exceptions.DomainObjectNotFoundException)1 IPrinterOutputTypeViewer (org.jaffa.modules.printing.components.printeroutputtypeviewer.IPrinterOutputTypeViewer)1 PrinterOutputTypeViewerInDto (org.jaffa.modules.printing.components.printeroutputtypeviewer.dto.PrinterOutputTypeViewerInDto)1