org.sonar.plugins.core.sensors
Class UpdateReviewsDecorator

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

public class UpdateReviewsDecorator
extends Object
implements Decorator

Decorator that updates reviews that are linked to violations for which the message and the line number have changed. In this case, the message of the review and its corresponding line number must change.


Constructor Summary
UpdateReviewsDecorator(ResourcePersister resourcePersister, DatabaseSession databaseSession, ViolationTrackingDecorator violationTrackingDecorator)
           
 
Method Summary
protected  void checkReviewForUpdate(Review review, Date currentDate)
           
 void decorate(Resource resource, DecoratorContext context)
           
 boolean shouldExecuteOnProject(Project project)
           
protected  void updateReviews(int resourceId, Date currentDate)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpdateReviewsDecorator

public UpdateReviewsDecorator(ResourcePersister resourcePersister,
                              DatabaseSession databaseSession,
                              ViolationTrackingDecorator violationTrackingDecorator)
Method Detail

shouldExecuteOnProject

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

decorate

public void decorate(Resource resource,
                     DecoratorContext context)
Specified by:
decorate in interface Decorator

updateReviews

protected void updateReviews(int resourceId,
                             Date currentDate)

checkReviewForUpdate

protected void checkReviewForUpdate(Review review,
                                    Date currentDate)


Copyright © 2009-2012 SonarSource. All Rights Reserved.