aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java10
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/platform/PluginRepository.java3
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/platform/Server.java5
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/platform/ServerPluginRepository.java43
4 files changed, 59 insertions, 2 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java b/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java
index 8760081c433..0fc4a6c2d75 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java
@@ -180,4 +180,14 @@ public interface CoreProperties {
String TIMEMACHINE_DEFAULT_PERIOD_3 = "30";
String TIMEMACHINE_DEFAULT_PERIOD_4 = "";
String TIMEMACHINE_DEFAULT_PERIOD_5 = "";
+
+ /**
+ * @since 2.11
+ */
+ String ORGANIZATION = "sonar.organization";
+
+ /**
+ * @since 2.11
+ */
+ String SERVER_KEY = "sonar.serverKey.secured";
}
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/platform/PluginRepository.java b/sonar-plugin-api/src/main/java/org/sonar/api/platform/PluginRepository.java
index 2eb1ceb7de9..f2a544e3db0 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/platform/PluginRepository.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/platform/PluginRepository.java
@@ -22,11 +22,10 @@ package org.sonar.api.platform;
import org.sonar.api.BatchComponent;
import org.sonar.api.Plugin;
import org.sonar.api.Property;
-import org.sonar.api.ServerComponent;
import java.util.Collection;
-public interface PluginRepository extends BatchComponent, ServerComponent {
+public interface PluginRepository extends BatchComponent {
Collection<Plugin> getPlugins();
Plugin getPlugin(String key);
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/platform/Server.java b/sonar-plugin-api/src/main/java/org/sonar/api/platform/Server.java
index 37d06ad35d6..f5043073dbb 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/platform/Server.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/platform/Server.java
@@ -40,4 +40,9 @@ public abstract class Server implements BatchComponent, ServerComponent {
* @since 2.4
*/
public abstract String getURL();
+
+ /**
+ * @since 2.10
+ */
+ public abstract String getKey();
}
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/platform/ServerPluginRepository.java b/sonar-plugin-api/src/main/java/org/sonar/api/platform/ServerPluginRepository.java
new file mode 100644
index 00000000000..fdab45aefb6
--- /dev/null
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/platform/ServerPluginRepository.java
@@ -0,0 +1,43 @@
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 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.platform;
+
+import org.sonar.api.ServerComponent;
+
+/**
+ * @since 2.11
+ */
+public interface ServerPluginRepository extends PluginRepository, ServerComponent {
+
+ /**
+ * Disabled plugins are not loaded by batch, but they are still installed :
+ * <ul>
+ * <li>Plugin properties are available in General Settings</li>
+ * <li>Plugin is marked as installed in Update Center</li>
+ * </ul>
+ */
+ void disable(String pluginKey);
+
+ /**
+ * @param plugingKey can not be null
+ */
+ boolean isDisabled(String plugingKey);
+
+}