org.opennms.reporting.availability.svclayer
Class AvailabilityReportService

java.lang.Object
  extended by org.opennms.reporting.availability.svclayer.AvailabilityReportService
All Implemented Interfaces:
ReportService

public class AvailabilityReportService
extends Object
implements ReportService

AvailabilityReportService class.


Constructor Summary
AvailabilityReportService()
          Constructor for AvailabilityReportService.
 
Method Summary
 List<ReportFormat> getFormats(String id)
          This method provides a list of formats supported by the report
 ReportParameters getParameters(String ReportId)
          This method retrieves the runtime parameters taken by the report
 void render(String id, String location, ReportFormat format, OutputStream outputStream)
          This method renders the report into a given output stream.
 String run(HashMap<String,Object> reportParms, String reportId)
          This method runs the report
 void runAndRender(HashMap<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
 void setCalendarCalculator(AvailabilityCalculator calculator)
          setCalendarCalculator
 void setClassicCalculator(AvailabilityCalculator calulator)
          setClassicCalculator
 void setConfigDao(OnmsReportConfigDao configDao)
          setConfigDao
 void setParameterConversionService(ParameterConversionService parameterConversionService)
          setParameterConversionService
 boolean validate(HashMap<String,Object> reportParms, String reportID)
          This method validates that the map of report parameters matches the report parameters accepted by the report.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AvailabilityReportService

public AvailabilityReportService()

Constructor for AvailabilityReportService.

Method Detail

validate

public boolean validate(HashMap<String,Object> reportParms,
                        String reportID)
This method validates that the map of report parameters matches the report parameters accepted by the report. Used by the web interface.

Specified by:
validate in interface ReportService
Parameters:
reportParms - hashmap of parameters to be provided at runtime
reportID - reportId as defined in database-reports.xml
Returns:
true if the reportParms supplied match those in the report definition.

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 interface ReportService
Parameters:
id - reportId as defined in database-reports.xml
location - location of the report on disk
format - format to render the report
outputStream - 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 interface ReportService
Parameters:
id - reportId as defined in database-reports.xml
Returns:
a list of supported formats

run

public String run(HashMap<String,Object> reportParms,
                  String reportId)
This method runs the report

Specified by:
run in interface ReportService
Parameters:
reportParms - hashmap of parameters to be provided at runtime
reportId - reportId as defined in database-reports.xml
Returns:
a String object.

runAndRender

public void runAndRender(HashMap<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 interface ReportService
Parameters:
reportParms - a HashMap object.
reportId - reportId as defined in database-reports.xml
format - format to render the report
outputStream - 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 interface ReportService
Parameters:
ReportId - a String object.
Returns:
a ReportParameters object containing the parameters taken by the report

setCalendarCalculator

public void setCalendarCalculator(AvailabilityCalculator calculator)

setCalendarCalculator

Parameters:
calculator - a AvailabilityCalculator object.

setClassicCalculator

public void setClassicCalculator(AvailabilityCalculator calulator)

setClassicCalculator

Parameters:
calulator - a AvailabilityCalculator object.

setConfigDao

public void setConfigDao(OnmsReportConfigDao configDao)

setConfigDao

Parameters:
configDao - a OnmsReportConfigDao object.

setParameterConversionService

public void setParameterConversionService(ParameterConversionService parameterConversionService)

setParameterConversionService

Parameters:
parameterConversionService - a ParameterConversionService object.


Copyright © 2011. All Rights Reserved.