org.hammurapi
Class QuickSummary

java.lang.Object
  extended byorg.hammurapi.QuickSummary
All Implemented Interfaces:
AggregatedResults, BasicResults, CompositeResults, DetailedResults, NamedResults

public class QuickSummary
extends java.lang.Object
implements CompositeResults

Version:
$Revision: 1.6 $
Author:
Pavel Vlasov

Constructor Summary
QuickSummary(java.lang.String title, QuickResultsCollector collector, InspectorSet inspectorSet, java.util.Collection children)
           
 
Method Summary
 void add(AggregatedResults child)
           
 void addAnnotation(Annotation annotation)
           
 void addMetric(SourceMarker source, java.lang.String name, double value)
           
 Waiver addViolation(Violation violation)
          Add violation to severity summary
 void addWarning(Violation warning)
           
 void aggregate(AggregatedResults agregee)
           
 void commit()
          Commits results, which means that all calculations for results was completed successfully.
 java.util.Collection getAnnotations()
           
 BasicResults getBaseLine()
           
 java.util.Collection getChildren()
           
 long getCodeBase()
           
 java.util.Date getDate()
           
 java.lang.String getDPMO()
           
 java.lang.Number getMaxSeverity()
           
 java.util.Map getMetrics()
           
 java.lang.String getName()
           
 long getReviewsNumber()
           
 java.util.Map getSeveritySummary()
           
 java.lang.String getSigma()
           
 double getViolationLevel()
           
 java.util.Collection getViolations()
           
 int getViolationsNumber()
           
 java.util.Collection getWaivedViolations()
           
 int getWaivedViolationsNumber()
           
 WaiverSet getWaiverSet()
           
 java.util.Collection getWarnings()
           
 boolean hasWarnings()
           
 boolean isNew()
           
 void setCodeBase(long codeBase)
           
 void setReviewsNumber(long reviews)
          Sets number of reviews.
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuickSummary

public QuickSummary(java.lang.String title,
                    QuickResultsCollector collector,
                    InspectorSet inspectorSet,
                    java.util.Collection children)
             throws java.sql.SQLException
Parameters:
collector -
Throws:
java.sql.SQLException
Method Detail

getChildren

public java.util.Collection getChildren()
Specified by:
getChildren in interface CompositeResults

add

public void add(AggregatedResults child)
Specified by:
add in interface CompositeResults

size

public int size()
Specified by:
size in interface CompositeResults
Returns:
sum of all included results including result's children.

getViolations

public java.util.Collection getViolations()
Specified by:
getViolations in interface DetailedResults

getWaivedViolations

public java.util.Collection getWaivedViolations()
Specified by:
getWaivedViolations in interface DetailedResults
Returns:
Collection of WaiverSet.WaiverEntry instances

getName

public java.lang.String getName()
Specified by:
getName in interface NamedResults

addViolation

public Waiver addViolation(Violation violation)
Description copied from interface: AggregatedResults
Add violation to severity summary

Specified by:
addViolation in interface AggregatedResults
Parameters:
violation -
Returns:
null if violation was added, Waiver if it was waived

getSeveritySummary

public java.util.Map getSeveritySummary()
Specified by:
getSeveritySummary in interface AggregatedResults

getWarnings

public java.util.Collection getWarnings()
Specified by:
getWarnings in interface AggregatedResults

hasWarnings

public boolean hasWarnings()
Specified by:
hasWarnings in interface AggregatedResults

addWarning

public void addWarning(Violation warning)
Specified by:
addWarning in interface AggregatedResults

addMetric

public void addMetric(SourceMarker source,
                      java.lang.String name,
                      double value)
Specified by:
addMetric in interface AggregatedResults

getMetrics

public java.util.Map getMetrics()
Specified by:
getMetrics in interface AggregatedResults

aggregate

public void aggregate(AggregatedResults agregee)
Specified by:
aggregate in interface AggregatedResults

setReviewsNumber

public void setReviewsNumber(long reviews)
Description copied from interface: AggregatedResults
Sets number of reviews.

Specified by:
setReviewsNumber in interface AggregatedResults
Parameters:
reviews - The reviews to set.

setCodeBase

public void setCodeBase(long codeBase)
Specified by:
setCodeBase in interface AggregatedResults

addAnnotation

public void addAnnotation(Annotation annotation)
Specified by:
addAnnotation in interface AggregatedResults

getAnnotations

public java.util.Collection getAnnotations()
Specified by:
getAnnotations in interface AggregatedResults

getWaiverSet

public WaiverSet getWaiverSet()
Specified by:
getWaiverSet in interface AggregatedResults

commit

public void commit()
Description copied from interface: AggregatedResults
Commits results, which means that all calculations for results was completed successfully.

Specified by:
commit in interface AggregatedResults

isNew

public boolean isNew()
Specified by:
isNew in interface AggregatedResults
Returns:
true this review result or one of its children is different from the previous run.

getBaseLine

public BasicResults getBaseLine()
Specified by:
getBaseLine in interface AggregatedResults
Returns:
Baseline basic results

getCodeBase

public long getCodeBase()
Specified by:
getCodeBase in interface BasicResults

getDPMO

public java.lang.String getDPMO()
Specified by:
getDPMO in interface BasicResults

getSigma

public java.lang.String getSigma()
Specified by:
getSigma in interface BasicResults

getMaxSeverity

public java.lang.Number getMaxSeverity()
Specified by:
getMaxSeverity in interface BasicResults

getReviewsNumber

public long getReviewsNumber()
Specified by:
getReviewsNumber in interface BasicResults

getViolationLevel

public double getViolationLevel()
Specified by:
getViolationLevel in interface BasicResults

getViolationsNumber

public int getViolationsNumber()
Specified by:
getViolationsNumber in interface BasicResults

getWaivedViolationsNumber

public int getWaivedViolationsNumber()
Specified by:
getWaivedViolationsNumber in interface BasicResults

getDate

public java.util.Date getDate()
Specified by:
getDate in interface BasicResults


Copyright © 2004 Hammurapi Group. All Rights Reserved.