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.

ProjectDataQuery.java 2.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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.batch;
  21. import javax.annotation.CheckForNull;
  22. import javax.annotation.Nullable;
  23. public class ProjectDataQuery {
  24. private String projectOrModuleKey;
  25. private String profileName;
  26. private boolean issuesMode;
  27. private String branch;
  28. private String pullRequest;
  29. private ProjectDataQuery() {
  30. // No direct call
  31. }
  32. public boolean isIssuesMode() {
  33. return issuesMode;
  34. }
  35. public ProjectDataQuery setIssuesMode(boolean issuesMode) {
  36. this.issuesMode = issuesMode;
  37. return this;
  38. }
  39. @CheckForNull
  40. public String getProfileName() {
  41. return profileName;
  42. }
  43. public ProjectDataQuery setProfileName(@Nullable String profileName) {
  44. this.profileName = profileName;
  45. return this;
  46. }
  47. public String getModuleKey() {
  48. return projectOrModuleKey;
  49. }
  50. public ProjectDataQuery setModuleKey(String projectOrModuleKey) {
  51. this.projectOrModuleKey = projectOrModuleKey;
  52. return this;
  53. }
  54. @CheckForNull
  55. public String getBranch() {
  56. return branch;
  57. }
  58. public ProjectDataQuery setBranch(@Nullable String branch) {
  59. this.branch = branch;
  60. return this;
  61. }
  62. @CheckForNull
  63. public String getPullRequest() {
  64. return pullRequest;
  65. }
  66. public ProjectDataQuery setPullRequest(@Nullable String pullRequest) {
  67. this.pullRequest = pullRequest;
  68. return this;
  69. }
  70. public static ProjectDataQuery create() {
  71. return new ProjectDataQuery();
  72. }
  73. }