Class AvailabilityReportService
- java.lang.Object
-
- org.opennms.reporting.availability.svclayer.AvailabilityReportService
-
- All Implemented Interfaces:
ReportService
public class AvailabilityReportService extends Object implements ReportService
AvailabilityReportService class.
-
-
Constructor Summary
Constructors Constructor Description AvailabilityReportService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<ReportFormat>
getFormats(String id)
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 id, 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 stepsvoid
setCalendarCalculator(AvailabilityCalculator calculator)
setCalendarCalculatorvoid
setClassicCalculator(AvailabilityCalculator calulator)
setClassicCalculatorvoid
setConfigDao(OnmsReportConfigDao configDao)
setConfigDaovoid
setParameterConversionService(ParameterConversionService parameterConversionService)
setParameterConversionService
-
-
-
Method Detail
-
render
public void render(String id, String location, ReportFormat format, OutputStream outputStream)
This method renders the report into a given output stream.- Specified by:
render
in 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 List<ReportFormat> getFormats(String id)
This method provides a list of formats supported by the report- Specified by:
getFormats
in interfaceReportService
- Parameters:
id
- reportId as defined in database-reports.xml- Returns:
- a list of supported formats
-
run
public String run(Map<String,Object> reportParms, String reportId)
This method runs the report- Specified by:
run
in interfaceReportService
- Parameters:
reportParms
- hashmap of parameters to be provided at runtimereportId
- reportId as defined in database-reports.xml- Returns:
- a
String
object.
-
runAndRender
public void 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- Specified by:
runAndRender
in interfaceReportService
- Parameters:
reportParms
- aHashMap
object.reportId
- reportId as defined in database-reports.xmlformat
- format to render the reportoutputStream
- stream to render the resulting report
-
getParameters
public ReportParameters getParameters(String ReportId)
This method retrieves the runtime parameters taken by the report- Specified by:
getParameters
in interfaceReportService
- Parameters:
ReportId
- aString
object.- Returns:
- a ReportParameters object containing the parameters taken by the report
-
setCalendarCalculator
public void setCalendarCalculator(AvailabilityCalculator calculator)
setCalendarCalculator
- Parameters:
calculator
- aAvailabilityCalculator
object.
-
setClassicCalculator
public void setClassicCalculator(AvailabilityCalculator calulator)
setClassicCalculator
- Parameters:
calulator
- aAvailabilityCalculator
object.
-
setConfigDao
public void setConfigDao(OnmsReportConfigDao configDao)
setConfigDao
- Parameters:
configDao
- aOnmsReportConfigDao
object.
-
setParameterConversionService
public void setParameterConversionService(ParameterConversionService parameterConversionService)
setParameterConversionService
- Parameters:
parameterConversionService
- aParameterConversionService
object.
-
-