diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2011-08-11 23:48:48 +0200 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2011-08-11 23:48:48 +0200 |
commit | 9cbf7d1d02aaf60f6e36ff259305d4474aa68230 (patch) | |
tree | 9fc9f24de417e086d5fbb2f411dd005babb5c866 /sonar-plugin-api/src | |
parent | 3ef437426b9886f519477a288333ba77342d964c (diff) | |
download | sonarqube-9cbf7d1d02aaf60f6e36ff259305d4474aa68230.tar.gz sonarqube-9cbf7d1d02aaf60f6e36ff259305d4474aa68230.zip |
SONAR-2692 API: allow plugins to auto-disable on server startup
Diffstat (limited to 'sonar-plugin-api/src')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/platform/PluginRepository.java | 3 | ||||
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/platform/ServerPluginRepository.java | 43 |
2 files changed, 44 insertions, 2 deletions
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/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); + +} |