org.sonar.plugins.core.sensors
Class ReviewsMeasuresDecorator

java.lang.Object
  extended by org.sonar.plugins.core.sensors.ReviewsMeasuresDecorator
All Implemented Interfaces:
CheckProject, Decorator, BatchComponent, BatchExtension, Extension

public class ReviewsMeasuresDecorator
extends Object
implements Decorator

Decorator that creates measures related to reviews.

Since:
2.14

Constructor Summary
ReviewsMeasuresDecorator(ReviewDao reviewDao, TimeMachineConfiguration timeMachineConfiguration)
           
 
Method Summary
protected  int countNewUnreviewedViolationsForSnapshot(PastSnapshot pastSnapshot, List<Violation> violations, Map<Integer,ReviewDto> openReviewsByViolationPermanentIds)
           
 void decorate(Resource resource, DecoratorContext context)
           
 Collection<Metric> generatesMetrics()
           
 boolean shouldExecuteOnProject(Project project)
           
protected  void trackNewViolationsWithoutReview(DecoratorContext context, Map<Integer,ReviewDto> openReviewsByViolationPermanentIds)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReviewsMeasuresDecorator

public ReviewsMeasuresDecorator(ReviewDao reviewDao,
                                TimeMachineConfiguration timeMachineConfiguration)
Method Detail

shouldExecuteOnProject

public boolean shouldExecuteOnProject(Project project)
Specified by:
shouldExecuteOnProject in interface CheckProject

generatesMetrics

public Collection<Metric> generatesMetrics()

decorate

public void decorate(Resource resource,
                     DecoratorContext context)
Specified by:
decorate in interface Decorator
Parameters:
resource - resource that is currently decorated, equivalent of context.getResource()

trackNewViolationsWithoutReview

protected void trackNewViolationsWithoutReview(DecoratorContext context,
                                               Map<Integer,ReviewDto> openReviewsByViolationPermanentIds)

countNewUnreviewedViolationsForSnapshot

protected int countNewUnreviewedViolationsForSnapshot(PastSnapshot pastSnapshot,
                                                      List<Violation> violations,
                                                      Map<Integer,ReviewDto> openReviewsByViolationPermanentIds)


Copyright © 2009-2012 SonarSource. All Rights Reserved.