From 9cbf7d1d02aaf60f6e36ff259305d4474aa68230 Mon Sep 17 00:00:00 2001 From: simonbrandhof Date: Thu, 11 Aug 2011 23:48:48 +0200 Subject: SONAR-2692 API: allow plugins to auto-disable on server startup --- .../org/sonar/api/platform/PluginRepository.java | 3 +- .../sonar/api/platform/ServerPluginRepository.java | 43 ++++++++++++++++++++++ 2 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 sonar-plugin-api/src/main/java/org/sonar/api/platform/ServerPluginRepository.java (limited to 'sonar-plugin-api') 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 getPlugins(); Plugin getPlugin(String key); 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 : + * + */ + void disable(String pluginKey); + + /** + * @param plugingKey can not be null + */ + boolean isDisabled(String plugingKey); + +} -- cgit v1.2.3