org.sonar.plugins.core.sensors
Class CloseReviewsDecorator
java.lang.Object
org.sonar.plugins.core.sensors.CloseReviewsDecorator
- All Implemented Interfaces:
- CheckProject, Decorator, BatchComponent, BatchExtension, Extension
public class CloseReviewsDecorator
- extends Object
- implements Decorator
Decorator that handles the life cycle of a review (for instance, closes a review when its corresponding violation has been fixed).
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
REVIEW_LIFECYCLE_BARRIER
public static final String REVIEW_LIFECYCLE_BARRIER
- See Also:
- Constant Field Values
CloseReviewsDecorator
public CloseReviewsDecorator(Project project,
ResourcePersister resourcePersister,
DatabaseSession databaseSession,
NotificationManager notificationManager,
UserFinder userFinder)
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
closeReviewsOnResolvedViolations
protected int closeReviewsOnResolvedViolations(Resource resource,
int resourceId,
int snapshotId)
- Close reviews for which violations have been fixed.
reopenReviewsOnUnresolvedViolations
protected int reopenReviewsOnUnresolvedViolations(Resource resource,
int resourceId)
- Reopen reviews that had been set to resolved but for which the violation is still here.
Manual violations are ignored.
closeReviewsForDeletedResources
protected int closeReviewsForDeletedResources(int projectId,
int projectSnapshotId)
- Close reviews that relate to resources that have been deleted or renamed.
Copyright © 2009-2012 SonarSource. All Rights Reserved.