Class AvailabilityReportService
- java.lang.Object
-
- org.opennms.reporting.availability.svclayer.AvailabilityReportService
-
- All Implemented Interfaces:
ReportService
public class AvailabilityReportService extends java.lang.Object implements ReportService
AvailabilityReportService class.
-
-
Constructor Summary
Constructors Constructor Description AvailabilityReportService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<ReportFormat>getFormats(java.lang.String id)This method provides a list of formats supported by the reportReportParametersgetParameters(java.lang.String ReportId)This method retrieves the runtime parameters taken by the reportvoidrender(java.lang.String id, java.lang.String location, ReportFormat format, java.io.OutputStream outputStream)This method renders the report into a given output stream.java.lang.Stringrun(java.util.Map<java.lang.String,java.lang.Object> reportParms, java.lang.String reportId)This method runs the reportvoidrunAndRender(java.util.Map<java.lang.String,java.lang.Object> reportParms, java.lang.String reportId, ReportFormat format, java.io.OutputStream outputStream)This method runs the report and renders in into the given output stream with no intermediate stepsvoidsetCalendarCalculator(AvailabilityCalculator calculator)setCalendarCalculatorvoidsetClassicCalculator(AvailabilityCalculator calulator)setClassicCalculatorvoidsetConfigDao(OnmsReportConfigDao configDao)setConfigDaovoidsetParameterConversionService(ParameterConversionService parameterConversionService)setParameterConversionService
-
-
-
Method Detail
-
render
public void render(java.lang.String id, java.lang.String location, ReportFormat format, java.io.OutputStream outputStream)This method renders the report into a given output stream.- Specified by:
renderin interfaceReportService- Parameters:
id- reportId as defined in database-reports.xmllocation- location of the report on diskformat- format to render the reportoutputStream- stream to render the resulting report
-
getFormats
public java.util.List<ReportFormat> getFormats(java.lang.String id)
This method provides a list of formats supported by the report- Specified by:
getFormatsin interfaceReportService- Parameters:
id- reportId as defined in database-reports.xml- Returns:
- a list of supported formats
-
run
public java.lang.String run(java.util.Map<java.lang.String,java.lang.Object> reportParms, java.lang.String reportId)This method runs the report- Specified by:
runin interfaceReportService- Parameters:
reportParms- hashmap of parameters to be provided at runtimereportId- reportId as defined in database-reports.xml- Returns:
- a
Stringobject.
-
runAndRender
public void runAndRender(java.util.Map<java.lang.String,java.lang.Object> reportParms, java.lang.String reportId, ReportFormat format, java.io.OutputStream outputStream)This method runs the report and renders in into the given output stream with no intermediate steps- Specified by:
runAndRenderin interfaceReportService- Parameters:
reportParms- aHashMapobject.reportId- reportId as defined in database-reports.xmlformat- format to render the reportoutputStream- stream to render the resulting report
-
getParameters
public ReportParameters getParameters(java.lang.String ReportId)
This method retrieves the runtime parameters taken by the report- Specified by:
getParametersin interfaceReportService- Parameters:
ReportId- aStringobject.- Returns:
- a ReportParameters object containing the parameters taken by the report
-
setCalendarCalculator
public void setCalendarCalculator(AvailabilityCalculator calculator)
setCalendarCalculator
- Parameters:
calculator- aAvailabilityCalculatorobject.
-
setClassicCalculator
public void setClassicCalculator(AvailabilityCalculator calulator)
setClassicCalculator
- Parameters:
calulator- aAvailabilityCalculatorobject.
-
setConfigDao
public void setConfigDao(OnmsReportConfigDao configDao)
setConfigDao
- Parameters:
configDao- aOnmsReportConfigDaoobject.
-
setParameterConversionService
public void setParameterConversionService(ParameterConversionService parameterConversionService)
setParameterConversionService
- Parameters:
parameterConversionService- aParameterConversionServiceobject.
-
-