Package org.opennms.api.reporting
Interface ReportService
-
- All Known Implementing Classes:
AvailabilityReportService,JasperReportService
public interface ReportServiceThis interface provides an API for implementing additional database reports inside the opennms webapp- Version:
- $Id: $
- Author:
- Jonathan Sartin
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<ReportFormat>getFormats(String reportId)This method provides a list of formats supported by the reportReportParametersgetParameters(String ReportId)This method retrieves the runtime parameters taken by the reportvoidrender(String ReportId, String location, ReportFormat format, OutputStream outputStream)This method renders the report into a given output stream.Stringrun(Map<String,Object> reportParms, String reportId)This method runs the reportvoidrunAndRender(Map<String,Object> reportParms, String ReportId, ReportFormat format, OutputStream outputStream)This method runs the report and renders in into the given output stream with no intermediate steps
-
-
-
Method Detail
-
run
String run(Map<String,Object> reportParms, String reportId) throws ReportException
This method runs the report- Parameters:
reportParms- hashmap of parameters to be provided at runtimereportId- reportId as defined in database-reports.xml- Returns:
- a
Stringobject. - Throws:
ReportException- if any.
-
getFormats
List<ReportFormat> getFormats(String reportId)
This method provides a list of formats supported by the report- Parameters:
reportId- reportId as defined in database-reports.xml- Returns:
- a list of supported formats
-
render
void render(String ReportId, String location, ReportFormat format, OutputStream outputStream) throws ReportException
This method renders the report into a given output stream.- Parameters:
ReportId- reportId as defined in database-reports.xmllocation- location of the report on diskformat- format to render the reportoutputStream- stream to render the resulting report- Throws:
ReportException- if any.
-
runAndRender
void runAndRender(Map<String,Object> reportParms, String ReportId, ReportFormat format, OutputStream outputStream) throws ReportException
This method runs the report and renders in into the given output stream with no intermediate steps- Parameters:
ReportId- reportId as defined in database-reports.xmlformat- format to render the reportoutputStream- stream to render the resulting reportreportParms- aHashMapobject.- Throws:
ReportException- if any.
-
getParameters
ReportParameters getParameters(String ReportId) throws ReportException
This method retrieves the runtime parameters taken by the report- Parameters:
ReportId- aStringobject.- Returns:
- a ReportParameters object containing the parameters taken by the report
- Throws:
ReportException
-
-