net.objectlab.qalab.exporter
Class ConsoleExporter

java.lang.Object
  extended by net.objectlab.qalab.exporter.ConsoleExporter
All Implemented Interfaces:
QALabExporter

public class ConsoleExporter
extends java.lang.Object
implements QALabExporter

This is a basic exporter for debugging (it simply shows the exports on ConsoleLogger.

 

Constructor Summary
ConsoleExporter()
           
 
Method Summary
 void addFileResult(int violationCount, java.lang.String fileName)
          Add a result entry for a given file name and type.
 void addSummary(int violationCount, int fileCount)
          Add summary details for this merger of statistics for this type.
 void configure(java.util.Properties properties)
          For instance for the XML Exporter.
protected  TaskLogger getTaskLogger()
           
 boolean isQuiet()
           
 void save()
          Save the stats (called when the parsing of input statistics is completed).
 void setQuiet(boolean noLog)
          if quiet is true, the merger should limit its log output.
 void setTaskLogger(TaskLogger task)
          set the task logger, ie mechanism to log issues & debug info.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConsoleExporter

public ConsoleExporter()
Method Detail

configure

public final void configure(java.util.Properties properties)
For instance for the XML Exporter.

Specified by:
configure in interface QALabExporter
Parameters:
properties - the properties.
See Also:
QALabExporter#configure(java.util.Properties)

addSummary

public final void addSummary(int violationCount,
                             int fileCount)
Add summary details for this merger of statistics for this type.

Specified by:
addSummary in interface QALabExporter
Parameters:
violationCount - total number of violations for this type
fileCount - total number of files affected by this type.
See Also:
net.objectlab.qalab.interfaces.QALabExporter#addSummary( java.util.Date, int, int, java.lang.String)

addFileResult

public final void addFileResult(int violationCount,
                                java.lang.String fileName)
Add a result entry for a given file name and type.

Specified by:
addFileResult in interface QALabExporter
Parameters:
violationCount - total number of violations for this type and file.
fileName - file name
See Also:
net.objectlab.qalab.interfaces.QALabExporter#addFileResult( java.util.Date, int, java.lang.String, java.lang.String)

save

public final void save()
                throws java.io.IOException
Save the stats (called when the parsing of input statistics is completed).

Specified by:
save in interface QALabExporter
Throws:
java.io.IOException - any IO issue.
See Also:
QALabExporter.save()

getTaskLogger

protected final TaskLogger getTaskLogger()
Returns:
logger to use if not quiet.

setTaskLogger

public final void setTaskLogger(TaskLogger task)
set the task logger, ie mechanism to log issues & debug info.

Specified by:
setTaskLogger in interface QALabExporter
Parameters:
task - the logger to use

isQuiet

public final boolean isQuiet()
Returns:
true means that no debug info is logged.

setQuiet

public final void setQuiet(boolean noLog)
Description copied from interface: QALabExporter
if quiet is true, the merger should limit its log output.

Specified by:
setQuiet in interface QALabExporter
Parameters:
noLog - true if no log required.