From 1c92c5671fd74619609c0ab9b6a510ebd1876b6e Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Lesaint?= Date: Mon, 22 Feb 2016 16:25:20 +0100 Subject: [PATCH] add module sonar-governance-bridge --- pom.xml | 5 +++ server/pom.xml | 1 + server/sonar-governance-bridge/pom.xml | 41 +++++++++++++++++ .../server/governance/GovernanceBridge.java | 44 +++++++++++++++++++ .../sonar/server/governance/package-info.java | 23 ++++++++++ 5 files changed, 114 insertions(+) create mode 100644 server/sonar-governance-bridge/pom.xml create mode 100644 server/sonar-governance-bridge/src/main/java/org/sonar/server/governance/GovernanceBridge.java create mode 100644 server/sonar-governance-bridge/src/main/java/org/sonar/server/governance/package-info.java diff --git a/pom.xml b/pom.xml index 60a570aba74..9fd4cd98d5f 100644 --- a/pom.xml +++ b/pom.xml @@ -528,6 +528,11 @@ sonar-dev-cockpit-bridge ${project.version} + + org.sonarsource.sonarqube + sonar-governance-bridge + ${project.version} + org.sonarsource.java sonar-java-plugin diff --git a/server/pom.xml b/server/pom.xml index 6537d24e682..9046963b34d 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -17,6 +17,7 @@ sonar-server sonar-views-bridge sonar-dev-cockpit-bridge + sonar-governance-bridge sonar-web sonar-server-benchmarks diff --git a/server/sonar-governance-bridge/pom.xml b/server/sonar-governance-bridge/pom.xml new file mode 100644 index 00000000000..3c49da1690e --- /dev/null +++ b/server/sonar-governance-bridge/pom.xml @@ -0,0 +1,41 @@ + + + 4.0.0 + + org.sonarsource.sonarqube + server + 5.5-SNAPSHOT + .. + + sonar-governance-bridge + SonarQube :: Governance Bridge + + + + ${project.groupId} + sonar-plugin-api + + + ${project.groupId} + sonar-core + + + com.google.code.findbugs + jsr305 + provided + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + ${skipServerTests} + + + + + + diff --git a/server/sonar-governance-bridge/src/main/java/org/sonar/server/governance/GovernanceBridge.java b/server/sonar-governance-bridge/src/main/java/org/sonar/server/governance/GovernanceBridge.java new file mode 100644 index 00000000000..03c3e633383 --- /dev/null +++ b/server/sonar-governance-bridge/src/main/java/org/sonar/server/governance/GovernanceBridge.java @@ -0,0 +1,44 @@ +/* + * 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.server.governance; + +import org.sonar.core.platform.ComponentContainer; + +/** + * Interface implemented by the Extension point exposed by the Governance plugin that serves as the unique access point from + * the whole SQ instance into the Governance plugin. + */ +public interface GovernanceBridge { + + /** + * Bootstraps the Governance plugin. + * + * @param parent the parent ComponentContainer which provides Platform components for Governance to use. + * + * @throws IllegalStateException if called more than once + */ + void startGovernance(ComponentContainer parent); + + /** + * This method is called when Platform is shutting down. + */ + void stopGovernance(); + +} diff --git a/server/sonar-governance-bridge/src/main/java/org/sonar/server/governance/package-info.java b/server/sonar-governance-bridge/src/main/java/org/sonar/server/governance/package-info.java new file mode 100644 index 00000000000..17c8c94552d --- /dev/null +++ b/server/sonar-governance-bridge/src/main/java/org/sonar/server/governance/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.server.governance; + +import javax.annotation.ParametersAreNonnullByDefault; -- 2.39.5