Class AvailabilityReport


  • public class AvailabilityReport
    extends java.lang.Object
    AvailabilityReport generates the Availability report in PDF format
    Author:
    Jacinta Remedios
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String[] months
      String of Months
    • Constructor Summary

      Constructors 
      Constructor Description
      AvailabilityReport​(java.lang.String author, java.lang.String startMonth, java.lang.String startDate, java.lang.String startYear)
      Default constructor
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void generatePDF​(java.lang.String xsltFileName, java.io.OutputStream out, java.lang.String format)
      Generate PDF from classes.
      static void generateReport​(java.lang.String logourl, java.lang.String categoryName, java.lang.String format, java.lang.String monthFormat, java.lang.String startMonth, java.lang.String startDate, java.lang.String startYear)
      generateReport
      void getReportData​(java.lang.String logourl, java.lang.String categoryName, java.lang.String reportFormat, java.lang.String monthFormat, java.lang.String startMonth, java.lang.String startDate, java.lang.String startYear)
      This when invoked generates the data into report classes.
      static void main​(java.lang.String[] args)
      Main method
      void marshalReport()
      This when invoked marshals the report XML from the classes.
      void populateReport​(java.lang.String logourl, java.lang.String categoryName, java.lang.String reportFormat, java.lang.String monthFormat, java.lang.String startMonth, java.lang.String startDate, java.lang.String startYear)
      This when invoked populates the classes.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • months

        public static java.lang.String[] months
        String of Months
    • Constructor Detail

      • AvailabilityReport

        public AvailabilityReport​(java.lang.String author,
                                  java.lang.String startMonth,
                                  java.lang.String startDate,
                                  java.lang.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​(java.lang.String logourl,
                                  java.lang.String categoryName,
                                  java.lang.String reportFormat,
                                  java.lang.String monthFormat,
                                  java.lang.String startMonth,
                                  java.lang.String startDate,
                                  java.lang.String startYear)
        This when invoked generates the data into report 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​(java.lang.String logourl,
                                   java.lang.String categoryName,
                                   java.lang.String reportFormat,
                                   java.lang.String monthFormat,
                                   java.lang.String startMonth,
                                   java.lang.String startDate,
                                   java.lang.String startYear)
        This when invoked populates the 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 java.io.IOException,
                                  java.lang.Exception
        This when invoked marshals the report XML from the classes.
        Throws:
        java.io.IOException - if any.
        java.lang.Exception - if any.
      • generatePDF

        public void generatePDF​(java.lang.String xsltFileName,
                                java.io.OutputStream out,
                                java.lang.String format)
                         throws java.lang.Exception
        Generate PDF from classes.
        Parameters:
        xsltFileName - a String object.
        out - a OutputStream object.
        format - a String object.
        Throws:
        java.lang.Exception - if any.
      • main

        public static void main​(java.lang.String[] args)
        Main method
        Parameters:
        args - an array of String objects.
      • generateReport

        public static void generateReport​(java.lang.String logourl,
                                          java.lang.String categoryName,
                                          java.lang.String format,
                                          java.lang.String monthFormat,
                                          java.lang.String startMonth,
                                          java.lang.String startDate,
                                          java.lang.String startYear)
                                   throws java.lang.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:
        java.lang.Exception - if any.