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.

BulkApplyTemplateWsRequest.java 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. /*
  2. * SonarQube
  3. * Copyright (C) 2009-2017 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.sonarqube.ws.client.permission;
  21. import java.util.Collection;
  22. import javax.annotation.CheckForNull;
  23. import javax.annotation.Nullable;
  24. import org.sonar.api.resources.Qualifiers;
  25. import static java.util.Collections.singleton;
  26. import static java.util.Objects.requireNonNull;
  27. public class BulkApplyTemplateWsRequest {
  28. private String templateId;
  29. private String organization;
  30. private String templateName;
  31. private String query;
  32. private Collection<String> qualifiers = singleton(Qualifiers.PROJECT);
  33. private String visibility;
  34. private String analyzedBefore;
  35. private boolean onProvisionedOnly = false;
  36. private Collection<String> projects;
  37. @CheckForNull
  38. public String getTemplateId() {
  39. return templateId;
  40. }
  41. public BulkApplyTemplateWsRequest setTemplateId(@Nullable String templateId) {
  42. this.templateId = templateId;
  43. return this;
  44. }
  45. @CheckForNull
  46. public String getOrganization() {
  47. return organization;
  48. }
  49. public BulkApplyTemplateWsRequest setOrganization(@Nullable String s) {
  50. this.organization = s;
  51. return this;
  52. }
  53. @CheckForNull
  54. public String getTemplateName() {
  55. return templateName;
  56. }
  57. public BulkApplyTemplateWsRequest setTemplateName(@Nullable String templateName) {
  58. this.templateName = templateName;
  59. return this;
  60. }
  61. @CheckForNull
  62. public String getQuery() {
  63. return query;
  64. }
  65. public BulkApplyTemplateWsRequest setQuery(@Nullable String query) {
  66. this.query = query;
  67. return this;
  68. }
  69. public Collection<String> getQualifiers() {
  70. return qualifiers;
  71. }
  72. public BulkApplyTemplateWsRequest setQualifiers(Collection<String> qualifiers) {
  73. this.qualifiers = requireNonNull(qualifiers);
  74. return this;
  75. }
  76. @CheckForNull
  77. public String getVisibility() {
  78. return visibility;
  79. }
  80. public BulkApplyTemplateWsRequest setVisibility(@Nullable String visibility) {
  81. this.visibility = visibility;
  82. return this;
  83. }
  84. @CheckForNull
  85. public String getAnalyzedBefore() {
  86. return analyzedBefore;
  87. }
  88. public BulkApplyTemplateWsRequest setAnalyzedBefore(@Nullable String analyzedBefore) {
  89. this.analyzedBefore = analyzedBefore;
  90. return this;
  91. }
  92. public boolean isOnProvisionedOnly() {
  93. return onProvisionedOnly;
  94. }
  95. public BulkApplyTemplateWsRequest setOnProvisionedOnly(boolean onProvisionedOnly) {
  96. this.onProvisionedOnly = onProvisionedOnly;
  97. return this;
  98. }
  99. @CheckForNull
  100. public Collection<String> getProjects() {
  101. return projects;
  102. }
  103. public BulkApplyTemplateWsRequest setProjects(@Nullable Collection<String> projects) {
  104. this.projects = projects;
  105. return this;
  106. }
  107. }