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
Modifier and TypeFieldDescriptionprotected final UiReportRunContext
protected Downloader
protected final String
protected final Collection<?>
protected ReportRunner
protected ReportZipUtils
protected final Report
-
Constructor Summary
ConstructorDescriptionRunMultipleReportsBackgroundTask
(UiReportRunContext context, long timeout, View<?> view, Report targetReport, String multiParamAlias, Collection<?> multiParamValue) -
Method Summary
Modifier and TypeMethodDescriptionvoid
done
(List<ReportOutputDocument> result) Called by the execution environment in UI thread when the task is completed.protected void
downloadZipArchive
(List<ReportOutputDocument> outputDocuments) protected List<ReportOutputDocument>
multiRunSync
(UiReportRunContext uiReportRunContext, String multiParamName, Collection<?> multiParamValues) run
(TaskLifeCycle<Integer> taskLifeCycle) Main method that performs a task.void
setDownloader
(Downloader downloader) void
setReportRunner
(ReportRunner reportRunner) void
setReportZipUtils
(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:BackgroundTask
Main 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:
run
in 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:BackgroundTask
Called by the execution environment in UI thread when the task is completed.- Overrides:
done
in 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)
-