aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2015-09-18 11:43:24 +0200
committerDuarte Meneses <duarte.meneses@sonarsource.com>2015-09-30 16:27:12 +0200
commit0847774db59344316629a7171c3943dbfaa3f52d (patch)
treec0ccebef9f3a29c97cb07b3fb1d1b2c667770e9e /sonar-plugin-api/src
parent1dae583a5cca52b34f6a11ed6cf515998ca06d4b (diff)
downloadsonarqube-0847774db59344316629a7171c3943dbfaa3f52d.tar.gz
sonarqube-0847774db59344316629a7171c3943dbfaa3f52d.zip
SONAR-6777 Project cache sync
Diffstat (limited to 'sonar-plugin-api/src')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectKey.java24
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectReactor.java10
2 files changed, 33 insertions, 1 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectKey.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectKey.java
new file mode 100644
index 00000000000..8238f33837f
--- /dev/null
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectKey.java
@@ -0,0 +1,24 @@
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube 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.
+ *
+ * SonarQube 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.api.batch.bootstrap;
+
+public interface ProjectKey {
+ String get();
+}
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectReactor.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectReactor.java
index 81e2dbe3267..ddb09d932ff 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectReactor.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectReactor.java
@@ -29,7 +29,7 @@ import java.util.List;
* @since 2.9
*/
@BatchSide
-public class ProjectReactor {
+public class ProjectReactor implements ProjectKey {
private ProjectDefinition root;
@@ -67,4 +67,12 @@ public class ProjectReactor {
}
return null;
}
+
+ @Override
+ public String get() {
+ if (root != null) {
+ return root.getKeyWithBranch();
+ }
+ return null;
+ }
}