diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2014-12-19 15:21:59 +0100 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2014-12-19 15:46:05 +0100 |
commit | 9632d46538eee762a108cc6f77f1acd75b97c733 (patch) | |
tree | ab1b7c486131d9c3927219227947c1c1986f1d1c /sonar-batch-protocol/src/main | |
parent | e9e4078d905c91c09c96d37690f562adb81d5ebf (diff) | |
download | sonarqube-9632d46538eee762a108cc6f77f1acd75b97c733.tar.gz sonarqube-9632d46538eee762a108cc6f77f1acd75b97c733.zip |
SONAR-5945 Improve export of components in report and fix upload
Diffstat (limited to 'sonar-batch-protocol/src/main')
-rw-r--r-- | sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/resource/ReportComponent.java | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/resource/ReportComponent.java b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/resource/ReportComponent.java index ef24686d4b2..578cf92d73d 100644 --- a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/resource/ReportComponent.java +++ b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/resource/ReportComponent.java @@ -19,6 +19,8 @@ */ package org.sonar.batch.protocol.output.resource; +import javax.annotation.CheckForNull; + import java.util.ArrayList; import java.util.Collection; @@ -28,7 +30,9 @@ public class ReportComponent { PRJ, MOD, DIR, - FIL + FIL, + VIEW, + SUBVIEW } private long batchId; @@ -37,6 +41,9 @@ public class ReportComponent { private String path; private String name; private Type type; + // Only for files + private Boolean isTest; + private String languageKey; private Collection<ReportComponent> children = new ArrayList<ReportComponent>(); @@ -94,6 +101,28 @@ public class ReportComponent { return type; } + public ReportComponent setTest(Boolean isTest) { + this.isTest = isTest; + return this; + } + + /** + * @return null when not a file + */ + @CheckForNull + public Boolean isTest() { + return isTest; + } + + public ReportComponent setLanguageKey(String languageKey) { + this.languageKey = languageKey; + return this; + } + + public String languageKey() { + return languageKey; + } + public ReportComponent addChild(ReportComponent child) { this.children.add(child); return this; |