public interface MorpheusReportService
ReportProviderbased plugins. Be mindful that things like grabbing a database connection will NOT work in other plugin types when being run externally in a distributed worker scenario. Reports have a simply object model. Firstly a plugin defines a
ReportTypewhich contains information about the report and available filter options. Finally a user runs said report which creates a
ReportResultentry. These are tracked against when appending rows to the result Rows have sections like 'data', or 'header'. This can affect the display in how you render things from the HTML output side.
|Modifier and Type||Method and Description|
Saves new result rows against a
Grabs a Read-Only Database connection for querying the Morpheus Database.
Releases a Database Connection back into the Pool Manager.
Updates the status of the
io.reactivex.Single<java.lang.Boolean> appendResultRows(ReportResult reportResult, java.util.Collection<ReportResultRow> rows)
ReportResult. These can be chunked or done in batches to improve report efficiency. It is important to leverage displayOrder when processing for proper order on each individual
reportResult- The report run being processed
rows- the list of rows to be added to the system
io.reactivex.Completable updateReportResultStatus(ReportResult reportResult, ReportResult.Status status)
ReportResult. This should be updated upon either success or failure or even when initializing processing of large reports.
reportResult- the report result row that is being processed
status- the new status TODO: Maybe statusMessage for failure in the future?
NOTE: Be sure to release a connection you grab when you are done so as not to over-utilize a pool.
io.reactivex.Completable releaseDatabaseConnection(java.sql.Connection connection)
connection- the JDBC Sql connection to be released