aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2013-05-28 14:08:36 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2013-05-28 14:08:44 +0200
commit0eddfffce1b680964cc0917cc0bdc5d505a7a167 (patch)
tree479dd529846ebd49699f559349cc2e77e3db74aa /sonar-plugin-api/src
parent4c203b53eefd8fdef5d114f1720fbfaf5b84fb1d (diff)
downloadsonarqube-0eddfffce1b680964cc0917cc0bdc5d505a7a167.tar.gz
sonarqube-0eddfffce1b680964cc0917cc0bdc5d505a7a167.zip
SONAR-4316 implement IssueFilter and support ViolationFilter
Diffstat (limited to 'sonar-plugin-api/src')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/database/model/Snapshot.java3
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/resources/Resource.java4
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/rules/Violation.java2
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/rules/ViolationFilter.java2
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/violations/ViolationQuery.java2
5 files changed, 11 insertions, 2 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/database/model/Snapshot.java b/sonar-plugin-api/src/main/java/org/sonar/api/database/model/Snapshot.java
index 8f5cbd8aaf8..de5390d3a2a 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/database/model/Snapshot.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/database/model/Snapshot.java
@@ -32,6 +32,7 @@ import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
+import java.io.Serializable;
import java.util.Date;
/**
@@ -39,7 +40,7 @@ import java.util.Date;
*/
@Entity
@Table(name = "snapshots")
-public class Snapshot extends BaseIdentifiable {
+public class Snapshot extends BaseIdentifiable implements Serializable {
/**
* This status is set on the snapshot at the beginning of the batch
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Resource.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Resource.java
index 95dcdd084d2..c6e22cdd408 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Resource.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Resource.java
@@ -19,12 +19,14 @@
*/
package org.sonar.api.resources;
+import java.io.Serializable;
+
/**
* The interface to implement to create a resource in Sonar
*
* @since 1.10
*/
-public abstract class Resource<P extends Resource> {
+public abstract class Resource<P extends Resource> implements Serializable {
/**
* @deprecated since 2.6. Use Scopes.PROJECT.
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/rules/Violation.java b/sonar-plugin-api/src/main/java/org/sonar/api/rules/Violation.java
index 906aea24aad..d1091b62cf9 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/rules/Violation.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/rules/Violation.java
@@ -27,7 +27,9 @@ import java.util.Date;
/**
* A class that represents a violation. A violation happens when a resource does not respect a defined rule.
+ * @deprecated in 3.6. Replaced by {@link org.sonar.api.issue.Issue}.
*/
+@Deprecated
public class Violation {
private Resource resource;
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/rules/ViolationFilter.java b/sonar-plugin-api/src/main/java/org/sonar/api/rules/ViolationFilter.java
index 71e8cecf495..612e8eb054d 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/rules/ViolationFilter.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/rules/ViolationFilter.java
@@ -27,8 +27,10 @@ import org.sonar.api.batch.DependedUpon;
* Filter violations to save. For example, ignore a violation if it occurs on a line of code commented with //NOSONAR
*
* @since 1.12
+ * @deprecated in 3.6. Replaced by {@link org.sonar.api.issue.IssueFilter}.
*/
@DependedUpon(value = DecoratorBarriers.START_VIOLATIONS_GENERATION)
+@Deprecated
public interface ViolationFilter extends BatchExtension {
/**
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/violations/ViolationQuery.java b/sonar-plugin-api/src/main/java/org/sonar/api/violations/ViolationQuery.java
index 70ca8ee5f13..470e3929648 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/violations/ViolationQuery.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/violations/ViolationQuery.java
@@ -25,7 +25,9 @@ import org.sonar.api.resources.Resource;
* Class that allows to query the Sonar index about violations.
*
* @since 2.8
+ * @deprecated in 3.6 for the merge of violations and reviews into issues.
*/
+@Deprecated
public final class ViolationQuery {
public static enum SwitchMode {