/** * When an object implementing interface <code>Runnable</code> is used to create a thread, starting the thread causes * the object's <code>run</code> method to be called in that separately executing thread. * <p/> * The general contract of the method <code>run</code> is that it may take any action whatsoever. * * @see Thread#run() */ public void run() { try { targetFile = KettleVFS.getFileObject( targetPath ); if ( targetFile.exists() ) { if ( !targetFile.delete() ) { throw new ReportProcessingException( messages.getErrorString( "ReportExportTask.ERROR_0001_TARGET_EXISTS" ) ); //$NON-NLS-1$ } } if ( createParentFolder ) { targetFile.getParent().createFolder(); } execute(); } catch ( Exception ex ) { statusListener.setStatus( StatusType.ERROR, messages.getString( "ReportExportTask.USER_EXPORT_FAILED" ), ex ); //$NON-NLS-1$ logger.error( "Failed" ); //$NON-NLS-1$ } }
public void summaryRow( final DefaultOutputFunction outputFunction, final ReportEvent event ) throws ReportProcessingException { throw new ReportProcessingException( "A crosstab-other-group cannot contain a summary band. Never." ); } }
public void summaryRow( final DefaultOutputFunction outputFunction, final ReportEvent event ) throws ReportProcessingException { throw new ReportProcessingException( "A crosstab-group cannot contain a summary band. Never." ); } }
private CrosstabRowGroup findLastRowGroup() throws ReportProcessingException { for ( int i = groups.length - 1; i >= 0; i -= 1 ) { final Group group = groups[i]; if ( group instanceof CrosstabRowGroup ) { return (CrosstabRowGroup) group; } } // This is a hard error. No point in waiting to fail here. throw new ReportProcessingException( "Trying to find a crosstab-row, but there is none." ); }
public void summaryRowEnd( final DefaultOutputFunction outputFunction, final ReportEvent event ) throws ReportProcessingException { throw new ReportProcessingException( "Crosstab-column groups handler cannot contain summary-rows" ); }
public void summaryRowEnd( final DefaultOutputFunction outputFunction, final ReportEvent event ) throws ReportProcessingException { throw new ReportProcessingException( "A crosstab-group cannot contain a summary band. Never." ); }
public void summaryRow( final DefaultOutputFunction outputFunction, final ReportEvent event ) throws ReportProcessingException { throw new ReportProcessingException( "Crosstab-column groups handler cannot contain summary-rows" ); } }
public void summaryRowEnd( final DefaultOutputFunction outputFunction, final ReportEvent event ) throws ReportProcessingException { throw new ReportProcessingException( "A crosstab-other-group cannot contain a summary band. Never." ); }
public void itemsStarted( final DefaultOutputFunction outputFunction, final ReportEvent event ) throws ReportProcessingException { throw new ReportProcessingException( "A crosstab-row cannot contain a detail band. Never." ); }
public void summaryRowStart( final DefaultOutputFunction outputFunction, final ReportEvent event ) throws ReportProcessingException { throw new ReportProcessingException( "A crosstab-group cannot contain a summary band. Never." ); }
public void itemsFinished( final DefaultOutputFunction outputFunction, final ReportEvent event ) throws ReportProcessingException { throw new ReportProcessingException( "A crosstab-row cannot contain a detail band. Never." ); }
public void itemsFinished( final DefaultOutputFunction outputFunction, final ReportEvent event ) throws ReportProcessingException { throw new ReportProcessingException( "A crosstab-other-group cannot contain a detail band. Never." ); }
public void summaryRowStart( final DefaultOutputFunction outputFunction, final ReportEvent event ) throws ReportProcessingException { throw new ReportProcessingException( "Crosstab-column groups handler cannot contain summary-rows" ); }
public void itemsAdvanced( final DefaultOutputFunction outputFunction, final ReportEvent event ) throws ReportProcessingException { throw new ReportProcessingException( "A crosstab-group cannot contain a detail band. Never." ); }
public void itemsStarted( final DefaultOutputFunction outputFunction, final ReportEvent event ) throws ReportProcessingException { throw new ReportProcessingException( "A crosstab-other-group cannot contain a detail band. Never." ); }
public void finishReport() throws ReportProcessingException { try { this.htmlPrinter.close(); } catch ( IOException e ) { throw new ReportProcessingException( "Failed to close report", e ); } catch ( ContentIOException e ) { throw new ReportProcessingException( "Failed to close report", e ); } }
public void finishReport() throws ReportProcessingException { try { this.excelPrinter.closeWorkbook( outputStream ); } catch ( IOException e ) { throw new ReportProcessingException( "Failed to close report", e ); } }
public StreamReportProcessor( final MasterReport report, final OutputProcessor outputProcessor ) throws ReportProcessingException { super( report, outputProcessor ); if ( outputProcessor.getMetaData().isFeatureSupported( OutputProcessorFeature.PAGEBREAKS ) ) { throw new ReportProcessingException( "Streaming report processors cannot be used in conjunction with pageable-outputs" ); } }
private CrosstabRowGroup findRowGroup( final String field ) throws ReportProcessingException { for ( int i = 0; i < groups.length; i++ ) { final Group group = groups[i]; if ( group instanceof CrosstabRowGroup ) { final CrosstabRowGroup rowGroup = (CrosstabRowGroup) group; if ( ObjectUtilities.equal( rowGroup.getField(), field ) ) { return rowGroup; } } } // This is a hard error. No point in waiting to fail here. throw new ReportProcessingException( "Trying to find a crosstab-row for field '" + field + "', but there is none." ); }
private CrosstabSpecification findCrosstabSpecification( final ProcessState next ) throws ReportProcessingException { final StructureFunction[] functions = next.getLayoutProcess().getCollectionFunctions(); for ( int i = 0; i < functions.length; i++ ) { final StructureFunction function = functions[i]; if ( function instanceof CrosstabProcessorFunction ) { final CrosstabSpecification cs = (CrosstabSpecification) function.getValue(); if ( cs == null ) { return new DummyCrosstabSpecification( next.getProcessKey() ); } return cs; } } throw new ReportProcessingException( "Failed to locate crosstab-spec, cannot continue." ); }