aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2013-04-11 14:24:36 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2013-04-11 14:24:36 +0200
commit619d71c598da3903dd8c7516a0ca170689a18fc9 (patch)
treeb0fc281fbe8c1abed80db32d93257fa59e85ac43 /sonar-plugin-api/src
parentc6d93dd07b2423e6d70dfc5dfa5d54dfb179aca0 (diff)
downloadsonarqube-619d71c598da3903dd8c7516a0ca170689a18fc9.tar.gz
sonarqube-619d71c598da3903dd8c7516a0ca170689a18fc9.zip
ScanPersister implementations can load snapshots through SnapshotCache
Diffstat (limited to 'sonar-plugin-api/src')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/issue/Issuable.java2
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueActions.java37
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/issue/NewIssueHandler.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueAction.java)18
3 files changed, 50 insertions, 7 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/issue/Issuable.java b/sonar-plugin-api/src/main/java/org/sonar/api/issue/Issuable.java
index 76a0c3af066..ceae0a99a08 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/issue/Issuable.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/issue/Issuable.java
@@ -50,8 +50,6 @@ public interface Issuable extends Perspective {
IssueBuilder newIssue();
- Issue apply(Issue issue, IssueAction action);
-
Collection<Issue> issues();
@Override
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueActions.java b/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueActions.java
new file mode 100644
index 00000000000..d7f2dbcd925
--- /dev/null
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueActions.java
@@ -0,0 +1,37 @@
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2012 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
+ */
+package org.sonar.api.issue;
+
+import org.sonar.api.BatchComponent;
+import org.sonar.api.ServerComponent;
+
+import javax.annotation.Nullable;
+
+public interface IssueActions extends BatchComponent, ServerComponent {
+
+ IssueActions comment(Issue issue, String userLogin, String comment);
+ IssueActions setSeverity(Issue issue, String severity);
+ IssueActions setMessage(Issue issue, String message);
+ IssueActions setCost(Issue issue, @Nullable Double cost);
+ IssueActions setResolution(Issue issue, String resolution);
+ IssueActions assign(Issue issue, String userLogin);
+ IssueActions setAttribute(Issue issue, String key, @Nullable String value);
+
+}
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueAction.java b/sonar-plugin-api/src/main/java/org/sonar/api/issue/NewIssueHandler.java
index ca3c3fb6fe2..3e46e2cdf8e 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueAction.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/issue/NewIssueHandler.java
@@ -17,12 +17,20 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-
package org.sonar.api.issue;
+import org.sonar.api.BatchExtension;
+
/**
- * @since 3.6
+ * Observe issues considered as new during project scan. Note that it does not observe manual
+ * issues created by end-users
*/
-public interface IssueAction {
- // TO BE DEFINED
-} \ No newline at end of file
+public interface NewIssueHandler extends BatchExtension {
+
+ interface NewIssueEvent {
+ Issue issue();
+ }
+
+ void onNewIssue(NewIssueEvent event);
+
+}