You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ComponentTreeRequest.java 5.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. /*
  2. * SonarQube
  3. * Copyright (C) 2009-2018 SonarSource SA
  4. * mailto:info AT sonarsource DOT com
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 3 of the License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public License
  17. * along with this program; if not, write to the Free Software Foundation,
  18. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  19. */
  20. package org.sonar.server.measure.ws;
  21. import java.util.List;
  22. import javax.annotation.CheckForNull;
  23. import javax.annotation.Nullable;
  24. class ComponentTreeRequest {
  25. private String baseComponentId;
  26. private String component;
  27. private String branch;
  28. private String pullRequest;
  29. private String strategy;
  30. private List<String> qualifiers;
  31. private List<String> additionalFields;
  32. private String query;
  33. private List<String> sort;
  34. private Boolean asc;
  35. private String metricSort;
  36. private Integer metricPeriodSort;
  37. private String metricSortFilter;
  38. private List<String> metricKeys;
  39. private Integer page;
  40. private Integer pageSize;
  41. private String developerId;
  42. private String developerKey;
  43. /**
  44. * @deprecated since 6.6, please use {@link #getComponent()} instead
  45. */
  46. @Deprecated
  47. @CheckForNull
  48. public String getBaseComponentId() {
  49. return baseComponentId;
  50. }
  51. /**
  52. * @deprecated since 6.6, please use {@link #setComponent(String)} instead
  53. */
  54. @Deprecated
  55. public ComponentTreeRequest setBaseComponentId(@Nullable String baseComponentId) {
  56. this.baseComponentId = baseComponentId;
  57. return this;
  58. }
  59. @CheckForNull
  60. public String getComponent() {
  61. return component;
  62. }
  63. public ComponentTreeRequest setComponent(@Nullable String component) {
  64. this.component = component;
  65. return this;
  66. }
  67. @CheckForNull
  68. public String getBranch() {
  69. return branch;
  70. }
  71. public ComponentTreeRequest setBranch(@Nullable String branch) {
  72. this.branch = branch;
  73. return this;
  74. }
  75. @CheckForNull
  76. public String getPullRequest() {
  77. return pullRequest;
  78. }
  79. public ComponentTreeRequest setPullRequest(@Nullable String pullRequest) {
  80. this.pullRequest = pullRequest;
  81. return this;
  82. }
  83. @CheckForNull
  84. public String getStrategy() {
  85. return strategy;
  86. }
  87. public ComponentTreeRequest setStrategy(String strategy) {
  88. this.strategy = strategy;
  89. return this;
  90. }
  91. @CheckForNull
  92. public List<String> getQualifiers() {
  93. return qualifiers;
  94. }
  95. public ComponentTreeRequest setQualifiers(@Nullable List<String> qualifiers) {
  96. this.qualifiers = qualifiers;
  97. return this;
  98. }
  99. @CheckForNull
  100. public List<String> getAdditionalFields() {
  101. return additionalFields;
  102. }
  103. public ComponentTreeRequest setAdditionalFields(@Nullable List<String> additionalFields) {
  104. this.additionalFields = additionalFields;
  105. return this;
  106. }
  107. @CheckForNull
  108. public String getQuery() {
  109. return query;
  110. }
  111. public ComponentTreeRequest setQuery(@Nullable String query) {
  112. this.query = query;
  113. return this;
  114. }
  115. @CheckForNull
  116. public List<String> getSort() {
  117. return sort;
  118. }
  119. public ComponentTreeRequest setSort(@Nullable List<String> sort) {
  120. this.sort = sort;
  121. return this;
  122. }
  123. @CheckForNull
  124. public String getMetricSort() {
  125. return metricSort;
  126. }
  127. public ComponentTreeRequest setMetricSort(@Nullable String metricSort) {
  128. this.metricSort = metricSort;
  129. return this;
  130. }
  131. @CheckForNull
  132. public String getMetricSortFilter() {
  133. return metricSortFilter;
  134. }
  135. public ComponentTreeRequest setMetricSortFilter(@Nullable String metricSortFilter) {
  136. this.metricSortFilter = metricSortFilter;
  137. return this;
  138. }
  139. @CheckForNull
  140. public List<String> getMetricKeys() {
  141. return metricKeys;
  142. }
  143. public ComponentTreeRequest setMetricKeys(List<String> metricKeys) {
  144. this.metricKeys = metricKeys;
  145. return this;
  146. }
  147. @CheckForNull
  148. public Boolean getAsc() {
  149. return asc;
  150. }
  151. public ComponentTreeRequest setAsc(@Nullable Boolean asc) {
  152. this.asc = asc;
  153. return this;
  154. }
  155. @CheckForNull
  156. public Integer getPage() {
  157. return page;
  158. }
  159. public ComponentTreeRequest setPage(int page) {
  160. this.page = page;
  161. return this;
  162. }
  163. @CheckForNull
  164. public Integer getPageSize() {
  165. return pageSize;
  166. }
  167. public ComponentTreeRequest setPageSize(int pageSize) {
  168. this.pageSize = pageSize;
  169. return this;
  170. }
  171. @CheckForNull
  172. public Integer getMetricPeriodSort() {
  173. return metricPeriodSort;
  174. }
  175. public ComponentTreeRequest setMetricPeriodSort(@Nullable Integer metricPeriodSort) {
  176. this.metricPeriodSort = metricPeriodSort;
  177. return this;
  178. }
  179. @CheckForNull
  180. public String getDeveloperId() {
  181. return developerId;
  182. }
  183. public ComponentTreeRequest setDeveloperId(@Nullable String developerId) {
  184. this.developerId = developerId;
  185. return this;
  186. }
  187. @CheckForNull
  188. public String getDeveloperKey() {
  189. return developerKey;
  190. }
  191. public ComponentTreeRequest setDeveloperKey(@Nullable String developerKey) {
  192. this.developerKey = developerKey;
  193. return this;
  194. }
  195. }