public interface ReportingAPI
Only "select" statements are allowed.
Also allows to manipulate Report
s, through creation, deletion, search.
Report
Modifier and Type | Method and Description |
---|---|
Report |
createReport(ReportCreator reportCreator,
byte[] content)
Creates a custom report.
|
Report |
createReport(String name,
String description,
byte[] content)
Creates a new report with no screenshot.
|
void |
deleteReport(long reportId)
Deletes a report identified by its ID.
|
void |
deleteReports(List<Long> reportIds)
Deletes a list of reports, given by their IDs.
|
Report |
getReport(long reportId)
Retrieves a report from its ID.
|
byte[] |
getReportContent(long reportId)
Retrieves the binary content of a report.
|
SearchResult<Report> |
searchReports(SearchOptions searchOptions)
Searches for reports with specific search criteria.
|
String |
selectList(String selectQuery)
Executes a SELECT query (rollback only) and returns the result in a CSV format.
|
String selectList(String selectQuery) throws ExecutionException
If the query is not a SELECT one a RetrieveException is thrown. The result can differ from a database to another one due to the way the database stores values. (for example: with a boolean it can be a number for some databases)
selectQuery
- the SELECT query.ExecutionException
- if an exception occurs during the execution of the query.Report getReport(long reportId) throws ReportNotFoundException
reportId
- the Identifier of the report to retrieveReportNotFoundException
- if no report can be found with the provided ID.byte[] getReportContent(long reportId) throws ReportNotFoundException
reportId
- the ID of the report to extract the content for.ReportNotFoundException
- if no report can be found with the provided ID.SearchResult<Report> searchReports(SearchOptions searchOptions) throws SearchException
searchOptions
- the search options for the search. See SearchOptions
for search option details.SearchResult
containingSearchException
- if a problem occurs during the search.Report createReport(String name, String description, byte[] content) throws AlreadyExistsException, CreationException
name
- the name of the report.description
- the description of the report, ready to be displayed.content
- the binary content of the report.AlreadyExistsException
- if a report with this name already exists.CreationException
- if an error occurs during the creation.createReport(ReportCreator, byte[])
Report createReport(ReportCreator reportCreator, byte[] content) throws AlreadyExistsException, CreationException
reportCreator
- the creator object to instantiate the new report.content
- the binary content of the report.AlreadyExistsException
- if a report with this name already exists.CreationException
- if an error occurs during the creation.void deleteReport(long reportId) throws DeletionException
reportId
- the report identifier to delete.DeletionException
- if a problem occurs during deletion.void deleteReports(List<Long> reportIds) throws DeletionException
reportIds
- a list of report identifiers to delete.DeletionException
- if a problem occurs during deletion.Copyright © 2020 Bonitasoft S.A. All rights reserved.