Skip to content

Commit

Permalink
SONAR-6567 disable extension point NotificationDispatcher in batch
Browse files Browse the repository at this point in the history
Currently it's only removed from API. Will be removed from batch after that events are in Compute Engine (for change of quality gate status)
  • Loading branch information
Simon Brandhof committed May 22, 2015
1 parent 850d739 commit b15cb8e
Show file tree
Hide file tree
Showing 28 changed files with 53 additions and 205 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@

import java.util.Collection;
import java.util.Map;
import org.sonar.core.notification.NotificationDispatcher;
import org.sonar.core.notification.NotificationDispatcherMetadata;
import org.sonar.core.notification.NotificationManager;

/**
* This dispatcher means: "notify me each new alert event".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
import org.junit.Test;
import org.sonar.api.notifications.Notification;
import org.sonar.api.notifications.NotificationChannel;
import org.sonar.api.notifications.NotificationDispatcher;
import org.sonar.api.notifications.NotificationManager;
import org.sonar.core.notification.NotificationDispatcher;
import org.sonar.core.notification.NotificationManager;

import static org.mockito.Mockito.*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import org.sonar.api.issue.Issue;
import org.sonar.api.issue.internal.DefaultIssue;
import org.sonar.api.issue.internal.IssueChangeContext;
import org.sonar.api.notifications.NotificationManager;
import org.sonar.core.notification.NotificationManager;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.rules.Rule;
import org.sonar.api.utils.log.Logger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import org.sonar.api.issue.Issue;
import org.sonar.api.issue.internal.DefaultIssue;
import org.sonar.api.issue.internal.IssueChangeContext;
import org.sonar.api.notifications.NotificationManager;
import org.sonar.core.notification.NotificationManager;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.rule.Severity;
import org.sonar.api.rules.Rule;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@

import javax.annotation.Nullable;
import java.util.Collection;
import org.sonar.core.notification.NotificationDispatcher;
import org.sonar.core.notification.NotificationDispatcherMetadata;
import org.sonar.core.notification.NotificationManager;

/**
* This dispatcher means: "notify me when a change is done on an issue that is assigned to me or reported by me".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@

import java.util.Collection;
import java.util.Map;
import org.sonar.core.notification.NotificationDispatcher;
import org.sonar.core.notification.NotificationDispatcherMetadata;
import org.sonar.core.notification.NotificationManager;

/**
* This dispatcher means: "notify me when an issue is resolved as false positive or won't fix".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
import org.sonar.api.notifications.*;

import java.util.Collection;
import org.sonar.core.notification.NotificationDispatcher;
import org.sonar.core.notification.NotificationDispatcherMetadata;
import org.sonar.core.notification.NotificationManager;

/**
* This dispatcher means: "notify me when new issues are introduced during project analysis"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@

import java.util.Collection;
import java.util.Map;
import org.sonar.core.notification.NotificationDispatcher;
import org.sonar.core.notification.NotificationDispatcherMetadata;
import org.sonar.core.notification.NotificationManager;

/**
* This dispatcher means: "notify me when new issues are introduced during project analysis"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import com.google.common.collect.Lists;
import org.sonar.api.server.ServerSide;
import org.sonar.api.notifications.NotificationChannel;
import org.sonar.api.notifications.NotificationDispatcherMetadata;
import org.sonar.core.notification.NotificationDispatcherMetadata;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import org.sonar.api.config.Settings;
import org.sonar.api.notifications.Notification;
import org.sonar.api.notifications.NotificationChannel;
import org.sonar.api.notifications.NotificationDispatcher;
import org.sonar.core.notification.NotificationDispatcher;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
import org.sonar.core.notification.DefaultNotificationManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import org.sonar.api.notifications.*;
import org.sonar.core.notification.NotificationDispatcher;
import org.sonar.core.notification.NotificationDispatcherMetadata;
import org.sonar.core.notification.NotificationManager;

import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
import org.sonar.api.issue.Issue;
import org.sonar.api.notifications.Notification;
import org.sonar.api.notifications.NotificationChannel;
import org.sonar.api.notifications.NotificationDispatcher;
import org.sonar.api.notifications.NotificationDispatcherMetadata;
import org.sonar.api.notifications.NotificationManager;
import org.sonar.core.notification.NotificationDispatcher;
import org.sonar.core.notification.NotificationDispatcherMetadata;
import org.sonar.core.notification.NotificationManager;

import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.*;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
import org.junit.Test;
import org.sonar.api.notifications.Notification;
import org.sonar.api.notifications.NotificationChannel;
import org.sonar.api.notifications.NotificationDispatcher;
import org.sonar.api.notifications.NotificationManager;
import org.sonar.core.notification.NotificationDispatcher;
import org.sonar.core.notification.NotificationManager;

import static org.mockito.Mockito.*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
import org.junit.Test;
import org.sonar.api.notifications.Notification;
import org.sonar.api.notifications.NotificationChannel;
import org.sonar.api.notifications.NotificationDispatcher;
import org.sonar.api.notifications.NotificationManager;
import org.sonar.core.notification.NotificationDispatcher;
import org.sonar.core.notification.NotificationManager;

import static org.mockito.Mockito.*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.sonar.api.notifications.NotificationChannel;
import org.sonar.api.notifications.NotificationDispatcherMetadata;
import org.sonar.core.notification.NotificationDispatcherMetadata;

import static org.assertj.core.api.Assertions.assertThat;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.sonar.api.config.Settings;
import org.sonar.api.notifications.Notification;
import org.sonar.api.notifications.NotificationChannel;
import org.sonar.api.notifications.NotificationDispatcher;
import org.sonar.core.notification.NotificationDispatcher;
import org.sonar.core.notification.DefaultNotificationManager;
import org.sonar.core.properties.PropertiesDao;
import org.sonar.jpa.session.DatabaseSessionFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import org.sonar.api.measures.Metric;
import org.sonar.api.measures.Metric.Level;
import org.sonar.api.notifications.Notification;
import org.sonar.api.notifications.NotificationManager;
import org.sonar.core.notification.NotificationManager;
import org.sonar.api.resources.Project;
import org.sonar.api.resources.Resource;
import org.sonar.api.resources.ResourceUtils;
Expand Down Expand Up @@ -85,7 +85,7 @@ public void decorate(Resource resource, DecoratorContext context) {
private void checkQualityGateStatusChange(Resource resource, DecoratorContext context, Measure currentStatus, Measure pastStatus) {
String alertText = currentStatus.getAlertText();
Level alertLevel = currentStatus.getDataAsLevel();
String alertName = null;
String alertName;
boolean isNewAlert = true;
if (pastStatus != null && pastStatus.getDataAsLevel() != alertLevel) {
// The alert status has changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import org.sonar.api.measures.Measure;
import org.sonar.api.measures.Metric;
import org.sonar.api.notifications.Notification;
import org.sonar.api.notifications.NotificationManager;
import org.sonar.core.notification.NotificationManager;
import org.sonar.api.resources.File;
import org.sonar.api.resources.Project;
import org.sonar.api.resources.Resource;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
import org.sonar.api.batch.RequiresDB;
import org.sonar.api.notifications.Notification;
import org.sonar.api.notifications.NotificationChannel;
import org.sonar.api.notifications.NotificationDispatcher;
import org.sonar.api.notifications.NotificationManager;
import org.sonar.api.utils.SonarException;
import org.sonar.core.notification.db.NotificationQueueDao;
import org.sonar.core.notification.db.NotificationQueueDto;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package org.sonar.api.notifications;
package org.sonar.core.notification;

import org.apache.commons.lang.StringUtils;
import org.sonar.api.ExtensionPoint;
import org.sonar.api.notifications.Notification;
import org.sonar.api.notifications.NotificationChannel;
import org.sonar.api.server.ServerSide;

/**
Expand Down
Loading

0 comments on commit b15cb8e

Please sign in to comment.