diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2016-03-29 18:10:21 +0200 |
---|---|---|
committer | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2016-03-31 11:34:41 +0200 |
commit | 9b88ac1448e5f8dc359a928602ed2883515611c5 (patch) | |
tree | 4e4a8ad4efd4fd25ad7aac0b0893799ae1837370 /server/sonar-plugin-bridge/src | |
parent | cee47fb86197710892e9d23cbdc35813f51845f7 (diff) | |
download | sonarqube-9b88ac1448e5f8dc359a928602ed2883515611c5.tar.gz sonarqube-9b88ac1448e5f8dc359a928602ed2883515611c5.zip |
SONAR-7510 add sonar-plugin-bridge and ReportAnalysisComponentProvider
new sonar-plugin-bridge maven module replaces modules sonar-dev-cockpit-bridge and sonar-governance-bridge
ReportAnalysisComponentProvider generalizes loading component in the Compute Engine task processing analysis report which was specifically in Dev Cockpit before, as a method of DevCockpitBridge
Diffstat (limited to 'server/sonar-plugin-bridge/src')
4 files changed, 125 insertions, 0 deletions
diff --git a/server/sonar-plugin-bridge/src/main/java/org/sonar/plugin/PrivilegedPluginBridge.java b/server/sonar-plugin-bridge/src/main/java/org/sonar/plugin/PrivilegedPluginBridge.java new file mode 100644 index 00000000000..b8cb97babac --- /dev/null +++ b/server/sonar-plugin-bridge/src/main/java/org/sonar/plugin/PrivilegedPluginBridge.java @@ -0,0 +1,46 @@ +/* + * SonarQube + * Copyright (C) 2009-2016 SonarSource SA + * mailto:contact AT sonarsource DOT com + * + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package org.sonar.plugin; + +import org.sonar.core.platform.ComponentContainer; + +/** + * Interface implemented by the Extension point exposed by the Privileged plugin that serves as the unique access + * point from the whole SQ instance into the Privileged plugin. + */ +public interface PrivilegedPluginBridge { + + String getPluginName(); + + /** + * Bootstraps the plugin. + * + * @param parent the parent ComponentContainer which provides Platform components for the Privileged plugin to use. + * + * @throws IllegalStateException if called more than once + */ + void startPlugin(ComponentContainer parent); + + /** + * This method is called when Platform is shutting down. + */ + void stopPlugin(); + +} diff --git a/server/sonar-plugin-bridge/src/main/java/org/sonar/plugin/ce/ReportAnalysisComponentProvider.java b/server/sonar-plugin-bridge/src/main/java/org/sonar/plugin/ce/ReportAnalysisComponentProvider.java new file mode 100644 index 00000000000..e47723602d3 --- /dev/null +++ b/server/sonar-plugin-bridge/src/main/java/org/sonar/plugin/ce/ReportAnalysisComponentProvider.java @@ -0,0 +1,33 @@ +/* + * SonarQube + * Copyright (C) 2009-2016 SonarSource SA + * mailto:contact AT sonarsource DOT com + * + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package org.sonar.plugin.ce; + +import java.util.List; +import org.sonar.api.ce.ComputeEngineSide; + +@ComputeEngineSide +public interface ReportAnalysisComponentProvider { + + /** + * Return the list of components to add to the state-full container of a Compute Engine report analysis task + */ + List<Object> getComponents(); + +} diff --git a/server/sonar-plugin-bridge/src/main/java/org/sonar/plugin/ce/package-info.java b/server/sonar-plugin-bridge/src/main/java/org/sonar/plugin/ce/package-info.java new file mode 100644 index 00000000000..0eda9134660 --- /dev/null +++ b/server/sonar-plugin-bridge/src/main/java/org/sonar/plugin/ce/package-info.java @@ -0,0 +1,23 @@ +/* + * SonarQube + * Copyright (C) 2009-2016 SonarSource SA + * mailto:contact AT sonarsource DOT com + * + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +@ParametersAreNonnullByDefault +package org.sonar.plugin.ce; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/server/sonar-plugin-bridge/src/main/java/org/sonar/plugin/package-info.java b/server/sonar-plugin-bridge/src/main/java/org/sonar/plugin/package-info.java new file mode 100644 index 00000000000..66b29c54962 --- /dev/null +++ b/server/sonar-plugin-bridge/src/main/java/org/sonar/plugin/package-info.java @@ -0,0 +1,23 @@ +/* + * SonarQube + * Copyright (C) 2009-2016 SonarSource SA + * mailto:contact AT sonarsource DOT com + * + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +@ParametersAreNonnullByDefault +package org.sonar.plugin; + +import javax.annotation.ParametersAreNonnullByDefault; |