org.jcoderz.phoenix.report
Class ReportMerger

java.lang.Object
  extended by org.jcoderz.phoenix.report.ReportMerger

public class ReportMerger
extends Object

Provides merging and filtering of various jcoderz-report.xml files. It combines parts of the functions from ReportNormalizer and XmlMergeAntTask.

Author:
Michael Rumpf

Constructor Summary
ReportMerger()
           
 
Method Summary
 void addFilter(File filter)
          Adds the filter.
 void addReport(File report)
          Adds the report.
 void filter()
          Filters the report XML file using the JDK XSL processor.
 void flagNewFindings()
          Searches for new findings based on the old jcReport and increases the severity of such findings to NEW.
 Level getLogLevel()
          Gets the log level.
 File getOutFile()
          Gets the out file.
static void main(String[] args)
          The main method.
 void merge()
          Merge input reports.
 void setLogLevel(Level logLevel)
          Sets the log level.
 void setOldFile(File file)
          Set the old report to compare with.
 void setOutFile(File outFile)
          Sets the out file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReportMerger

public ReportMerger()
Method Detail

merge

public void merge()
           throws JAXBException,
                  FileNotFoundException
Merge input reports.

Throws:
JAXBException - if a xml handling error occurs.
FileNotFoundException - in case of an IO issue.

filter

public void filter()
            throws TransformerException,
                   IOException
Filters the report XML file using the JDK XSL processor.

Throws:
TransformerException - if the transformation fails.
IOException - if an io operation fails.

flagNewFindings

public void flagNewFindings()
Searches for new findings based on the old jcReport and increases the severity of such findings to NEW.


main

public static void main(String[] args)
                 throws Exception
The main method.

Parameters:
args - the arguments
Throws:
Exception - in case of a technical issue.

addReport

public void addReport(File report)
Adds the report.

Parameters:
report - the report

addFilter

public void addFilter(File filter)
Adds the filter.

Parameters:
filter - the filter

getLogLevel

public Level getLogLevel()
Gets the log level.

Returns:
the log level

setLogLevel

public void setLogLevel(Level logLevel)
Sets the log level.

Parameters:
logLevel - the new log level

getOutFile

public File getOutFile()
Gets the out file.

Returns:
the out file

setOldFile

public void setOldFile(File file)
                throws IOException
Set the old report to compare with.

Parameters:
file - old report file.
Throws:
IOException - if the file name conversion fails

setOutFile

public void setOutFile(File outFile)
                throws IOException
Sets the out file.

Parameters:
outFile - the new out file
Throws:
IOException - Signals that an I/O exception has occurred.


Copyright 2007 The jCoderZ Project.