]> source.dussan.org Git - sonarqube.git/commitdiff
add module sonar-governance-bridge
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Mon, 22 Feb 2016 15:25:20 +0000 (16:25 +0100)
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Wed, 24 Feb 2016 14:54:03 +0000 (15:54 +0100)
pom.xml
server/pom.xml
server/sonar-governance-bridge/pom.xml [new file with mode: 0644]
server/sonar-governance-bridge/src/main/java/org/sonar/server/governance/GovernanceBridge.java [new file with mode: 0644]
server/sonar-governance-bridge/src/main/java/org/sonar/server/governance/package-info.java [new file with mode: 0644]

diff --git a/pom.xml b/pom.xml
index 60a570aba742585c603dc3984d55d17f9f969da9..9fd4cd98d5f0ac7e5a369ec3e775dc01b12652fb 100644 (file)
--- a/pom.xml
+++ b/pom.xml
         <artifactId>sonar-dev-cockpit-bridge</artifactId>
         <version>${project.version}</version>
       </dependency>
+      <dependency>
+        <groupId>org.sonarsource.sonarqube</groupId>
+        <artifactId>sonar-governance-bridge</artifactId>
+        <version>${project.version}</version>
+      </dependency>
       <dependency>
         <groupId>org.sonarsource.java</groupId>
         <artifactId>sonar-java-plugin</artifactId>
index 6537d24e682ff0555681aea5fe7263c56754a94a..9046963b34d30fc623b4e69bb9631db6ad2d566f 100644 (file)
@@ -17,6 +17,7 @@
     <module>sonar-server</module>
     <module>sonar-views-bridge</module>
     <module>sonar-dev-cockpit-bridge</module>
+    <module>sonar-governance-bridge</module>
     <module>sonar-web</module>
     <module>sonar-server-benchmarks</module>
   </modules>
diff --git a/server/sonar-governance-bridge/pom.xml b/server/sonar-governance-bridge/pom.xml
new file mode 100644 (file)
index 0000000..3c49da1
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.sonarsource.sonarqube</groupId>
+    <artifactId>server</artifactId>
+    <version>5.5-SNAPSHOT</version>
+    <relativePath>..</relativePath>
+  </parent>
+  <artifactId>sonar-governance-bridge</artifactId>
+  <name>SonarQube :: Governance Bridge</name>
+
+  <dependencies>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>sonar-plugin-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>sonar-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>com.google.code.findbugs</groupId>
+      <artifactId>jsr305</artifactId>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <skipTests>${skipServerTests}</skipTests>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
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 (file)
index 0000000..03c3e63
--- /dev/null
@@ -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 (file)
index 0000000..17c8c94
--- /dev/null
@@ -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;