Package org.opennms.api.reporting
Interface ReportService
-
- All Known Implementing Classes:
AvailabilityReportService
,JasperReportService
public interface ReportService
This 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 reportReportParameters
getParameters(String ReportId)
This method retrieves the runtime parameters taken by the reportvoid
render(String ReportId, String location, ReportFormat format, OutputStream outputStream)
This method renders the report into a given output stream.String
run(Map<String,Object> reportParms, String reportId)
This method runs the reportvoid
runAndRender(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
String
object. - 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
- aHashMap
object.- Throws:
ReportException
- if any.
-
getParameters
ReportParameters getParameters(String ReportId) throws ReportException
This method retrieves the runtime parameters taken by the report- Parameters:
ReportId
- aString
object.- Returns:
- a ReportParameters object containing the parameters taken by the report
- Throws:
ReportException
-
-