aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src/main/java/org/sonar/api/config
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2015-05-07 15:59:40 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2015-05-11 17:04:46 +0200
commit3c18d94e800d30e71b2ca578b2a4d606f824e844 (patch)
treeaca651a8adb71920ea839beb8975c425b94a587f /sonar-plugin-api/src/main/java/org/sonar/api/config
parent079a8179040931d2589b7d9b233ca9ed949437e2 (diff)
downloadsonarqube-3c18d94e800d30e71b2ca578b2a4d606f824e844.tar.gz
sonarqube-3c18d94e800d30e71b2ca578b2a4d606f824e844.zip
SONAR-6535 API cleanup: deprecate BatchComponent and ServerComponent
Diffstat (limited to 'sonar-plugin-api/src/main/java/org/sonar/api/config')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/config/EmailSettings.java8
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/config/GlobalPropertyChangeHandler.java7
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefinition.java10
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefinitions.java8
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java8
5 files changed, 27 insertions, 14 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/config/EmailSettings.java b/sonar-plugin-api/src/main/java/org/sonar/api/config/EmailSettings.java
index 5d955aa1ec9..5e45bcc6185 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/config/EmailSettings.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/config/EmailSettings.java
@@ -20,16 +20,18 @@
package org.sonar.api.config;
import com.google.common.base.Objects;
-import org.sonar.api.BatchComponent;
+import org.sonar.api.BatchSide;
import org.sonar.api.CoreProperties;
-import org.sonar.api.ServerComponent;
+import org.sonar.api.ServerSide;
/**
* If batch extensions use this component, then batch must be executed with administrator rights (see properties sonar.login and sonar.password)
*
* @since 3.2
*/
-public class EmailSettings implements BatchComponent, ServerComponent {
+@BatchSide
+@ServerSide
+public class EmailSettings {
public static final String SMTP_HOST = "email.smtp_host.secured";
public static final String SMTP_HOST_DEFAULT = "";
public static final String SMTP_PORT = "email.smtp_port.secured";
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/config/GlobalPropertyChangeHandler.java b/sonar-plugin-api/src/main/java/org/sonar/api/config/GlobalPropertyChangeHandler.java
index dae8b5238ad..5d1be0f877d 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/config/GlobalPropertyChangeHandler.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/config/GlobalPropertyChangeHandler.java
@@ -19,7 +19,8 @@
*/
package org.sonar.api.config;
-import org.sonar.api.ServerExtension;
+import org.sonar.api.ExtensionPoint;
+import org.sonar.api.ServerSide;
import javax.annotation.Nullable;
@@ -33,7 +34,9 @@ import javax.annotation.Nullable;
*
* @since 3.0
*/
-public abstract class GlobalPropertyChangeHandler implements ServerExtension {
+@ServerSide
+@ExtensionPoint
+public abstract class GlobalPropertyChangeHandler {
public static final class PropertyChange {
private String key;
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefinition.java b/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefinition.java
index c8c73bde7e5..b82b340e4ba 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefinition.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefinition.java
@@ -25,10 +25,11 @@ import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.math.NumberUtils;
-import org.sonar.api.BatchExtension;
+import org.sonar.api.BatchSide;
+import org.sonar.api.ExtensionPoint;
import org.sonar.api.Property;
import org.sonar.api.PropertyType;
-import org.sonar.api.ServerExtension;
+import org.sonar.api.ServerSide;
import org.sonar.api.resources.Qualifiers;
import javax.annotation.Nullable;
@@ -67,7 +68,10 @@ import java.util.List;
*
* @since 3.6
*/
-public final class PropertyDefinition implements BatchExtension, ServerExtension {
+@BatchSide
+@ServerSide
+@ExtensionPoint
+public final class PropertyDefinition {
private String key;
private String defaultValue;
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefinitions.java b/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefinitions.java
index b44f6696d27..4907cda4609 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefinitions.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefinitions.java
@@ -21,11 +21,11 @@ package org.sonar.api.config;
import com.google.common.base.Strings;
import org.apache.commons.lang.StringUtils;
-import org.sonar.api.BatchComponent;
+import org.sonar.api.BatchSide;
import org.sonar.api.CoreProperties;
import org.sonar.api.Properties;
import org.sonar.api.Property;
-import org.sonar.api.ServerComponent;
+import org.sonar.api.ServerSide;
import org.sonar.api.utils.AnnotationUtils;
import javax.annotation.Nullable;
@@ -41,7 +41,9 @@ import java.util.Map;
*
* @since 2.12
*/
-public final class PropertyDefinitions implements BatchComponent, ServerComponent {
+@BatchSide
+@ServerSide
+public final class PropertyDefinitions {
private final Map<String, PropertyDefinition> definitions = new HashMap<>();
private final Map<String, Category> categories = new HashMap<>();
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java b/sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java
index 662c661d195..8c20de9b3a5 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java
@@ -26,8 +26,8 @@ import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang.StringUtils;
-import org.sonar.api.BatchComponent;
-import org.sonar.api.ServerComponent;
+import org.sonar.api.BatchSide;
+import org.sonar.api.ServerSide;
import org.sonar.api.utils.DateUtils;
import javax.annotation.Nullable;
@@ -85,7 +85,9 @@ import java.util.Properties;
* </p>
* @since 2.12
*/
-public class Settings implements BatchComponent, ServerComponent {
+@BatchSide
+@ServerSide
+public class Settings {
protected Map<String, String> properties;
protected PropertyDefinitions definitions;