com.ebay.carad.os.vitalsigns.listeners
Class HtmlGraphListener

java.lang.Object
  extended by com.ebay.carad.os.vitalsigns.listeners.AbstractReportingListener
      extended by com.ebay.carad.os.vitalsigns.listeners.LineGraphImageCreationListener
          extended by com.ebay.carad.os.vitalsigns.listeners.HtmlGraphListener
All Implemented Interfaces:
IReportingListener

public class HtmlGraphListener
extends LineGraphImageCreationListener

Writes HTML reports that can include the graphs created by LineGraphImageCreationListener. The reports can be customized by supplying your own Freemarker template, and supplying the relative path to it on your classpath.

Version:
$Id$
Author:
Jeremy Kraybill, Jeremy Thomerson

Field Summary
private  java.text.Format mRelativePath
           
private  java.lang.String mTemplatePath
           
private  ITemplateProcessor mTemplateProcessor
           
 
Constructor Summary
HtmlGraphListener()
           
 
Method Summary
private  boolean checkForCsvListener(java.util.List reportingListeners)
           
protected  void doAfterImagesCreated(float[] delta, IDashboardReport report, IDashboardAgent agent)
           
 java.lang.String getTemplatePath()
           
private  boolean isExportedAsCSV(IDashboardAgent agent, IDashboardReport config)
           
 void setRelativeOutputPath(java.lang.String path)
          Relative output path for the generated HTML, passed through a MessageFormat with a single parameter - the report ID that is being generated.
 void setTemplatePath(java.lang.String templatePath)
          Default value is: HtmlGraphListener.fml
 void setTemplateProcessor(ITemplateProcessor templateProcessor)
           
 
Methods inherited from class com.ebay.carad.os.vitalsigns.listeners.LineGraphImageCreationListener
createChart, getYAxisLabel, includeDayChart, includeHourChart, includeMonthChart, includeWeekChart, includeYearChart, reportRan, setYAxisLabel
 
Methods inherited from class com.ebay.carad.os.vitalsigns.listeners.AbstractReportingListener
reportingComplete, reportingException, reportingPreStart
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ebay.carad.os.vitalsigns.listeners.IReportingListener
reportingComplete, reportingException, reportingPreStart
 

Field Detail

mTemplateProcessor

private ITemplateProcessor mTemplateProcessor

mTemplatePath

private java.lang.String mTemplatePath

mRelativePath

private java.text.Format mRelativePath
Constructor Detail

HtmlGraphListener

public HtmlGraphListener()
Method Detail

doAfterImagesCreated

protected void doAfterImagesCreated(float[] delta,
                                    IDashboardReport report,
                                    IDashboardAgent agent)
Overrides:
doAfterImagesCreated in class LineGraphImageCreationListener

isExportedAsCSV

private boolean isExportedAsCSV(IDashboardAgent agent,
                                IDashboardReport config)

checkForCsvListener

private boolean checkForCsvListener(java.util.List reportingListeners)

getTemplatePath

public java.lang.String getTemplatePath()

setTemplatePath

public void setTemplatePath(java.lang.String templatePath)
Default value is: HtmlGraphListener.fml

Parameters:
templatePath - path that template resides within classpath

setRelativeOutputPath

public void setRelativeOutputPath(java.lang.String path)
Relative output path for the generated HTML, passed through a MessageFormat with a single parameter - the report ID that is being generated.

Parameters:
path - A String that can be used in MessageFormat

setTemplateProcessor

public void setTemplateProcessor(ITemplateProcessor templateProcessor)
Parameters:
templateProcessor - The templateProcessor to set.


Copyright © 2004-2009. All Rights Reserved.