Class RunMultipleReportsBackgroundTask
java.lang.Object
io.jmix.flowui.backgroundtask.BackgroundTask<Integer,List<ReportOutputDocument>>
io.jmix.reportsflowui.runner.impl.RunMultipleReportsBackgroundTask
public class RunMultipleReportsBackgroundTask
extends BackgroundTask<Integer,List<ReportOutputDocument>>
-
Nested Class Summary
Nested classes/interfaces inherited from class io.jmix.flowui.backgroundtask.BackgroundTask
BackgroundTask.ProgressListener<T,V>, BackgroundTask.ProgressListenerAdapter<T, V> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final UiReportRunContextprotected Downloaderprotected final Stringprotected final Collection<?>protected ReportRunnerprotected ReportZipUtilsprotected final Report -
Constructor Summary
ConstructorsConstructorDescriptionRunMultipleReportsBackgroundTask(UiReportRunContext context, long timeout, View<?> view, Report targetReport, String multiParamAlias, Collection<?> multiParamValue) -
Method Summary
Modifier and TypeMethodDescriptionvoiddone(List<ReportOutputDocument> result) Called by the execution environment in UI thread when the task is completed.protected voiddownloadZipArchive(List<ReportOutputDocument> outputDocuments) protected List<ReportOutputDocument>multiRunSync(UiReportRunContext uiReportRunContext, String multiParamName, Collection<?> multiParamValues) run(TaskLifeCycle<Integer> taskLifeCycle) Main method that performs a task.voidsetDownloader(Downloader downloader) voidsetReportRunner(ReportRunner reportRunner) voidsetReportZipUtils(ReportZipUtils reportZipUtils) Methods inherited from class io.jmix.flowui.backgroundtask.BackgroundTask
addProgressListener, canceled, getOwnerView, getParams, getProgressListeners, getTimeoutMilliseconds, getTimeoutSeconds, handleException, handleTimeoutException, progress, removeProgressListener
-
Field Details
-
reportRunner
-
reportZipUtils
-
downloader
-
context
-
targetReport
-
multiParamAlias
-
multiParamValue
-
-
Constructor Details
-
RunMultipleReportsBackgroundTask
public RunMultipleReportsBackgroundTask(UiReportRunContext context, long timeout, View<?> view, Report targetReport, String multiParamAlias, Collection<?> multiParamValue)
-
-
Method Details
-
setReportZipUtils
-
setDownloader
-
setReportRunner
-
run
Description copied from class:BackgroundTaskMain method that performs a task.
Called by the execution environment in a separate working thread.
Implementation of this method should support interruption:- In long loops check
TaskLifeCycle.isInterrupted()and return if it is true - Don't swallow
InterruptedException- return from the method or don't catch it at all
- Specified by:
runin classBackgroundTask<Integer,List<ReportOutputDocument>> - Parameters:
taskLifeCycle- lifecycle object that allows the main method to interact with the execution environment- Returns:
- task result
- In long loops check
-
done
Description copied from class:BackgroundTaskCalled by the execution environment in UI thread when the task is completed.- Overrides:
donein classBackgroundTask<Integer,List<ReportOutputDocument>> - Parameters:
result- result of execution returned byBackgroundTask.run(TaskLifeCycle)method
-
downloadZipArchive
-
multiRunSync
protected List<ReportOutputDocument> multiRunSync(UiReportRunContext uiReportRunContext, String multiParamName, Collection<?> multiParamValues)
-