org.opennms.reporting.availability
Class AvailabilityReport

java.lang.Object
  extended by org.opennms.reporting.availability.AvailabilityReport

public class AvailabilityReport
extends Object

AvailabilityReport generates the Availability report in PDF format

Version:
$Id: $
Author:
Jacinta Remedios , Oculan , Jacinta Remedios , Oculan

Field Summary
static String[] months
          String of Months
 
Constructor Summary
AvailabilityReport(String author, String startMonth, String startDate, String startYear)
          Default constructor
 
Method Summary
 void generatePDF(String xsltFileName, OutputStream out, String format)
          Generate PDF from castor classes.
static void generateReport(String logourl, String categoryName, String format, String monthFormat, String startMonth, String startDate, String startYear)
          generateReport
 void getReportData(String logourl, String categoryName, String reportFormat, String monthFormat, String startMonth, String startDate, String startYear)
          This when invoked generates the data into report castor classes.
static void main(String[] args)
          Main method
 void marshalReport()
          This when invoked marshals the report XML from the castor classes.
 void populateReport(String logourl, String categoryName, String reportFormat, String monthFormat, String startMonth, String startDate, String startYear)
          This when invoked populates the castor classes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

months

public static String[] months
String of Months

Constructor Detail

AvailabilityReport

public AvailabilityReport(String author,
                          String startMonth,
                          String startDate,
                          String startYear)
Default constructor

Parameters:
author - a String object.
startMonth - a String object.
startDate - a String object.
startYear - a String object.
Method Detail

getReportData

public void getReportData(String logourl,
                          String categoryName,
                          String reportFormat,
                          String monthFormat,
                          String startMonth,
                          String startDate,
                          String startYear)
This when invoked generates the data into report castor classes.

Parameters:
logourl - location of the logo to be displayed on the report
categoryName - of the logo to be displayed on the report
reportFormat - Report Format ("SVG" / all)
monthFormat - Format for month data ("classic"/"calendar")
startMonth - a String object.
startDate - a String object.
startYear - a String object.

populateReport

public void populateReport(String logourl,
                           String categoryName,
                           String reportFormat,
                           String monthFormat,
                           String startMonth,
                           String startDate,
                           String startYear)
This when invoked populates the castor classes.

Parameters:
logourl - location of the logo to be displayed on the report
categoryName - of the logo to be displayed on the report
reportFormat - Report Format ("SVG" / all)
monthFormat - Format for month data ("classic"/"calendar")
startMonth - a String object.
startDate - a String object.
startYear - a String object.

marshalReport

public void marshalReport()
                   throws org.exolab.castor.xml.ValidationException,
                          org.exolab.castor.xml.MarshalException,
                          IOException,
                          Exception
This when invoked marshals the report XML from the castor classes.

Throws:
org.exolab.castor.xml.ValidationException - if any.
org.exolab.castor.xml.MarshalException - if any.
IOException - if any.
Exception - if any.

generatePDF

public void generatePDF(String xsltFileName,
                        OutputStream out,
                        String format)
                 throws Exception
Generate PDF from castor classes.

Parameters:
xsltFileName - a String object.
out - a OutputStream object.
format - a String object.
Throws:
Exception - if any.

main

public static void main(String[] args)
Main method

Parameters:
args - an array of String objects.

generateReport

public static void generateReport(String logourl,
                                  String categoryName,
                                  String format,
                                  String monthFormat,
                                  String startMonth,
                                  String startDate,
                                  String startYear)
                           throws Exception

generateReport

Parameters:
logourl - a String object.
categoryName - a String object.
format - a String object.
monthFormat - a String object.
startMonth - a String object.
startDate - a String object.
startYear - a String object.
Throws:
Exception - if any.


Copyright © 2011. All Rights Reserved.