]> source.dussan.org Git - sonarqube.git/commitdiff
Apply naming conventions in sonar-ws protobuf
authorDaniel Schwarz <daniel.schwarz@sonarsource.com>
Sat, 25 Nov 2017 06:21:02 +0000 (07:21 +0100)
committerDaniel Schwarz <bartfastiel@users.noreply.github.com>
Wed, 29 Nov 2017 19:24:11 +0000 (20:24 +0100)
195 files changed:
server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/OrganizationTester.java
server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/ProjectTester.java
server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/QProfileTester.java
server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/UserTester.java
server/sonar-server/src/main/java/org/sonar/server/component/ws/SearchAction.java
server/sonar-server/src/main/java/org/sonar/server/component/ws/ShowAction.java
server/sonar-server/src/main/java/org/sonar/server/component/ws/TreeAction.java
server/sonar-server/src/main/java/org/sonar/server/issue/IssueQueryFactory.java
server/sonar-server/src/main/java/org/sonar/server/issue/ws/ComponentTagsAction.java
server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchAction.java
server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchAdditionalField.java
server/sonar-server/src/main/java/org/sonar/server/measure/ws/ComponentAction.java
server/sonar-server/src/main/java/org/sonar/server/measure/ws/ComponentTreeAction.java
server/sonar-server/src/main/java/org/sonar/server/measure/ws/ComponentTreeDataLoader.java
server/sonar-server/src/main/java/org/sonar/server/measure/ws/ComponentTreeSort.java
server/sonar-server/src/main/java/org/sonar/server/measure/ws/HasMeasure.java
server/sonar-server/src/main/java/org/sonar/server/permission/ws/SearchProjectPermissionsAction.java
server/sonar-server/src/main/java/org/sonar/server/permission/ws/SearchProjectPermissionsDataLoader.java
server/sonar-server/src/main/java/org/sonar/server/permission/ws/template/AddProjectCreatorToTemplateAction.java
server/sonar-server/src/main/java/org/sonar/server/permission/ws/template/AddUserToTemplateAction.java
server/sonar-server/src/main/java/org/sonar/server/permission/ws/template/ApplyTemplateAction.java
server/sonar-server/src/main/java/org/sonar/server/permission/ws/template/BulkApplyTemplateAction.java
server/sonar-server/src/main/java/org/sonar/server/permission/ws/template/CreateTemplateAction.java
server/sonar-server/src/main/java/org/sonar/server/permission/ws/template/DeleteTemplateAction.java
server/sonar-server/src/main/java/org/sonar/server/permission/ws/template/RemoveProjectCreatorFromTemplateAction.java
server/sonar-server/src/main/java/org/sonar/server/permission/ws/template/RemoveUserFromTemplateAction.java
server/sonar-server/src/main/java/org/sonar/server/permission/ws/template/SearchTemplatesAction.java
server/sonar-server/src/main/java/org/sonar/server/permission/ws/template/SearchTemplatesDataLoader.java
server/sonar-server/src/main/java/org/sonar/server/permission/ws/template/SetDefaultTemplateAction.java
server/sonar-server/src/main/java/org/sonar/server/permission/ws/template/UpdateTemplateAction.java
server/sonar-server/src/main/java/org/sonar/server/project/ws/BulkDeleteAction.java
server/sonar-server/src/main/java/org/sonar/server/project/ws/BulkUpdateKeyAction.java
server/sonar-server/src/main/java/org/sonar/server/project/ws/SearchAction.java
server/sonar-server/src/main/java/org/sonar/server/project/ws/UpdateKeyAction.java
server/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/SearchAction.java
server/sonar-server/src/test/java/org/sonar/server/component/ws/SearchActionTest.java
server/sonar-server/src/test/java/org/sonar/server/issue/IssueQueryFactoryTest.java
server/sonar-server/src/test/java/org/sonar/server/issue/ws/ComponentTagsActionTest.java
server/sonar-server/src/test/java/org/sonar/server/measure/ws/ComponentTreeSortTest.java
server/sonar-server/src/test/java/org/sonar/server/organization/ws/SearchMembersActionTest.java
server/sonar-server/src/test/java/org/sonar/server/project/ws/SearchActionTest.java
sonar-ws/src/main/java/org/sonarqube/ws/client/component/ComponentsService.java
sonar-ws/src/main/java/org/sonarqube/ws/client/component/SearchRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/component/SearchWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/component/ShowRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/component/ShowWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/component/SuggestionsRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/component/SuggestionsWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/component/TreeRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/component/TreeWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssuesService.java
sonar-ws/src/main/java/org/sonarqube/ws/client/issue/SearchRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/issue/SearchWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/measure/ComponentRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/measure/ComponentTreeRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/measure/ComponentTreeWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/measure/ComponentWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/measure/MeasuresService.java
sonar-ws/src/main/java/org/sonarqube/ws/client/organization/CreateRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/organization/CreateWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/organization/OrganizationService.java
sonar-ws/src/main/java/org/sonarqube/ws/client/organization/SearchMembersRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/organization/SearchMembersWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/organization/SearchRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/organization/SearchWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/organization/UpdateProjectVisibilityRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/organization/UpdateProjectVisibilityWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/organization/UpdateRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/organization/UpdateWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddGroupRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddGroupToTemplateRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddGroupToTemplateWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddGroupWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddProjectCreatorToTemplateRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddProjectCreatorToTemplateWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddUserRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddUserToTemplateRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddUserToTemplateWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddUserWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/ApplyTemplateRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/ApplyTemplateWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/BulkApplyTemplateRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/BulkApplyTemplateWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/CreateTemplateRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/CreateTemplateWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/DeleteTemplateRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/DeleteTemplateWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/GroupsRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/GroupsWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/PermissionsService.java
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/RemoveGroupFromTemplateRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/RemoveGroupFromTemplateWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/RemoveGroupRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/RemoveGroupWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/RemoveProjectCreatorFromTemplateRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/RemoveProjectCreatorFromTemplateWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/RemoveUserFromTemplateRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/RemoveUserFromTemplateWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/RemoveUserRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/RemoveUserWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/SearchProjectPermissionsRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/SearchProjectPermissionsWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/SearchTemplatesRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/SearchTemplatesWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/SetDefaultTemplateRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/SetDefaultTemplateWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/UpdateTemplateRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/UpdateTemplateWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/UsersRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/UsersWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/project/BulkUpdateKeyRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/project/BulkUpdateKeyWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/project/ProjectsService.java
sonar-ws/src/main/java/org/sonarqube/ws/client/project/SearchRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/project/SearchWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/project/UpdateKeyRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/project/UpdateKeyWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/ActivateRuleRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/ActivateRuleWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/ChangelogRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/ChangelogWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/QualityProfilesService.java
sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/RestoreRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/RestoreWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/SearchRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/SearchWsRequest.java [deleted file]
sonar-ws/src/test/java/org/sonarqube/ws/client/component/ComponentsServiceTest.java
sonar-ws/src/test/java/org/sonarqube/ws/client/issue/SearchRequestTest.java [new file with mode: 0644]
sonar-ws/src/test/java/org/sonarqube/ws/client/issue/SearchWsRequestTest.java [deleted file]
sonar-ws/src/test/java/org/sonarqube/ws/client/measure/MeasuresServiceTest.java
sonar-ws/src/test/java/org/sonarqube/ws/client/organization/OrganizationServiceTest.java
sonar-ws/src/test/java/org/sonarqube/ws/client/permission/PermissionsServiceTest.java
sonar-ws/src/test/java/org/sonarqube/ws/client/project/ProjectsServiceTest.java
sonar-ws/src/test/java/org/sonarqube/ws/client/project/SearchRequestTest.java [new file with mode: 0644]
sonar-ws/src/test/java/org/sonarqube/ws/client/project/SearchWsRequestTest.java [deleted file]
sonar-ws/src/test/java/org/sonarqube/ws/client/project/UpdateKeyRequestTest.java [new file with mode: 0644]
sonar-ws/src/test/java/org/sonarqube/ws/client/project/UpdateKeyWsRequestTest.java [deleted file]
sonar-ws/src/test/java/org/sonarqube/ws/client/qualityprofile/QualityProfilesServiceTest.java
tests/src/test/java/org/sonarqube/tests/analysis/AnalysisEsResilienceTest.java
tests/src/test/java/org/sonarqube/tests/analysis/FavoriteTest.java
tests/src/test/java/org/sonarqube/tests/analysis/FileExclusionsTest.java
tests/src/test/java/org/sonarqube/tests/analysis/PermissionTest.java
tests/src/test/java/org/sonarqube/tests/analysis/ScannerTest.java
tests/src/test/java/org/sonarqube/tests/authorization/ExecuteAnalysisPermissionTest.java
tests/src/test/java/org/sonarqube/tests/authorization/IssuePermissionTest.java
tests/src/test/java/org/sonarqube/tests/authorization/PermissionSearchTest.java
tests/src/test/java/org/sonarqube/tests/authorization/PermissionTemplatePageTest.java
tests/src/test/java/org/sonarqube/tests/authorization/PermissionTemplateTest.java
tests/src/test/java/org/sonarqube/tests/authorization/ProvisioningPermissionTest.java
tests/src/test/java/org/sonarqube/tests/authorization/QualityProfileAdminPermissionTest.java
tests/src/test/java/org/sonarqube/tests/ce/ReportFailureNotificationTest.java
tests/src/test/java/org/sonarqube/tests/component/ComponentsWsTest.java
tests/src/test/java/org/sonarqube/tests/duplication/CrossProjectDuplicationsTest.java
tests/src/test/java/org/sonarqube/tests/duplication/DuplicationsTest.java
tests/src/test/java/org/sonarqube/tests/issue/CommonRulesTest.java
tests/src/test/java/org/sonarqube/tests/issue/IssueActionTest.java
tests/src/test/java/org/sonarqube/tests/issue/IssueBulkChangeTest.java
tests/src/test/java/org/sonarqube/tests/issue/IssueFilterOnCommonRulesTest.java
tests/src/test/java/org/sonarqube/tests/issue/IssueNotificationsTest.java
tests/src/test/java/org/sonarqube/tests/issue/IssueSearchTest.java
tests/src/test/java/org/sonarqube/tests/issue/IssueTagsTest.java
tests/src/test/java/org/sonarqube/tests/issue/IssueTrackingTest.java
tests/src/test/java/org/sonarqube/tests/issue/IssueWorkflowTest.java
tests/src/test/java/org/sonarqube/tests/issue/OrganizationIssueAssignTest.java
tests/src/test/java/org/sonarqube/tests/lite/LiteTest.java
tests/src/test/java/org/sonarqube/tests/measure/MeasuresWsTest.java
tests/src/test/java/org/sonarqube/tests/organization/BillingTest.java
tests/src/test/java/org/sonarqube/tests/organization/OrganizationMembershipTest.java
tests/src/test/java/org/sonarqube/tests/organization/OrganizationTest.java
tests/src/test/java/org/sonarqube/tests/organization/PersonalOrganizationTest.java
tests/src/test/java/org/sonarqube/tests/performance/scanner/DuplicationTest.java
tests/src/test/java/org/sonarqube/tests/project/ProjectBulkDeletionTest.java
tests/src/test/java/org/sonarqube/tests/project/ProjectDeletionTest.java
tests/src/test/java/org/sonarqube/tests/project/ProjectKeyUpdateTest.java
tests/src/test/java/org/sonarqube/tests/project/ProjectProvisioningTest.java
tests/src/test/java/org/sonarqube/tests/project/ProjectSearchTest.java
tests/src/test/java/org/sonarqube/tests/project/ProjectVisibilityPageTest.java
tests/src/test/java/org/sonarqube/tests/qualityGate/OrganizationQualityGateUiTest.java
tests/src/test/java/org/sonarqube/tests/qualityGate/QualityGateTest.java
tests/src/test/java/org/sonarqube/tests/qualityModel/TechnicalDebtInIssueChangelogTest.java
tests/src/test/java/org/sonarqube/tests/qualityModel/TechnicalDebtTest.java
tests/src/test/java/org/sonarqube/tests/qualityProfile/BuiltInQualityProfilesNotificationTest.java
tests/src/test/java/org/sonarqube/tests/qualityProfile/BuiltInQualityProfilesTest.java
tests/src/test/java/org/sonarqube/tests/qualityProfile/CustomQualityProfilesTest.java
tests/src/test/java/org/sonarqube/tests/qualityProfile/QualityProfilesEditTest.java
tests/src/test/java/org/sonarqube/tests/qualityProfile/QualityProfilesWsTest.java
tests/src/test/java/org/sonarqube/tests/rule/RulesWsTest.java
tests/src/test/java/org/sonarqube/tests/serverSystem/LogsTest.java
tests/src/test/java/org/sonarqube/tests/serverSystem/RestartTest.java
tests/src/test/java/org/sonarqube/tests/settings/SettingsTest.java
tests/src/test/java/org/sonarqube/tests/upgrade/UpgradeTest.java
tests/src/test/java/org/sonarqube/tests/user/OAuth2IdentityProviderTest.java
tests/src/test/java/util/ItUtils.java
tests/src/test/java/util/issue/IssueRule.java
tests/src/test/java/util/user/UserRule.java

index 08c317c6d406e24cf71bff8693efd434f9c55387..f38dbde22e81e9940c2381933e1bb84939f3ab4c 100644 (file)
@@ -28,10 +28,10 @@ import org.sonarqube.ws.Organizations;
 import org.sonarqube.ws.Users;
 import org.sonarqube.ws.client.HttpException;
 import org.sonarqube.ws.client.PostRequest;
-import org.sonarqube.ws.client.organization.CreateWsRequest;
+import org.sonarqube.ws.client.organization.CreateRequest;
 import org.sonarqube.ws.client.organization.OrganizationService;
-import org.sonarqube.ws.client.organization.SearchMembersWsRequest;
-import org.sonarqube.ws.client.organization.SearchWsRequest;
+import org.sonarqube.ws.client.organization.SearchMembersRequest;
+import org.sonarqube.ws.client.organization.SearchRequest;
 import org.sonarqube.ws.client.user.GroupsRequest;
 
 import static java.util.Arrays.stream;
@@ -51,16 +51,16 @@ public class OrganizationTester {
   }
 
   void deleteNonGuardedOrganizations() {
-    service().search(SearchWsRequest.builder().build()).getOrganizationsList()
+    service().search(SearchRequest.builder().build()).getOrganizationsList()
       .stream()
       .filter(o -> !o.getKey().equals("default-organization"))
       .forEach(organization -> service().delete(organization.getKey()));
   }
 
   @SafeVarargs
-  public final Organizations.Organization generate(Consumer<CreateWsRequest.Builder>... populators) {
+  public final Organizations.Organization generate(Consumer<CreateRequest.Builder>... populators) {
     int id = ID_GENERATOR.getAndIncrement();
-    CreateWsRequest.Builder request = new CreateWsRequest.Builder()
+    CreateRequest.Builder request = new CreateRequest.Builder()
       .setKey("org" + id)
       .setName("Org " + id)
       .setDescription("Description " + id)
@@ -75,14 +75,14 @@ public class OrganizationTester {
   }
 
   public Organizations.Organization getDefaultOrganization() {
-    return service().search(SearchWsRequest.builder().build()).getOrganizationsList()
+    return service().search(SearchRequest.builder().build()).getOrganizationsList()
       .stream()
       .filter(o -> o.getKey().equals("default-organization"))
       .findFirst().orElseThrow(() -> new IllegalStateException("Can't find default organization"));
   }
 
   public OrganizationTester assertThatOrganizationDoesNotExist(String organizationKey) {
-    SearchWsRequest request = new SearchWsRequest.Builder().setOrganizations(organizationKey).build();
+    SearchRequest request = new SearchRequest.Builder().setOrganizations(organizationKey).build();
     Organizations.SearchWsResponse searchWsResponse = service().search(request);
     Assertions.assertThat(searchWsResponse.getOrganizationsList()).isEmpty();
     return this;
@@ -116,7 +116,7 @@ public class OrganizationTester {
   }
 
   private void verifyOrganizationMembership(@Nullable Organizations.Organization organization, String userLogin, boolean isMember) {
-    List<Organizations.User> users = service().searchMembers(new SearchMembersWsRequest()
+    List<Organizations.User> users = service().searchMembers(new SearchMembersRequest()
       .setQuery(userLogin)
       .setSelected("selected")
       .setOrganization(organization != null ? organization.getKey() : null))
index 9c48acaf47bc471a2d7e092befaa377b4cd9acae..00eaf34ca73a0d2e6a19aa07c08cec82601803ba 100644 (file)
@@ -27,7 +27,7 @@ import org.sonarqube.ws.Projects;
 import org.sonarqube.ws.client.project.CreateRequest;
 import org.sonarqube.ws.client.project.DeleteRequest;
 import org.sonarqube.ws.client.project.ProjectsService;
-import org.sonarqube.ws.client.project.SearchWsRequest;
+import org.sonarqube.ws.client.project.SearchRequest;
 
 import static java.util.Arrays.stream;
 import static java.util.Collections.singletonList;
@@ -44,7 +44,7 @@ public class ProjectTester {
 
   void deleteAll() {
     ProjectsService service = session.wsClient().projects();
-    service.search(SearchWsRequest.builder().setQualifiers(singletonList("TRK")).build()).getComponentsList().forEach(p ->
+    service.search(SearchRequest.builder().setQualifiers(singletonList("TRK")).build()).getComponentsList().forEach(p ->
       service.delete(DeleteRequest.builder().setKey(p.getKey()).build()));
   }
 
index 102581d155dce407feba4d3d87e6f77708851c95..38e81ca6769395ffc91d8d5655740d6b4448bbdc 100644 (file)
@@ -29,7 +29,7 @@ import org.sonarqube.ws.Qualityprofiles.CreateWsResponse.QualityProfile;
 import org.sonarqube.ws.Rules;
 import org.sonarqube.ws.Projects.CreateWsResponse.Project;
 import org.sonarqube.ws.client.HttpException;
-import org.sonarqube.ws.client.qualityprofile.ActivateRuleWsRequest;
+import org.sonarqube.ws.client.qualityprofile.ActivateRuleRequest;
 import org.sonarqube.ws.client.qualityprofile.AddProjectRequest;
 import org.sonarqube.ws.client.qualityprofile.CreateRequest;
 import org.sonarqube.ws.client.qualityprofile.QualityProfilesService;
@@ -69,7 +69,7 @@ public class QProfileTester {
   }
 
   public QProfileTester activateRule(String profileKey, String ruleKey) {
-    ActivateRuleWsRequest request = ActivateRuleWsRequest.builder()
+    ActivateRuleRequest request = ActivateRuleRequest.builder()
       .setKey(profileKey)
       .setRuleKey(ruleKey)
       .build();
index d5546e5761a29433f609ae9a9e477515039e7954..9445767c8f17e58a114dfe3f7799c463781df760 100644 (file)
@@ -74,7 +74,7 @@ public class UserTester {
   @SafeVarargs
   public final User generateAdministrator(Consumer<CreateRequest.Builder>... populators) {
     User user = generate(populators);
-    session.wsClient().permissions().addUser(new org.sonarqube.ws.client.permission.AddUserWsRequest().setLogin(user.getLogin()).setPermission("admin"));
+    session.wsClient().permissions().addUser(new org.sonarqube.ws.client.permission.AddUserRequest().setLogin(user.getLogin()).setPermission("admin"));
     session.wsClient().userGroups().addUser(new AddUserRequest().setLogin(user.getLogin()).setName("sonar-administrators"));
     return user;
   }
index 8e847517bc8ed71e7aa88d9701f1e51ce2224bbe..2307faf3e85b8854cda144695166c8d1a7ddc531 100644 (file)
@@ -43,7 +43,7 @@ import org.sonar.server.organization.DefaultOrganizationProvider;
 import org.sonar.server.ws.WsUtils;
 import org.sonarqube.ws.Components;
 import org.sonarqube.ws.Components.SearchWsResponse;
-import org.sonarqube.ws.client.component.SearchWsRequest;
+import org.sonarqube.ws.client.component.SearchRequest;
 
 import static com.google.common.base.Preconditions.checkArgument;
 import static java.util.stream.Collectors.toMap;
@@ -116,8 +116,8 @@ public class SearchAction implements ComponentsWsAction {
     writeProtobuf(searchWsResponse, wsRequest, wsResponse);
   }
 
-  private static SearchWsRequest toSearchWsRequest(Request request) {
-    return new SearchWsRequest()
+  private static SearchRequest toSearchWsRequest(Request request) {
+    return new SearchRequest()
       .setOrganization(request.param(PARAM_ORGANIZATION))
       .setQualifiers(request.mandatoryParamAsStrings(PARAM_QUALIFIERS))
       .setLanguage(request.param(PARAM_LANGUAGE))
@@ -126,7 +126,7 @@ public class SearchAction implements ComponentsWsAction {
       .setPageSize(request.mandatoryParamAsInt(Param.PAGE_SIZE));
   }
 
-  private SearchWsResponse doHandle(SearchWsRequest request) {
+  private SearchWsResponse doHandle(SearchRequest request) {
     try (DbSession dbSession = dbClient.openSession(false)) {
       OrganizationDto organization = getOrganization(dbSession, request);
       ComponentQuery esQuery = buildEsQuery(organization, request);
@@ -148,7 +148,7 @@ public class SearchAction implements ComponentsWsAction {
     return projects.stream().collect(toMap(ComponentDto::uuid, ComponentDto::getDbKey));
   }
 
-  private OrganizationDto getOrganization(DbSession dbSession, SearchWsRequest request) {
+  private OrganizationDto getOrganization(DbSession dbSession, SearchRequest request) {
     String organizationKey = Optional.ofNullable(request.getOrganization())
       .orElseGet(defaultOrganizationProvider.get()::getKey);
     return WsUtils.checkFoundWithOptional(
@@ -156,7 +156,7 @@ public class SearchAction implements ComponentsWsAction {
       "No organizationDto with key '%s'", organizationKey);
   }
 
-  private static ComponentQuery buildEsQuery(OrganizationDto organization, SearchWsRequest request) {
+  private static ComponentQuery buildEsQuery(OrganizationDto organization, SearchRequest request) {
     return ComponentQuery.builder()
       .setQuery(request.getQuery())
       .setOrganization(organization.getUuid())
index 8288af7cec1a69bc797673023b910dcdf18bba90..3799794e0122fc2a7769373341fea0015dc7457e 100644 (file)
@@ -35,7 +35,7 @@ import org.sonar.db.organization.OrganizationDto;
 import org.sonar.server.component.ComponentFinder;
 import org.sonar.server.user.UserSession;
 import org.sonarqube.ws.Components.ShowWsResponse;
-import org.sonarqube.ws.client.component.ShowWsRequest;
+import org.sonarqube.ws.client.component.ShowRequest;
 
 import static com.google.common.base.Preconditions.checkArgument;
 import static java.lang.String.format;
@@ -100,13 +100,13 @@ public class ShowAction implements ComponentsWsAction {
 
   @Override
   public void handle(Request request, Response response) throws Exception {
-    ShowWsRequest showWsRequest = toShowWsRequest(request);
-    ShowWsResponse showWsResponse = doHandle(showWsRequest);
+    ShowRequest showRequest = toShowWsRequest(request);
+    ShowWsResponse showWsResponse = doHandle(showRequest);
 
     writeProtobuf(showWsResponse, request, response);
   }
 
-  private ShowWsResponse doHandle(ShowWsRequest request) {
+  private ShowWsResponse doHandle(ShowRequest request) {
     try (DbSession dbSession = dbClient.openSession(false)) {
       ComponentDto component = loadComponent(dbSession, request);
       Optional<SnapshotDto> lastAnalysis = dbClient.snapshotDao().selectLastAnalysisByComponentUuid(dbSession, component.projectUuid());
@@ -116,7 +116,7 @@ public class ShowAction implements ComponentsWsAction {
     }
   }
 
-  private ComponentDto loadComponent(DbSession dbSession, ShowWsRequest request) {
+  private ComponentDto loadComponent(DbSession dbSession, ShowRequest request) {
     String componentId = request.getId();
     String componentKey = request.getKey();
     String branch = request.getBranch();
@@ -139,8 +139,8 @@ public class ShowAction implements ComponentsWsAction {
     return response.build();
   }
 
-  private static ShowWsRequest toShowWsRequest(Request request) {
-    return new ShowWsRequest()
+  private static ShowRequest toShowWsRequest(Request request) {
+    return new ShowRequest()
       .setId(request.param(PARAM_COMPONENT_ID))
       .setKey(request.param(PARAM_COMPONENT))
       .setBranch(request.param(PARAM_BRANCH));
index 1bd0014c0b08fe08079a5e2025fe3eeb44bbe283..e2c31ae4325b58d8b887834ebfebade1eacc8aa1 100644 (file)
@@ -52,7 +52,7 @@ import org.sonar.server.component.ComponentFinder;
 import org.sonar.server.user.UserSession;
 import org.sonarqube.ws.Components;
 import org.sonarqube.ws.Components.TreeWsResponse;
-import org.sonarqube.ws.client.component.TreeWsRequest;
+import org.sonarqube.ws.client.component.TreeRequest;
 
 import static com.google.common.base.Preconditions.checkArgument;
 import static java.lang.String.CASE_INSENSITIVE_ORDER;
@@ -170,26 +170,26 @@ public class TreeAction implements ComponentsWsAction {
     writeProtobuf(treeWsResponse, request, response);
   }
 
-  private TreeWsResponse doHandle(TreeWsRequest treeWsRequest) {
+  private TreeWsResponse doHandle(TreeRequest treeRequest) {
     try (DbSession dbSession = dbClient.openSession(false)) {
-      ComponentDto baseComponent = loadComponent(dbSession, treeWsRequest);
+      ComponentDto baseComponent = loadComponent(dbSession, treeRequest);
       checkPermissions(baseComponent);
       OrganizationDto organizationDto = componentFinder.getOrganization(dbSession, baseComponent);
 
-      ComponentTreeQuery query = toComponentTreeQuery(treeWsRequest, baseComponent);
+      ComponentTreeQuery query = toComponentTreeQuery(treeRequest, baseComponent);
       List<ComponentDto> components = dbClient.componentDao().selectDescendants(dbSession, query);
       int total = components.size();
-      components = sortComponents(components, treeWsRequest);
-      components = paginateComponents(components, treeWsRequest);
+      components = sortComponents(components, treeRequest);
+      components = paginateComponents(components, treeRequest);
 
       Map<String, ComponentDto> referenceComponentsByUuid = searchReferenceComponentsByUuid(dbSession, components);
 
       return buildResponse(baseComponent, organizationDto, components, referenceComponentsByUuid,
-        Paging.forPageIndex(treeWsRequest.getPage()).withPageSize(treeWsRequest.getPageSize()).andTotal(total));
+        Paging.forPageIndex(treeRequest.getPage()).withPageSize(treeRequest.getPageSize()).andTotal(total));
     }
   }
 
-  private ComponentDto loadComponent(DbSession dbSession, TreeWsRequest request) {
+  private ComponentDto loadComponent(DbSession dbSession, TreeRequest request) {
     String componentId = request.getBaseComponentId();
     String componentKey = request.getBaseComponentKey();
     String branch = request.getBranch();
@@ -246,7 +246,7 @@ public class TreeAction implements ComponentsWsAction {
     return wsComponent;
   }
 
-  private ComponentTreeQuery toComponentTreeQuery(TreeWsRequest request, ComponentDto baseComponent) {
+  private ComponentTreeQuery toComponentTreeQuery(TreeRequest request, ComponentDto baseComponent) {
     List<String> childrenQualifiers = childrenQualifiers(request, baseComponent.qualifier());
 
     ComponentTreeQuery.Builder query = ComponentTreeQuery.builder()
@@ -263,7 +263,7 @@ public class TreeAction implements ComponentsWsAction {
   }
 
   @CheckForNull
-  private List<String> childrenQualifiers(TreeWsRequest request, String baseQualifier) {
+  private List<String> childrenQualifiers(TreeRequest request, String baseQualifier) {
     List<String> requestQualifiers = request.getQualifiers();
     List<String> childrenQualifiers = null;
     if (LEAVES_STRATEGY.equals(request.getStrategy())) {
@@ -283,8 +283,8 @@ public class TreeAction implements ComponentsWsAction {
     return new ArrayList<>(qualifiersIntersection);
   }
 
-  private static TreeWsRequest toTreeWsRequest(Request request) {
-    return new TreeWsRequest()
+  private static TreeRequest toTreeWsRequest(Request request) {
+    return new TreeRequest()
       .setBaseComponentId(request.param(PARAM_COMPONENT_ID))
       .setBaseComponentKey(request.param(PARAM_COMPONENT))
       .setBranch(request.param(PARAM_BRANCH))
@@ -297,12 +297,12 @@ public class TreeAction implements ComponentsWsAction {
       .setPageSize(request.mandatoryParamAsInt(Param.PAGE_SIZE));
   }
 
-  private static List<ComponentDto> paginateComponents(List<ComponentDto> components, TreeWsRequest wsRequest) {
+  private static List<ComponentDto> paginateComponents(List<ComponentDto> components, TreeRequest wsRequest) {
     return components.stream().skip(offset(wsRequest.getPage(), wsRequest.getPageSize()))
       .limit(wsRequest.getPageSize()).collect(toList());
   }
 
-  public static List<ComponentDto> sortComponents(List<ComponentDto> components, TreeWsRequest wsRequest) {
+  public static List<ComponentDto> sortComponents(List<ComponentDto> components, TreeRequest wsRequest) {
     List<String> sortParameters = wsRequest.getSort();
     if (sortParameters == null || sortParameters.isEmpty()) {
       return components;
index 63974471ac085665544e285b88f24eba1d25159d..a4a2f341f48fb96c5476839af8cf75302303c15c 100644 (file)
@@ -53,7 +53,7 @@ import org.sonar.db.component.ComponentDto;
 import org.sonar.db.component.SnapshotDto;
 import org.sonar.db.organization.OrganizationDto;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.client.issue.SearchWsRequest;
+import org.sonarqube.ws.client.issue.SearchRequest;
 
 import static com.google.common.base.Preconditions.checkArgument;
 import static com.google.common.collect.Lists.newArrayList;
@@ -99,7 +99,7 @@ public class IssueQueryFactory {
     this.userSession = userSession;
   }
 
-  public IssueQuery create(SearchWsRequest request) {
+  public IssueQuery create(SearchRequest request) {
     try (DbSession dbSession = dbClient.openSession(false)) {
       IssueQuery.Builder builder = IssueQuery.builder()
         .issueKeys(request.getIssues())
@@ -155,7 +155,7 @@ public class IssueQueryFactory {
     return organization.map(OrganizationDto::getUuid).orElse(UNKNOWN);
   }
 
-  private Date buildCreatedAfterFromRequest(DbSession dbSession, SearchWsRequest request, List<ComponentDto> componentUuids) {
+  private Date buildCreatedAfterFromRequest(DbSession dbSession, SearchRequest request, List<ComponentDto> componentUuids) {
     Date createdAfter = parseStartingDateOrDateTime(request.getCreatedAfter());
     String createdInLast = request.getCreatedInLast();
 
@@ -192,7 +192,7 @@ public class IssueQueryFactory {
     return assignees;
   }
 
-  private boolean mergeDeprecatedComponentParameters(DbSession session, SearchWsRequest request, List<ComponentDto> allComponents) {
+  private boolean mergeDeprecatedComponentParameters(DbSession session, SearchRequest request, List<ComponentDto> allComponents) {
     Boolean onComponentOnly = request.getOnComponentOnly();
     Collection<String> components = request.getComponents();
     Collection<String> componentUuids = request.getComponentUuids();
@@ -232,7 +232,7 @@ public class IssueQueryFactory {
   }
 
   private void addComponentParameters(IssueQuery.Builder builder, DbSession session, boolean onComponentOnly,
-    List<ComponentDto> components, SearchWsRequest request) {
+    List<ComponentDto> components, SearchRequest request) {
 
     builder.onComponentOnly(onComponentOnly);
     if (onComponentOnly) {
@@ -259,7 +259,7 @@ public class IssueQueryFactory {
     addComponentsBasedOnQualifier(builder, session, components, request);
   }
 
-  private void addComponentsBasedOnQualifier(IssueQuery.Builder builder, DbSession dbSession, List<ComponentDto> components, SearchWsRequest request) {
+  private void addComponentsBasedOnQualifier(IssueQuery.Builder builder, DbSession dbSession, List<ComponentDto> components, SearchRequest request) {
     if (components.isEmpty()) {
       return;
     }
@@ -310,7 +310,7 @@ public class IssueQueryFactory {
     builder.viewUuids(filteredViewUuids);
   }
 
-  private void addApplications(IssueQuery.Builder builder, DbSession dbSession, List<ComponentDto> applications, SearchWsRequest request) {
+  private void addApplications(IssueQuery.Builder builder, DbSession dbSession, List<ComponentDto> applications, SearchRequest request) {
     Set<String> authorizedApplicationUuids = applications.stream()
       .filter(app -> userSession.hasComponentPermission(UserRole.USER, app))
       .map(ComponentDto::uuid)
@@ -320,7 +320,7 @@ public class IssueQueryFactory {
     addCreatedAfterByProjects(builder, dbSession, request, authorizedApplicationUuids);
   }
 
-  private void addCreatedAfterByProjects(IssueQuery.Builder builder, DbSession dbSession, SearchWsRequest request, Set<String> applicationUuids) {
+  private void addCreatedAfterByProjects(IssueQuery.Builder builder, DbSession dbSession, SearchRequest request, Set<String> applicationUuids) {
     if (request.getSinceLeakPeriod() == null || !request.getSinceLeakPeriod()) {
       return;
     }
index a28c041a37288d06a380ce121f74605d50754e15..5bb5d38c8f1c4da8e368d68c95a7544c67ae630e 100644 (file)
@@ -29,7 +29,7 @@ import org.sonar.api.utils.text.JsonWriter;
 import org.sonar.server.issue.IssueQuery;
 import org.sonar.server.issue.IssueQueryFactory;
 import org.sonar.server.issue.index.IssueIndex;
-import org.sonarqube.ws.client.issue.SearchWsRequest;
+import org.sonarqube.ws.client.issue.SearchRequest;
 
 import static java.util.Collections.singletonList;
 import static org.sonar.api.server.ws.WebService.Param.PAGE_SIZE;
@@ -77,12 +77,12 @@ public class ComponentTagsAction implements IssuesWsAction {
 
   @Override
   public void handle(Request request, Response response) throws Exception {
-    SearchWsRequest searchWsRequest = new SearchWsRequest()
+    SearchRequest searchRequest = new SearchRequest()
       .setComponentUuids(singletonList(request.mandatoryParam(PARAM_COMPONENT_UUID)))
       .setResolved(false)
       .setCreatedAfter(request.param(PARAM_CREATED_AFTER));
 
-    IssueQuery query = queryService.create(searchWsRequest);
+    IssueQuery query = queryService.create(searchRequest);
     int pageSize = request.mandatoryParamAsInt(PAGE_SIZE);
     try (JsonWriter json = response.newJsonWriter()) {
       json.beginObject().name("tags").beginArray();
index 5293f0491c96c72424737a718dfe9841a6082139..b8b744d83eb4c2683e9ade2f5ac2c07d7d01e45a 100644 (file)
@@ -51,7 +51,7 @@ import org.sonar.server.issue.IssueQueryFactory;
 import org.sonar.server.issue.index.IssueIndex;
 import org.sonar.server.user.UserSession;
 import org.sonarqube.ws.Issues.SearchWsResponse;
-import org.sonarqube.ws.client.issue.SearchWsRequest;
+import org.sonarqube.ws.client.issue.SearchRequest;
 
 import static com.google.common.base.Preconditions.checkArgument;
 import static com.google.common.collect.Iterables.concat;
@@ -319,7 +319,7 @@ public class SearchAction implements IssuesWsAction {
     writeProtobuf(searchWsResponse, request, response);
   }
 
-  private SearchWsResponse doHandle(SearchWsRequest request, Request wsRequest) {
+  private SearchWsResponse doHandle(SearchRequest request, Request wsRequest) {
     // prepare the Elasticsearch request
     SearchOptions options = createSearchOptionsFromRequest(request);
     EnumSet<SearchAdditionalField> additionalFields = SearchAdditionalField.getFromRequest(request);
@@ -366,7 +366,7 @@ public class SearchAction implements IssuesWsAction {
     return searchResponseFormat.formatSearch(additionalFields, data, paging, facets);
   }
 
-  private static SearchOptions createSearchOptionsFromRequest(SearchWsRequest request) {
+  private static SearchOptions createSearchOptionsFromRequest(SearchRequest request) {
     SearchOptions options = new SearchOptions();
     options.setPage(request.getPage(), request.getPageSize());
     options.addFacets(request.getFacets());
@@ -388,7 +388,7 @@ public class SearchAction implements IssuesWsAction {
     return new Facets(orderedFacets, system2.getDefaultTimeZone());
   }
 
-  private void completeFacets(Facets facets, SearchWsRequest request, Request wsRequest) {
+  private void completeFacets(Facets facets, SearchRequest request, Request wsRequest) {
     addMandatoryValuesToFacet(facets, PARAM_SEVERITIES, Severity.ALL);
     addMandatoryValuesToFacet(facets, PARAM_STATUSES, Issue.STATUSES);
     addMandatoryValuesToFacet(facets, PARAM_RESOLUTIONS, concat(singletonList(""), Issue.RESOLUTIONS));
@@ -457,7 +457,7 @@ public class SearchAction implements IssuesWsAction {
     collector.addAll(SearchAdditionalField.USERS, facets.getBucketKeys(PARAM_ASSIGNEES));
   }
 
-  private static void collectRequestParams(SearchResponseLoader.Collector collector, SearchWsRequest request) {
+  private static void collectRequestParams(SearchResponseLoader.Collector collector, SearchRequest request) {
     collector.addProjectUuids(request.getProjectUuids());
     collector.addComponentUuids(request.getFileUuids());
     collector.addComponentUuids(request.getModuleUuids());
@@ -465,8 +465,8 @@ public class SearchAction implements IssuesWsAction {
     collector.addAll(SearchAdditionalField.USERS, request.getAssignees());
   }
 
-  private static SearchWsRequest toSearchWsRequest(Request request) {
-    return new SearchWsRequest()
+  private static SearchRequest toSearchWsRequest(Request request) {
+    return new SearchRequest()
       .setAdditionalFields(request.paramAsStrings(PARAM_ADDITIONAL_FIELDS))
       .setAsc(request.paramAsBoolean(PARAM_ASC))
       .setAssigned(request.paramAsBoolean(PARAM_ASSIGNED))
index f6c870335e47173b8577207f388047d8adfcc3ab..0c8ef7e9224c4adc9ba45e05954961a3f973c873 100644 (file)
@@ -26,7 +26,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import javax.annotation.CheckForNull;
-import org.sonarqube.ws.client.issue.SearchWsRequest;
+import org.sonarqube.ws.client.issue.SearchRequest;
 
 public enum SearchAdditionalField {
 
@@ -68,7 +68,7 @@ public enum SearchAdditionalField {
     return possibles;
   }
 
-  public static EnumSet<SearchAdditionalField> getFromRequest(SearchWsRequest request) {
+  public static EnumSet<SearchAdditionalField> getFromRequest(SearchRequest request) {
     List<String> labels = request.getAdditionalFields();
     if (labels == null) {
       return EnumSet.noneOf(SearchAdditionalField.class);
index 03a8edd8eb76c5b3364002fcefd1699784191604..fd5d78e90ef87ae373950b926a358dd93cd255cf 100644 (file)
@@ -53,7 +53,7 @@ import org.sonar.server.measure.ws.MetricDtoWithBestValue.MetricDtoToMetricDtoWi
 import org.sonar.server.user.UserSession;
 import org.sonarqube.ws.Measures;
 import org.sonarqube.ws.Measures.ComponentWsResponse;
-import org.sonarqube.ws.client.measure.ComponentWsRequest;
+import org.sonarqube.ws.client.measure.ComponentRequest;
 
 import static com.google.common.base.Preconditions.checkArgument;
 import static java.lang.String.format;
@@ -138,7 +138,7 @@ public class ComponentAction implements MeasuresWsAction {
     writeProtobuf(componentWsResponse, request, response);
   }
 
-  private ComponentWsResponse doHandle(ComponentWsRequest request) {
+  private ComponentWsResponse doHandle(ComponentRequest request) {
     try (DbSession dbSession = dbClient.openSession(false)) {
       ComponentDto component = loadComponent(dbSession, request);
       Long developerId = searchDeveloperId(dbSession, request);
@@ -153,7 +153,7 @@ public class ComponentAction implements MeasuresWsAction {
     }
   }
 
-  private ComponentDto loadComponent(DbSession dbSession, ComponentWsRequest request) {
+  private ComponentDto loadComponent(DbSession dbSession, ComponentRequest request) {
     String componentKey = request.getComponent();
     String componentId = request.getComponentId();
     String branch = request.getBranch();
@@ -164,7 +164,7 @@ public class ComponentAction implements MeasuresWsAction {
   }
 
   @CheckForNull
-  private Long searchDeveloperId(DbSession dbSession, ComponentWsRequest request) {
+  private Long searchDeveloperId(DbSession dbSession, ComponentRequest request) {
     if (request.getDeveloperId() == null && request.getDeveloperKey() == null) {
       return null;
     }
@@ -180,8 +180,8 @@ public class ComponentAction implements MeasuresWsAction {
     return dbClient.componentDao().selectByUuid(dbSession, component.getCopyResourceUuid());
   }
 
-  private static ComponentWsResponse buildResponse(ComponentWsRequest request, ComponentDto component, Optional<ComponentDto> refComponent, List<MeasureDto> measures,
-    List<MetricDto> metrics, List<Measures.Period> periods) {
+  private static ComponentWsResponse buildResponse(ComponentRequest request, ComponentDto component, Optional<ComponentDto> refComponent, List<MeasureDto> measures,
+                                                   List<MetricDto> metrics, List<Measures.Period> periods) {
     ComponentWsResponse.Builder response = ComponentWsResponse.newBuilder();
     Map<Integer, MetricDto> metricsById = Maps.uniqueIndex(metrics, MetricDto::getId);
     Map<MetricDto, MeasureDto> measuresByMetric = new HashMap<>();
@@ -210,7 +210,7 @@ public class ComponentAction implements MeasuresWsAction {
     return response.build();
   }
 
-  private List<MetricDto> searchMetrics(DbSession dbSession, ComponentWsRequest request) {
+  private List<MetricDto> searchMetrics(DbSession dbSession, ComponentRequest request) {
     List<MetricDto> metrics = dbClient.metricDao().selectByKeys(dbSession, request.getMetricKeys());
     if (metrics.size() < request.getMetricKeys().size()) {
       List<String> foundMetricKeys = Lists.transform(metrics, MetricDto::getKey);
@@ -266,8 +266,8 @@ public class ComponentAction implements MeasuresWsAction {
     }
   }
 
-  private static ComponentWsRequest toComponentWsRequest(Request request) {
-    ComponentWsRequest componentWsRequest = new ComponentWsRequest()
+  private static ComponentRequest toComponentWsRequest(Request request) {
+    ComponentRequest componentRequest = new ComponentRequest()
       .setComponentId(request.param(DEPRECATED_PARAM_COMPONENT_ID))
       .setComponent(request.param(PARAM_COMPONENT))
       .setBranch(request.param(PARAM_BRANCH))
@@ -275,8 +275,8 @@ public class ComponentAction implements MeasuresWsAction {
       .setMetricKeys(request.mandatoryParamAsStrings(PARAM_METRIC_KEYS))
       .setDeveloperId(request.param(PARAM_DEVELOPER_ID))
       .setDeveloperKey(request.param(PARAM_DEVELOPER_KEY));
-    checkRequest(!componentWsRequest.getMetricKeys().isEmpty(), "At least one metric key must be provided");
-    return componentWsRequest;
+    checkRequest(!componentRequest.getMetricKeys().isEmpty(), "At least one metric key must be provided");
+    return componentRequest;
   }
 
   private void checkPermissions(ComponentDto baseComponent) {
index 2423e61ee2fdc1c77b90c255c9aba05cc7a83194..b9f79a6beef9aca54bcd7aa4ae2625784d3e2267 100644 (file)
@@ -40,7 +40,7 @@ import org.sonar.db.component.ComponentTreeQuery.Strategy;
 import org.sonar.db.metric.MetricDto;
 import org.sonarqube.ws.Measures;
 import org.sonarqube.ws.Measures.ComponentTreeWsResponse;
-import org.sonarqube.ws.client.measure.ComponentTreeWsRequest;
+import org.sonarqube.ws.client.measure.ComponentTreeRequest;
 
 import static com.google.common.base.Preconditions.checkArgument;
 import static java.lang.String.format;
@@ -219,7 +219,7 @@ public class ComponentTreeAction implements MeasuresWsAction {
     writeProtobuf(componentTreeWsResponse, request, response);
   }
 
-  private ComponentTreeWsResponse doHandle(ComponentTreeWsRequest request) {
+  private ComponentTreeWsResponse doHandle(ComponentTreeRequest request) {
     ComponentTreeData data = dataLoader.load(request);
     if (data.getComponents() == null) {
       return emptyResponse(data.getBaseComponent(), request);
@@ -234,7 +234,7 @@ public class ComponentTreeAction implements MeasuresWsAction {
         .andTotal(data.getComponentCount()));
   }
 
-  private static ComponentTreeWsResponse buildResponse(ComponentTreeWsRequest request, ComponentTreeData data, Paging paging) {
+  private static ComponentTreeWsResponse buildResponse(ComponentTreeRequest request, ComponentTreeData data, Paging paging) {
     ComponentTreeWsResponse.Builder response = ComponentTreeWsResponse.newBuilder();
     response.getPagingBuilder()
       .setPageIndex(paging.pageIndex())
@@ -269,17 +269,17 @@ public class ComponentTreeAction implements MeasuresWsAction {
     return response.build();
   }
 
-  private static boolean areMetricsInResponse(ComponentTreeWsRequest request) {
+  private static boolean areMetricsInResponse(ComponentTreeRequest request) {
     List<String> additionalFields = request.getAdditionalFields();
     return additionalFields != null && additionalFields.contains(ADDITIONAL_METRICS);
   }
 
-  private static boolean arePeriodsInResponse(ComponentTreeWsRequest request) {
+  private static boolean arePeriodsInResponse(ComponentTreeRequest request) {
     List<String> additionalFields = request.getAdditionalFields();
     return additionalFields != null && additionalFields.contains(ADDITIONAL_PERIODS);
   }
 
-  private static ComponentTreeWsResponse emptyResponse(ComponentDto baseComponent, ComponentTreeWsRequest request) {
+  private static ComponentTreeWsResponse emptyResponse(ComponentDto baseComponent, ComponentTreeRequest request) {
     ComponentTreeWsResponse.Builder response = ComponentTreeWsResponse.newBuilder();
     response.getPagingBuilder()
       .setPageIndex(request.getPage())
@@ -289,10 +289,10 @@ public class ComponentTreeAction implements MeasuresWsAction {
     return response.build();
   }
 
-  private static ComponentTreeWsRequest toComponentTreeWsRequest(Request request) {
+  private static ComponentTreeRequest toComponentTreeWsRequest(Request request) {
     List<String> metricKeys = request.mandatoryParamAsStrings(PARAM_METRIC_KEYS);
     checkArgument(metricKeys.size() <= MAX_METRIC_KEYS, "Number of metrics keys is limited to %s, got %s", MAX_METRIC_KEYS, metricKeys.size());
-    ComponentTreeWsRequest componentTreeWsRequest = new ComponentTreeWsRequest()
+    ComponentTreeRequest componentTreeRequest = new ComponentTreeRequest()
       .setBaseComponentId(request.param(DEPRECATED_PARAM_BASE_COMPONENT_ID))
       .setComponent(request.param(PARAM_COMPONENT))
       .setBranch(request.param(PARAM_BRANCH))
@@ -310,20 +310,20 @@ public class ComponentTreeAction implements MeasuresWsAction {
       .setPage(request.mandatoryParamAsInt(Param.PAGE))
       .setPageSize(request.mandatoryParamAsInt(Param.PAGE_SIZE))
       .setQuery(request.param(Param.TEXT_QUERY));
-    String metricSortValue = componentTreeWsRequest.getMetricSort();
-    checkRequest(!componentTreeWsRequest.getMetricKeys().isEmpty(), "The '%s' parameter must contain at least one metric key", PARAM_METRIC_KEYS);
-    List<String> sorts = Optional.ofNullable(componentTreeWsRequest.getSort()).orElse(emptyList());
+    String metricSortValue = componentTreeRequest.getMetricSort();
+    checkRequest(!componentTreeRequest.getMetricKeys().isEmpty(), "The '%s' parameter must contain at least one metric key", PARAM_METRIC_KEYS);
+    List<String> sorts = Optional.ofNullable(componentTreeRequest.getSort()).orElse(emptyList());
     checkRequest(metricSortValue == null ^ sorts.contains(METRIC_SORT) ^ sorts.contains(METRIC_PERIOD_SORT),
       "To sort by a metric, the '%s' parameter must contain '%s' or '%s', and a metric key must be provided in the '%s' parameter",
       Param.SORT, METRIC_SORT, METRIC_PERIOD_SORT, PARAM_METRIC_SORT);
-    checkRequest(metricSortValue == null ^ componentTreeWsRequest.getMetricKeys().contains(metricSortValue),
+    checkRequest(metricSortValue == null ^ componentTreeRequest.getMetricKeys().contains(metricSortValue),
       "To sort by the '%s' metric, it must be in the list of metric keys in the '%s' parameter", metricSortValue, PARAM_METRIC_KEYS);
-    checkRequest(componentTreeWsRequest.getMetricPeriodSort() == null ^ sorts.contains(METRIC_PERIOD_SORT),
+    checkRequest(componentTreeRequest.getMetricPeriodSort() == null ^ sorts.contains(METRIC_PERIOD_SORT),
       "To sort by a metric period, the '%s' parameter must contain '%s' and the '%s' must be provided.", Param.SORT, METRIC_PERIOD_SORT, PARAM_METRIC_PERIOD_SORT);
-    checkRequest(ALL_METRIC_SORT_FILTER.equals(componentTreeWsRequest.getMetricSortFilter()) || metricSortValue != null,
+    checkRequest(ALL_METRIC_SORT_FILTER.equals(componentTreeRequest.getMetricSortFilter()) || metricSortValue != null,
       "To filter components based on the sort metric, the '%s' parameter must contain '%s' or '%s' and the '%s' parameter must be provided",
       Param.SORT, METRIC_SORT, METRIC_PERIOD_SORT, PARAM_METRIC_SORT);
-    return componentTreeWsRequest;
+    return componentTreeRequest;
   }
 
   private static Measures.Component.Builder toWsComponent(ComponentDto component, Map<MetricDto, ComponentTreeData.Measure> measures,
index e599bb77803258808b0cc21eb06590a389776956..fc2dba8ae1ff9f4fdb40b2794058da1ba2d925a8 100644 (file)
@@ -60,7 +60,7 @@ import org.sonar.server.component.ComponentFinder;
 import org.sonar.server.exceptions.NotFoundException;
 import org.sonar.server.measure.ws.ComponentTreeData.Measure;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.client.measure.ComponentTreeWsRequest;
+import org.sonarqube.ws.client.measure.ComponentTreeRequest;
 
 import static com.google.common.base.Preconditions.checkArgument;
 import static com.google.common.base.Preconditions.checkState;
@@ -93,7 +93,7 @@ public class ComponentTreeDataLoader {
     this.resourceTypes = resourceTypes;
   }
 
-  ComponentTreeData load(ComponentTreeWsRequest wsRequest) {
+  ComponentTreeData load(ComponentTreeRequest wsRequest) {
     try (DbSession dbSession = dbClient.openSession(false)) {
       ComponentDto baseComponent = loadComponent(dbSession, wsRequest);
       checkPermissions(baseComponent);
@@ -130,7 +130,7 @@ public class ComponentTreeDataLoader {
     }
   }
 
-  private ComponentDto loadComponent(DbSession dbSession, ComponentTreeWsRequest request) {
+  private ComponentDto loadComponent(DbSession dbSession, ComponentTreeRequest request) {
     String componentKey = request.getComponent();
     String componentId = request.getBaseComponentId();
     String branch = request.getBranch();
@@ -141,7 +141,7 @@ public class ComponentTreeDataLoader {
   }
 
   @CheckForNull
-  private Long searchDeveloperId(DbSession dbSession, ComponentTreeWsRequest wsRequest) {
+  private Long searchDeveloperId(DbSession dbSession, ComponentTreeRequest wsRequest) {
     if (wsRequest.getDeveloperId() == null && wsRequest.getDeveloperKey() == null) {
       return null;
     }
@@ -170,7 +170,7 @@ public class ComponentTreeDataLoader {
     return dbClient.componentDao().selectDescendants(dbSession, componentTreeQuery);
   }
 
-  private List<MetricDto> searchMetrics(DbSession dbSession, ComponentTreeWsRequest request) {
+  private List<MetricDto> searchMetrics(DbSession dbSession, ComponentTreeRequest request) {
     List<String> metricKeys = requireNonNull(request.getMetricKeys());
     List<MetricDto> metrics = dbClient.metricDao().selectByKeys(dbSession, metricKeys);
     if (metrics.size() < metricKeys.size()) {
@@ -246,7 +246,7 @@ public class ComponentTreeDataLoader {
   }
 
   private static List<ComponentDto> filterComponents(List<ComponentDto> components,
-    Table<String, MetricDto, Measure> measuresByComponentUuidAndMetric, List<MetricDto> metrics, ComponentTreeWsRequest wsRequest) {
+    Table<String, MetricDto, Measure> measuresByComponentUuidAndMetric, List<MetricDto> metrics, ComponentTreeRequest wsRequest) {
     if (!componentWithMeasuresOnly(wsRequest)) {
       return components;
     }
@@ -261,16 +261,16 @@ public class ComponentTreeDataLoader {
       .collect(MoreCollectors.toList(components.size()));
   }
 
-  private static boolean componentWithMeasuresOnly(ComponentTreeWsRequest wsRequest) {
+  private static boolean componentWithMeasuresOnly(ComponentTreeRequest wsRequest) {
     return WITH_MEASURES_ONLY_METRIC_SORT_FILTER.equals(wsRequest.getMetricSortFilter());
   }
 
-  private static List<ComponentDto> sortComponents(List<ComponentDto> components, ComponentTreeWsRequest wsRequest, List<MetricDto> metrics,
-    Table<String, MetricDto, Measure> measuresByComponentUuidAndMetric) {
+  private static List<ComponentDto> sortComponents(List<ComponentDto> components, ComponentTreeRequest wsRequest, List<MetricDto> metrics,
+                                                   Table<String, MetricDto, Measure> measuresByComponentUuidAndMetric) {
     return ComponentTreeSort.sortComponents(components, wsRequest, metrics, measuresByComponentUuidAndMetric);
   }
 
-  private static List<ComponentDto> paginateComponents(List<ComponentDto> components, ComponentTreeWsRequest wsRequest) {
+  private static List<ComponentDto> paginateComponents(List<ComponentDto> components, ComponentTreeRequest wsRequest) {
     return components.stream()
       .skip(offset(wsRequest.getPage(), wsRequest.getPageSize()))
       .limit(wsRequest.getPageSize())
@@ -278,7 +278,7 @@ public class ComponentTreeDataLoader {
   }
 
   @CheckForNull
-  private List<String> childrenQualifiers(ComponentTreeWsRequest request, String baseQualifier) {
+  private List<String> childrenQualifiers(ComponentTreeRequest request, String baseQualifier) {
     List<String> requestQualifiers = request.getQualifiers();
     List<String> childrenQualifiers = null;
     if (LEAVES_STRATEGY.equals(request.getStrategy())) {
@@ -298,7 +298,7 @@ public class ComponentTreeDataLoader {
     return new ArrayList<>(qualifiersIntersection);
   }
 
-  private ComponentTreeQuery toComponentTreeQuery(ComponentTreeWsRequest wsRequest, ComponentDto baseComponent) {
+  private ComponentTreeQuery toComponentTreeQuery(ComponentTreeRequest wsRequest, ComponentDto baseComponent) {
     List<String> childrenQualifiers = childrenQualifiers(wsRequest, baseComponent.qualifier());
 
     ComponentTreeQuery.Builder componentTreeQueryBuilder = ComponentTreeQuery.builder()
index af94995abd01cab379ec3ecdcb7dc7131b5bfb65..cf881dd6126986bdb51c0585ed079725b2479ee7 100644 (file)
@@ -35,7 +35,7 @@ import org.sonar.api.measures.Metric.ValueType;
 import org.sonar.db.component.ComponentDto;
 import org.sonar.db.metric.MetricDto;
 import org.sonar.server.exceptions.BadRequestException;
-import org.sonarqube.ws.client.measure.ComponentTreeWsRequest;
+import org.sonarqube.ws.client.measure.ComponentTreeRequest;
 
 import static java.lang.String.CASE_INSENSITIVE_ORDER;
 import static java.lang.String.format;
@@ -62,8 +62,8 @@ public class ComponentTreeSort {
     // static method only
   }
 
-  public static List<ComponentDto> sortComponents(List<ComponentDto> components, ComponentTreeWsRequest wsRequest, List<MetricDto> metrics,
-    Table<String, MetricDto, ComponentTreeData.Measure> measuresByComponentUuidAndMetric) {
+  public static List<ComponentDto> sortComponents(List<ComponentDto> components, ComponentTreeRequest wsRequest, List<MetricDto> metrics,
+                                                  Table<String, MetricDto, ComponentTreeData.Measure> measuresByComponentUuidAndMetric) {
     List<String> sortParameters = wsRequest.getSort();
     if (sortParameters == null || sortParameters.isEmpty()) {
       return components;
@@ -112,8 +112,8 @@ public class ComponentTreeSort {
     return ordering.nullsLast().onResultOf(function);
   }
 
-  private static Ordering<ComponentDto> metricValueOrdering(ComponentTreeWsRequest wsRequest, List<MetricDto> metrics,
-    Table<String, MetricDto, ComponentTreeData.Measure> measuresByComponentUuidAndMetric) {
+  private static Ordering<ComponentDto> metricValueOrdering(ComponentTreeRequest wsRequest, List<MetricDto> metrics,
+                                                            Table<String, MetricDto, ComponentTreeData.Measure> measuresByComponentUuidAndMetric) {
     if (wsRequest.getMetricSort() == null) {
       return componentNameOrdering(wsRequest.getAsc());
     }
@@ -133,8 +133,8 @@ public class ComponentTreeSort {
     throw new IllegalStateException("Unrecognized metric value type: " + metric.getValueType());
   }
 
-  private static Ordering<ComponentDto> metricPeriodOrdering(ComponentTreeWsRequest wsRequest, List<MetricDto> metrics,
-    Table<String, MetricDto, ComponentTreeData.Measure> measuresByComponentUuidAndMetric) {
+  private static Ordering<ComponentDto> metricPeriodOrdering(ComponentTreeRequest wsRequest, List<MetricDto> metrics,
+                                                             Table<String, MetricDto, ComponentTreeData.Measure> measuresByComponentUuidAndMetric) {
     if (wsRequest.getMetricSort() == null || wsRequest.getMetricPeriodSort() == null) {
       return componentNameOrdering(wsRequest.getAsc());
     }
@@ -160,8 +160,8 @@ public class ComponentTreeSort {
     return ordering.nullsLast().onResultOf(new ComponentDtoToNumericalMeasureValue(metric, measuresByComponentUuidAndMetric));
   }
 
-  private static Ordering<ComponentDto> numericalMetricPeriodOrdering(ComponentTreeWsRequest request, @Nullable MetricDto metric,
-    Table<String, MetricDto, ComponentTreeData.Measure> measuresByComponentUuidAndMetric) {
+  private static Ordering<ComponentDto> numericalMetricPeriodOrdering(ComponentTreeRequest request, @Nullable MetricDto metric,
+                                                                      Table<String, MetricDto, ComponentTreeData.Measure> measuresByComponentUuidAndMetric) {
     Ordering<Double> ordering = Ordering.natural();
 
     if (!request.getAsc()) {
index 6893c6851bd8be7ec3141969b5fef2a372fdf849..3f0b7ed5bdbdc8b39ebaa6dafa14f79c4391bf87 100644 (file)
@@ -24,14 +24,14 @@ import java.util.function.Predicate;
 import javax.annotation.Nonnull;
 import org.sonar.db.component.ComponentDto;
 import org.sonar.db.metric.MetricDto;
-import org.sonarqube.ws.client.measure.ComponentTreeWsRequest;
+import org.sonarqube.ws.client.measure.ComponentTreeRequest;
 
 import static org.sonar.server.measure.ws.ComponentTreeData.Measure;
 
 class HasMeasure implements Predicate<ComponentDto> {
   private final Predicate<ComponentDto> predicate;
 
-  HasMeasure(Table<String, MetricDto, ComponentTreeData.Measure> table, MetricDto metric, ComponentTreeWsRequest request) {
+  HasMeasure(Table<String, MetricDto, ComponentTreeData.Measure> table, MetricDto metric, ComponentTreeRequest request) {
     Integer periodIndex = request.getMetricPeriodSort();
     this.predicate = periodIndex == null
       ? new HasAbsoluteValue(table, metric)
index 1782ae1ef8183c0640059d680c3bd3e2c7d064d3..2eb7531c944e4bdc77d26d223547b7ed2e1ddede 100644 (file)
@@ -39,7 +39,7 @@ import org.sonarqube.ws.Common;
 import org.sonarqube.ws.Permissions.Permission;
 import org.sonarqube.ws.Permissions.SearchProjectPermissionsWsResponse;
 import org.sonarqube.ws.Permissions.SearchProjectPermissionsWsResponse.Project;
-import org.sonarqube.ws.client.permission.SearchProjectPermissionsWsRequest;
+import org.sonarqube.ws.client.permission.SearchProjectPermissionsRequest;
 
 import static org.sonar.server.permission.ws.PermissionRequestValidator.validateQualifier;
 import static org.sonar.server.permission.ws.PermissionsWsParametersBuilder.createProjectParameters;
@@ -104,7 +104,7 @@ public class SearchProjectPermissionsAction implements PermissionsWsAction {
     writeProtobuf(searchProjectPermissionsWsResponse, wsRequest, wsResponse);
   }
 
-  private SearchProjectPermissionsWsResponse doHandle(SearchProjectPermissionsWsRequest request) {
+  private SearchProjectPermissionsWsResponse doHandle(SearchProjectPermissionsRequest request) {
     try (DbSession dbSession = dbClient.openSession(false)) {
       checkAuthorized(dbSession, request);
       validateQualifier(request.getQualifier(), resourceTypes);
@@ -113,8 +113,8 @@ public class SearchProjectPermissionsAction implements PermissionsWsAction {
     }
   }
 
-  private static SearchProjectPermissionsWsRequest toSearchProjectPermissionsWsRequest(Request request) {
-    return new SearchProjectPermissionsWsRequest()
+  private static SearchProjectPermissionsRequest toSearchProjectPermissionsWsRequest(Request request) {
+    return new SearchProjectPermissionsRequest()
       .setProjectId(request.param(PARAM_PROJECT_ID))
       .setProjectKey(request.param(PARAM_PROJECT_KEY))
       .setQualifier(request.param(PARAM_QUALIFIER))
@@ -123,7 +123,7 @@ public class SearchProjectPermissionsAction implements PermissionsWsAction {
       .setQuery(request.param(Param.TEXT_QUERY));
   }
 
-  private void checkAuthorized(DbSession dbSession, SearchProjectPermissionsWsRequest request) {
+  private void checkAuthorized(DbSession dbSession, SearchProjectPermissionsRequest request) {
     com.google.common.base.Optional<ProjectWsRef> projectRef = newOptionalWsProjectRef(request.getProjectId(), request.getProjectKey());
     if (projectRef.isPresent()) {
       ComponentDto project = wsSupport.getRootComponentOrModule(dbSession, projectRef.get());
index ef9dabdcb7e081c19fb46fec9a189fc005834311..973144fcd195f13b4cc06fe32a357bcd798b90b1 100644 (file)
@@ -34,7 +34,7 @@ import org.sonar.db.DbSession;
 import org.sonar.db.component.ComponentDto;
 import org.sonar.db.component.ComponentQuery;
 import org.sonar.db.permission.CountPerProjectPermission;
-import org.sonarqube.ws.client.permission.SearchProjectPermissionsWsRequest;
+import org.sonarqube.ws.client.permission.SearchProjectPermissionsRequest;
 
 import static java.util.Collections.singletonList;
 import static org.sonar.api.utils.Paging.forPageIndex;
@@ -52,7 +52,7 @@ public class SearchProjectPermissionsDataLoader {
     this.rootQualifiers = Collections2.transform(resourceTypes.getRoots(), ResourceType::getQualifier).toArray(new String[resourceTypes.getRoots().size()]);
   }
 
-  SearchProjectPermissionsData load(DbSession dbSession, SearchProjectPermissionsWsRequest request) {
+  SearchProjectPermissionsData load(DbSession dbSession, SearchProjectPermissionsRequest request) {
     SearchProjectPermissionsData.Builder data = newBuilder();
     int countRootComponents = countRootComponents(dbSession, request);
     List<ComponentDto> rootComponents = searchRootComponents(dbSession, request, paging(request, countRootComponents));
@@ -66,17 +66,17 @@ public class SearchProjectPermissionsDataLoader {
     return data.build();
   }
 
-  private static Paging paging(SearchProjectPermissionsWsRequest request, int total) {
+  private static Paging paging(SearchProjectPermissionsRequest request, int total) {
     return forPageIndex(request.getPage())
       .withPageSize(request.getPageSize())
       .andTotal(total);
   }
 
-  private int countRootComponents(DbSession dbSession, SearchProjectPermissionsWsRequest request) {
+  private int countRootComponents(DbSession dbSession, SearchProjectPermissionsRequest request) {
     return dbClient.componentDao().countByQuery(dbSession, toDbQuery(request));
   }
 
-  private List<ComponentDto> searchRootComponents(DbSession dbSession, SearchProjectPermissionsWsRequest request, Paging paging) {
+  private List<ComponentDto> searchRootComponents(DbSession dbSession, SearchProjectPermissionsRequest request, Paging paging) {
     Optional<ProjectWsRef> project = newOptionalWsProjectRef(request.getProjectId(), request.getProjectKey());
 
     if (project.isPresent()) {
@@ -86,7 +86,7 @@ public class SearchProjectPermissionsDataLoader {
     return dbClient.componentDao().selectByQuery(dbSession, toDbQuery(request), paging.offset(), paging.pageSize());
   }
 
-  private ComponentQuery toDbQuery(SearchProjectPermissionsWsRequest wsRequest) {
+  private ComponentQuery toDbQuery(SearchProjectPermissionsRequest wsRequest) {
     return ComponentQuery.builder()
       .setQualifiers(qualifiers(wsRequest.getQualifier()))
       .setNameOrKeyQuery(wsRequest.getQuery())
index f694f5ec6c4dd65ab77c1013584fab199fffc2e2..0d4956088e2947187247cf6dbde6bf09107684de 100644 (file)
@@ -31,7 +31,7 @@ import org.sonar.db.permission.template.PermissionTemplateDto;
 import org.sonar.server.permission.ws.PermissionWsSupport;
 import org.sonar.server.permission.ws.PermissionsWsAction;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.client.permission.AddProjectCreatorToTemplateWsRequest;
+import org.sonarqube.ws.client.permission.AddProjectCreatorToTemplateRequest;
 
 import static org.sonar.server.permission.PermissionPrivilegeChecker.checkGlobalAdmin;
 import static org.sonar.server.permission.ws.PermissionRequestValidator.validateProjectPermission;
@@ -55,8 +55,8 @@ public class AddProjectCreatorToTemplateAction implements PermissionsWsAction {
     this.system = system;
   }
 
-  private static AddProjectCreatorToTemplateWsRequest toWsRequest(Request request) {
-    AddProjectCreatorToTemplateWsRequest wsRequest = AddProjectCreatorToTemplateWsRequest.builder()
+  private static AddProjectCreatorToTemplateRequest toWsRequest(Request request) {
+    AddProjectCreatorToTemplateRequest wsRequest = AddProjectCreatorToTemplateRequest.builder()
       .setPermission(request.mandatoryParam(PARAM_PERMISSION))
       .setTemplateId(request.param(PARAM_TEMPLATE_ID))
       .setOrganization(request.param(PARAM_ORGANIZATION))
@@ -85,7 +85,7 @@ public class AddProjectCreatorToTemplateAction implements PermissionsWsAction {
     response.noContent();
   }
 
-  private void doHandle(AddProjectCreatorToTemplateWsRequest request) {
+  private void doHandle(AddProjectCreatorToTemplateRequest request) {
     try (DbSession dbSession = dbClient.openSession(false)) {
       PermissionTemplateDto template = wsSupport.findTemplate(dbSession, WsTemplateRef.newTemplateRef(
         request.getTemplateId(), request.getOrganization(), request.getTemplateName()));
@@ -101,7 +101,7 @@ public class AddProjectCreatorToTemplateAction implements PermissionsWsAction {
     }
   }
 
-  private void addTemplatePermission(DbSession dbSession, AddProjectCreatorToTemplateWsRequest request, PermissionTemplateDto template) {
+  private void addTemplatePermission(DbSession dbSession, AddProjectCreatorToTemplateRequest request, PermissionTemplateDto template) {
     long now = system.now();
     dbClient.permissionTemplateCharacteristicDao().insert(dbSession, new PermissionTemplateCharacteristicDto()
       .setPermission(request.getPermission())
index 75f2b02f4083dcf4feaecace8d4cda6fd8de2fbb..5c38b5a5ab76d6d55126a6180ae1a1909ed305b8 100644 (file)
@@ -32,7 +32,7 @@ import org.sonar.server.permission.UserId;
 import org.sonar.server.permission.ws.PermissionWsSupport;
 import org.sonar.server.permission.ws.PermissionsWsAction;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.client.permission.AddUserToTemplateWsRequest;
+import org.sonarqube.ws.client.permission.AddUserToTemplateRequest;
 
 import static org.sonar.server.permission.PermissionPrivilegeChecker.checkGlobalAdmin;
 import static org.sonar.server.permission.ws.PermissionsWsParametersBuilder.createProjectPermissionParameter;
@@ -56,8 +56,8 @@ public class AddUserToTemplateAction implements PermissionsWsAction {
     this.userSession = userSession;
   }
 
-  private static AddUserToTemplateWsRequest toAddUserToTemplateWsRequest(Request request) {
-    return new AddUserToTemplateWsRequest()
+  private static AddUserToTemplateRequest toAddUserToTemplateWsRequest(Request request) {
+    return new AddUserToTemplateRequest()
       .setLogin(request.mandatoryParam(PARAM_USER_LOGIN))
       .setPermission(request.mandatoryParam(PARAM_PERMISSION))
       .setTemplateId(request.param(PARAM_TEMPLATE_ID))
@@ -86,7 +86,7 @@ public class AddUserToTemplateAction implements PermissionsWsAction {
     response.noContent();
   }
 
-  private void doHandle(AddUserToTemplateWsRequest request) {
+  private void doHandle(AddUserToTemplateRequest request) {
     String permission = request.getPermission();
     String userLogin = request.getLogin();
 
index 7847af840fdf08cf43899c86ce9b8384e44dba03..655d3a866f545aa1dd6415eecdebd4c865db630c 100644 (file)
@@ -31,7 +31,7 @@ import org.sonar.server.permission.PermissionTemplateService;
 import org.sonar.server.permission.ws.PermissionWsSupport;
 import org.sonar.server.permission.ws.PermissionsWsAction;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.client.permission.ApplyTemplateWsRequest;
+import org.sonarqube.ws.client.permission.ApplyTemplateRequest;
 
 import static org.sonar.server.permission.PermissionPrivilegeChecker.checkGlobalAdmin;
 import static org.sonar.server.permission.ws.PermissionsWsParametersBuilder.createProjectParameters;
@@ -58,8 +58,8 @@ public class ApplyTemplateAction implements PermissionsWsAction {
     this.wsSupport = wsSupport;
   }
 
-  private static ApplyTemplateWsRequest toApplyTemplateWsRequest(Request request) {
-    return new ApplyTemplateWsRequest()
+  private static ApplyTemplateRequest toApplyTemplateWsRequest(Request request) {
+    return new ApplyTemplateRequest()
       .setProjectId(request.param(PARAM_PROJECT_ID))
       .setProjectKey(request.param(PARAM_PROJECT_KEY))
       .setTemplateId(request.param(PARAM_TEMPLATE_ID))
@@ -88,7 +88,7 @@ public class ApplyTemplateAction implements PermissionsWsAction {
     response.noContent();
   }
 
-  private void doHandle(ApplyTemplateWsRequest request) {
+  private void doHandle(ApplyTemplateRequest request) {
     try (DbSession dbSession = dbClient.openSession(false)) {
       PermissionTemplateDto template = wsSupport.findTemplate(dbSession, newTemplateRef(
         request.getTemplateId(), request.getOrganization(), request.getTemplateName()));
index b5cdd5f896ea9eb70adfc372c9ec488b21883dea..e2f82dfc576d202bd32aa528e989152e7cd644b9 100644 (file)
@@ -39,7 +39,7 @@ import org.sonar.server.permission.ws.PermissionWsSupport;
 import org.sonar.server.permission.ws.PermissionsWsAction;
 import org.sonar.server.project.Visibility;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.client.permission.BulkApplyTemplateWsRequest;
+import org.sonarqube.ws.client.permission.BulkApplyTemplateRequest;
 
 import static org.sonar.api.utils.DateUtils.parseDateOrDateTime;
 import static org.sonar.core.util.Protobuf.setNullable;
@@ -137,7 +137,7 @@ public class BulkApplyTemplateAction implements PermissionsWsAction {
     response.noContent();
   }
 
-  private void doHandle(BulkApplyTemplateWsRequest request) {
+  private void doHandle(BulkApplyTemplateRequest request) {
     try (DbSession dbSession = dbClient.openSession(false)) {
       PermissionTemplateDto template = wsSupport.findTemplate(dbSession, newTemplateRef(
         request.getTemplateId(), request.getOrganization(), request.getTemplateName()));
@@ -150,8 +150,8 @@ public class BulkApplyTemplateAction implements PermissionsWsAction {
     }
   }
 
-  private static BulkApplyTemplateWsRequest toBulkApplyTemplateWsRequest(Request request) {
-    return new BulkApplyTemplateWsRequest()
+  private static BulkApplyTemplateRequest toBulkApplyTemplateWsRequest(Request request) {
+    return new BulkApplyTemplateRequest()
       .setOrganization(request.param(PARAM_ORGANIZATION))
       .setTemplateId(request.param(PARAM_TEMPLATE_ID))
       .setTemplateName(request.param(PARAM_TEMPLATE_NAME))
@@ -163,7 +163,7 @@ public class BulkApplyTemplateAction implements PermissionsWsAction {
       .setProjects(request.paramAsStrings(PARAM_PROJECTS));
   }
 
-  private static ComponentQuery buildDbQuery(BulkApplyTemplateWsRequest request) {
+  private static ComponentQuery buildDbQuery(BulkApplyTemplateRequest request) {
     Collection<String> qualifiers = request.getQualifiers();
     ComponentQuery.Builder query = ComponentQuery.builder()
       .setQualifiers(qualifiers.toArray(new String[qualifiers.size()]));
index 91ba4eaf24394f6d2414125ce8e7dfc9a7f06713..216cec4e230bd67528321c33bda1781d44afe622 100644 (file)
@@ -34,7 +34,7 @@ import org.sonar.server.permission.ws.PermissionsWsAction;
 import org.sonar.server.user.UserSession;
 import org.sonarqube.ws.Permissions.CreateTemplateWsResponse;
 import org.sonarqube.ws.Permissions.PermissionTemplate;
-import org.sonarqube.ws.client.permission.CreateTemplateWsRequest;
+import org.sonarqube.ws.client.permission.CreateTemplateRequest;
 
 import static java.lang.String.format;
 import static org.sonar.server.permission.PermissionPrivilegeChecker.checkGlobalAdmin;
@@ -65,8 +65,8 @@ public class CreateTemplateAction implements PermissionsWsAction {
     this.wsSupport = wsSupport;
   }
 
-  private static CreateTemplateWsRequest toCreateTemplateWsRequest(Request request) {
-    return new CreateTemplateWsRequest()
+  private static CreateTemplateRequest toCreateTemplateWsRequest(Request request) {
+    return new CreateTemplateRequest()
       .setName(request.mandatoryParam(PARAM_NAME))
       .setDescription(request.param(PARAM_DESCRIPTION))
       .setProjectKeyPattern(request.param(PARAM_PROJECT_KEY_PATTERN))
@@ -104,7 +104,7 @@ public class CreateTemplateAction implements PermissionsWsAction {
     writeProtobuf(createTemplateWsResponse, request, response);
   }
 
-  private CreateTemplateWsResponse doHandle(CreateTemplateWsRequest request) {
+  private CreateTemplateWsResponse doHandle(CreateTemplateRequest request) {
     try (DbSession dbSession = dbClient.openSession(false)) {
       OrganizationDto org = wsSupport.findOrganization(dbSession, request.getOrganization());
       checkGlobalAdmin(userSession, org.getUuid());
@@ -126,7 +126,7 @@ public class CreateTemplateAction implements PermissionsWsAction {
     checkRequest(permissionTemplateWithSameName == null, format(MSG_TEMPLATE_WITH_SAME_NAME, name));
   }
 
-  private PermissionTemplateDto insertTemplate(DbSession dbSession, OrganizationDto org, CreateTemplateWsRequest request) {
+  private PermissionTemplateDto insertTemplate(DbSession dbSession, OrganizationDto org, CreateTemplateRequest request) {
     Date now = new Date(system.now());
     PermissionTemplateDto template = dbClient.permissionTemplateDao().insert(dbSession, new PermissionTemplateDto()
       .setUuid(Uuids.create())
index 0ae76ba8f69284ca634a61b721b4688d74a1562f..821364c7fe01df81a735273ffcbd53a0e6e082b2 100644 (file)
@@ -29,7 +29,7 @@ import org.sonar.db.permission.template.PermissionTemplateDto;
 import org.sonar.server.permission.ws.PermissionWsSupport;
 import org.sonar.server.permission.ws.PermissionsWsAction;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.client.permission.DeleteTemplateWsRequest;
+import org.sonarqube.ws.client.permission.DeleteTemplateRequest;
 
 import static org.sonar.server.permission.PermissionPrivilegeChecker.checkGlobalAdmin;
 import static org.sonar.server.permission.ws.PermissionsWsParametersBuilder.createTemplateParameters;
@@ -53,8 +53,8 @@ public class DeleteTemplateAction implements PermissionsWsAction {
     this.defaultTemplatesResolver = defaultTemplatesResolver;
   }
 
-  private static DeleteTemplateWsRequest toDeleteTemplateWsRequest(Request request) {
-    return new DeleteTemplateWsRequest()
+  private static DeleteTemplateRequest toDeleteTemplateWsRequest(Request request) {
+    return new DeleteTemplateRequest()
       .setTemplateId(request.param(PARAM_TEMPLATE_ID))
       .setOrganization(request.param(PARAM_ORGANIZATION))
       .setTemplateName(request.param(PARAM_TEMPLATE_NAME));
@@ -79,7 +79,7 @@ public class DeleteTemplateAction implements PermissionsWsAction {
     response.noContent();
   }
 
-  private void doHandle(DeleteTemplateWsRequest request) {
+  private void doHandle(DeleteTemplateRequest request) {
     try (DbSession dbSession = dbClient.openSession(false)) {
       PermissionTemplateDto template = finder.findTemplate(dbSession, newTemplateRef(
         request.getTemplateId(), request.getOrganization(), request.getTemplateName()));
index 813efee8b10c621d039c6e5ec12309a12eb9b715..2ff3728cb0b5556aa8f83760ce4cee4e0f46f0a2 100644 (file)
@@ -31,7 +31,7 @@ import org.sonar.db.permission.template.PermissionTemplateDto;
 import org.sonar.server.permission.ws.PermissionWsSupport;
 import org.sonar.server.permission.ws.PermissionsWsAction;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.client.permission.RemoveProjectCreatorFromTemplateWsRequest;
+import org.sonarqube.ws.client.permission.RemoveProjectCreatorFromTemplateRequest;
 
 import static org.sonar.server.permission.PermissionPrivilegeChecker.checkGlobalAdmin;
 import static org.sonar.server.permission.ws.PermissionRequestValidator.validateProjectPermission;
@@ -55,8 +55,8 @@ public class RemoveProjectCreatorFromTemplateAction implements PermissionsWsActi
     this.system = system;
   }
 
-  private static RemoveProjectCreatorFromTemplateWsRequest toWsRequest(Request request) {
-    RemoveProjectCreatorFromTemplateWsRequest wsRequest = RemoveProjectCreatorFromTemplateWsRequest.builder()
+  private static RemoveProjectCreatorFromTemplateRequest toWsRequest(Request request) {
+    RemoveProjectCreatorFromTemplateRequest wsRequest = RemoveProjectCreatorFromTemplateRequest.builder()
       .setPermission(request.mandatoryParam(PARAM_PERMISSION))
       .setTemplateId(request.param(PARAM_TEMPLATE_ID))
       .setOrganization(request.param(PARAM_ORGANIZATION))
@@ -85,7 +85,7 @@ public class RemoveProjectCreatorFromTemplateAction implements PermissionsWsActi
     response.noContent();
   }
 
-  private void doHandle(RemoveProjectCreatorFromTemplateWsRequest request) {
+  private void doHandle(RemoveProjectCreatorFromTemplateRequest request) {
     try (DbSession dbSession = dbClient.openSession(false)) {
       PermissionTemplateDto template = wsSupport.findTemplate(dbSession, WsTemplateRef.newTemplateRef(
         request.getTemplateId(), request.getOrganization(), request.getTemplateName()));
index 6ce9f1f5e7671b1e805443f1243808f98e6c7975..f91d243ae2ccca21fd361e71445a07ef3a976d06 100644 (file)
@@ -29,7 +29,7 @@ import org.sonar.server.permission.UserId;
 import org.sonar.server.permission.ws.PermissionWsSupport;
 import org.sonar.server.permission.ws.PermissionsWsAction;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.client.permission.RemoveUserFromTemplateWsRequest;
+import org.sonarqube.ws.client.permission.RemoveUserFromTemplateRequest;
 
 import static org.sonar.server.permission.PermissionPrivilegeChecker.checkGlobalAdmin;
 import static org.sonar.server.permission.ws.PermissionRequestValidator.validateProjectPermission;
@@ -53,8 +53,8 @@ public class RemoveUserFromTemplateAction implements PermissionsWsAction {
     this.userSession = userSession;
   }
 
-  private static RemoveUserFromTemplateWsRequest toRemoveUserFromTemplateWsRequest(Request request) {
-    return new RemoveUserFromTemplateWsRequest()
+  private static RemoveUserFromTemplateRequest toRemoveUserFromTemplateWsRequest(Request request) {
+    return new RemoveUserFromTemplateRequest()
       .setPermission(request.mandatoryParam(PARAM_PERMISSION))
       .setLogin(request.mandatoryParam(PARAM_USER_LOGIN))
       .setTemplateId(request.param(PARAM_TEMPLATE_ID))
@@ -83,7 +83,7 @@ public class RemoveUserFromTemplateAction implements PermissionsWsAction {
     response.noContent();
   }
 
-  private void doHandle(RemoveUserFromTemplateWsRequest request) {
+  private void doHandle(RemoveUserFromTemplateRequest request) {
     String permission = request.getPermission();
     String userLogin = request.getLogin();
 
index 87266ae544ed12b01ca1adf44926c562b4ba0041..29e68967dd0441ef3a6e03f816f2a5509602aa04 100644 (file)
@@ -39,7 +39,7 @@ import org.sonarqube.ws.Permissions.Permission;
 import org.sonarqube.ws.Permissions.PermissionTemplate;
 import org.sonarqube.ws.Permissions.SearchTemplatesWsResponse;
 import org.sonarqube.ws.Permissions.SearchTemplatesWsResponse.TemplateIdQualifier;
-import org.sonarqube.ws.client.permission.SearchTemplatesWsRequest;
+import org.sonarqube.ws.client.permission.SearchTemplatesRequest;
 
 import static org.sonar.api.utils.DateUtils.formatDateTime;
 import static org.sonar.core.util.Protobuf.setNullable;
@@ -83,7 +83,7 @@ public class SearchTemplatesAction implements PermissionsWsAction {
   public void handle(Request wsRequest, Response wsResponse) throws Exception {
     try (DbSession dbSession = dbClient.openSession(false)) {
       OrganizationDto org = support.findOrganization(dbSession, wsRequest.param(PARAM_ORGANIZATION));
-      SearchTemplatesWsRequest request = new SearchTemplatesWsRequest()
+      SearchTemplatesRequest request = new SearchTemplatesRequest()
         .setOrganizationUuid(org.getUuid())
         .setQuery(wsRequest.param(Param.TEXT_QUERY));
       checkGlobalAdmin(userSession, request.getOrganizationUuid());
index 20cc847c804cbc1dba7c7084cd0c187310574886..c95aa7f31327360836f660f569ce6a8ef0f3118d 100644 (file)
@@ -30,7 +30,7 @@ import org.sonar.db.permission.template.CountByTemplateAndPermissionDto;
 import org.sonar.db.permission.template.PermissionTemplateCharacteristicDto;
 import org.sonar.db.permission.template.PermissionTemplateDto;
 import org.sonar.server.permission.ws.template.DefaultTemplatesResolver.ResolvedDefaultTemplates;
-import org.sonarqube.ws.client.permission.SearchTemplatesWsRequest;
+import org.sonarqube.ws.client.permission.SearchTemplatesRequest;
 
 import static org.sonar.server.permission.ws.template.SearchTemplatesData.builder;
 import static org.sonar.server.ws.WsUtils.checkFoundWithOptional;
@@ -44,7 +44,7 @@ public class SearchTemplatesDataLoader {
     this.defaultTemplatesResolver = defaultTemplatesResolver;
   }
 
-  public SearchTemplatesData load(DbSession dbSession, SearchTemplatesWsRequest request) {
+  public SearchTemplatesData load(DbSession dbSession, SearchTemplatesRequest request) {
     SearchTemplatesData.Builder data = builder();
     List<PermissionTemplateDto> templates = searchTemplates(dbSession, request);
     List<Long> templateIds = Lists.transform(templates, PermissionTemplateDto::getId);
@@ -63,7 +63,7 @@ public class SearchTemplatesDataLoader {
     return data.build();
   }
 
-  private List<PermissionTemplateDto> searchTemplates(DbSession dbSession, SearchTemplatesWsRequest request) {
+  private List<PermissionTemplateDto> searchTemplates(DbSession dbSession, SearchTemplatesRequest request) {
     return dbClient.permissionTemplateDao().selectAll(dbSession, request.getOrganizationUuid(), request.getQuery());
   }
 
index 49eca0a59ffe13ffef01db94d8b58c6d8e29d5bd..ea9ed0b4e71c92518ee060096ace21080ef4f813 100644 (file)
@@ -33,7 +33,7 @@ import org.sonar.db.permission.template.PermissionTemplateDto;
 import org.sonar.server.permission.ws.PermissionWsSupport;
 import org.sonar.server.permission.ws.PermissionsWsAction;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.client.permission.SetDefaultTemplateWsRequest;
+import org.sonarqube.ws.client.permission.SetDefaultTemplateRequest;
 
 import static org.sonar.server.permission.PermissionPrivilegeChecker.checkGlobalAdmin;
 import static org.sonar.server.permission.ws.PermissionRequestValidator.validateQualifier;
@@ -63,8 +63,8 @@ public class SetDefaultTemplateAction implements PermissionsWsAction {
     this.i18n = i18n;
   }
 
-  private static SetDefaultTemplateWsRequest toSetDefaultTemplateWsRequest(Request request) {
-    return new SetDefaultTemplateWsRequest()
+  private static SetDefaultTemplateRequest toSetDefaultTemplateWsRequest(Request request) {
+    return new SetDefaultTemplateRequest()
       .setQualifier(request.param(PARAM_QUALIFIER))
       .setTemplateId(request.param(PARAM_TEMPLATE_ID))
       .setOrganization(request.param(PARAM_ORGANIZATION))
@@ -91,7 +91,7 @@ public class SetDefaultTemplateAction implements PermissionsWsAction {
     response.noContent();
   }
 
-  private void doHandle(SetDefaultTemplateWsRequest request) {
+  private void doHandle(SetDefaultTemplateRequest request) {
     try (DbSession dbSession = dbClient.openSession(false)) {
       String qualifier = request.getQualifier();
       PermissionTemplateDto template = findTemplate(dbSession, request);
@@ -102,7 +102,7 @@ public class SetDefaultTemplateAction implements PermissionsWsAction {
     }
   }
 
-  private PermissionTemplateDto findTemplate(DbSession dbSession, SetDefaultTemplateWsRequest request) {
+  private PermissionTemplateDto findTemplate(DbSession dbSession, SetDefaultTemplateRequest request) {
     return wsSupport.findTemplate(dbSession, newTemplateRef(request.getTemplateId(),
       request.getOrganization(), request.getTemplateName()));
   }
index b2a38561c75bf4418f20b51c17d77cc7fa0af8a1..94f59901b1ec094319b613870e1fb672599c05da 100644 (file)
@@ -33,7 +33,7 @@ import org.sonar.server.permission.ws.PermissionsWsAction;
 import org.sonar.server.user.UserSession;
 import org.sonarqube.ws.Permissions.PermissionTemplate;
 import org.sonarqube.ws.Permissions.UpdateTemplateWsResponse;
-import org.sonarqube.ws.client.permission.UpdateTemplateWsRequest;
+import org.sonarqube.ws.client.permission.UpdateTemplateRequest;
 
 import static com.google.common.base.MoreObjects.firstNonNull;
 import static java.lang.String.format;
@@ -65,8 +65,8 @@ public class UpdateTemplateAction implements PermissionsWsAction {
     this.wsSupport = wsSupport;
   }
 
-  private static UpdateTemplateWsRequest toUpdateTemplateWsRequest(Request request) {
-    return new UpdateTemplateWsRequest()
+  private static UpdateTemplateRequest toUpdateTemplateWsRequest(Request request) {
+    return new UpdateTemplateRequest()
       .setId(request.mandatoryParam(PARAM_ID))
       .setName(request.param(PARAM_NAME))
       .setDescription(request.param(PARAM_DESCRIPTION))
@@ -104,7 +104,7 @@ public class UpdateTemplateAction implements PermissionsWsAction {
     writeProtobuf(updateTemplateWsResponse, request, response);
   }
 
-  private UpdateTemplateWsResponse doHandle(UpdateTemplateWsRequest request) {
+  private UpdateTemplateWsResponse doHandle(UpdateTemplateRequest request) {
     String uuid = request.getId();
     String nameParam = request.getName();
     String descriptionParam = request.getDescription();
index ec129767b1448bc88ee6475be83433114656a665..a220e8761491d0c77a02ebc8c74cadc403ec01c1 100644 (file)
@@ -31,7 +31,7 @@ import org.sonar.db.permission.OrganizationPermission;
 import org.sonar.server.component.ComponentCleanerService;
 import org.sonar.server.project.Visibility;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.client.project.SearchWsRequest;
+import org.sonarqube.ws.client.project.SearchRequest;
 
 import static org.sonar.api.resources.Qualifiers.APP;
 import static org.sonar.api.resources.Qualifiers.PROJECT;
@@ -127,7 +127,7 @@ public class BulkDeleteAction implements ProjectsWsAction {
 
   @Override
   public void handle(Request request, Response response) throws Exception {
-    SearchWsRequest searchRequest = toSearchWsRequest(request);
+    SearchRequest searchRequest = toSearchWsRequest(request);
     userSession.checkLoggedIn();
     try (DbSession dbSession = dbClient.openSession(false)) {
       OrganizationDto organization = support.getOrganization(dbSession, searchRequest.getOrganization());
@@ -140,8 +140,8 @@ public class BulkDeleteAction implements ProjectsWsAction {
     response.noContent();
   }
 
-  private static SearchWsRequest toSearchWsRequest(Request request) {
-    return SearchWsRequest.builder()
+  private static SearchRequest toSearchWsRequest(Request request) {
+    return SearchRequest.builder()
       .setOrganization(request.param(PARAM_ORGANIZATION))
       .setQualifiers(request.mandatoryParamAsStrings(PARAM_QUALIFIERS))
       .setQuery(request.param(Param.TEXT_QUERY))
index 9eefaa3f91bf9e8b2032fc25891fc82d8eb4c9f2..d2a8cc844eb7970b34584324f0a127801d9c723b 100644 (file)
@@ -36,7 +36,7 @@ import org.sonar.server.component.ComponentFinder.ParamNames;
 import org.sonar.server.component.ComponentService;
 import org.sonar.server.user.UserSession;
 import org.sonarqube.ws.Projects.BulkUpdateKeyWsResponse;
-import org.sonarqube.ws.client.project.BulkUpdateKeyWsRequest;
+import org.sonarqube.ws.client.project.BulkUpdateKeyRequest;
 
 import static org.sonar.core.util.Uuids.UUID_EXAMPLE_01;
 import static org.sonar.db.component.ComponentKeyUpdaterDao.checkIsProjectOrModule;
@@ -131,7 +131,7 @@ public class BulkUpdateKeyAction implements ProjectsWsAction {
     writeProtobuf(doHandle(toWsRequest(request)), request, response);
   }
 
-  private BulkUpdateKeyWsResponse doHandle(BulkUpdateKeyWsRequest request) {
+  private BulkUpdateKeyWsResponse doHandle(BulkUpdateKeyRequest request) {
     try (DbSession dbSession = dbClient.openSession(false)) {
       ComponentDto projectOrModule = componentFinder.getByUuidOrKey(dbSession, request.getId(), request.getKey(), ParamNames.ID_AND_KEY);
       checkIsProjectOrModule(projectOrModule);
@@ -153,7 +153,7 @@ public class BulkUpdateKeyAction implements ProjectsWsAction {
     newKeysWithDuplicateMap.entrySet().forEach(entry -> checkRequest(!entry.getValue(), "Impossible to update key: a component with key \"%s\" already exists.", entry.getKey()));
   }
 
-  private void bulkUpdateKey(DbSession dbSession, BulkUpdateKeyWsRequest request, ComponentDto projectOrModule) {
+  private void bulkUpdateKey(DbSession dbSession, BulkUpdateKeyRequest request, ComponentDto projectOrModule) {
     componentService.bulkUpdateKey(dbSession, projectOrModule, request.getFrom(), request.getTo());
   }
 
@@ -175,8 +175,8 @@ public class BulkUpdateKeyAction implements ProjectsWsAction {
     return response.build();
   }
 
-  private static BulkUpdateKeyWsRequest toWsRequest(Request request) {
-    return BulkUpdateKeyWsRequest.builder()
+  private static BulkUpdateKeyRequest toWsRequest(Request request) {
+    return BulkUpdateKeyRequest.builder()
       .setId(request.param(PARAM_PROJECT_ID))
       .setKey(request.param(PARAM_PROJECT))
       .setFrom(request.mandatoryParam(PARAM_FROM))
index f9f1dab3ee1204353a43eb41c28987f2363d9524..9ef198b33b220371c84a49e206ed90818361c847 100644 (file)
@@ -40,7 +40,7 @@ import org.sonar.db.permission.OrganizationPermission;
 import org.sonar.server.project.Visibility;
 import org.sonar.server.user.UserSession;
 import org.sonarqube.ws.Projects.SearchWsResponse;
-import org.sonarqube.ws.client.project.SearchWsRequest;
+import org.sonarqube.ws.client.project.SearchRequest;
 
 import static com.google.common.base.Preconditions.checkArgument;
 import static org.sonar.api.resources.Qualifiers.APP;
@@ -147,8 +147,8 @@ public class SearchAction implements ProjectsWsAction {
     writeProtobuf(searchWsResponse, wsRequest, wsResponse);
   }
 
-  private static SearchWsRequest toSearchWsRequest(Request request) {
-    return SearchWsRequest.builder()
+  private static SearchRequest toSearchWsRequest(Request request) {
+    return SearchRequest.builder()
       .setOrganization(request.param(PARAM_ORGANIZATION))
       .setQualifiers(request.mandatoryParamAsStrings(PARAM_QUALIFIERS))
       .setQuery(request.param(Param.TEXT_QUERY))
@@ -162,7 +162,7 @@ public class SearchAction implements ProjectsWsAction {
       .build();
   }
 
-  private SearchWsResponse doHandle(SearchWsRequest request) {
+  private SearchWsResponse doHandle(SearchRequest request) {
     try (DbSession dbSession = dbClient.openSession(false)) {
       OrganizationDto organization = support.getOrganization(dbSession, request.getOrganization());
       userSession.checkPermission(OrganizationPermission.ADMINISTER, organization);
@@ -177,7 +177,7 @@ public class SearchAction implements ProjectsWsAction {
     }
   }
 
-  static ComponentQuery buildDbQuery(SearchWsRequest request) {
+  static ComponentQuery buildDbQuery(SearchRequest request) {
     List<String> qualifiers = request.getQualifiers();
     ComponentQuery.Builder query = ComponentQuery.builder()
       .setQualifiers(qualifiers.toArray(new String[qualifiers.size()]));
@@ -196,7 +196,7 @@ public class SearchAction implements ProjectsWsAction {
     return query.build();
   }
 
-  private Paging buildPaging(DbSession dbSession, SearchWsRequest request, OrganizationDto organization, ComponentQuery query) {
+  private Paging buildPaging(DbSession dbSession, SearchRequest request, OrganizationDto organization, ComponentQuery query) {
     int total = dbClient.componentDao().countByQuery(dbSession, organization.getUuid(), query);
     return Paging.forPageIndex(request.getPage())
       .withPageSize(request.getPageSize())
index 4f14b4793e8bdc4ae2b9d8570ab2d75fb6bd15df..49e79a01085b4cbc8db624777c2ce075ad323104 100644 (file)
@@ -30,7 +30,7 @@ import org.sonar.db.component.ComponentDto;
 import org.sonar.server.component.ComponentFinder;
 import org.sonar.server.component.ComponentFinder.ParamNames;
 import org.sonar.server.component.ComponentService;
-import org.sonarqube.ws.client.project.UpdateKeyWsRequest;
+import org.sonarqube.ws.client.project.UpdateKeyRequest;
 
 import static org.sonar.core.util.Uuids.UUID_EXAMPLE_01;
 import static org.sonarqube.ws.client.project.ProjectsWsParameters.ACTION_UPDATE_KEY;
@@ -97,15 +97,15 @@ public class UpdateKeyAction implements ProjectsWsAction {
     response.noContent();
   }
 
-  private void doHandle(UpdateKeyWsRequest request) {
+  private void doHandle(UpdateKeyRequest request) {
     try (DbSession dbSession = dbClient.openSession(false)) {
       ComponentDto projectOrModule = componentFinder.getByUuidOrKey(dbSession, request.getId(), request.getKey(), ParamNames.PROJECT_ID_AND_FROM);
       componentService.updateKey(dbSession, projectOrModule, request.getNewKey());
     }
   }
 
-  private static UpdateKeyWsRequest toWsRequest(Request request) {
-    return UpdateKeyWsRequest.builder()
+  private static UpdateKeyRequest toWsRequest(Request request) {
+    return UpdateKeyRequest.builder()
       .setId(request.param(PARAM_PROJECT_ID))
       .setKey(request.param(PARAM_FROM))
       .setNewKey(request.mandatoryParam(PARAM_TO))
index 3e90a178b13448bfc28f88d0eecc03fa8c579d6a..892096abe07df34fe21462b9bb09ccbcfd83d16e 100644 (file)
@@ -52,7 +52,7 @@ import org.sonar.server.user.UserSession;
 import org.sonar.server.util.LanguageParamUtils;
 import org.sonarqube.ws.Qualityprofiles.SearchWsResponse;
 import org.sonarqube.ws.Qualityprofiles.SearchWsResponse.QualityProfile;
-import org.sonarqube.ws.client.qualityprofile.SearchWsRequest;
+import org.sonarqube.ws.client.qualityprofile.SearchRequest;
 
 import static com.google.common.base.Preconditions.checkState;
 import static java.lang.String.format;
@@ -132,8 +132,8 @@ public class SearchAction implements QProfileWsAction {
     writeProtobuf(searchWsResponse, request, response);
   }
 
-  private static SearchWsRequest toSearchWsRequest(Request request) {
-    return new SearchWsRequest()
+  private static SearchRequest toSearchWsRequest(Request request) {
+    return new SearchRequest()
       .setOrganizationKey(request.param(PARAM_ORGANIZATION))
       .setProjectKey(request.param(PARAM_PROJECT))
       .setQualityProfile(request.param(PARAM_QUALITY_PROFILE))
@@ -141,12 +141,12 @@ public class SearchAction implements QProfileWsAction {
       .setLanguage(request.param(PARAM_LANGUAGE));
   }
 
-  private SearchWsResponse doHandle(SearchWsRequest request) {
+  private SearchWsResponse doHandle(SearchRequest request) {
     SearchData data = load(request);
     return buildResponse(data);
   }
 
-  private SearchData load(SearchWsRequest request) {
+  private SearchData load(SearchRequest request) {
     try (DbSession dbSession = dbClient.openSession(false)) {
 
       OrganizationDto organization = wsSupport.getOrganizationByKey(dbSession, request.getOrganizationKey());
@@ -172,7 +172,7 @@ public class SearchAction implements QProfileWsAction {
   }
 
   @CheckForNull
-  private ComponentDto findProject(DbSession dbSession, OrganizationDto organization, SearchWsRequest request) {
+  private ComponentDto findProject(DbSession dbSession, OrganizationDto organization, SearchRequest request) {
     if (request.getProjectKey() == null) {
       return null;
     }
@@ -205,7 +205,7 @@ public class SearchAction implements QProfileWsAction {
         .collect(toList());
   }
 
-  private List<QProfileDto> searchProfiles(DbSession dbSession, SearchWsRequest request, OrganizationDto organization, List<QProfileDto> defaultProfiles,
+  private List<QProfileDto> searchProfiles(DbSession dbSession, SearchRequest request, OrganizationDto organization, List<QProfileDto> defaultProfiles,
                                            @Nullable ComponentDto project) {
     Collection<QProfileDto> profiles = selectAllProfiles(dbSession, organization);
 
@@ -223,15 +223,15 @@ public class SearchAction implements QProfileWsAction {
     return p -> languages.get(p.getLanguage()) != null;
   }
 
-  private static Predicate<QProfileDto> byName(SearchWsRequest request) {
+  private static Predicate<QProfileDto> byName(SearchRequest request) {
     return p -> request.getQualityProfile() == null || Objects.equals(p.getName(), request.getQualityProfile());
   }
 
-  private static Predicate<QProfileDto> byLanguage(SearchWsRequest request) {
+  private static Predicate<QProfileDto> byLanguage(SearchRequest request) {
     return p -> request.getLanguage() == null || Objects.equals(p.getLanguage(), request.getLanguage());
   }
 
-  private static Predicate<QProfileDto> byDefault(SearchWsRequest request, List<QProfileDto> defaultProfiles) {
+  private static Predicate<QProfileDto> byDefault(SearchRequest request, List<QProfileDto> defaultProfiles) {
     Set<String> defaultProfileUuids = defaultProfiles.stream().map(QProfileDto::getKee).collect(Collectors.toSet());
     return p -> !request.getDefaults() || defaultProfileUuids.contains(p.getKee());
   }
index 98357f4b30c9bf7513028a1df81c9dbf523b3141..2a94d9e999d29cabb9864b39de402770868bb79a 100644 (file)
@@ -53,7 +53,7 @@ import org.sonar.server.ws.WsActionTester;
 import org.sonarqube.ws.MediaTypes;
 import org.sonarqube.ws.Components.Component;
 import org.sonarqube.ws.Components.SearchWsResponse;
-import org.sonarqube.ws.client.component.SearchWsRequest;
+import org.sonarqube.ws.client.component.SearchRequest;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.emptySet;
@@ -140,7 +140,7 @@ public class SearchActionTest {
       ComponentTesting.newPrivateProjectDto(db.getDefaultOrganization()).setDbKey("project-_%-key"),
       ComponentTesting.newPrivateProjectDto(db.getDefaultOrganization()).setDbKey("project-key-without-escaped-characters"));
 
-    SearchWsResponse response = call(new SearchWsRequest().setQuery("project-_%-key").setQualifiers(singletonList(PROJECT)));
+    SearchWsResponse response = call(new SearchRequest().setQuery("project-_%-key").setQualifiers(singletonList(PROJECT)));
 
     assertThat(response.getComponentsList()).extracting(Component::getKey).containsOnly("project-_%-key");
   }
@@ -153,7 +153,7 @@ public class SearchActionTest {
     db.components().insertComponents(project, file1, file2);
     setBrowsePermissionOnUserAndIndex(project);
 
-    SearchWsResponse response = call(new SearchWsRequest().setQuery(file1.getDbKey()).setQualifiers(singletonList(FILE)));
+    SearchWsResponse response = call(new SearchRequest().setQuery(file1.getDbKey()).setQualifiers(singletonList(FILE)));
 
     assertThat(response.getComponentsList()).extracting(Component::getKey).containsOnly(file1.getDbKey());
   }
@@ -167,7 +167,7 @@ public class SearchActionTest {
     }
     insertProjectsAuthorizedForUser(componentDtoList.toArray(new ComponentDto[] {}));
 
-    SearchWsResponse response = call(new SearchWsRequest().setOrganization(organizationDto.getKey()).setPage(2).setPageSize(3).setQualifiers(singletonList(PROJECT)));
+    SearchWsResponse response = call(new SearchRequest().setOrganization(organizationDto.getKey()).setPage(2).setPageSize(3).setQualifiers(singletonList(PROJECT)));
 
     assertThat(response.getComponentsList()).extracting(Component::getKey).containsExactly("project-key-4", "project-key-5", "project-key-6");
   }
@@ -179,7 +179,7 @@ public class SearchActionTest {
       ComponentTesting.newPrivateProjectDto(organizationDto).setDbKey("java-project").setLanguage("java"),
       ComponentTesting.newPrivateProjectDto(organizationDto).setDbKey("cpp-project").setLanguage("cpp"));
 
-    SearchWsResponse response = call(new SearchWsRequest().setOrganization(organizationDto.getKey()).setLanguage("java").setQualifiers(singletonList(PROJECT)));
+    SearchWsResponse response = call(new SearchRequest().setOrganization(organizationDto.getKey()).setLanguage("java").setQualifiers(singletonList(PROJECT)));
 
     assertThat(response.getComponentsList()).extracting(Component::getKey).containsOnly("java-project");
   }
@@ -194,7 +194,7 @@ public class SearchActionTest {
     db.components().insertComponents(project1, file1, file2, project2, file3);
     setBrowsePermissionOnUserAndIndex(project1);
 
-    SearchWsResponse response = call(new SearchWsRequest().setQualifiers(singletonList(FILE)));
+    SearchWsResponse response = call(new SearchRequest().setQualifiers(singletonList(FILE)));
 
     assertThat(response.getComponentsList()).extracting(Component::getKey)
       .containsExactlyInAnyOrder(file1.getDbKey(), file2.getDbKey());
@@ -211,7 +211,7 @@ public class SearchActionTest {
     db.components().insertComponents(project, module, file1, file2, file3);
     setBrowsePermissionOnUserAndIndex(project);
 
-    SearchWsResponse response = call(new SearchWsRequest().setQualifiers(asList(PROJECT, MODULE, FILE)));
+    SearchWsResponse response = call(new SearchRequest().setQualifiers(asList(PROJECT, MODULE, FILE)));
 
     assertThat(response.getComponentsList()).extracting(Component::getKey, Component::getProject)
       .containsOnly(tuple(project.getDbKey(), project.getDbKey()),
@@ -227,7 +227,7 @@ public class SearchActionTest {
     ComponentDto branch = db.components().insertProjectBranch(project);
     setBrowsePermissionOnUserAndIndex(project, branch);
 
-    SearchWsResponse response = call(new SearchWsRequest().setQualifiers(asList(PROJECT, MODULE, FILE)));
+    SearchWsResponse response = call(new SearchRequest().setQualifiers(asList(PROJECT, MODULE, FILE)));
 
     assertThat(response.getComponentsList()).extracting(Component::getKey)
       .containsOnly(project.getDbKey());
@@ -238,7 +238,7 @@ public class SearchActionTest {
     expectedException.expect(IllegalArgumentException.class);
     expectedException.expectMessage("Value of parameter 'qualifiers' (Unknown-Qualifier) must be one of: [BRC, DIR, FIL, TRK]");
 
-    call(new SearchWsRequest().setQualifiers(singletonList("Unknown-Qualifier")));
+    call(new SearchRequest().setQualifiers(singletonList("Unknown-Qualifier")));
   }
 
   @Test
@@ -246,7 +246,7 @@ public class SearchActionTest {
     expectedException.expect(IllegalArgumentException.class);
     expectedException.expectMessage("The 'qualifiers' parameter is missing");
 
-    call(new SearchWsRequest());
+    call(new SearchRequest());
   }
 
   @Test
@@ -279,7 +279,7 @@ public class SearchActionTest {
     Arrays.stream(projects).forEach(project -> authorizationIndexerTester.allowOnlyUser(project, user));
   }
 
-  private SearchWsResponse call(SearchWsRequest wsRequest) {
+  private SearchWsResponse call(SearchRequest wsRequest) {
     TestRequest request = ws.newRequest();
     setNullable(wsRequest.getOrganization(), p -> request.setParam(PARAM_ORGANIZATION, p));
     setNullable(wsRequest.getLanguage(), p -> request.setParam(PARAM_LANGUAGE, p));
index e1f4cd234c3bbab19d2f1f1072c1df0c921602cf..9ac942c58b5536c0b0cb45abdd20c7723904740c 100644 (file)
@@ -35,7 +35,7 @@ import org.sonar.db.component.SnapshotDto;
 import org.sonar.db.organization.OrganizationDto;
 import org.sonar.server.exceptions.BadRequestException;
 import org.sonar.server.tester.UserSessionRule;
-import org.sonarqube.ws.client.issue.SearchWsRequest;
+import org.sonarqube.ws.client.issue.SearchRequest;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.singletonList;
@@ -70,7 +70,7 @@ public class IssueQueryFactoryTest {
     ComponentDto module = db.components().insertComponent(newModuleDto(project));
     ComponentDto file = db.components().insertComponent(newFileDto(project));
 
-    SearchWsRequest request = new SearchWsRequest()
+    SearchRequest request = new SearchRequest()
       .setIssues(asList("anIssueKey"))
       .setSeverities(asList("MAJOR", "MINOR"))
       .setStatuses(asList("CLOSED"))
@@ -117,7 +117,7 @@ public class IssueQueryFactoryTest {
 
   @Test
   public void dates_are_inclusive() {
-    SearchWsRequest request = new SearchWsRequest()
+    SearchRequest request = new SearchRequest()
       .setCreatedAfter("2013-04-16")
       .setCreatedBefore("2013-04-17");
 
@@ -129,7 +129,7 @@ public class IssueQueryFactoryTest {
 
   @Test
   public void creation_date_support_localdate() {
-    SearchWsRequest request = new SearchWsRequest()
+    SearchRequest request = new SearchRequest()
       .setCreatedAt("2013-04-16");
 
     IssueQuery query = underTest.create(request);
@@ -139,7 +139,7 @@ public class IssueQueryFactoryTest {
 
   @Test
   public void creation_date_support_zoneddatetime() {
-    SearchWsRequest request = new SearchWsRequest()
+    SearchRequest request = new SearchRequest()
       .setCreatedAt("2013-04-16T09:08:24+0200");
 
     IssueQuery query = underTest.create(request);
@@ -149,7 +149,7 @@ public class IssueQueryFactoryTest {
 
   @Test
   public void add_unknown_when_no_component_found() {
-    SearchWsRequest request = new SearchWsRequest()
+    SearchRequest request = new SearchRequest()
       .setComponentKeys(asList("does_not_exist"));
 
     IssueQuery query = underTest.create(request);
@@ -159,7 +159,7 @@ public class IssueQueryFactoryTest {
 
   @Test
   public void query_without_any_parameter() {
-    SearchWsRequest request = new SearchWsRequest();
+    SearchRequest request = new SearchRequest();
 
     IssueQuery query = underTest.create(request);
 
@@ -185,7 +185,7 @@ public class IssueQueryFactoryTest {
 
   @Test
   public void fail_if_components_and_components_uuid_params_are_set_at_the_same_time() {
-    SearchWsRequest request = new SearchWsRequest()
+    SearchRequest request = new SearchRequest()
       .setComponentKeys(asList("foo"))
       .setComponentUuids(asList("bar"));
 
@@ -197,7 +197,7 @@ public class IssueQueryFactoryTest {
 
   @Test
   public void fail_if_both_projects_and_projectUuids_params_are_set() {
-    SearchWsRequest request = new SearchWsRequest()
+    SearchRequest request = new SearchRequest()
       .setProjectKeys(asList("foo"))
       .setProjectUuids(asList("bar"));
 
@@ -209,7 +209,7 @@ public class IssueQueryFactoryTest {
 
   @Test
   public void fail_if_both_componentRoots_and_componentRootUuids_params_are_set() {
-    SearchWsRequest request = new SearchWsRequest()
+    SearchRequest request = new SearchRequest()
       .setComponentRoots(asList("foo"))
       .setComponentRootUuids(asList("bar"));
 
@@ -223,7 +223,7 @@ public class IssueQueryFactoryTest {
   public void fail_if_componentRoots_references_components_with_different_qualifier() {
     ComponentDto project = db.components().insertPrivateProject();
     ComponentDto file = db.components().insertComponent(newFileDto(project));
-    SearchWsRequest request = new SearchWsRequest()
+    SearchRequest request = new SearchRequest()
       .setComponentRoots(asList(project.getDbKey(), file.getDbKey()));
 
     expectedException.expect(IllegalArgumentException.class);
@@ -235,7 +235,7 @@ public class IssueQueryFactoryTest {
   @Test
   public void param_componentRootUuids_enables_search_in_view_tree_if_user_has_permission_on_view() {
     ComponentDto view = db.components().insertView();
-    SearchWsRequest request = new SearchWsRequest()
+    SearchRequest request = new SearchRequest()
       .setComponentRootUuids(asList(view.uuid()));
     userSession.registerComponents(view);
 
@@ -254,7 +254,7 @@ public class IssueQueryFactoryTest {
     db.components().insertComponents(newProjectCopy("PC2", project2, application));
     userSession.registerComponents(application, project1, project2);
 
-    IssueQuery result = underTest.create(new SearchWsRequest().setComponentUuids(singletonList(application.uuid())));
+    IssueQuery result = underTest.create(new SearchRequest().setComponentUuids(singletonList(application.uuid())));
 
     assertThat(result.viewUuids()).containsExactlyInAnyOrder(application.uuid());
   }
@@ -273,7 +273,7 @@ public class IssueQueryFactoryTest {
     db.components().insertComponents(newProjectCopy("PC3", project3, application));
     userSession.registerComponents(application, project1, project2, project3);
 
-    IssueQuery result = underTest.create(new SearchWsRequest()
+    IssueQuery result = underTest.create(new SearchRequest()
       .setComponentUuids(singletonList(application.uuid()))
       .setSinceLeakPeriod(true));
 
@@ -286,7 +286,7 @@ public class IssueQueryFactoryTest {
   public void return_empty_results_if_not_allowed_to_search_for_subview() {
     ComponentDto view = db.components().insertView();
     ComponentDto subView = db.components().insertComponent(newSubView(view));
-    SearchWsRequest request = new SearchWsRequest()
+    SearchRequest request = new SearchRequest()
       .setComponentRootUuids(asList(subView.uuid()));
 
     IssueQuery query = underTest.create(request);
@@ -297,7 +297,7 @@ public class IssueQueryFactoryTest {
   @Test
   public void param_componentUuids_enables_search_on_project_tree_by_default() {
     ComponentDto project = db.components().insertPrivateProject();
-    SearchWsRequest request = new SearchWsRequest()
+    SearchRequest request = new SearchRequest()
       .setComponentUuids(asList(project.uuid()));
 
     IssueQuery query = underTest.create(request);
@@ -308,7 +308,7 @@ public class IssueQueryFactoryTest {
   @Test
   public void onComponentOnly_restricts_search_to_specified_componentKeys() {
     ComponentDto project = db.components().insertPrivateProject();
-    SearchWsRequest request = new SearchWsRequest()
+    SearchRequest request = new SearchRequest()
       .setComponentKeys(asList(project.getDbKey()))
       .setOnComponentOnly(true);
 
@@ -323,7 +323,7 @@ public class IssueQueryFactoryTest {
   public void should_search_in_tree_with_module_uuid() {
     ComponentDto project = db.components().insertPrivateProject();
     ComponentDto module = db.components().insertComponent(newModuleDto(project));
-    SearchWsRequest request = new SearchWsRequest()
+    SearchRequest request = new SearchRequest()
       .setComponentUuids(asList(module.uuid()));
 
     IssueQuery query = underTest.create(request);
@@ -335,7 +335,7 @@ public class IssueQueryFactoryTest {
   public void param_componentUuids_enables_search_in_directory_tree() {
     ComponentDto project = db.components().insertPrivateProject();
     ComponentDto dir = db.components().insertComponent(newDirectory(project, "src/main/java/foo"));
-    SearchWsRequest request = new SearchWsRequest()
+    SearchRequest request = new SearchRequest()
       .setComponentUuids(asList(dir.uuid()));
 
     IssueQuery query = underTest.create(request);
@@ -349,7 +349,7 @@ public class IssueQueryFactoryTest {
   public void param_componentUuids_enables_search_by_file() {
     ComponentDto project = db.components().insertPrivateProject();
     ComponentDto file = db.components().insertComponent(newFileDto(project));
-    SearchWsRequest request = new SearchWsRequest()
+    SearchRequest request = new SearchRequest()
       .setComponentUuids(asList(file.uuid()));
 
     IssueQuery query = underTest.create(request);
@@ -361,7 +361,7 @@ public class IssueQueryFactoryTest {
   public void param_componentUuids_enables_search_by_test_file() {
     ComponentDto project = db.components().insertPrivateProject();
     ComponentDto file = db.components().insertComponent(newFileDto(project).setQualifier(Qualifiers.UNIT_TEST_FILE));
-    SearchWsRequest request = new SearchWsRequest()
+    SearchRequest request = new SearchRequest()
       .setComponentUuids(asList(file.uuid()));
 
     IssueQuery query = underTest.create(request);
@@ -374,13 +374,13 @@ public class IssueQueryFactoryTest {
     ComponentDto project = db.components().insertPrivateProject();
     ComponentDto branch = db.components().insertProjectBranch(project);
 
-    assertThat(underTest.create(new SearchWsRequest()
+    assertThat(underTest.create(new SearchRequest()
       .setProjectKeys(singletonList(branch.getKey()))
       .setBranch(branch.getBranch())))
         .extracting(IssueQuery::branchUuid, query -> new ArrayList<>(query.projectUuids()), IssueQuery::isMainBranch)
         .containsOnly(branch.uuid(), singletonList(project.uuid()), false);
 
-    assertThat(underTest.create(new SearchWsRequest()
+    assertThat(underTest.create(new SearchRequest()
       .setComponentKeys(singletonList(branch.getKey()))
       .setBranch(branch.getBranch())))
         .extracting(IssueQuery::branchUuid, query -> new ArrayList<>(query.projectUuids()), IssueQuery::isMainBranch)
@@ -393,20 +393,20 @@ public class IssueQueryFactoryTest {
     ComponentDto branch = db.components().insertProjectBranch(project);
     ComponentDto file = db.components().insertComponent(newFileDto(branch));
 
-    assertThat(underTest.create(new SearchWsRequest()
+    assertThat(underTest.create(new SearchRequest()
       .setComponentKeys(singletonList(file.getKey()))
       .setBranch(branch.getBranch())))
         .extracting(IssueQuery::branchUuid, query -> new ArrayList<>(query.fileUuids()), IssueQuery::isMainBranch)
         .containsOnly(branch.uuid(), singletonList(file.uuid()), false);
 
-    assertThat(underTest.create(new SearchWsRequest()
+    assertThat(underTest.create(new SearchRequest()
       .setComponentKeys(singletonList(branch.getKey()))
       .setFileUuids(singletonList(file.uuid()))
       .setBranch(branch.getBranch())))
         .extracting(IssueQuery::branchUuid, query -> new ArrayList<>(query.fileUuids()), IssueQuery::isMainBranch)
         .containsOnly(branch.uuid(), singletonList(file.uuid()), false);
 
-    assertThat(underTest.create(new SearchWsRequest()
+    assertThat(underTest.create(new SearchRequest()
       .setProjectKeys(singletonList(branch.getKey()))
       .setFileUuids(singletonList(file.uuid()))
       .setBranch(branch.getBranch())))
@@ -420,7 +420,7 @@ public class IssueQueryFactoryTest {
     ComponentDto branch = db.components().insertProjectBranch(project);
     ComponentDto file = db.components().insertComponent(newFileDto(branch));
 
-    assertThat(underTest.create(new SearchWsRequest()
+    assertThat(underTest.create(new SearchRequest()
       .setComponentKeys(singletonList(file.getKey()))
       .setBranch(branch.getBranch())
       .setOnComponentOnly(true)))
@@ -433,12 +433,12 @@ public class IssueQueryFactoryTest {
     ComponentDto project = db.components().insertMainBranch();
     ComponentDto branch = db.components().insertProjectBranch(project);
 
-    assertThat(underTest.create(new SearchWsRequest()
+    assertThat(underTest.create(new SearchRequest()
       .setProjectKeys(singletonList(project.getKey()))
       .setBranch("master")))
         .extracting(IssueQuery::branchUuid, query -> new ArrayList<>(query.projectUuids()), IssueQuery::isMainBranch)
         .containsOnly(project.uuid(), singletonList(project.uuid()), true);
-    assertThat(underTest.create(new SearchWsRequest()
+    assertThat(underTest.create(new SearchRequest()
       .setComponentKeys(singletonList(project.getKey()))
       .setBranch("master")))
         .extracting(IssueQuery::branchUuid, query -> new ArrayList<>(query.projectUuids()), IssueQuery::isMainBranch)
@@ -447,7 +447,7 @@ public class IssueQueryFactoryTest {
 
   @Test
   public void fail_if_created_after_and_created_since_are_both_set() {
-    SearchWsRequest request = new SearchWsRequest()
+    SearchRequest request = new SearchRequest()
       .setCreatedAfter("2013-07-25T07:35:00+0100")
       .setCreatedInLast("palap");
 
@@ -464,7 +464,7 @@ public class IssueQueryFactoryTest {
     Date now = DateUtils.parseDateTime("2013-07-25T07:35:00+0100");
     when(clock.instant()).thenReturn(now.toInstant());
     when(clock.getZone()).thenReturn(ZoneOffset.UTC);
-    SearchWsRequest request = new SearchWsRequest()
+    SearchRequest request = new SearchRequest()
       .setCreatedInLast("1y2m3w4d");
     assertThat(underTest.create(request).createdAfter()).isEqualTo(DateUtils.parseDateTime("2012-04-30T07:35:00+0100"));
   }
@@ -474,7 +474,7 @@ public class IssueQueryFactoryTest {
     expectedException.expect(BadRequestException.class);
     expectedException.expectMessage("Parameters 'createdAfter' and 'sinceLeakPeriod' cannot be set simultaneously");
 
-    underTest.create(new SearchWsRequest()
+    underTest.create(new SearchRequest()
       .setSinceLeakPeriod(true)
       .setCreatedAfter("2013-07-25T07:35:00+0100"));
   }
@@ -484,7 +484,7 @@ public class IssueQueryFactoryTest {
     expectedException.expect(IllegalArgumentException.class);
     expectedException.expectMessage("One and only one component must be provided when searching since leak period");
 
-    underTest.create(new SearchWsRequest().setSinceLeakPeriod(true));
+    underTest.create(new SearchRequest().setSinceLeakPeriod(true));
   }
 
   @Test
@@ -495,7 +495,7 @@ public class IssueQueryFactoryTest {
     expectedException.expect(IllegalArgumentException.class);
     expectedException.expectMessage("One and only one component must be provided when searching since leak period");
 
-    underTest.create(new SearchWsRequest()
+    underTest.create(new SearchRequest()
       .setSinceLeakPeriod(true)
       .setComponentKeys(asList(project1.getKey(), project2.getKey())));
   }
@@ -505,13 +505,13 @@ public class IssueQueryFactoryTest {
     expectedException.expect(IllegalArgumentException.class);
     expectedException.expectMessage("'unknown-date' cannot be parsed as either a date or date+time");
 
-    underTest.create(new SearchWsRequest()
+    underTest.create(new SearchRequest()
       .setCreatedAfter("unknown-date"));
   }
 
   @Test
   public void return_empty_results_if_organization_with_specified_key_does_not_exist() {
-    SearchWsRequest request = new SearchWsRequest()
+    SearchRequest request = new SearchRequest()
       .setOrganization("does_not_exist");
 
     IssueQuery query = underTest.create(request);
index b157ea73f717d132a5d5384cfcd2ecb397741acf..b020c4426fcd9e24d4c998d36e57c8f6dff563b8 100644 (file)
@@ -31,7 +31,7 @@ import org.sonar.server.issue.IssueQueryFactory;
 import org.sonar.server.issue.index.IssueIndex;
 import org.sonar.server.ws.TestResponse;
 import org.sonar.server.ws.WsActionTester;
-import org.sonarqube.ws.client.issue.SearchWsRequest;
+import org.sonarqube.ws.client.issue.SearchRequest;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.Matchers.any;
@@ -89,7 +89,7 @@ public class ComponentTagsActionTest {
       .put("bug", 32L)
       .put("cert", 2L)
       .build();
-    ArgumentCaptor<SearchWsRequest> captor = ArgumentCaptor.forClass(SearchWsRequest.class);
+    ArgumentCaptor<SearchRequest> captor = ArgumentCaptor.forClass(SearchRequest.class);
     when(issueQueryFactory.create(captor.capture())).thenReturn(mock(IssueQuery.class));
     when(service.countTags(any(IssueQuery.class), eq(5))).thenReturn(tags);
 
@@ -113,7 +113,7 @@ public class ComponentTagsActionTest {
       .put("bug", 32L)
       .put("cert", 2L)
       .build();
-    ArgumentCaptor<SearchWsRequest> captor = ArgumentCaptor.forClass(SearchWsRequest.class);
+    ArgumentCaptor<SearchRequest> captor = ArgumentCaptor.forClass(SearchRequest.class);
     when(issueQueryFactory.create(captor.capture())).thenReturn(mock(IssueQuery.class));
     when(service.countTags(any(IssueQuery.class), eq(5))).thenReturn(tags);
 
index a829d11a9891ffbfbb7cda08094a224336da7b2c..379f774723772d0b637236cffc84a35631be5a8c 100644 (file)
@@ -32,7 +32,7 @@ import org.sonar.core.util.Uuids;
 import org.sonar.db.component.ComponentDto;
 import org.sonar.db.measure.MeasureDto;
 import org.sonar.db.metric.MetricDto;
-import org.sonarqube.ws.client.measure.ComponentTreeWsRequest;
+import org.sonarqube.ws.client.measure.ComponentTreeRequest;
 
 import static com.google.common.collect.Lists.newArrayList;
 import static java.util.Collections.singletonList;
@@ -88,7 +88,7 @@ public class ComponentTreeSortTest {
 
   @Test
   public void sort_by_names() {
-    ComponentTreeWsRequest wsRequest = newRequest(singletonList(NAME_SORT), true, null);
+    ComponentTreeRequest wsRequest = newRequest(singletonList(NAME_SORT), true, null);
     List<ComponentDto> result = sortComponents(wsRequest);
 
     assertThat(result).extracting("name")
@@ -97,7 +97,7 @@ public class ComponentTreeSortTest {
 
   @Test
   public void sort_by_qualifier() {
-    ComponentTreeWsRequest wsRequest = newRequest(singletonList(QUALIFIER_SORT), false, null);
+    ComponentTreeRequest wsRequest = newRequest(singletonList(QUALIFIER_SORT), false, null);
 
     List<ComponentDto> result = sortComponents(wsRequest);
 
@@ -107,7 +107,7 @@ public class ComponentTreeSortTest {
 
   @Test
   public void sort_by_path() {
-    ComponentTreeWsRequest wsRequest = newRequest(singletonList(PATH_SORT), true, null);
+    ComponentTreeRequest wsRequest = newRequest(singletonList(PATH_SORT), true, null);
 
     List<ComponentDto> result = sortComponents(wsRequest);
 
@@ -118,7 +118,7 @@ public class ComponentTreeSortTest {
   @Test
   public void sort_by_numerical_metric_key_ascending() {
     components.add(newComponentWithoutSnapshotId("name-without-measure", "qualifier-without-measure", "path-without-measure"));
-    ComponentTreeWsRequest wsRequest = newRequest(singletonList(METRIC_SORT), true, NUM_METRIC_KEY);
+    ComponentTreeRequest wsRequest = newRequest(singletonList(METRIC_SORT), true, NUM_METRIC_KEY);
 
     List<ComponentDto> result = sortComponents(wsRequest);
 
@@ -129,7 +129,7 @@ public class ComponentTreeSortTest {
   @Test
   public void sort_by_numerical_metric_key_descending() {
     components.add(newComponentWithoutSnapshotId("name-without-measure", "qualifier-without-measure", "path-without-measure"));
-    ComponentTreeWsRequest wsRequest = newRequest(singletonList(METRIC_SORT), false, NUM_METRIC_KEY);
+    ComponentTreeRequest wsRequest = newRequest(singletonList(METRIC_SORT), false, NUM_METRIC_KEY);
 
     List<ComponentDto> result = sortComponents(wsRequest);
 
@@ -144,7 +144,7 @@ public class ComponentTreeSortTest {
       newComponentWithoutSnapshotId("PROJECT 11", Qualifiers.PROJECT, "PROJECT_PATH_1"),
       newComponentWithoutSnapshotId("PROJECT 0", Qualifiers.PROJECT, "PROJECT_PATH_2"));
 
-    ComponentTreeWsRequest wsRequest = newRequest(newArrayList(PATH_SORT), false, null);
+    ComponentTreeRequest wsRequest = newRequest(newArrayList(PATH_SORT), false, null);
 
     List<ComponentDto> result = sortComponents(wsRequest);
 
@@ -170,7 +170,7 @@ public class ComponentTreeSortTest {
       String alertStatus = statuses.get(i % 3);
       measuresByComponentUuidAndMetric.put(component.uuid(), metrics.get(0), createFromMeasureDto(new MeasureDto().setData(alertStatus)));
     }
-    ComponentTreeWsRequest wsRequest = newRequest(newArrayList(METRIC_SORT, NAME_SORT), true, CoreMetrics.ALERT_STATUS_KEY);
+    ComponentTreeRequest wsRequest = newRequest(newArrayList(METRIC_SORT, NAME_SORT), true, CoreMetrics.ALERT_STATUS_KEY);
 
     List<ComponentDto> result = sortComponents(wsRequest);
 
@@ -183,7 +183,7 @@ public class ComponentTreeSortTest {
   @Test
   public void sort_by_numerical_metric_period_1_key_ascending() {
     components.add(newComponentWithoutSnapshotId("name-without-measure", "qualifier-without-measure", "path-without-measure"));
-    ComponentTreeWsRequest wsRequest = newRequest(singletonList(METRIC_PERIOD_SORT), true, NUM_METRIC_KEY).setMetricPeriodSort(1);
+    ComponentTreeRequest wsRequest = newRequest(singletonList(METRIC_PERIOD_SORT), true, NUM_METRIC_KEY).setMetricPeriodSort(1);
 
     List<ComponentDto> result = sortComponents(wsRequest);
 
@@ -194,7 +194,7 @@ public class ComponentTreeSortTest {
   @Test
   public void sort_by_numerical_metric_period_1_key_descending() {
     components.add(newComponentWithoutSnapshotId("name-without-measure", "qualifier-without-measure", "path-without-measure"));
-    ComponentTreeWsRequest wsRequest = newRequest(singletonList(METRIC_PERIOD_SORT), false, NUM_METRIC_KEY).setMetricPeriodSort(1);
+    ComponentTreeRequest wsRequest = newRequest(singletonList(METRIC_PERIOD_SORT), false, NUM_METRIC_KEY).setMetricPeriodSort(1);
 
     List<ComponentDto> result = sortComponents(wsRequest);
 
@@ -205,7 +205,7 @@ public class ComponentTreeSortTest {
   @Test
   public void sort_by_numerical_metric_period_5_key() {
     components.add(newComponentWithoutSnapshotId("name-without-measure", "qualifier-without-measure", "path-without-measure"));
-    ComponentTreeWsRequest wsRequest = newRequest(singletonList(METRIC_SORT), false, NUM_METRIC_KEY).setMetricPeriodSort(5);
+    ComponentTreeRequest wsRequest = newRequest(singletonList(METRIC_SORT), false, NUM_METRIC_KEY).setMetricPeriodSort(5);
 
     List<ComponentDto> result = sortComponents(wsRequest);
 
@@ -216,7 +216,7 @@ public class ComponentTreeSortTest {
   @Test
   public void sort_by_textual_metric_key_ascending() {
     components.add(newComponentWithoutSnapshotId("name-without-measure", "qualifier-without-measure", "path-without-measure"));
-    ComponentTreeWsRequest wsRequest = newRequest(singletonList(METRIC_SORT), true, TEXT_METRIC_KEY);
+    ComponentTreeRequest wsRequest = newRequest(singletonList(METRIC_SORT), true, TEXT_METRIC_KEY);
 
     List<ComponentDto> result = sortComponents(wsRequest);
 
@@ -227,7 +227,7 @@ public class ComponentTreeSortTest {
   @Test
   public void sort_by_textual_metric_key_descending() {
     components.add(newComponentWithoutSnapshotId("name-without-measure", "qualifier-without-measure", "path-without-measure"));
-    ComponentTreeWsRequest wsRequest = newRequest(singletonList(METRIC_SORT), false, TEXT_METRIC_KEY);
+    ComponentTreeRequest wsRequest = newRequest(singletonList(METRIC_SORT), false, TEXT_METRIC_KEY);
 
     List<ComponentDto> result = sortComponents(wsRequest);
 
@@ -241,7 +241,7 @@ public class ComponentTreeSortTest {
       newComponentWithoutSnapshotId("name-1", "qualifier-1", "path-2"),
       newComponentWithoutSnapshotId("name-1", "qualifier-1", "path-3"),
       newComponentWithoutSnapshotId("name-1", "qualifier-1", "path-1"));
-    ComponentTreeWsRequest wsRequest = newRequest(newArrayList(NAME_SORT, QUALIFIER_SORT, PATH_SORT), true, null);
+    ComponentTreeRequest wsRequest = newRequest(newArrayList(NAME_SORT, QUALIFIER_SORT, PATH_SORT), true, null);
 
     List<ComponentDto> result = sortComponents(wsRequest);
 
@@ -249,7 +249,7 @@ public class ComponentTreeSortTest {
       .containsExactly("path-1", "path-2", "path-3");
   }
 
-  private List<ComponentDto> sortComponents(ComponentTreeWsRequest wsRequest) {
+  private List<ComponentDto> sortComponents(ComponentTreeRequest wsRequest) {
     return ComponentTreeSort.sortComponents(components, wsRequest, metrics, measuresByComponentUuidAndMetric);
   }
 
@@ -261,8 +261,8 @@ public class ComponentTreeSortTest {
       .setPath(path);
   }
 
-  private static ComponentTreeWsRequest newRequest(List<String> sortFields, boolean isAscending, @Nullable String metricKey) {
-    return new ComponentTreeWsRequest()
+  private static ComponentTreeRequest newRequest(List<String> sortFields, boolean isAscending, @Nullable String metricKey) {
+    return new ComponentTreeRequest()
       .setAsc(isAscending)
       .setSort(sortFields)
       .setMetricSort(metricKey);
index 4b9608912d7e6240a27dbfd6347024d8f89240e0..695869c6d48fc00dcfb8c4f5ec99dc90d7563bdd 100644 (file)
@@ -48,7 +48,7 @@ import org.sonar.server.ws.WsActionTester;
 import org.sonarqube.ws.Common.Paging;
 import org.sonarqube.ws.Organizations.SearchMembersWsResponse;
 import org.sonarqube.ws.Organizations.User;
-import org.sonarqube.ws.client.organization.SearchMembersWsRequest;
+import org.sonarqube.ws.client.organization.SearchMembersRequest;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.assertj.core.api.Assertions.tuple;
@@ -73,7 +73,7 @@ public class SearchMembersActionTest {
 
   private WsActionTester ws = new WsActionTester(new SearchMembersAction(dbClient, new UserIndex(es.client(), System2.INSTANCE), organizationProvider, userSession, new AvatarResolverImpl()));
 
-  private SearchMembersWsRequest request = new SearchMembersWsRequest();
+  private SearchMembersRequest request = new SearchMembersRequest();
 
   @Test
   public void empty_response() {
index b4f670a9bfa78b9af5cdaf399d172a628f73e224..0c74c2cca219095fcea707095708152b1bc20c95 100644 (file)
@@ -48,7 +48,7 @@ import org.sonarqube.ws.MediaTypes;
 import org.sonarqube.ws.Projects.SearchWsResponse;
 import org.sonarqube.ws.Projects.SearchWsResponse.Component;
 import org.sonarqube.ws.client.component.ComponentsWsParameters;
-import org.sonarqube.ws.client.project.SearchWsRequest;
+import org.sonarqube.ws.client.project.SearchRequest;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.singletonList;
@@ -104,7 +104,7 @@ public class SearchActionTest {
       ComponentTesting.newPrivateProjectDto(db.getDefaultOrganization()).setDbKey("PROJECT-_%-KEY"),
       ComponentTesting.newPrivateProjectDto(db.getDefaultOrganization()).setDbKey("project-key-without-escaped-characters"));
 
-    SearchWsResponse response = call(SearchWsRequest.builder().setQuery("JeCt-_%-k").build());
+    SearchWsResponse response = call(SearchRequest.builder().setQuery("JeCt-_%-k").build());
 
     assertThat(response.getComponentsList()).extracting(Component::getKey).containsOnly("project-_%-key", "PROJECT-_%-KEY");
   }
@@ -116,7 +116,7 @@ public class SearchActionTest {
       ComponentTesting.newPrivateProjectDto(db.getDefaultOrganization()).setDbKey("private-key"),
       ComponentTesting.newPublicProjectDto(db.getDefaultOrganization()).setDbKey("public-key"));
 
-    SearchWsResponse response = call(SearchWsRequest.builder().setVisibility("private").build());
+    SearchWsResponse response = call(SearchRequest.builder().setVisibility("private").build());
 
     assertThat(response.getComponentsList()).extracting(Component::getKey).containsOnly("private-key");
   }
@@ -128,7 +128,7 @@ public class SearchActionTest {
       ComponentTesting.newPrivateProjectDto(db.getDefaultOrganization()).setDbKey("private-key"),
       ComponentTesting.newPublicProjectDto(db.getDefaultOrganization()).setDbKey("public-key"));
 
-    SearchWsResponse response = call(SearchWsRequest.builder().setVisibility("public").build());
+    SearchWsResponse response = call(SearchRequest.builder().setVisibility("public").build());
 
     assertThat(response.getComponentsList()).extracting(Component::getKey).containsOnly("public-key");
   }
@@ -140,7 +140,7 @@ public class SearchActionTest {
       ComponentTesting.newPrivateProjectDto(db.getDefaultOrganization()).setDbKey(PROJECT_KEY_1),
       newView(db.getDefaultOrganization()));
 
-    SearchWsResponse response = call(SearchWsRequest.builder().build());
+    SearchWsResponse response = call(SearchRequest.builder().build());
 
     assertThat(response.getComponentsList()).extracting(Component::getKey).containsOnly(PROJECT_KEY_1);
   }
@@ -157,7 +157,7 @@ public class SearchActionTest {
       ComponentTesting.newPrivateProjectDto(db.getDefaultOrganization()).setDbKey(PROJECT_KEY_2),
       newView(db.getDefaultOrganization()));
 
-    SearchWsResponse response = call(SearchWsRequest.builder().setQualifiers(singletonList("TRK")).build());
+    SearchWsResponse response = call(SearchRequest.builder().setQualifiers(singletonList("TRK")).build());
 
     assertThat(response.getComponentsList()).extracting(Component::getKey).containsOnly(PROJECT_KEY_1, PROJECT_KEY_2);
   }
@@ -169,7 +169,7 @@ public class SearchActionTest {
       ComponentTesting.newPrivateProjectDto(db.getDefaultOrganization()).setDbKey(PROJECT_KEY_1),
       newView(db.getDefaultOrganization()).setDbKey("view1"));
 
-    SearchWsResponse response = call(SearchWsRequest.builder().setQualifiers(singletonList("VW")).build());
+    SearchWsResponse response = call(SearchRequest.builder().setQualifiers(singletonList("VW")).build());
 
     assertThat(response.getComponentsList()).extracting(Component::getKey).containsOnly("view1");
   }
@@ -181,7 +181,7 @@ public class SearchActionTest {
       ComponentTesting.newPrivateProjectDto(db.getDefaultOrganization()).setDbKey(PROJECT_KEY_1),
       newView(db.getDefaultOrganization()).setDbKey("view1"));
 
-    SearchWsResponse response = call(SearchWsRequest.builder().setQualifiers(asList("TRK", "VW")).build());
+    SearchWsResponse response = call(SearchRequest.builder().setQualifiers(asList("TRK", "VW")).build());
 
     assertThat(response.getComponentsList()).extracting(Component::getKey).containsOnly(PROJECT_KEY_1, "view1");
   }
@@ -195,7 +195,7 @@ public class SearchActionTest {
       ComponentTesting.newPrivateProjectDto(db.getDefaultOrganization()).setDbKey(PROJECT_KEY_2),
       ComponentTesting.newPrivateProjectDto(otherOrganization).setDbKey(PROJECT_KEY_3));
 
-    SearchWsResponse response = call(SearchWsRequest.builder().build());
+    SearchWsResponse response = call(SearchRequest.builder().build());
 
     assertThat(response.getComponentsList()).extracting(Component::getKey).containsOnly(PROJECT_KEY_1, PROJECT_KEY_2);
   }
@@ -210,7 +210,7 @@ public class SearchActionTest {
     ComponentDto project3 = ComponentTesting.newPrivateProjectDto(organization2);
     db.components().insertComponents(project1, project2, project3);
 
-    SearchWsResponse response = call(SearchWsRequest.builder().setOrganization(organization1.getKey()).build());
+    SearchWsResponse response = call(SearchRequest.builder().setOrganization(organization1.getKey()).build());
 
     assertThat(response.getComponentsList()).extracting(Component::getKey).containsOnly(project1.getDbKey(), project2.getDbKey());
   }
@@ -226,7 +226,7 @@ public class SearchActionTest {
     db.getDbClient().snapshotDao().insert(db.getSession(), newAnalysis(recentProject).setCreatedAt(recentTime));
     db.commit();
 
-    SearchWsResponse result = call(SearchWsRequest.builder().setAnalyzedBefore(formatDate(new Date(recentTime))).build());
+    SearchWsResponse result = call(SearchRequest.builder().setAnalyzedBefore(formatDate(new Date(recentTime))).build());
 
     assertThat(result.getComponentsList()).extracting(Component::getKey)
       .containsExactlyInAnyOrder(oldProject.getKey())
@@ -239,7 +239,7 @@ public class SearchActionTest {
     ComponentDto branch = db.components().insertProjectBranch(project);
     userSession.addPermission(ADMINISTER, db.getDefaultOrganization());
 
-    SearchWsResponse response = call(SearchWsRequest.builder().build());
+    SearchWsResponse response = call(SearchRequest.builder().build());
 
     assertThat(response.getComponentsList()).extracting(Component::getKey).containsOnly(project.getDbKey());
   }
@@ -253,7 +253,7 @@ public class SearchActionTest {
     }
     db.components().insertComponents(componentDtoList.toArray(new ComponentDto[] {}));
 
-    SearchWsResponse response = call(SearchWsRequest.builder().setPage(2).setPageSize(3).build());
+    SearchWsResponse response = call(SearchRequest.builder().setPage(2).setPageSize(3).build());
 
     assertThat(response.getComponentsList()).extracting(Component::getKey).containsExactly("project-key-4", "project-key-5", "project-key-6");
   }
@@ -265,7 +265,7 @@ public class SearchActionTest {
     ComponentDto analyzedProject = db.components().insertPrivateProject();
     db.components().insertSnapshot(newAnalysis(analyzedProject));
 
-    SearchWsResponse response = call(SearchWsRequest.builder().setOnProvisionedOnly(true).build());
+    SearchWsResponse response = call(SearchRequest.builder().setOnProvisionedOnly(true).build());
 
     assertThat(response.getComponentsList()).extracting(Component::getKey)
       .containsExactlyInAnyOrder(provisionedProject.getKey())
@@ -279,7 +279,7 @@ public class SearchActionTest {
     ComponentDto sonarqube = db.components().insertPrivateProject();
     ComponentDto sonarlint = db.components().insertPrivateProject();
 
-    SearchWsResponse result = call(SearchWsRequest.builder()
+    SearchWsResponse result = call(SearchRequest.builder()
       .setProjects(Arrays.asList(jdk.getKey(), sonarqube.getKey()))
       .build());
 
@@ -295,7 +295,7 @@ public class SearchActionTest {
     ComponentDto sonarqube = db.components().insertPrivateProject();
     ComponentDto sonarlint = db.components().insertPrivateProject();
 
-    SearchWsResponse result = call(SearchWsRequest.builder()
+    SearchWsResponse result = call(SearchRequest.builder()
       .setProjectIds(Arrays.asList(jdk.uuid(), sonarqube.uuid()))
       .build());
 
@@ -309,14 +309,14 @@ public class SearchActionTest {
     userSession.addPermission(ADMINISTER_QUALITY_PROFILES, db.getDefaultOrganization());
     expectedException.expect(ForbiddenException.class);
 
-    call(SearchWsRequest.builder().build());
+    call(SearchRequest.builder().build());
   }
 
   @Test
   public void fail_on_unknown_organization() throws Exception {
     expectedException.expect(NotFoundException.class);
 
-    call(SearchWsRequest.builder().setOrganization("unknown").build());
+    call(SearchRequest.builder().setOrganization("unknown").build());
   }
 
   @Test
@@ -325,7 +325,7 @@ public class SearchActionTest {
     expectedException.expect(IllegalArgumentException.class);
     expectedException.expectMessage("Value of parameter 'qualifiers' (BRC) must be one of: [TRK, VW, APP]");
 
-    call(SearchWsRequest.builder().setQualifiers(singletonList("BRC")).build());
+    call(SearchRequest.builder().setQualifiers(singletonList("BRC")).build());
   }
 
   @Test
@@ -408,7 +408,7 @@ public class SearchActionTest {
     assertJson(ws.getDef().responseExampleAsString()).isSimilarTo(response);
   }
 
-  private SearchWsResponse call(SearchWsRequest wsRequest) {
+  private SearchWsResponse call(SearchRequest wsRequest) {
     TestRequest request = ws.newRequest();
     setNullable(wsRequest.getOrganization(), organization -> request.setParam(PARAM_ORGANIZATION, organization));
     List<String> qualifiers = wsRequest.getQualifiers();
index 6d45e829bf2117f462dac4c159d5094a9234daf7..163b1fdb3e7c76bc88c680df55392673a8487f2c 100644 (file)
@@ -52,7 +52,7 @@ public class ComponentsService extends BaseService {
     super(wsConnector, CONTROLLER_COMPONENTS);
   }
 
-  public SearchWsResponse search(SearchWsRequest request) {
+  public SearchWsResponse search(SearchRequest request) {
     GetRequest get = new GetRequest(path(ACTION_SEARCH))
       .setParam(PARAM_ORGANIZATION, request.getOrganization())
       .setParam(PARAM_QUALIFIERS, Joiner.on(",").join(request.getQualifiers()))
@@ -62,7 +62,7 @@ public class ComponentsService extends BaseService {
     return call(get, SearchWsResponse.parser());
   }
 
-  public TreeWsResponse tree(TreeWsRequest request) {
+  public TreeWsResponse tree(TreeRequest request) {
     GetRequest get = new GetRequest(path(ACTION_TREE))
       .setParam(PARAM_COMPONENT_ID, request.getBaseComponentId())
       .setParam("baseComponentKey", request.getBaseComponentKey())
@@ -77,7 +77,7 @@ public class ComponentsService extends BaseService {
     return call(get, TreeWsResponse.parser());
   }
 
-  public ShowWsResponse show(ShowWsRequest request) {
+  public ShowWsResponse show(ShowRequest request) {
     GetRequest get = new GetRequest(path(ACTION_SHOW))
       .setParam(PARAM_COMPONENT_ID, request.getId())
       .setParam(PARAM_COMPONENT, request.getKey())
@@ -100,7 +100,7 @@ public class ComponentsService extends BaseService {
     return call(get, SearchProjectsWsResponse.parser());
   }
 
-  public WsResponse suggestions(SuggestionsWsRequest request) {
+  public WsResponse suggestions(SuggestionsRequest request) {
     GetRequest get = new GetRequest(path(ACTION_SUGGESTIONS))
       .setParam("more", request.getMore() == null ? null : request.getMore().toString())
       .setParam("recentlyBrowsed", request.getRecentlyBrowsed().stream().collect(Collectors.joining(",")))
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/component/SearchRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/component/SearchRequest.java
new file mode 100644 (file)
index 0000000..efe91f2
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.component;
+
+import java.util.List;
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+
+import static java.util.Objects.requireNonNull;
+
+public class SearchRequest {
+  private String organization;
+  private List<String> qualifiers;
+  private Integer page;
+  private Integer pageSize;
+  private String query;
+  private String language;
+
+  @CheckForNull
+  public String getOrganization() {
+    return organization;
+  }
+
+  public SearchRequest setOrganization(@Nullable String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public List<String> getQualifiers() {
+    return qualifiers;
+  }
+
+  public SearchRequest setQualifiers(List<String> qualifiers) {
+    this.qualifiers = requireNonNull(qualifiers);
+    return this;
+  }
+
+  @CheckForNull
+  public Integer getPage() {
+    return page;
+  }
+
+  public SearchRequest setPage(int page) {
+    this.page = page;
+    return this;
+  }
+
+  @CheckForNull
+  public Integer getPageSize() {
+    return pageSize;
+  }
+
+  public SearchRequest setPageSize(int pageSize) {
+    this.pageSize = pageSize;
+    return this;
+  }
+
+  @CheckForNull
+  public String getQuery() {
+    return query;
+  }
+
+  public SearchRequest setQuery(@Nullable String query) {
+    this.query = query;
+    return this;
+  }
+
+  @CheckForNull
+  public String getLanguage() {
+    return language;
+  }
+
+  public SearchRequest setLanguage(@Nullable String language) {
+    this.language = language;
+    return this;
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/component/SearchWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/component/SearchWsRequest.java
deleted file mode 100644 (file)
index 7d7dcc0..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.component;
-
-import java.util.List;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
-import static java.util.Objects.requireNonNull;
-
-public class SearchWsRequest {
-  private String organization;
-  private List<String> qualifiers;
-  private Integer page;
-  private Integer pageSize;
-  private String query;
-  private String language;
-
-  @CheckForNull
-  public String getOrganization() {
-    return organization;
-  }
-
-  public SearchWsRequest setOrganization(@Nullable String organization) {
-    this.organization = organization;
-    return this;
-  }
-
-  public List<String> getQualifiers() {
-    return qualifiers;
-  }
-
-  public SearchWsRequest setQualifiers(List<String> qualifiers) {
-    this.qualifiers = requireNonNull(qualifiers);
-    return this;
-  }
-
-  @CheckForNull
-  public Integer getPage() {
-    return page;
-  }
-
-  public SearchWsRequest setPage(int page) {
-    this.page = page;
-    return this;
-  }
-
-  @CheckForNull
-  public Integer getPageSize() {
-    return pageSize;
-  }
-
-  public SearchWsRequest setPageSize(int pageSize) {
-    this.pageSize = pageSize;
-    return this;
-  }
-
-  @CheckForNull
-  public String getQuery() {
-    return query;
-  }
-
-  public SearchWsRequest setQuery(@Nullable String query) {
-    this.query = query;
-    return this;
-  }
-
-  @CheckForNull
-  public String getLanguage() {
-    return language;
-  }
-
-  public SearchWsRequest setLanguage(@Nullable String language) {
-    this.language = language;
-    return this;
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/component/ShowRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/component/ShowRequest.java
new file mode 100644 (file)
index 0000000..2377e7d
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.component;
+
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+
+public class ShowRequest {
+  private String id;
+  private String key;
+  private String branch;
+
+  @CheckForNull
+  public String getId() {
+    return id;
+  }
+
+  public ShowRequest setId(@Nullable String id) {
+    this.id = id;
+    return this;
+  }
+
+  @CheckForNull
+  public String getKey() {
+    return key;
+  }
+
+  public ShowRequest setKey(@Nullable String key) {
+    this.key = key;
+    return this;
+  }
+
+  @CheckForNull
+  public String getBranch() {
+    return branch;
+  }
+
+  public ShowRequest setBranch(@Nullable String branch) {
+    this.branch = branch;
+    return this;
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/component/ShowWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/component/ShowWsRequest.java
deleted file mode 100644 (file)
index 1ada158..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.component;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
-public class ShowWsRequest {
-  private String id;
-  private String key;
-  private String branch;
-
-  @CheckForNull
-  public String getId() {
-    return id;
-  }
-
-  public ShowWsRequest setId(@Nullable String id) {
-    this.id = id;
-    return this;
-  }
-
-  @CheckForNull
-  public String getKey() {
-    return key;
-  }
-
-  public ShowWsRequest setKey(@Nullable String key) {
-    this.key = key;
-    return this;
-  }
-
-  @CheckForNull
-  public String getBranch() {
-    return branch;
-  }
-
-  public ShowWsRequest setBranch(@Nullable String branch) {
-    this.branch = branch;
-    return this;
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/component/SuggestionsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/component/SuggestionsRequest.java
new file mode 100644 (file)
index 0000000..1f28b21
--- /dev/null
@@ -0,0 +1,95 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.component;
+
+import java.util.Collections;
+import java.util.List;
+
+public class SuggestionsRequest {
+
+  public static final int MAX_PAGE_SIZE = 500;
+  public static final int DEFAULT_PAGE_SIZE = 100;
+
+  public enum More {
+    VW,
+    SVW,
+    APP,
+    TRK,
+    BRC,
+    FIL,
+    UTS
+  }
+
+  private final More more;
+  private final List<String> recentlyBrowsed;
+  private final String s;
+
+  private SuggestionsRequest(Builder builder) {
+    this.more = builder.more;
+    this.recentlyBrowsed = builder.recentlyBrowsed;
+    this.s = builder.s;
+  }
+
+  public More getMore() {
+    return more;
+  }
+
+  public List<String> getRecentlyBrowsed() {
+    return recentlyBrowsed;
+  }
+
+  public String getS() {
+    return s;
+  }
+
+  public static Builder builder() {
+    return new Builder();
+  }
+
+  public static class Builder {
+
+    private More more;
+    private List<String> recentlyBrowsed = Collections.emptyList();
+    private String s;
+
+    private Builder() {
+      // enforce static factory method
+    }
+
+    public Builder setMore(More more) {
+      this.more = more;
+      return this;
+    }
+
+    public Builder setRecentlyBrowsed(List<String> recentlyBrowsed) {
+      this.recentlyBrowsed = recentlyBrowsed;
+      return this;
+    }
+
+    public Builder setS(String s) {
+      this.s = s;
+      return this;
+    }
+
+    public SuggestionsRequest build() {
+      return new SuggestionsRequest(this);
+    }
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/component/SuggestionsWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/component/SuggestionsWsRequest.java
deleted file mode 100644 (file)
index ca7fd84..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.component;
-
-import java.util.Collections;
-import java.util.List;
-
-public class SuggestionsWsRequest {
-
-  public static final int MAX_PAGE_SIZE = 500;
-  public static final int DEFAULT_PAGE_SIZE = 100;
-
-  public enum More {
-    VW,
-    SVW,
-    APP,
-    TRK,
-    BRC,
-    FIL,
-    UTS
-  }
-
-  private final More more;
-  private final List<String> recentlyBrowsed;
-  private final String s;
-
-  private SuggestionsWsRequest(Builder builder) {
-    this.more = builder.more;
-    this.recentlyBrowsed = builder.recentlyBrowsed;
-    this.s = builder.s;
-  }
-
-  public More getMore() {
-    return more;
-  }
-
-  public List<String> getRecentlyBrowsed() {
-    return recentlyBrowsed;
-  }
-
-  public String getS() {
-    return s;
-  }
-
-  public static Builder builder() {
-    return new Builder();
-  }
-
-  public static class Builder {
-
-    private More more;
-    private List<String> recentlyBrowsed = Collections.emptyList();
-    private String s;
-
-    private Builder() {
-      // enforce static factory method
-    }
-
-    public Builder setMore(More more) {
-      this.more = more;
-      return this;
-    }
-
-    public Builder setRecentlyBrowsed(List<String> recentlyBrowsed) {
-      this.recentlyBrowsed = recentlyBrowsed;
-      return this;
-    }
-
-    public Builder setS(String s) {
-      this.s = s;
-      return this;
-    }
-
-    public SuggestionsWsRequest build() {
-      return new SuggestionsWsRequest(this);
-    }
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/component/TreeRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/component/TreeRequest.java
new file mode 100644 (file)
index 0000000..569e44a
--- /dev/null
@@ -0,0 +1,163 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.component;
+
+import java.util.List;
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+
+public class TreeRequest {
+  private String baseComponentId;
+  private String baseComponentKey;
+  private String component;
+  private String branch;
+  private String strategy;
+  private List<String> qualifiers;
+  private String query;
+  private List<String> sort;
+  private Boolean asc;
+  private Integer page;
+  private Integer pageSize;
+
+  /**
+   * @deprecated since 6.4, please use {@link #getComponent()} instead
+   */
+  @Deprecated
+  @CheckForNull
+  public String getBaseComponentId() {
+    return baseComponentId;
+  }
+
+  /**
+   * @deprecated since 6.4, please use {@link #setComponent(String)} instead
+   */
+  @Deprecated
+  public TreeRequest setBaseComponentId(@Nullable String baseComponentId) {
+    this.baseComponentId = baseComponentId;
+    return this;
+  }
+
+  /**
+   * @deprecated since 6.4, please use {@link #getComponent()} instead
+   */
+  @Deprecated
+  @CheckForNull
+  public String getBaseComponentKey() {
+    return baseComponentKey;
+  }
+
+  /**
+   * @deprecated since 6.4, please use {@link #setComponent(String)} instead
+   */
+  @Deprecated
+  public TreeRequest setBaseComponentKey(@Nullable String baseComponentKey) {
+    this.baseComponentKey = baseComponentKey;
+    return this;
+  }
+
+  public TreeRequest setComponent(@Nullable String component) {
+    this.component = component;
+    return this;
+  }
+
+  @CheckForNull
+  public String getComponent() {
+    return component;
+  }
+
+  @CheckForNull
+  public String getBranch() {
+    return branch;
+  }
+
+  public TreeRequest setBranch(@Nullable String branch) {
+    this.branch = branch;
+    return this;
+  }
+
+  @CheckForNull
+  public String getStrategy() {
+    return strategy;
+  }
+
+  public TreeRequest setStrategy(@Nullable String strategy) {
+    this.strategy = strategy;
+    return this;
+  }
+
+  @CheckForNull
+  public List<String> getQualifiers() {
+    return qualifiers;
+  }
+
+  public TreeRequest setQualifiers(@Nullable List<String> qualifiers) {
+    this.qualifiers = qualifiers;
+    return this;
+  }
+
+  @CheckForNull
+  public String getQuery() {
+    return query;
+  }
+
+  public TreeRequest setQuery(@Nullable String query) {
+    this.query = query;
+    return this;
+  }
+
+  @CheckForNull
+  public List<String> getSort() {
+    return sort;
+  }
+
+  public TreeRequest setSort(@Nullable List<String> sort) {
+    this.sort = sort;
+    return this;
+  }
+
+  public Boolean getAsc() {
+    return asc;
+  }
+
+  public TreeRequest setAsc(@Nullable Boolean asc) {
+    this.asc = asc;
+    return this;
+  }
+
+  @CheckForNull
+  public Integer getPage() {
+    return page;
+  }
+
+  public TreeRequest setPage(@Nullable Integer page) {
+    this.page = page;
+    return this;
+  }
+
+  @CheckForNull
+  public Integer getPageSize() {
+    return pageSize;
+  }
+
+  public TreeRequest setPageSize(@Nullable Integer pageSize) {
+    this.pageSize = pageSize;
+    return this;
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/component/TreeWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/component/TreeWsRequest.java
deleted file mode 100644 (file)
index d941300..0000000
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.component;
-
-import java.util.List;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
-public class TreeWsRequest {
-  private String baseComponentId;
-  private String baseComponentKey;
-  private String component;
-  private String branch;
-  private String strategy;
-  private List<String> qualifiers;
-  private String query;
-  private List<String> sort;
-  private Boolean asc;
-  private Integer page;
-  private Integer pageSize;
-
-  /**
-   * @deprecated since 6.4, please use {@link #getComponent()} instead
-   */
-  @Deprecated
-  @CheckForNull
-  public String getBaseComponentId() {
-    return baseComponentId;
-  }
-
-  /**
-   * @deprecated since 6.4, please use {@link #setComponent(String)} instead
-   */
-  @Deprecated
-  public TreeWsRequest setBaseComponentId(@Nullable String baseComponentId) {
-    this.baseComponentId = baseComponentId;
-    return this;
-  }
-
-  /**
-   * @deprecated since 6.4, please use {@link #getComponent()} instead
-   */
-  @Deprecated
-  @CheckForNull
-  public String getBaseComponentKey() {
-    return baseComponentKey;
-  }
-
-  /**
-   * @deprecated since 6.4, please use {@link #setComponent(String)} instead
-   */
-  @Deprecated
-  public TreeWsRequest setBaseComponentKey(@Nullable String baseComponentKey) {
-    this.baseComponentKey = baseComponentKey;
-    return this;
-  }
-
-  public TreeWsRequest setComponent(@Nullable String component) {
-    this.component = component;
-    return this;
-  }
-
-  @CheckForNull
-  public String getComponent() {
-    return component;
-  }
-
-  @CheckForNull
-  public String getBranch() {
-    return branch;
-  }
-
-  public TreeWsRequest setBranch(@Nullable String branch) {
-    this.branch = branch;
-    return this;
-  }
-
-  @CheckForNull
-  public String getStrategy() {
-    return strategy;
-  }
-
-  public TreeWsRequest setStrategy(@Nullable String strategy) {
-    this.strategy = strategy;
-    return this;
-  }
-
-  @CheckForNull
-  public List<String> getQualifiers() {
-    return qualifiers;
-  }
-
-  public TreeWsRequest setQualifiers(@Nullable List<String> qualifiers) {
-    this.qualifiers = qualifiers;
-    return this;
-  }
-
-  @CheckForNull
-  public String getQuery() {
-    return query;
-  }
-
-  public TreeWsRequest setQuery(@Nullable String query) {
-    this.query = query;
-    return this;
-  }
-
-  @CheckForNull
-  public List<String> getSort() {
-    return sort;
-  }
-
-  public TreeWsRequest setSort(@Nullable List<String> sort) {
-    this.sort = sort;
-    return this;
-  }
-
-  public Boolean getAsc() {
-    return asc;
-  }
-
-  public TreeWsRequest setAsc(@Nullable Boolean asc) {
-    this.asc = asc;
-    return this;
-  }
-
-  @CheckForNull
-  public Integer getPage() {
-    return page;
-  }
-
-  public TreeWsRequest setPage(@Nullable Integer page) {
-    this.page = page;
-    return this;
-  }
-
-  @CheckForNull
-  public Integer getPageSize() {
-    return pageSize;
-  }
-
-  public TreeWsRequest setPageSize(@Nullable Integer pageSize) {
-    this.pageSize = pageSize;
-    return this;
-  }
-}
index fb9c73feae7e869097cc0eacd3c3e0d83348e568..58e94c13e2e0245ce1b89d0ec5cc1f564b69ffcd 100644 (file)
@@ -158,7 +158,7 @@ public class IssuesService extends BaseService {
       Issues.Operation.parser());
   }
 
-  public SearchWsResponse search(SearchWsRequest request) {
+  public SearchWsResponse search(SearchRequest request) {
     return call(
       new GetRequest(path(ACTION_SEARCH))
         .setParam(DEPRECATED_PARAM_ACTION_PLANS, inlineMultipleParamValue(request.getActionPlans()))
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/SearchRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/SearchRequest.java
new file mode 100644 (file)
index 0000000..841e007
--- /dev/null
@@ -0,0 +1,456 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.issue;
+
+import java.util.List;
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+
+public class SearchRequest {
+  private List<String> actionPlans;
+  private List<String> additionalFields;
+  private Boolean asc;
+  private Boolean assigned;
+  private List<String> assignees;
+  private List<String> authors;
+  private List<String> componentKeys;
+  private List<String> componentRootUuids;
+  private List<String> componentRoots;
+  private List<String> componentUuids;
+  private List<String> components;
+  private String createdAfter;
+  private String createdAt;
+  private String createdBefore;
+  private String createdInLast;
+  private List<String> directories;
+  private String facetMode;
+  private List<String> facets;
+  private List<String> fileUuids;
+  private List<String> issues;
+  private List<String> languages;
+  private List<String> moduleUuids;
+  private Boolean onComponentOnly;
+  private String branch;
+  private String organization;
+  private Integer page;
+  private Integer pageSize;
+  private List<String> projectKeys;
+  private List<String> projectUuids;
+  private List<String> projects;
+  private List<String> resolutions;
+  private Boolean resolved;
+  private List<String> rules;
+  private Boolean sinceLeakPeriod;
+  private String sort;
+  private List<String> severities;
+  private List<String> statuses;
+  private List<String> tags;
+  private List<String> types;
+
+  @CheckForNull
+  public List<String> getActionPlans() {
+    return actionPlans;
+  }
+
+  public SearchRequest setActionPlans(@Nullable List<String> actionPlans) {
+    this.actionPlans = actionPlans;
+    return this;
+  }
+
+  @CheckForNull
+  public List<String> getAdditionalFields() {
+    return additionalFields;
+  }
+
+  public SearchRequest setAdditionalFields(@Nullable List<String> additionalFields) {
+    this.additionalFields = additionalFields;
+    return this;
+  }
+
+  @CheckForNull
+  public Boolean getAsc() {
+    return asc;
+  }
+
+  public SearchRequest setAsc(boolean asc) {
+    this.asc = asc;
+    return this;
+  }
+
+  @CheckForNull
+  public Boolean getAssigned() {
+    return assigned;
+  }
+
+  public SearchRequest setAssigned(@Nullable Boolean assigned) {
+    this.assigned = assigned;
+    return this;
+  }
+
+  @CheckForNull
+  public List<String> getAssignees() {
+    return assignees;
+  }
+
+  public SearchRequest setAssignees(@Nullable List<String> assignees) {
+    this.assignees = assignees;
+    return this;
+  }
+
+  @CheckForNull
+  public List<String> getAuthors() {
+    return authors;
+  }
+
+  public SearchRequest setAuthors(@Nullable List<String> authors) {
+    this.authors = authors;
+    return this;
+  }
+
+  @CheckForNull
+  public List<String> getComponentKeys() {
+    return componentKeys;
+  }
+
+  public SearchRequest setComponentKeys(@Nullable List<String> componentKeys) {
+    this.componentKeys = componentKeys;
+    return this;
+  }
+
+  @CheckForNull
+  public List<String> getComponentUuids() {
+    return componentUuids;
+  }
+
+  public SearchRequest setComponentUuids(@Nullable List<String> componentUuids) {
+    this.componentUuids = componentUuids;
+    return this;
+  }
+
+  @CheckForNull
+  public String getCreatedAfter() {
+    return createdAfter;
+  }
+
+  public SearchRequest setCreatedAfter(@Nullable String createdAfter) {
+    this.createdAfter = createdAfter;
+    return this;
+  }
+
+  @CheckForNull
+  public String getCreatedAt() {
+    return createdAt;
+  }
+
+  public SearchRequest setCreatedAt(@Nullable String createdAt) {
+    this.createdAt = createdAt;
+    return this;
+  }
+
+  @CheckForNull
+  public String getCreatedBefore() {
+    return createdBefore;
+  }
+
+  public SearchRequest setCreatedBefore(@Nullable String createdBefore) {
+    this.createdBefore = createdBefore;
+    return this;
+  }
+
+  @CheckForNull
+  public String getCreatedInLast() {
+    return createdInLast;
+  }
+
+  public SearchRequest setCreatedInLast(@Nullable String createdInLast) {
+    this.createdInLast = createdInLast;
+    return this;
+  }
+
+  @CheckForNull
+  public List<String> getDirectories() {
+    return directories;
+  }
+
+  public SearchRequest setDirectories(@Nullable List<String> directories) {
+    this.directories = directories;
+    return this;
+  }
+
+  @CheckForNull
+  public String getFacetMode() {
+    return facetMode;
+  }
+
+  public SearchRequest setFacetMode(@Nullable String facetMode) {
+    this.facetMode = facetMode;
+    return this;
+  }
+
+  @CheckForNull
+  public List<String> getFacets() {
+    return facets;
+  }
+
+  public SearchRequest setFacets(@Nullable List<String> facets) {
+    this.facets = facets;
+    return this;
+  }
+
+  @CheckForNull
+  public List<String> getFileUuids() {
+    return fileUuids;
+  }
+
+  public SearchRequest setFileUuids(@Nullable List<String> fileUuids) {
+    this.fileUuids = fileUuids;
+    return this;
+  }
+
+  @CheckForNull
+  public List<String> getIssues() {
+    return issues;
+  }
+
+  public SearchRequest setIssues(@Nullable List<String> issues) {
+    this.issues = issues;
+    return this;
+  }
+
+  @CheckForNull
+  public List<String> getLanguages() {
+    return languages;
+  }
+
+  public SearchRequest setLanguages(@Nullable List<String> languages) {
+    this.languages = languages;
+    return this;
+  }
+
+  @CheckForNull
+  public List<String> getModuleUuids() {
+    return moduleUuids;
+  }
+
+  public SearchRequest setModuleUuids(@Nullable List<String> moduleUuids) {
+    this.moduleUuids = moduleUuids;
+    return this;
+  }
+
+  @CheckForNull
+  public Boolean getOnComponentOnly() {
+    return onComponentOnly;
+  }
+
+  public SearchRequest setOnComponentOnly(Boolean onComponentOnly) {
+    this.onComponentOnly = onComponentOnly;
+    return this;
+  }
+
+  @CheckForNull
+  public String getOrganization() {
+    return organization;
+  }
+
+  public SearchRequest setOrganization(@Nullable String s) {
+    this.organization = s;
+    return this;
+  }
+
+  @CheckForNull
+  public Integer getPage() {
+    return page;
+  }
+
+  public SearchRequest setPage(int page) {
+    this.page = page;
+    return this;
+  }
+
+  @CheckForNull
+  public Integer getPageSize() {
+    return pageSize;
+  }
+
+  public SearchRequest setPageSize(int pageSize) {
+    this.pageSize = pageSize;
+    return this;
+  }
+
+  @CheckForNull
+  public List<String> getProjectKeys() {
+    return projectKeys;
+  }
+
+  public SearchRequest setProjectKeys(@Nullable List<String> projectKeys) {
+    this.projectKeys = projectKeys;
+    return this;
+  }
+
+  @CheckForNull
+  public List<String> getProjectUuids() {
+    return projectUuids;
+  }
+
+  public SearchRequest setProjectUuids(@Nullable List<String> projectUuids) {
+    this.projectUuids = projectUuids;
+    return this;
+  }
+
+  @CheckForNull
+  public List<String> getResolutions() {
+    return resolutions;
+  }
+
+  public SearchRequest setResolutions(@Nullable List<String> resolutions) {
+    this.resolutions = resolutions;
+    return this;
+  }
+
+  @CheckForNull
+  public Boolean getResolved() {
+    return resolved;
+  }
+
+  public SearchRequest setResolved(@Nullable Boolean resolved) {
+    this.resolved = resolved;
+    return this;
+  }
+
+  @CheckForNull
+  public List<String> getRules() {
+    return rules;
+  }
+
+  public SearchRequest setRules(@Nullable List<String> rules) {
+    this.rules = rules;
+    return this;
+  }
+
+  @CheckForNull
+  public Boolean getSinceLeakPeriod() {
+    return sinceLeakPeriod;
+  }
+
+  public SearchRequest setSinceLeakPeriod(@Nullable Boolean sinceLeakPeriod) {
+    this.sinceLeakPeriod = sinceLeakPeriod;
+    return this;
+  }
+
+  @CheckForNull
+  public String getSort() {
+    return sort;
+  }
+
+  public SearchRequest setSort(@Nullable String sort) {
+    this.sort = sort;
+    return this;
+  }
+
+  @CheckForNull
+  public List<String> getSeverities() {
+    return severities;
+  }
+
+  public SearchRequest setSeverities(@Nullable List<String> severities) {
+    this.severities = severities;
+    return this;
+  }
+
+  @CheckForNull
+  public List<String> getStatuses() {
+    return statuses;
+  }
+
+  public SearchRequest setStatuses(@Nullable List<String> statuses) {
+    this.statuses = statuses;
+    return this;
+  }
+
+  @CheckForNull
+  public List<String> getTags() {
+    return tags;
+  }
+
+  public SearchRequest setTags(@Nullable List<String> tags) {
+    this.tags = tags;
+    return this;
+  }
+
+  @CheckForNull
+  public List<String> getTypes() {
+    return types;
+  }
+
+  public SearchRequest setTypes(@Nullable List<String> types) {
+    this.types = types;
+    return this;
+  }
+
+  @CheckForNull
+  public List<String> getComponentRootUuids() {
+    return componentRootUuids;
+  }
+
+  public SearchRequest setComponentRootUuids(List<String> componentRootUuids) {
+    this.componentRootUuids = componentRootUuids;
+    return this;
+  }
+
+  @CheckForNull
+  public List<String> getComponentRoots() {
+    return componentRoots;
+  }
+
+  public SearchRequest setComponentRoots(@Nullable List<String> componentRoots) {
+    this.componentRoots = componentRoots;
+    return this;
+  }
+
+  @CheckForNull
+  public List<String> getComponents() {
+    return components;
+  }
+
+  public SearchRequest setComponents(@Nullable List<String> components) {
+    this.components = components;
+    return this;
+  }
+
+  @CheckForNull
+  public List<String> getProjects() {
+    return projects;
+  }
+
+  public SearchRequest setProjects(@Nullable List<String> projects) {
+    this.projects = projects;
+    return this;
+  }
+
+  @CheckForNull
+  public String getBranch() {
+    return branch;
+  }
+
+  public SearchRequest setBranch(@Nullable String branch) {
+    this.branch = branch;
+    return this;
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/SearchWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/SearchWsRequest.java
deleted file mode 100644 (file)
index 427ea7f..0000000
+++ /dev/null
@@ -1,456 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.issue;
-
-import java.util.List;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
-public class SearchWsRequest {
-  private List<String> actionPlans;
-  private List<String> additionalFields;
-  private Boolean asc;
-  private Boolean assigned;
-  private List<String> assignees;
-  private List<String> authors;
-  private List<String> componentKeys;
-  private List<String> componentRootUuids;
-  private List<String> componentRoots;
-  private List<String> componentUuids;
-  private List<String> components;
-  private String createdAfter;
-  private String createdAt;
-  private String createdBefore;
-  private String createdInLast;
-  private List<String> directories;
-  private String facetMode;
-  private List<String> facets;
-  private List<String> fileUuids;
-  private List<String> issues;
-  private List<String> languages;
-  private List<String> moduleUuids;
-  private Boolean onComponentOnly;
-  private String branch;
-  private String organization;
-  private Integer page;
-  private Integer pageSize;
-  private List<String> projectKeys;
-  private List<String> projectUuids;
-  private List<String> projects;
-  private List<String> resolutions;
-  private Boolean resolved;
-  private List<String> rules;
-  private Boolean sinceLeakPeriod;
-  private String sort;
-  private List<String> severities;
-  private List<String> statuses;
-  private List<String> tags;
-  private List<String> types;
-
-  @CheckForNull
-  public List<String> getActionPlans() {
-    return actionPlans;
-  }
-
-  public SearchWsRequest setActionPlans(@Nullable List<String> actionPlans) {
-    this.actionPlans = actionPlans;
-    return this;
-  }
-
-  @CheckForNull
-  public List<String> getAdditionalFields() {
-    return additionalFields;
-  }
-
-  public SearchWsRequest setAdditionalFields(@Nullable List<String> additionalFields) {
-    this.additionalFields = additionalFields;
-    return this;
-  }
-
-  @CheckForNull
-  public Boolean getAsc() {
-    return asc;
-  }
-
-  public SearchWsRequest setAsc(boolean asc) {
-    this.asc = asc;
-    return this;
-  }
-
-  @CheckForNull
-  public Boolean getAssigned() {
-    return assigned;
-  }
-
-  public SearchWsRequest setAssigned(@Nullable Boolean assigned) {
-    this.assigned = assigned;
-    return this;
-  }
-
-  @CheckForNull
-  public List<String> getAssignees() {
-    return assignees;
-  }
-
-  public SearchWsRequest setAssignees(@Nullable List<String> assignees) {
-    this.assignees = assignees;
-    return this;
-  }
-
-  @CheckForNull
-  public List<String> getAuthors() {
-    return authors;
-  }
-
-  public SearchWsRequest setAuthors(@Nullable List<String> authors) {
-    this.authors = authors;
-    return this;
-  }
-
-  @CheckForNull
-  public List<String> getComponentKeys() {
-    return componentKeys;
-  }
-
-  public SearchWsRequest setComponentKeys(@Nullable List<String> componentKeys) {
-    this.componentKeys = componentKeys;
-    return this;
-  }
-
-  @CheckForNull
-  public List<String> getComponentUuids() {
-    return componentUuids;
-  }
-
-  public SearchWsRequest setComponentUuids(@Nullable List<String> componentUuids) {
-    this.componentUuids = componentUuids;
-    return this;
-  }
-
-  @CheckForNull
-  public String getCreatedAfter() {
-    return createdAfter;
-  }
-
-  public SearchWsRequest setCreatedAfter(@Nullable String createdAfter) {
-    this.createdAfter = createdAfter;
-    return this;
-  }
-
-  @CheckForNull
-  public String getCreatedAt() {
-    return createdAt;
-  }
-
-  public SearchWsRequest setCreatedAt(@Nullable String createdAt) {
-    this.createdAt = createdAt;
-    return this;
-  }
-
-  @CheckForNull
-  public String getCreatedBefore() {
-    return createdBefore;
-  }
-
-  public SearchWsRequest setCreatedBefore(@Nullable String createdBefore) {
-    this.createdBefore = createdBefore;
-    return this;
-  }
-
-  @CheckForNull
-  public String getCreatedInLast() {
-    return createdInLast;
-  }
-
-  public SearchWsRequest setCreatedInLast(@Nullable String createdInLast) {
-    this.createdInLast = createdInLast;
-    return this;
-  }
-
-  @CheckForNull
-  public List<String> getDirectories() {
-    return directories;
-  }
-
-  public SearchWsRequest setDirectories(@Nullable List<String> directories) {
-    this.directories = directories;
-    return this;
-  }
-
-  @CheckForNull
-  public String getFacetMode() {
-    return facetMode;
-  }
-
-  public SearchWsRequest setFacetMode(@Nullable String facetMode) {
-    this.facetMode = facetMode;
-    return this;
-  }
-
-  @CheckForNull
-  public List<String> getFacets() {
-    return facets;
-  }
-
-  public SearchWsRequest setFacets(@Nullable List<String> facets) {
-    this.facets = facets;
-    return this;
-  }
-
-  @CheckForNull
-  public List<String> getFileUuids() {
-    return fileUuids;
-  }
-
-  public SearchWsRequest setFileUuids(@Nullable List<String> fileUuids) {
-    this.fileUuids = fileUuids;
-    return this;
-  }
-
-  @CheckForNull
-  public List<String> getIssues() {
-    return issues;
-  }
-
-  public SearchWsRequest setIssues(@Nullable List<String> issues) {
-    this.issues = issues;
-    return this;
-  }
-
-  @CheckForNull
-  public List<String> getLanguages() {
-    return languages;
-  }
-
-  public SearchWsRequest setLanguages(@Nullable List<String> languages) {
-    this.languages = languages;
-    return this;
-  }
-
-  @CheckForNull
-  public List<String> getModuleUuids() {
-    return moduleUuids;
-  }
-
-  public SearchWsRequest setModuleUuids(@Nullable List<String> moduleUuids) {
-    this.moduleUuids = moduleUuids;
-    return this;
-  }
-
-  @CheckForNull
-  public Boolean getOnComponentOnly() {
-    return onComponentOnly;
-  }
-
-  public SearchWsRequest setOnComponentOnly(Boolean onComponentOnly) {
-    this.onComponentOnly = onComponentOnly;
-    return this;
-  }
-
-  @CheckForNull
-  public String getOrganization() {
-    return organization;
-  }
-
-  public SearchWsRequest setOrganization(@Nullable String s) {
-    this.organization = s;
-    return this;
-  }
-
-  @CheckForNull
-  public Integer getPage() {
-    return page;
-  }
-
-  public SearchWsRequest setPage(int page) {
-    this.page = page;
-    return this;
-  }
-
-  @CheckForNull
-  public Integer getPageSize() {
-    return pageSize;
-  }
-
-  public SearchWsRequest setPageSize(int pageSize) {
-    this.pageSize = pageSize;
-    return this;
-  }
-
-  @CheckForNull
-  public List<String> getProjectKeys() {
-    return projectKeys;
-  }
-
-  public SearchWsRequest setProjectKeys(@Nullable List<String> projectKeys) {
-    this.projectKeys = projectKeys;
-    return this;
-  }
-
-  @CheckForNull
-  public List<String> getProjectUuids() {
-    return projectUuids;
-  }
-
-  public SearchWsRequest setProjectUuids(@Nullable List<String> projectUuids) {
-    this.projectUuids = projectUuids;
-    return this;
-  }
-
-  @CheckForNull
-  public List<String> getResolutions() {
-    return resolutions;
-  }
-
-  public SearchWsRequest setResolutions(@Nullable List<String> resolutions) {
-    this.resolutions = resolutions;
-    return this;
-  }
-
-  @CheckForNull
-  public Boolean getResolved() {
-    return resolved;
-  }
-
-  public SearchWsRequest setResolved(@Nullable Boolean resolved) {
-    this.resolved = resolved;
-    return this;
-  }
-
-  @CheckForNull
-  public List<String> getRules() {
-    return rules;
-  }
-
-  public SearchWsRequest setRules(@Nullable List<String> rules) {
-    this.rules = rules;
-    return this;
-  }
-
-  @CheckForNull
-  public Boolean getSinceLeakPeriod() {
-    return sinceLeakPeriod;
-  }
-
-  public SearchWsRequest setSinceLeakPeriod(@Nullable Boolean sinceLeakPeriod) {
-    this.sinceLeakPeriod = sinceLeakPeriod;
-    return this;
-  }
-
-  @CheckForNull
-  public String getSort() {
-    return sort;
-  }
-
-  public SearchWsRequest setSort(@Nullable String sort) {
-    this.sort = sort;
-    return this;
-  }
-
-  @CheckForNull
-  public List<String> getSeverities() {
-    return severities;
-  }
-
-  public SearchWsRequest setSeverities(@Nullable List<String> severities) {
-    this.severities = severities;
-    return this;
-  }
-
-  @CheckForNull
-  public List<String> getStatuses() {
-    return statuses;
-  }
-
-  public SearchWsRequest setStatuses(@Nullable List<String> statuses) {
-    this.statuses = statuses;
-    return this;
-  }
-
-  @CheckForNull
-  public List<String> getTags() {
-    return tags;
-  }
-
-  public SearchWsRequest setTags(@Nullable List<String> tags) {
-    this.tags = tags;
-    return this;
-  }
-
-  @CheckForNull
-  public List<String> getTypes() {
-    return types;
-  }
-
-  public SearchWsRequest setTypes(@Nullable List<String> types) {
-    this.types = types;
-    return this;
-  }
-
-  @CheckForNull
-  public List<String> getComponentRootUuids() {
-    return componentRootUuids;
-  }
-
-  public SearchWsRequest setComponentRootUuids(List<String> componentRootUuids) {
-    this.componentRootUuids = componentRootUuids;
-    return this;
-  }
-
-  @CheckForNull
-  public List<String> getComponentRoots() {
-    return componentRoots;
-  }
-
-  public SearchWsRequest setComponentRoots(@Nullable List<String> componentRoots) {
-    this.componentRoots = componentRoots;
-    return this;
-  }
-
-  @CheckForNull
-  public List<String> getComponents() {
-    return components;
-  }
-
-  public SearchWsRequest setComponents(@Nullable List<String> components) {
-    this.components = components;
-    return this;
-  }
-
-  @CheckForNull
-  public List<String> getProjects() {
-    return projects;
-  }
-
-  public SearchWsRequest setProjects(@Nullable List<String> projects) {
-    this.projects = projects;
-    return this;
-  }
-
-  @CheckForNull
-  public String getBranch() {
-    return branch;
-  }
-
-  public SearchWsRequest setBranch(@Nullable String branch) {
-    this.branch = branch;
-    return this;
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/measure/ComponentRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/measure/ComponentRequest.java
new file mode 100644 (file)
index 0000000..4eb5bbc
--- /dev/null
@@ -0,0 +1,130 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.measure;
+
+import java.util.List;
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+
+public class ComponentRequest {
+  private String componentId;
+  private String componentKey;
+  private String component;
+  private String branch;
+  private List<String> metricKeys;
+  private List<String> additionalFields;
+  private String developerId;
+  private String developerKey;
+
+  /**
+   * @deprecated since 6.6, please use {@link #getComponent()} instead
+   */
+  @Deprecated
+  @CheckForNull
+  public String getComponentId() {
+    return componentId;
+  }
+
+  /**
+   * @deprecated since 6.6, please use {@link #setComponent(String)} instead
+   */
+  @Deprecated
+  public ComponentRequest setComponentId(@Nullable String componentId) {
+    this.componentId = componentId;
+    return this;
+  }
+
+  /**
+   * @deprecated since 6.6, please use {@link #getComponent()} instead
+   */
+  @Deprecated
+  @CheckForNull
+  public String getComponentKey() {
+    return componentKey;
+  }
+
+  /**
+   * @deprecated since 6.6, please use {@link #setComponent(String)} instead
+   */
+  @Deprecated
+  public ComponentRequest setComponentKey(@Nullable String componentKey) {
+    this.componentKey = componentKey;
+    return this;
+  }
+
+  @CheckForNull
+  public String getComponent() {
+    return component;
+  }
+
+  public ComponentRequest setComponent(@Nullable String component) {
+    this.component = component;
+    return this;
+  }
+
+  @CheckForNull
+  public String getBranch() {
+    return branch;
+  }
+
+  public ComponentRequest setBranch(@Nullable String branch) {
+    this.branch = branch;
+    return this;
+  }
+
+  public List<String> getMetricKeys() {
+    return metricKeys;
+  }
+
+  public ComponentRequest setMetricKeys(@Nullable List<String> metricKeys) {
+    this.metricKeys = metricKeys;
+    return this;
+  }
+
+  @CheckForNull
+  public List<String> getAdditionalFields() {
+    return additionalFields;
+  }
+
+  public ComponentRequest setAdditionalFields(@Nullable List<String> additionalFields) {
+    this.additionalFields = additionalFields;
+    return this;
+  }
+
+  @CheckForNull
+  public String getDeveloperId() {
+    return developerId;
+  }
+
+  public ComponentRequest setDeveloperId(@Nullable String developerId) {
+    this.developerId = developerId;
+    return this;
+  }
+
+  @CheckForNull
+  public String getDeveloperKey() {
+    return developerKey;
+  }
+
+  public ComponentRequest setDeveloperKey(@Nullable String developerKey) {
+    this.developerKey = developerKey;
+    return this;
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/measure/ComponentTreeRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/measure/ComponentTreeRequest.java
new file mode 100644 (file)
index 0000000..fa6bb47
--- /dev/null
@@ -0,0 +1,242 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.measure;
+
+import java.util.List;
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+
+public class ComponentTreeRequest {
+
+  private String baseComponentId;
+  private String baseComponentKey;
+  private String component;
+  private String branch;
+  private String strategy;
+  private List<String> qualifiers;
+  private List<String> additionalFields;
+  private String query;
+  private List<String> sort;
+  private Boolean asc;
+  private String metricSort;
+  private Integer metricPeriodSort;
+  private String metricSortFilter;
+  private List<String> metricKeys;
+  private Integer page;
+  private Integer pageSize;
+  private String developerId;
+  private String developerKey;
+
+  /**
+   * @deprecated since 6.6, please use {@link #getComponent()} instead
+   */
+  @Deprecated
+  @CheckForNull
+  public String getBaseComponentId() {
+    return baseComponentId;
+  }
+
+  /**
+   * @deprecated since 6.6, please use {@link #setComponent(String)} instead
+   */
+  @Deprecated
+  public ComponentTreeRequest setBaseComponentId(@Nullable String baseComponentId) {
+    this.baseComponentId = baseComponentId;
+    return this;
+  }
+
+  /**
+   * @deprecated since 6.6, please use {@link #getComponent()} instead
+   */
+  @Deprecated
+  @CheckForNull
+  public String getBaseComponentKey() {
+    return baseComponentKey;
+  }
+
+  /**
+   * @deprecated since 6.6, please use {@link #setComponent(String)} instead
+   */
+  @Deprecated
+  public ComponentTreeRequest setBaseComponentKey(@Nullable String baseComponentKey) {
+    this.baseComponentKey = baseComponentKey;
+    return this;
+  }
+
+  @CheckForNull
+  public String getComponent() {
+    return component;
+  }
+
+  public ComponentTreeRequest setComponent(@Nullable String component) {
+    this.component = component;
+    return this;
+  }
+
+  @CheckForNull
+  public String getBranch() {
+    return branch;
+  }
+
+  public ComponentTreeRequest setBranch(@Nullable String branch) {
+    this.branch = branch;
+    return this;
+  }
+
+  @CheckForNull
+  public String getStrategy() {
+    return strategy;
+  }
+
+  public ComponentTreeRequest setStrategy(String strategy) {
+    this.strategy = strategy;
+    return this;
+  }
+
+  @CheckForNull
+  public List<String> getQualifiers() {
+    return qualifiers;
+  }
+
+  public ComponentTreeRequest setQualifiers(@Nullable List<String> qualifiers) {
+    this.qualifiers = qualifiers;
+    return this;
+  }
+
+  @CheckForNull
+  public List<String> getAdditionalFields() {
+    return additionalFields;
+  }
+
+  public ComponentTreeRequest setAdditionalFields(@Nullable List<String> additionalFields) {
+    this.additionalFields = additionalFields;
+    return this;
+  }
+
+  @CheckForNull
+  public String getQuery() {
+    return query;
+  }
+
+  public ComponentTreeRequest setQuery(@Nullable String query) {
+    this.query = query;
+    return this;
+  }
+
+  @CheckForNull
+  public List<String> getSort() {
+    return sort;
+  }
+
+  public ComponentTreeRequest setSort(@Nullable List<String> sort) {
+    this.sort = sort;
+    return this;
+  }
+
+  @CheckForNull
+  public String getMetricSort() {
+    return metricSort;
+  }
+
+  public ComponentTreeRequest setMetricSort(@Nullable String metricSort) {
+    this.metricSort = metricSort;
+    return this;
+  }
+
+  @CheckForNull
+  public String getMetricSortFilter() {
+    return metricSortFilter;
+  }
+
+  public ComponentTreeRequest setMetricSortFilter(@Nullable String metricSortFilter) {
+    this.metricSortFilter = metricSortFilter;
+    return this;
+  }
+
+  @CheckForNull
+  public List<String> getMetricKeys() {
+    return metricKeys;
+  }
+
+  public ComponentTreeRequest setMetricKeys(List<String> metricKeys) {
+    this.metricKeys = metricKeys;
+    return this;
+  }
+
+  @CheckForNull
+  public Boolean getAsc() {
+    return asc;
+  }
+
+  public ComponentTreeRequest setAsc(@Nullable Boolean asc) {
+    this.asc = asc;
+    return this;
+  }
+
+  @CheckForNull
+  public Integer getPage() {
+    return page;
+  }
+
+  public ComponentTreeRequest setPage(int page) {
+    this.page = page;
+    return this;
+  }
+
+  @CheckForNull
+  public Integer getPageSize() {
+    return pageSize;
+  }
+
+  public ComponentTreeRequest setPageSize(int pageSize) {
+    this.pageSize = pageSize;
+    return this;
+  }
+
+  @CheckForNull
+  public Integer getMetricPeriodSort() {
+    return metricPeriodSort;
+  }
+
+  public ComponentTreeRequest setMetricPeriodSort(@Nullable Integer metricPeriodSort) {
+    this.metricPeriodSort = metricPeriodSort;
+    return this;
+  }
+
+  @CheckForNull
+  public String getDeveloperId() {
+    return developerId;
+  }
+
+  public ComponentTreeRequest setDeveloperId(@Nullable String developerId) {
+    this.developerId = developerId;
+    return this;
+  }
+
+  @CheckForNull
+  public String getDeveloperKey() {
+    return developerKey;
+  }
+
+  public ComponentTreeRequest setDeveloperKey(@Nullable String developerKey) {
+    this.developerKey = developerKey;
+    return this;
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/measure/ComponentTreeWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/measure/ComponentTreeWsRequest.java
deleted file mode 100644 (file)
index 0a89515..0000000
+++ /dev/null
@@ -1,242 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.measure;
-
-import java.util.List;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
-public class ComponentTreeWsRequest {
-
-  private String baseComponentId;
-  private String baseComponentKey;
-  private String component;
-  private String branch;
-  private String strategy;
-  private List<String> qualifiers;
-  private List<String> additionalFields;
-  private String query;
-  private List<String> sort;
-  private Boolean asc;
-  private String metricSort;
-  private Integer metricPeriodSort;
-  private String metricSortFilter;
-  private List<String> metricKeys;
-  private Integer page;
-  private Integer pageSize;
-  private String developerId;
-  private String developerKey;
-
-  /**
-   * @deprecated since 6.6, please use {@link #getComponent()} instead
-   */
-  @Deprecated
-  @CheckForNull
-  public String getBaseComponentId() {
-    return baseComponentId;
-  }
-
-  /**
-   * @deprecated since 6.6, please use {@link #setComponent(String)} instead
-   */
-  @Deprecated
-  public ComponentTreeWsRequest setBaseComponentId(@Nullable String baseComponentId) {
-    this.baseComponentId = baseComponentId;
-    return this;
-  }
-
-  /**
-   * @deprecated since 6.6, please use {@link #getComponent()} instead
-   */
-  @Deprecated
-  @CheckForNull
-  public String getBaseComponentKey() {
-    return baseComponentKey;
-  }
-
-  /**
-   * @deprecated since 6.6, please use {@link #setComponent(String)} instead
-   */
-  @Deprecated
-  public ComponentTreeWsRequest setBaseComponentKey(@Nullable String baseComponentKey) {
-    this.baseComponentKey = baseComponentKey;
-    return this;
-  }
-
-  @CheckForNull
-  public String getComponent() {
-    return component;
-  }
-
-  public ComponentTreeWsRequest setComponent(@Nullable String component) {
-    this.component = component;
-    return this;
-  }
-
-  @CheckForNull
-  public String getBranch() {
-    return branch;
-  }
-
-  public ComponentTreeWsRequest setBranch(@Nullable String branch) {
-    this.branch = branch;
-    return this;
-  }
-
-  @CheckForNull
-  public String getStrategy() {
-    return strategy;
-  }
-
-  public ComponentTreeWsRequest setStrategy(String strategy) {
-    this.strategy = strategy;
-    return this;
-  }
-
-  @CheckForNull
-  public List<String> getQualifiers() {
-    return qualifiers;
-  }
-
-  public ComponentTreeWsRequest setQualifiers(@Nullable List<String> qualifiers) {
-    this.qualifiers = qualifiers;
-    return this;
-  }
-
-  @CheckForNull
-  public List<String> getAdditionalFields() {
-    return additionalFields;
-  }
-
-  public ComponentTreeWsRequest setAdditionalFields(@Nullable List<String> additionalFields) {
-    this.additionalFields = additionalFields;
-    return this;
-  }
-
-  @CheckForNull
-  public String getQuery() {
-    return query;
-  }
-
-  public ComponentTreeWsRequest setQuery(@Nullable String query) {
-    this.query = query;
-    return this;
-  }
-
-  @CheckForNull
-  public List<String> getSort() {
-    return sort;
-  }
-
-  public ComponentTreeWsRequest setSort(@Nullable List<String> sort) {
-    this.sort = sort;
-    return this;
-  }
-
-  @CheckForNull
-  public String getMetricSort() {
-    return metricSort;
-  }
-
-  public ComponentTreeWsRequest setMetricSort(@Nullable String metricSort) {
-    this.metricSort = metricSort;
-    return this;
-  }
-
-  @CheckForNull
-  public String getMetricSortFilter() {
-    return metricSortFilter;
-  }
-
-  public ComponentTreeWsRequest setMetricSortFilter(@Nullable String metricSortFilter) {
-    this.metricSortFilter = metricSortFilter;
-    return this;
-  }
-
-  @CheckForNull
-  public List<String> getMetricKeys() {
-    return metricKeys;
-  }
-
-  public ComponentTreeWsRequest setMetricKeys(List<String> metricKeys) {
-    this.metricKeys = metricKeys;
-    return this;
-  }
-
-  @CheckForNull
-  public Boolean getAsc() {
-    return asc;
-  }
-
-  public ComponentTreeWsRequest setAsc(@Nullable Boolean asc) {
-    this.asc = asc;
-    return this;
-  }
-
-  @CheckForNull
-  public Integer getPage() {
-    return page;
-  }
-
-  public ComponentTreeWsRequest setPage(int page) {
-    this.page = page;
-    return this;
-  }
-
-  @CheckForNull
-  public Integer getPageSize() {
-    return pageSize;
-  }
-
-  public ComponentTreeWsRequest setPageSize(int pageSize) {
-    this.pageSize = pageSize;
-    return this;
-  }
-
-  @CheckForNull
-  public Integer getMetricPeriodSort() {
-    return metricPeriodSort;
-  }
-
-  public ComponentTreeWsRequest setMetricPeriodSort(@Nullable Integer metricPeriodSort) {
-    this.metricPeriodSort = metricPeriodSort;
-    return this;
-  }
-
-  @CheckForNull
-  public String getDeveloperId() {
-    return developerId;
-  }
-
-  public ComponentTreeWsRequest setDeveloperId(@Nullable String developerId) {
-    this.developerId = developerId;
-    return this;
-  }
-
-  @CheckForNull
-  public String getDeveloperKey() {
-    return developerKey;
-  }
-
-  public ComponentTreeWsRequest setDeveloperKey(@Nullable String developerKey) {
-    this.developerKey = developerKey;
-    return this;
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/measure/ComponentWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/measure/ComponentWsRequest.java
deleted file mode 100644 (file)
index cc6e10e..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.measure;
-
-import java.util.List;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
-public class ComponentWsRequest {
-  private String componentId;
-  private String componentKey;
-  private String component;
-  private String branch;
-  private List<String> metricKeys;
-  private List<String> additionalFields;
-  private String developerId;
-  private String developerKey;
-
-  /**
-   * @deprecated since 6.6, please use {@link #getComponent()} instead
-   */
-  @Deprecated
-  @CheckForNull
-  public String getComponentId() {
-    return componentId;
-  }
-
-  /**
-   * @deprecated since 6.6, please use {@link #setComponent(String)} instead
-   */
-  @Deprecated
-  public ComponentWsRequest setComponentId(@Nullable String componentId) {
-    this.componentId = componentId;
-    return this;
-  }
-
-  /**
-   * @deprecated since 6.6, please use {@link #getComponent()} instead
-   */
-  @Deprecated
-  @CheckForNull
-  public String getComponentKey() {
-    return componentKey;
-  }
-
-  /**
-   * @deprecated since 6.6, please use {@link #setComponent(String)} instead
-   */
-  @Deprecated
-  public ComponentWsRequest setComponentKey(@Nullable String componentKey) {
-    this.componentKey = componentKey;
-    return this;
-  }
-
-  @CheckForNull
-  public String getComponent() {
-    return component;
-  }
-
-  public ComponentWsRequest setComponent(@Nullable String component) {
-    this.component = component;
-    return this;
-  }
-
-  @CheckForNull
-  public String getBranch() {
-    return branch;
-  }
-
-  public ComponentWsRequest setBranch(@Nullable String branch) {
-    this.branch = branch;
-    return this;
-  }
-
-  public List<String> getMetricKeys() {
-    return metricKeys;
-  }
-
-  public ComponentWsRequest setMetricKeys(@Nullable List<String> metricKeys) {
-    this.metricKeys = metricKeys;
-    return this;
-  }
-
-  @CheckForNull
-  public List<String> getAdditionalFields() {
-    return additionalFields;
-  }
-
-  public ComponentWsRequest setAdditionalFields(@Nullable List<String> additionalFields) {
-    this.additionalFields = additionalFields;
-    return this;
-  }
-
-  @CheckForNull
-  public String getDeveloperId() {
-    return developerId;
-  }
-
-  public ComponentWsRequest setDeveloperId(@Nullable String developerId) {
-    this.developerId = developerId;
-    return this;
-  }
-
-  @CheckForNull
-  public String getDeveloperKey() {
-    return developerKey;
-  }
-
-  public ComponentWsRequest setDeveloperKey(@Nullable String developerKey) {
-    this.developerKey = developerKey;
-    return this;
-  }
-}
index 0b0afb29cb0f552d7a04d81ca89942c8e9bf6e54..201a0c9b0d54efdb24bf8be9bff3fbc4feccd693 100644 (file)
@@ -56,7 +56,7 @@ public class MeasuresService extends BaseService {
     super(wsConnector, CONTROLLER_MEASURES);
   }
 
-  public ComponentTreeWsResponse componentTree(ComponentTreeWsRequest request) {
+  public ComponentTreeWsResponse componentTree(ComponentTreeRequest request) {
     GetRequest getRequest = new GetRequest(path(ACTION_COMPONENT_TREE))
       .setParam(DEPRECATED_PARAM_BASE_COMPONENT_ID, request.getBaseComponentId())
       .setParam(DEPRECATED_PARAM_BASE_COMPONENT_KEY, request.getBaseComponentKey())
@@ -79,7 +79,7 @@ public class MeasuresService extends BaseService {
     return call(getRequest, ComponentTreeWsResponse.parser());
   }
 
-  public ComponentWsResponse component(ComponentWsRequest request) {
+  public ComponentWsResponse component(ComponentRequest request) {
     GetRequest getRequest = new GetRequest(path(ACTION_COMPONENT))
       .setParam(DEPRECATED_PARAM_COMPONENT_ID, request.getComponentId())
       .setParam(DEPRECATED_PARAM_COMPONENT_KEY, request.getComponentKey())
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/CreateRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/CreateRequest.java
new file mode 100644 (file)
index 0000000..000426a
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.organization;
+
+import javax.annotation.concurrent.Immutable;
+
+@Immutable
+public class CreateRequest {
+  private final String name;
+  private final String key;
+  private final String description;
+  private final String url;
+  private final String avatar;
+
+  private CreateRequest(Builder builder) {
+    this.name = builder.name;
+    this.key = builder.key;
+    this.description = builder.description;
+    this.url = builder.url;
+    this.avatar = builder.avatar;
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  public String getKey() {
+    return key;
+  }
+
+  public String getDescription() {
+    return description;
+  }
+
+  public String getUrl() {
+    return url;
+  }
+
+  public String getAvatar() {
+    return avatar;
+  }
+
+  public static Builder builder() {
+    return new Builder();
+  }
+
+  public static class Builder {
+    private String name;
+    private String key;
+    private String description;
+    private String url;
+    private String avatar;
+
+    public Builder setName(String name) {
+      this.name = name;
+      return this;
+    }
+
+    public Builder setKey(String key) {
+      this.key = key;
+      return this;
+    }
+
+    public Builder setDescription(String description) {
+      this.description = description;
+      return this;
+    }
+
+    public Builder setUrl(String url) {
+      this.url = url;
+      return this;
+    }
+
+    public Builder setAvatar(String avatar) {
+      this.avatar = avatar;
+      return this;
+    }
+
+    public CreateRequest build() {
+      return new CreateRequest(this);
+    }
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/CreateWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/CreateWsRequest.java
deleted file mode 100644 (file)
index e8b2073..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.organization;
-
-import javax.annotation.concurrent.Immutable;
-
-@Immutable
-public class CreateWsRequest {
-  private final String name;
-  private final String key;
-  private final String description;
-  private final String url;
-  private final String avatar;
-
-  private CreateWsRequest(Builder builder) {
-    this.name = builder.name;
-    this.key = builder.key;
-    this.description = builder.description;
-    this.url = builder.url;
-    this.avatar = builder.avatar;
-  }
-
-  public String getName() {
-    return name;
-  }
-
-  public String getKey() {
-    return key;
-  }
-
-  public String getDescription() {
-    return description;
-  }
-
-  public String getUrl() {
-    return url;
-  }
-
-  public String getAvatar() {
-    return avatar;
-  }
-
-  public static Builder builder() {
-    return new Builder();
-  }
-
-  public static class Builder {
-    private String name;
-    private String key;
-    private String description;
-    private String url;
-    private String avatar;
-
-    public Builder setName(String name) {
-      this.name = name;
-      return this;
-    }
-
-    public Builder setKey(String key) {
-      this.key = key;
-      return this;
-    }
-
-    public Builder setDescription(String description) {
-      this.description = description;
-      return this;
-    }
-
-    public Builder setUrl(String url) {
-      this.url = url;
-      return this;
-    }
-
-    public Builder setAvatar(String avatar) {
-      this.avatar = avatar;
-      return this;
-    }
-
-    public CreateWsRequest build() {
-      return new CreateWsRequest(this);
-    }
-  }
-}
index 7ef6337f055aba305725aa81ad1fa8e5770745f7..96bac737a3afa735127e7591d2aac5fad537b624 100644 (file)
@@ -40,7 +40,7 @@ public class OrganizationService extends BaseService {
     super(wsConnector, "api/organizations");
   }
 
-  public SearchWsResponse search(SearchWsRequest request) {
+  public SearchWsResponse search(SearchRequest request) {
     GetRequest get = new GetRequest(path("search"))
       .setParam("organizations", inlineMultipleParamValue(request.getOrganizations()))
       .setParam(PAGE, request.getPage())
@@ -49,7 +49,7 @@ public class OrganizationService extends BaseService {
     return call(get, SearchWsResponse.parser());
   }
 
-  public CreateWsResponse create(CreateWsRequest request) {
+  public CreateWsResponse create(CreateRequest request) {
     PostRequest post = new PostRequest(path("create"))
       .setParam("name", request.getName())
       .setParam("key", request.getKey())
@@ -60,7 +60,7 @@ public class OrganizationService extends BaseService {
     return call(post, CreateWsResponse.parser());
   }
 
-  public UpdateWsResponse update(UpdateWsRequest request) {
+  public UpdateWsResponse update(UpdateRequest request) {
     PostRequest post = new PostRequest(path("update"))
       .setParam("key", request.getKey())
       .setParam("name", request.getName())
@@ -78,7 +78,7 @@ public class OrganizationService extends BaseService {
     call(post).failIfNotSuccessful();
   }
 
-  public SearchMembersWsResponse searchMembers(SearchMembersWsRequest request) {
+  public SearchMembersWsResponse searchMembers(SearchMembersRequest request) {
     GetRequest get = new GetRequest(path("search_members"))
       .setParam("organization", request.getOrganization())
       .setParam("selected", request.getSelected())
@@ -105,7 +105,7 @@ public class OrganizationService extends BaseService {
     call(post);
   }
 
-  public void updateProjectVisibility(UpdateProjectVisibilityWsRequest request) {
+  public void updateProjectVisibility(UpdateProjectVisibilityRequest request) {
     PostRequest post = new PostRequest(path("update_project_visibility"))
       .setParam("organization", request.getOrganization())
       .setParam("projectVisibility", request.getProjectVisibility());
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/SearchMembersRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/SearchMembersRequest.java
new file mode 100644 (file)
index 0000000..341a930
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.organization;
+
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+
+public class SearchMembersRequest {
+  private String organization;
+  private String selected;
+  private String query;
+  private Integer page;
+  private Integer pageSize;
+
+  @CheckForNull
+  public String getOrganization() {
+    return organization;
+  }
+
+  public SearchMembersRequest setOrganization(@Nullable String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  @CheckForNull
+  public String getSelected() {
+    return selected;
+  }
+
+  public SearchMembersRequest setSelected(@Nullable String selected) {
+    this.selected = selected;
+    return this;
+  }
+
+  @CheckForNull
+  public String getQuery() {
+    return query;
+  }
+
+  public SearchMembersRequest setQuery(@Nullable String query) {
+    this.query = query;
+    return this;
+  }
+
+  @CheckForNull
+  public Integer getPage() {
+    return page;
+  }
+
+  public SearchMembersRequest setPage(@Nullable Integer page) {
+    this.page = page;
+    return this;
+  }
+
+  @CheckForNull
+  public Integer getPageSize() {
+    return pageSize;
+  }
+
+  public SearchMembersRequest setPageSize(@Nullable Integer pageSize) {
+    this.pageSize = pageSize;
+    return this;
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/SearchMembersWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/SearchMembersWsRequest.java
deleted file mode 100644 (file)
index 06e8376..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.organization;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
-public class SearchMembersWsRequest {
-  private String organization;
-  private String selected;
-  private String query;
-  private Integer page;
-  private Integer pageSize;
-
-  @CheckForNull
-  public String getOrganization() {
-    return organization;
-  }
-
-  public SearchMembersWsRequest setOrganization(@Nullable String organization) {
-    this.organization = organization;
-    return this;
-  }
-
-  @CheckForNull
-  public String getSelected() {
-    return selected;
-  }
-
-  public SearchMembersWsRequest setSelected(@Nullable String selected) {
-    this.selected = selected;
-    return this;
-  }
-
-  @CheckForNull
-  public String getQuery() {
-    return query;
-  }
-
-  public SearchMembersWsRequest setQuery(@Nullable String query) {
-    this.query = query;
-    return this;
-  }
-
-  @CheckForNull
-  public Integer getPage() {
-    return page;
-  }
-
-  public SearchMembersWsRequest setPage(@Nullable Integer page) {
-    this.page = page;
-    return this;
-  }
-
-  @CheckForNull
-  public Integer getPageSize() {
-    return pageSize;
-  }
-
-  public SearchMembersWsRequest setPageSize(@Nullable Integer pageSize) {
-    this.pageSize = pageSize;
-    return this;
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/SearchRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/SearchRequest.java
new file mode 100644 (file)
index 0000000..b3363ab
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.organization;
+
+import java.util.List;
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+import javax.annotation.concurrent.Immutable;
+
+import static java.util.Arrays.asList;
+
+@Immutable
+public class SearchRequest {
+  private final Integer page;
+  private final Integer pageSize;
+  private final List<String> organizations;
+
+  private SearchRequest(Builder builder) {
+    this.page = builder.page;
+    this.pageSize = builder.pageSize;
+    this.organizations = builder.organizations;
+  }
+
+  @CheckForNull
+  public Integer getPageSize() {
+    return pageSize;
+  }
+
+  @CheckForNull
+  public Integer getPage() {
+    return page;
+  }
+
+  @CheckForNull
+  public List<String> getOrganizations() {
+    return organizations;
+  }
+
+  public static Builder builder() {
+    return new Builder();
+  }
+
+  public static final class Builder {
+    private Integer page;
+    private Integer pageSize;
+    private List<String> organizations;
+
+    public Builder setPage(@Nullable Integer page) {
+      this.page = page;
+      return this;
+    }
+
+    public Builder setPageSize(@Nullable Integer pageSize) {
+      this.pageSize = pageSize;
+      return this;
+    }
+
+    public Builder setOrganizations(String... organizations) {
+      this.organizations = asList(organizations);
+      return this;
+    }
+
+    public SearchRequest build() {
+      return new SearchRequest(this);
+    }
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/SearchWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/SearchWsRequest.java
deleted file mode 100644 (file)
index 92dbfb5..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.organization;
-
-import java.util.List;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-import javax.annotation.concurrent.Immutable;
-
-import static java.util.Arrays.asList;
-
-@Immutable
-public class SearchWsRequest {
-  private final Integer page;
-  private final Integer pageSize;
-  private final List<String> organizations;
-
-  private SearchWsRequest(Builder builder) {
-    this.page = builder.page;
-    this.pageSize = builder.pageSize;
-    this.organizations = builder.organizations;
-  }
-
-  @CheckForNull
-  public Integer getPageSize() {
-    return pageSize;
-  }
-
-  @CheckForNull
-  public Integer getPage() {
-    return page;
-  }
-
-  @CheckForNull
-  public List<String> getOrganizations() {
-    return organizations;
-  }
-
-  public static Builder builder() {
-    return new Builder();
-  }
-
-  public static final class Builder {
-    private Integer page;
-    private Integer pageSize;
-    private List<String> organizations;
-
-    public Builder setPage(@Nullable Integer page) {
-      this.page = page;
-      return this;
-    }
-
-    public Builder setPageSize(@Nullable Integer pageSize) {
-      this.pageSize = pageSize;
-      return this;
-    }
-
-    public Builder setOrganizations(String... organizations) {
-      this.organizations = asList(organizations);
-      return this;
-    }
-
-    public SearchWsRequest build() {
-      return new SearchWsRequest(this);
-    }
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/UpdateProjectVisibilityRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/UpdateProjectVisibilityRequest.java
new file mode 100644 (file)
index 0000000..e6e320a
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.organization;
+
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+import javax.annotation.concurrent.Immutable;
+
+@Immutable
+public class UpdateProjectVisibilityRequest {
+  private final String organization;
+  private final String projectVisibility;
+
+  private UpdateProjectVisibilityRequest(Builder builder) {
+    this.organization = builder.organization;
+    this.projectVisibility = builder.projectVisibility;
+  }
+
+  @CheckForNull
+  public String getOrganization() {
+    return organization;
+  }
+
+  @CheckForNull
+  public String getProjectVisibility() {
+    return projectVisibility;
+  }
+
+  public static Builder builder() {
+    return new Builder();
+  }
+
+  public static class Builder {
+    private String organization;
+    private String projectVisibility;
+
+    public Builder setOrganization(@Nullable String organization) {
+      this.organization = organization;
+      return this;
+    }
+
+    public Builder setProjectVisibility(@Nullable String projectVisibility) {
+      this.projectVisibility = projectVisibility;
+      return this;
+    }
+
+    public UpdateProjectVisibilityRequest build() {
+      return new UpdateProjectVisibilityRequest(this);
+    }
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/UpdateProjectVisibilityWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/UpdateProjectVisibilityWsRequest.java
deleted file mode 100644 (file)
index e7af953..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.organization;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-import javax.annotation.concurrent.Immutable;
-
-@Immutable
-public class UpdateProjectVisibilityWsRequest {
-  private final String organization;
-  private final String projectVisibility;
-
-  private UpdateProjectVisibilityWsRequest(Builder builder) {
-    this.organization = builder.organization;
-    this.projectVisibility = builder.projectVisibility;
-  }
-
-  @CheckForNull
-  public String getOrganization() {
-    return organization;
-  }
-
-  @CheckForNull
-  public String getProjectVisibility() {
-    return projectVisibility;
-  }
-
-  public static Builder builder() {
-    return new Builder();
-  }
-
-  public static class Builder {
-    private String organization;
-    private String projectVisibility;
-
-    public Builder setOrganization(@Nullable String organization) {
-      this.organization = organization;
-      return this;
-    }
-
-    public Builder setProjectVisibility(@Nullable String projectVisibility) {
-      this.projectVisibility = projectVisibility;
-      return this;
-    }
-
-    public UpdateProjectVisibilityWsRequest build() {
-      return new UpdateProjectVisibilityWsRequest(this);
-    }
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/UpdateRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/UpdateRequest.java
new file mode 100644 (file)
index 0000000..eb2de7b
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.organization;
+
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+import javax.annotation.concurrent.Immutable;
+
+@Immutable
+public class UpdateRequest {
+  private final String key;
+  private final String name;
+  private final String description;
+  private final String url;
+  private final String avatar;
+
+  private UpdateRequest(Builder builder) {
+    this.name = builder.name;
+    this.key = builder.key;
+    this.description = builder.description;
+    this.url = builder.url;
+    this.avatar = builder.avatar;
+  }
+
+  @CheckForNull
+  public String getName() {
+    return name;
+  }
+
+  @CheckForNull
+  public String getKey() {
+    return key;
+  }
+
+  @CheckForNull
+  public String getDescription() {
+    return description;
+  }
+
+  @CheckForNull
+  public String getUrl() {
+    return url;
+  }
+
+  @CheckForNull
+  public String getAvatar() {
+    return avatar;
+  }
+
+  public static class Builder {
+    private String key;
+    private String name;
+    private String description;
+    private String url;
+    private String avatar;
+
+    public Builder setKey(@Nullable String key) {
+      this.key = key;
+      return this;
+    }
+
+    public Builder setName(@Nullable String name) {
+      this.name = name;
+      return this;
+    }
+
+    public Builder setDescription(@Nullable String description) {
+      this.description = description;
+      return this;
+    }
+
+    public Builder setUrl(@Nullable String url) {
+      this.url = url;
+      return this;
+    }
+
+    public Builder setAvatar(@Nullable String avatar) {
+      this.avatar = avatar;
+      return this;
+    }
+
+    public UpdateRequest build() {
+      return new UpdateRequest(this);
+    }
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/UpdateWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/UpdateWsRequest.java
deleted file mode 100644 (file)
index e7b15a9..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.organization;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-import javax.annotation.concurrent.Immutable;
-
-@Immutable
-public class UpdateWsRequest {
-  private final String key;
-  private final String name;
-  private final String description;
-  private final String url;
-  private final String avatar;
-
-  private UpdateWsRequest(Builder builder) {
-    this.name = builder.name;
-    this.key = builder.key;
-    this.description = builder.description;
-    this.url = builder.url;
-    this.avatar = builder.avatar;
-  }
-
-  @CheckForNull
-  public String getName() {
-    return name;
-  }
-
-  @CheckForNull
-  public String getKey() {
-    return key;
-  }
-
-  @CheckForNull
-  public String getDescription() {
-    return description;
-  }
-
-  @CheckForNull
-  public String getUrl() {
-    return url;
-  }
-
-  @CheckForNull
-  public String getAvatar() {
-    return avatar;
-  }
-
-  public static class Builder {
-    private String key;
-    private String name;
-    private String description;
-    private String url;
-    private String avatar;
-
-    public Builder setKey(@Nullable String key) {
-      this.key = key;
-      return this;
-    }
-
-    public Builder setName(@Nullable String name) {
-      this.name = name;
-      return this;
-    }
-
-    public Builder setDescription(@Nullable String description) {
-      this.description = description;
-      return this;
-    }
-
-    public Builder setUrl(@Nullable String url) {
-      this.url = url;
-      return this;
-    }
-
-    public Builder setAvatar(@Nullable String avatar) {
-      this.avatar = avatar;
-      return this;
-    }
-
-    public UpdateWsRequest build() {
-      return new UpdateWsRequest(this);
-    }
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddGroupRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddGroupRequest.java
new file mode 100644 (file)
index 0000000..4a70ebc
--- /dev/null
@@ -0,0 +1,93 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.permission;
+
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+
+import static java.util.Objects.requireNonNull;
+
+public class AddGroupRequest {
+  private String permission;
+  private String groupId;
+  private String organization;
+  private String groupName;
+  private String projectId;
+  private String projectKey;
+
+  public String getPermission() {
+    return permission;
+  }
+
+  public AddGroupRequest setPermission(String permission) {
+    this.permission = requireNonNull(permission, "permission must not be null");
+    return this;
+  }
+
+  @CheckForNull
+  public String getGroupId() {
+    return groupId;
+  }
+
+  public AddGroupRequest setGroupId(@Nullable String groupId) {
+    this.groupId = groupId;
+    return this;
+  }
+
+  @CheckForNull
+  public String getOrganization() {
+    return organization;
+  }
+
+  public AddGroupRequest setOrganization(@Nullable String s) {
+    this.organization = s;
+    return this;
+  }
+
+  @CheckForNull
+  public String getGroupName() {
+    return groupName;
+  }
+
+  public AddGroupRequest setGroupName(@Nullable String groupName) {
+    this.groupName = groupName;
+    return this;
+  }
+
+  @CheckForNull
+  public String getProjectId() {
+    return projectId;
+  }
+
+  public AddGroupRequest setProjectId(@Nullable String projectId) {
+    this.projectId = projectId;
+    return this;
+  }
+
+  @CheckForNull
+  public String getProjectKey() {
+    return projectKey;
+  }
+
+  public AddGroupRequest setProjectKey(@Nullable String projectKey) {
+    this.projectKey = projectKey;
+    return this;
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddGroupToTemplateRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddGroupToTemplateRequest.java
new file mode 100644 (file)
index 0000000..a28c8ce
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.permission;
+
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+
+import static java.util.Objects.requireNonNull;
+
+public class AddGroupToTemplateRequest {
+  private String groupId;
+  private String groupName;
+  private String permission;
+  private String templateId;
+  private String templateName;
+
+  @CheckForNull
+  public String getGroupId() {
+    return groupId;
+  }
+
+  public AddGroupToTemplateRequest setGroupId(@Nullable String groupId) {
+    this.groupId = groupId;
+    return this;
+  }
+
+  @CheckForNull
+  public String getGroupName() {
+    return groupName;
+  }
+
+  public AddGroupToTemplateRequest setGroupName(@Nullable String groupName) {
+    this.groupName = groupName;
+    return this;
+  }
+
+  public String getPermission() {
+    return permission;
+  }
+
+  public AddGroupToTemplateRequest setPermission(String permission) {
+    this.permission = requireNonNull(permission, "permission must not be null");
+    return this;
+  }
+
+  @CheckForNull
+  public String getTemplateId() {
+    return templateId;
+  }
+
+  public AddGroupToTemplateRequest setTemplateId(@Nullable String templateId) {
+    this.templateId = templateId;
+    return this;
+  }
+
+  @CheckForNull
+  public String getTemplateName() {
+    return templateName;
+  }
+
+  public AddGroupToTemplateRequest setTemplateName(@Nullable String templateName) {
+    this.templateName = templateName;
+    return this;
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddGroupToTemplateWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddGroupToTemplateWsRequest.java
deleted file mode 100644 (file)
index fde92b4..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.permission;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
-import static java.util.Objects.requireNonNull;
-
-public class AddGroupToTemplateWsRequest {
-  private String groupId;
-  private String groupName;
-  private String permission;
-  private String templateId;
-  private String templateName;
-
-  @CheckForNull
-  public String getGroupId() {
-    return groupId;
-  }
-
-  public AddGroupToTemplateWsRequest setGroupId(@Nullable String groupId) {
-    this.groupId = groupId;
-    return this;
-  }
-
-  @CheckForNull
-  public String getGroupName() {
-    return groupName;
-  }
-
-  public AddGroupToTemplateWsRequest setGroupName(@Nullable String groupName) {
-    this.groupName = groupName;
-    return this;
-  }
-
-  public String getPermission() {
-    return permission;
-  }
-
-  public AddGroupToTemplateWsRequest setPermission(String permission) {
-    this.permission = requireNonNull(permission, "permission must not be null");
-    return this;
-  }
-
-  @CheckForNull
-  public String getTemplateId() {
-    return templateId;
-  }
-
-  public AddGroupToTemplateWsRequest setTemplateId(@Nullable String templateId) {
-    this.templateId = templateId;
-    return this;
-  }
-
-  @CheckForNull
-  public String getTemplateName() {
-    return templateName;
-  }
-
-  public AddGroupToTemplateWsRequest setTemplateName(@Nullable String templateName) {
-    this.templateName = templateName;
-    return this;
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddGroupWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddGroupWsRequest.java
deleted file mode 100644 (file)
index 99233d6..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.permission;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
-import static java.util.Objects.requireNonNull;
-
-public class AddGroupWsRequest {
-  private String permission;
-  private String groupId;
-  private String organization;
-  private String groupName;
-  private String projectId;
-  private String projectKey;
-
-  public String getPermission() {
-    return permission;
-  }
-
-  public AddGroupWsRequest setPermission(String permission) {
-    this.permission = requireNonNull(permission, "permission must not be null");
-    return this;
-  }
-
-  @CheckForNull
-  public String getGroupId() {
-    return groupId;
-  }
-
-  public AddGroupWsRequest setGroupId(@Nullable String groupId) {
-    this.groupId = groupId;
-    return this;
-  }
-
-  @CheckForNull
-  public String getOrganization() {
-    return organization;
-  }
-
-  public AddGroupWsRequest setOrganization(@Nullable String s) {
-    this.organization = s;
-    return this;
-  }
-
-  @CheckForNull
-  public String getGroupName() {
-    return groupName;
-  }
-
-  public AddGroupWsRequest setGroupName(@Nullable String groupName) {
-    this.groupName = groupName;
-    return this;
-  }
-
-  @CheckForNull
-  public String getProjectId() {
-    return projectId;
-  }
-
-  public AddGroupWsRequest setProjectId(@Nullable String projectId) {
-    this.projectId = projectId;
-    return this;
-  }
-
-  @CheckForNull
-  public String getProjectKey() {
-    return projectKey;
-  }
-
-  public AddGroupWsRequest setProjectKey(@Nullable String projectKey) {
-    this.projectKey = projectKey;
-    return this;
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddProjectCreatorToTemplateRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddProjectCreatorToTemplateRequest.java
new file mode 100644 (file)
index 0000000..a17c90c
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.permission;
+
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+import javax.annotation.concurrent.Immutable;
+
+import static java.util.Objects.requireNonNull;
+
+@Immutable
+public class AddProjectCreatorToTemplateRequest {
+  private final String templateId;
+  private final String organization;
+  private final String templateName;
+  private final String permission;
+
+  private AddProjectCreatorToTemplateRequest(Builder builder) {
+    this.templateId = builder.templateId;
+    this.organization = builder.organization;
+    this.templateName = builder.templateName;
+    this.permission = requireNonNull(builder.permission);
+  }
+
+  @CheckForNull
+  public String getTemplateId() {
+    return templateId;
+  }
+
+  @CheckForNull
+  public String getOrganization() {
+    return organization;
+  }
+
+  @CheckForNull
+  public String getTemplateName() {
+    return templateName;
+  }
+
+  public String getPermission() {
+    return permission;
+  }
+
+  public static Builder builder() {
+    return new Builder();
+  }
+
+  public static class Builder {
+    private String templateId;
+    private String organization;
+    private String templateName;
+    private String permission;
+
+    private Builder() {
+      // enforce method constructor
+    }
+
+    public Builder setTemplateId(@Nullable String templateId) {
+      this.templateId = templateId;
+      return this;
+    }
+
+    public Builder setOrganization(@Nullable String s) {
+      this.organization = s;
+      return this;
+    }
+
+    public Builder setTemplateName(@Nullable String templateName) {
+      this.templateName = templateName;
+      return this;
+    }
+
+    public Builder setPermission(@Nullable String permission) {
+      this.permission = permission;
+      return this;
+    }
+
+    public AddProjectCreatorToTemplateRequest build() {
+      return new AddProjectCreatorToTemplateRequest(this);
+    }
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddProjectCreatorToTemplateWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddProjectCreatorToTemplateWsRequest.java
deleted file mode 100644 (file)
index 1a43824..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.permission;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-import javax.annotation.concurrent.Immutable;
-
-import static java.util.Objects.requireNonNull;
-
-@Immutable
-public class AddProjectCreatorToTemplateWsRequest {
-  private final String templateId;
-  private final String organization;
-  private final String templateName;
-  private final String permission;
-
-  private AddProjectCreatorToTemplateWsRequest(Builder builder) {
-    this.templateId = builder.templateId;
-    this.organization = builder.organization;
-    this.templateName = builder.templateName;
-    this.permission = requireNonNull(builder.permission);
-  }
-
-  @CheckForNull
-  public String getTemplateId() {
-    return templateId;
-  }
-
-  @CheckForNull
-  public String getOrganization() {
-    return organization;
-  }
-
-  @CheckForNull
-  public String getTemplateName() {
-    return templateName;
-  }
-
-  public String getPermission() {
-    return permission;
-  }
-
-  public static Builder builder() {
-    return new Builder();
-  }
-
-  public static class Builder {
-    private String templateId;
-    private String organization;
-    private String templateName;
-    private String permission;
-
-    private Builder() {
-      // enforce method constructor
-    }
-
-    public Builder setTemplateId(@Nullable String templateId) {
-      this.templateId = templateId;
-      return this;
-    }
-
-    public Builder setOrganization(@Nullable String s) {
-      this.organization = s;
-      return this;
-    }
-
-    public Builder setTemplateName(@Nullable String templateName) {
-      this.templateName = templateName;
-      return this;
-    }
-
-    public Builder setPermission(@Nullable String permission) {
-      this.permission = permission;
-      return this;
-    }
-
-    public AddProjectCreatorToTemplateWsRequest build() {
-      return new AddProjectCreatorToTemplateWsRequest(this);
-    }
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddUserRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddUserRequest.java
new file mode 100644 (file)
index 0000000..fa3c9be
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.permission;
+
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+
+import static java.util.Objects.requireNonNull;
+
+public class AddUserRequest {
+  private String login;
+  private String permission;
+  private String projectId;
+  private String projectKey;
+  private String organization;
+
+  public String getLogin() {
+    return login;
+  }
+
+  public AddUserRequest setLogin(String login) {
+    this.login = requireNonNull(login, "login must not be null");
+    return this;
+  }
+
+  public String getPermission() {
+    return permission;
+  }
+
+  public AddUserRequest setPermission(String permission) {
+    this.permission = requireNonNull(permission, "permission must not be null");
+    return this;
+  }
+
+  @CheckForNull
+  public String getProjectId() {
+    return projectId;
+  }
+
+  public AddUserRequest setProjectId(@Nullable String projectId) {
+    this.projectId = projectId;
+    return this;
+  }
+
+  @CheckForNull
+  public String getProjectKey() {
+    return projectKey;
+  }
+
+  public AddUserRequest setProjectKey(@Nullable String projectKey) {
+    this.projectKey = projectKey;
+    return this;
+  }
+
+  @CheckForNull
+  public String getOrganization() {
+    return organization;
+  }
+
+  public AddUserRequest setOrganization(@Nullable String s) {
+    this.organization = s;
+    return this;
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddUserToTemplateRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddUserToTemplateRequest.java
new file mode 100644 (file)
index 0000000..5b4c686
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.permission;
+
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+
+import static java.util.Objects.requireNonNull;
+
+public class AddUserToTemplateRequest {
+  private String login;
+  private String permission;
+  private String templateId;
+  private String organization;
+  private String templateName;
+
+  public String getLogin() {
+    return login;
+  }
+
+  public AddUserToTemplateRequest setLogin(String login) {
+    this.login = requireNonNull(login);
+    return this;
+  }
+
+  public String getPermission() {
+    return permission;
+  }
+
+  public AddUserToTemplateRequest setPermission(String permission) {
+    this.permission = requireNonNull(permission);
+    return this;
+  }
+
+  @CheckForNull
+  public String getTemplateId() {
+    return templateId;
+  }
+
+  public AddUserToTemplateRequest setTemplateId(@Nullable String templateId) {
+    this.templateId = templateId;
+    return this;
+  }
+
+  @CheckForNull
+  public String getTemplateName() {
+    return templateName;
+  }
+
+  public AddUserToTemplateRequest setTemplateName(@Nullable String templateName) {
+    this.templateName = templateName;
+    return this;
+  }
+
+  @CheckForNull
+  public String getOrganization() {
+    return organization;
+  }
+
+  public AddUserToTemplateRequest setOrganization(@Nullable String s) {
+    this.organization = s;
+    return this;
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddUserToTemplateWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddUserToTemplateWsRequest.java
deleted file mode 100644 (file)
index 21a7923..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.permission;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
-import static java.util.Objects.requireNonNull;
-
-public class AddUserToTemplateWsRequest {
-  private String login;
-  private String permission;
-  private String templateId;
-  private String organization;
-  private String templateName;
-
-  public String getLogin() {
-    return login;
-  }
-
-  public AddUserToTemplateWsRequest setLogin(String login) {
-    this.login = requireNonNull(login);
-    return this;
-  }
-
-  public String getPermission() {
-    return permission;
-  }
-
-  public AddUserToTemplateWsRequest setPermission(String permission) {
-    this.permission = requireNonNull(permission);
-    return this;
-  }
-
-  @CheckForNull
-  public String getTemplateId() {
-    return templateId;
-  }
-
-  public AddUserToTemplateWsRequest setTemplateId(@Nullable String templateId) {
-    this.templateId = templateId;
-    return this;
-  }
-
-  @CheckForNull
-  public String getTemplateName() {
-    return templateName;
-  }
-
-  public AddUserToTemplateWsRequest setTemplateName(@Nullable String templateName) {
-    this.templateName = templateName;
-    return this;
-  }
-
-  @CheckForNull
-  public String getOrganization() {
-    return organization;
-  }
-
-  public AddUserToTemplateWsRequest setOrganization(@Nullable String s) {
-    this.organization = s;
-    return this;
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddUserWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddUserWsRequest.java
deleted file mode 100644 (file)
index 0908e39..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.permission;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
-import static java.util.Objects.requireNonNull;
-
-public class AddUserWsRequest {
-  private String login;
-  private String permission;
-  private String projectId;
-  private String projectKey;
-  private String organization;
-
-  public String getLogin() {
-    return login;
-  }
-
-  public AddUserWsRequest setLogin(String login) {
-    this.login = requireNonNull(login, "login must not be null");
-    return this;
-  }
-
-  public String getPermission() {
-    return permission;
-  }
-
-  public AddUserWsRequest setPermission(String permission) {
-    this.permission = requireNonNull(permission, "permission must not be null");
-    return this;
-  }
-
-  @CheckForNull
-  public String getProjectId() {
-    return projectId;
-  }
-
-  public AddUserWsRequest setProjectId(@Nullable String projectId) {
-    this.projectId = projectId;
-    return this;
-  }
-
-  @CheckForNull
-  public String getProjectKey() {
-    return projectKey;
-  }
-
-  public AddUserWsRequest setProjectKey(@Nullable String projectKey) {
-    this.projectKey = projectKey;
-    return this;
-  }
-
-  @CheckForNull
-  public String getOrganization() {
-    return organization;
-  }
-
-  public AddUserWsRequest setOrganization(@Nullable String s) {
-    this.organization = s;
-    return this;
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/ApplyTemplateRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/ApplyTemplateRequest.java
new file mode 100644 (file)
index 0000000..525e1a5
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.permission;
+
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+
+public class ApplyTemplateRequest {
+  private String projectId;
+  private String projectKey;
+  private String templateId;
+  private String organization;
+  private String templateName;
+
+  @CheckForNull
+  public String getProjectId() {
+    return projectId;
+  }
+
+  public ApplyTemplateRequest setProjectId(@Nullable String projectId) {
+    this.projectId = projectId;
+    return this;
+  }
+
+  @CheckForNull
+  public String getProjectKey() {
+    return projectKey;
+  }
+
+  public ApplyTemplateRequest setProjectKey(@Nullable String projectKey) {
+    this.projectKey = projectKey;
+    return this;
+  }
+
+  @CheckForNull
+  public String getTemplateId() {
+    return templateId;
+  }
+
+  public ApplyTemplateRequest setTemplateId(@Nullable String templateId) {
+    this.templateId = templateId;
+    return this;
+  }
+
+  @CheckForNull
+  public String getOrganization() {
+    return organization;
+  }
+
+  public ApplyTemplateRequest setOrganization(@Nullable String s) {
+    this.organization = s;
+    return this;
+  }
+  @CheckForNull
+  public String getTemplateName() {
+    return templateName;
+  }
+
+  public ApplyTemplateRequest setTemplateName(@Nullable String templateName) {
+    this.templateName = templateName;
+    return this;
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/ApplyTemplateWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/ApplyTemplateWsRequest.java
deleted file mode 100644 (file)
index edab495..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.permission;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
-public class ApplyTemplateWsRequest {
-  private String projectId;
-  private String projectKey;
-  private String templateId;
-  private String organization;
-  private String templateName;
-
-  @CheckForNull
-  public String getProjectId() {
-    return projectId;
-  }
-
-  public ApplyTemplateWsRequest setProjectId(@Nullable String projectId) {
-    this.projectId = projectId;
-    return this;
-  }
-
-  @CheckForNull
-  public String getProjectKey() {
-    return projectKey;
-  }
-
-  public ApplyTemplateWsRequest setProjectKey(@Nullable String projectKey) {
-    this.projectKey = projectKey;
-    return this;
-  }
-
-  @CheckForNull
-  public String getTemplateId() {
-    return templateId;
-  }
-
-  public ApplyTemplateWsRequest setTemplateId(@Nullable String templateId) {
-    this.templateId = templateId;
-    return this;
-  }
-
-  @CheckForNull
-  public String getOrganization() {
-    return organization;
-  }
-
-  public ApplyTemplateWsRequest setOrganization(@Nullable String s) {
-    this.organization = s;
-    return this;
-  }
-  @CheckForNull
-  public String getTemplateName() {
-    return templateName;
-  }
-
-  public ApplyTemplateWsRequest setTemplateName(@Nullable String templateName) {
-    this.templateName = templateName;
-    return this;
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/BulkApplyTemplateRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/BulkApplyTemplateRequest.java
new file mode 100644 (file)
index 0000000..6b78de8
--- /dev/null
@@ -0,0 +1,128 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.permission;
+
+import java.util.Collection;
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+import org.sonar.api.resources.Qualifiers;
+
+import static java.util.Collections.singleton;
+import static java.util.Objects.requireNonNull;
+
+public class BulkApplyTemplateRequest {
+  private String templateId;
+  private String organization;
+  private String templateName;
+  private String query;
+  private Collection<String> qualifiers = singleton(Qualifiers.PROJECT);
+  private String visibility;
+  private String analyzedBefore;
+  private boolean onProvisionedOnly = false;
+  private Collection<String> projects;
+
+  @CheckForNull
+  public String getTemplateId() {
+    return templateId;
+  }
+
+  public BulkApplyTemplateRequest setTemplateId(@Nullable String templateId) {
+    this.templateId = templateId;
+    return this;
+  }
+
+  @CheckForNull
+  public String getOrganization() {
+    return organization;
+  }
+
+  public BulkApplyTemplateRequest setOrganization(@Nullable String s) {
+    this.organization = s;
+    return this;
+  }
+
+  @CheckForNull
+  public String getTemplateName() {
+    return templateName;
+  }
+
+  public BulkApplyTemplateRequest setTemplateName(@Nullable String templateName) {
+    this.templateName = templateName;
+    return this;
+  }
+
+  @CheckForNull
+  public String getQuery() {
+    return query;
+  }
+
+  public BulkApplyTemplateRequest setQuery(@Nullable String query) {
+    this.query = query;
+    return this;
+  }
+
+  public Collection<String> getQualifiers() {
+    return qualifiers;
+  }
+
+  public BulkApplyTemplateRequest setQualifiers(Collection<String> qualifiers) {
+    this.qualifiers = requireNonNull(qualifiers);
+    return this;
+  }
+
+  @CheckForNull
+  public String getVisibility() {
+    return visibility;
+  }
+
+  public BulkApplyTemplateRequest setVisibility(@Nullable String visibility) {
+    this.visibility = visibility;
+    return this;
+  }
+
+  @CheckForNull
+  public String getAnalyzedBefore() {
+    return analyzedBefore;
+  }
+
+  public BulkApplyTemplateRequest setAnalyzedBefore(@Nullable String analyzedBefore) {
+    this.analyzedBefore = analyzedBefore;
+    return this;
+  }
+
+  public boolean isOnProvisionedOnly() {
+    return onProvisionedOnly;
+  }
+
+  public BulkApplyTemplateRequest setOnProvisionedOnly(boolean onProvisionedOnly) {
+    this.onProvisionedOnly = onProvisionedOnly;
+    return this;
+  }
+
+  @CheckForNull
+  public Collection<String> getProjects() {
+    return projects;
+  }
+
+  public BulkApplyTemplateRequest setProjects(@Nullable Collection<String> projects) {
+    this.projects = projects;
+    return this;
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/BulkApplyTemplateWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/BulkApplyTemplateWsRequest.java
deleted file mode 100644 (file)
index bb17eb3..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.permission;
-
-import java.util.Collection;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-import org.sonar.api.resources.Qualifiers;
-
-import static java.util.Collections.singleton;
-import static java.util.Objects.requireNonNull;
-
-public class BulkApplyTemplateWsRequest {
-  private String templateId;
-  private String organization;
-  private String templateName;
-  private String query;
-  private Collection<String> qualifiers = singleton(Qualifiers.PROJECT);
-  private String visibility;
-  private String analyzedBefore;
-  private boolean onProvisionedOnly = false;
-  private Collection<String> projects;
-
-  @CheckForNull
-  public String getTemplateId() {
-    return templateId;
-  }
-
-  public BulkApplyTemplateWsRequest setTemplateId(@Nullable String templateId) {
-    this.templateId = templateId;
-    return this;
-  }
-
-  @CheckForNull
-  public String getOrganization() {
-    return organization;
-  }
-
-  public BulkApplyTemplateWsRequest setOrganization(@Nullable String s) {
-    this.organization = s;
-    return this;
-  }
-
-  @CheckForNull
-  public String getTemplateName() {
-    return templateName;
-  }
-
-  public BulkApplyTemplateWsRequest setTemplateName(@Nullable String templateName) {
-    this.templateName = templateName;
-    return this;
-  }
-
-  @CheckForNull
-  public String getQuery() {
-    return query;
-  }
-
-  public BulkApplyTemplateWsRequest setQuery(@Nullable String query) {
-    this.query = query;
-    return this;
-  }
-
-  public Collection<String> getQualifiers() {
-    return qualifiers;
-  }
-
-  public BulkApplyTemplateWsRequest setQualifiers(Collection<String> qualifiers) {
-    this.qualifiers = requireNonNull(qualifiers);
-    return this;
-  }
-
-  @CheckForNull
-  public String getVisibility() {
-    return visibility;
-  }
-
-  public BulkApplyTemplateWsRequest setVisibility(@Nullable String visibility) {
-    this.visibility = visibility;
-    return this;
-  }
-
-  @CheckForNull
-  public String getAnalyzedBefore() {
-    return analyzedBefore;
-  }
-
-  public BulkApplyTemplateWsRequest setAnalyzedBefore(@Nullable String analyzedBefore) {
-    this.analyzedBefore = analyzedBefore;
-    return this;
-  }
-
-  public boolean isOnProvisionedOnly() {
-    return onProvisionedOnly;
-  }
-
-  public BulkApplyTemplateWsRequest setOnProvisionedOnly(boolean onProvisionedOnly) {
-    this.onProvisionedOnly = onProvisionedOnly;
-    return this;
-  }
-
-  @CheckForNull
-  public Collection<String> getProjects() {
-    return projects;
-  }
-
-  public BulkApplyTemplateWsRequest setProjects(@Nullable Collection<String> projects) {
-    this.projects = projects;
-    return this;
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/CreateTemplateRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/CreateTemplateRequest.java
new file mode 100644 (file)
index 0000000..6b1768a
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.permission;
+
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+
+import static java.util.Objects.requireNonNull;
+
+public class CreateTemplateRequest {
+  private String description;
+  private String name;
+  private String projectKeyPattern;
+  private String organization;
+
+  @CheckForNull
+  public String getDescription() {
+    return description;
+  }
+
+  public CreateTemplateRequest setDescription(@Nullable String description) {
+    this.description = description;
+    return this;
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  public CreateTemplateRequest setName(String name) {
+    this.name = requireNonNull(name);
+    return this;
+  }
+
+  @CheckForNull
+  public String getProjectKeyPattern() {
+    return projectKeyPattern;
+  }
+
+  public CreateTemplateRequest setProjectKeyPattern(@Nullable String projectKeyPattern) {
+    this.projectKeyPattern = projectKeyPattern;
+    return this;
+  }
+
+  @CheckForNull
+  public String getOrganization() {
+    return organization;
+  }
+
+  public CreateTemplateRequest setOrganization(@Nullable String s) {
+    this.organization = s;
+    return this;
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/CreateTemplateWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/CreateTemplateWsRequest.java
deleted file mode 100644 (file)
index 65f9d3a..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.permission;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
-import static java.util.Objects.requireNonNull;
-
-public class CreateTemplateWsRequest {
-  private String description;
-  private String name;
-  private String projectKeyPattern;
-  private String organization;
-
-  @CheckForNull
-  public String getDescription() {
-    return description;
-  }
-
-  public CreateTemplateWsRequest setDescription(@Nullable String description) {
-    this.description = description;
-    return this;
-  }
-
-  public String getName() {
-    return name;
-  }
-
-  public CreateTemplateWsRequest setName(String name) {
-    this.name = requireNonNull(name);
-    return this;
-  }
-
-  @CheckForNull
-  public String getProjectKeyPattern() {
-    return projectKeyPattern;
-  }
-
-  public CreateTemplateWsRequest setProjectKeyPattern(@Nullable String projectKeyPattern) {
-    this.projectKeyPattern = projectKeyPattern;
-    return this;
-  }
-
-  @CheckForNull
-  public String getOrganization() {
-    return organization;
-  }
-
-  public CreateTemplateWsRequest setOrganization(@Nullable String s) {
-    this.organization = s;
-    return this;
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/DeleteTemplateRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/DeleteTemplateRequest.java
new file mode 100644 (file)
index 0000000..69582ae
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.permission;
+
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+
+public class DeleteTemplateRequest {
+  private String templateId;
+  private String organization;
+  private String templateName;
+
+  @CheckForNull
+  public String getTemplateId() {
+    return templateId;
+  }
+
+  public DeleteTemplateRequest setTemplateId(@Nullable String templateId) {
+    this.templateId = templateId;
+    return this;
+  }
+
+  @CheckForNull
+  public String getOrganization() {
+    return organization;
+  }
+
+  public DeleteTemplateRequest setOrganization(@Nullable String s) {
+    this.organization = s;
+    return this;
+  }
+
+  @CheckForNull
+  public String getTemplateName() {
+    return templateName;
+  }
+
+  public DeleteTemplateRequest setTemplateName(@Nullable String templateName) {
+    this.templateName = templateName;
+    return this;
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/DeleteTemplateWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/DeleteTemplateWsRequest.java
deleted file mode 100644 (file)
index 50b975b..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.permission;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
-public class DeleteTemplateWsRequest {
-  private String templateId;
-  private String organization;
-  private String templateName;
-
-  @CheckForNull
-  public String getTemplateId() {
-    return templateId;
-  }
-
-  public DeleteTemplateWsRequest setTemplateId(@Nullable String templateId) {
-    this.templateId = templateId;
-    return this;
-  }
-
-  @CheckForNull
-  public String getOrganization() {
-    return organization;
-  }
-
-  public DeleteTemplateWsRequest setOrganization(@Nullable String s) {
-    this.organization = s;
-    return this;
-  }
-
-  @CheckForNull
-  public String getTemplateName() {
-    return templateName;
-  }
-
-  public DeleteTemplateWsRequest setTemplateName(@Nullable String templateName) {
-    this.templateName = templateName;
-    return this;
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/GroupsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/GroupsRequest.java
new file mode 100644 (file)
index 0000000..641729b
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.permission;
+
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+
+public class GroupsRequest {
+  private String permission;
+  private String projectId;
+  private String projectKey;
+  private Integer page;
+  private Integer pageSize;
+  private String query;
+
+  @CheckForNull
+  public String getPermission() {
+    return permission;
+  }
+
+  public GroupsRequest setPermission(@Nullable String permission) {
+    this.permission = permission;
+    return this;
+  }
+
+  @CheckForNull
+  public String getProjectId() {
+    return projectId;
+  }
+
+  public GroupsRequest setProjectId(@Nullable String projectId) {
+    this.projectId = projectId;
+    return this;
+  }
+
+  @CheckForNull
+  public String getProjectKey() {
+    return projectKey;
+  }
+
+  public GroupsRequest setProjectKey(String projectKey) {
+    this.projectKey = projectKey;
+    return this;
+  }
+
+  @CheckForNull
+  public Integer getPage() {
+    return page;
+  }
+
+  public GroupsRequest setPage(int page) {
+    this.page = page;
+    return this;
+  }
+
+  @CheckForNull
+  public Integer getPageSize() {
+    return pageSize;
+  }
+
+  public GroupsRequest setPageSize(int pageSize) {
+    this.pageSize = pageSize;
+    return this;
+  }
+
+  @CheckForNull
+  public String getQuery() {
+    return query;
+  }
+
+  public GroupsRequest setQuery(@Nullable String query) {
+    this.query = query;
+    return this;
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/GroupsWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/GroupsWsRequest.java
deleted file mode 100644 (file)
index 9ec6431..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.permission;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
-public class GroupsWsRequest {
-  private String permission;
-  private String projectId;
-  private String projectKey;
-  private Integer page;
-  private Integer pageSize;
-  private String query;
-
-  @CheckForNull
-  public String getPermission() {
-    return permission;
-  }
-
-  public GroupsWsRequest setPermission(@Nullable String permission) {
-    this.permission = permission;
-    return this;
-  }
-
-  @CheckForNull
-  public String getProjectId() {
-    return projectId;
-  }
-
-  public GroupsWsRequest setProjectId(@Nullable String projectId) {
-    this.projectId = projectId;
-    return this;
-  }
-
-  @CheckForNull
-  public String getProjectKey() {
-    return projectKey;
-  }
-
-  public GroupsWsRequest setProjectKey(String projectKey) {
-    this.projectKey = projectKey;
-    return this;
-  }
-
-  @CheckForNull
-  public Integer getPage() {
-    return page;
-  }
-
-  public GroupsWsRequest setPage(int page) {
-    this.page = page;
-    return this;
-  }
-
-  @CheckForNull
-  public Integer getPageSize() {
-    return pageSize;
-  }
-
-  public GroupsWsRequest setPageSize(int pageSize) {
-    this.pageSize = pageSize;
-    return this;
-  }
-
-  @CheckForNull
-  public String getQuery() {
-    return query;
-  }
-
-  public GroupsWsRequest setQuery(@Nullable String query) {
-    this.query = query;
-    return this;
-  }
-}
index c048837359704aad59db25b4805406e68caea057..e6e353bff5b8d0a79cc6fe2fd60009454e195627 100644 (file)
@@ -53,7 +53,7 @@ public class PermissionsService extends BaseService {
     super(wsConnector, PermissionsWsParameters.CONTROLLER);
   }
 
-  public Permissions.WsGroupsResponse groups(GroupsWsRequest request) {
+  public Permissions.WsGroupsResponse groups(GroupsRequest request) {
     GetRequest get = new GetRequest(path("groups"))
       .setParam(PARAM_PERMISSION, request.getPermission())
       .setParam(PARAM_PROJECT_ID, request.getProjectId())
@@ -64,7 +64,7 @@ public class PermissionsService extends BaseService {
     return call(get, Permissions.WsGroupsResponse.parser());
   }
 
-  public void addGroup(AddGroupWsRequest request) {
+  public void addGroup(AddGroupRequest request) {
     call(new PostRequest(path("add_group"))
       .setParam(PARAM_ORGANIZATION, request.getOrganization())
       .setParam(PARAM_PERMISSION, request.getPermission())
@@ -74,7 +74,7 @@ public class PermissionsService extends BaseService {
       .setParam(PARAM_GROUP_NAME, request.getGroupName()));
   }
 
-  public void addGroupToTemplate(AddGroupToTemplateWsRequest request) {
+  public void addGroupToTemplate(AddGroupToTemplateRequest request) {
     call(new PostRequest(path("add_group_to_template"))
       .setParam(PARAM_GROUP_ID, request.getGroupId())
       .setParam(PARAM_GROUP_NAME, request.getGroupName())
@@ -83,7 +83,7 @@ public class PermissionsService extends BaseService {
       .setParam(PARAM_TEMPLATE_NAME, request.getTemplateName()));
   }
 
-  public void addUser(AddUserWsRequest request) {
+  public void addUser(AddUserRequest request) {
     call(new PostRequest(path("add_user"))
       .setParam(PARAM_USER_LOGIN, request.getLogin())
       .setParam(PARAM_PERMISSION, request.getPermission())
@@ -92,7 +92,7 @@ public class PermissionsService extends BaseService {
       .setParam(PARAM_ORGANIZATION, request.getOrganization()));
   }
 
-  public void addUserToTemplate(AddUserToTemplateWsRequest request) {
+  public void addUserToTemplate(AddUserToTemplateRequest request) {
     call(new PostRequest(path("add_user_to_template"))
       .setParam(PARAM_ORGANIZATION, request.getOrganization())
       .setParam(PARAM_PERMISSION, request.getPermission())
@@ -101,7 +101,7 @@ public class PermissionsService extends BaseService {
       .setParam(PARAM_TEMPLATE_NAME, request.getTemplateName()));
   }
 
-  public void addProjectCreatorToTemplate(AddProjectCreatorToTemplateWsRequest request) {
+  public void addProjectCreatorToTemplate(AddProjectCreatorToTemplateRequest request) {
     call(new PostRequest(path("add_project_creator_to_template"))
       .setParam(PARAM_ORGANIZATION, request.getOrganization())
       .setParam(PARAM_PERMISSION, request.getPermission())
@@ -109,7 +109,7 @@ public class PermissionsService extends BaseService {
       .setParam(PARAM_TEMPLATE_NAME, request.getTemplateName()));
   }
 
-  public void applyTemplate(ApplyTemplateWsRequest request) {
+  public void applyTemplate(ApplyTemplateRequest request) {
     call(new PostRequest(path("apply_template"))
       .setParam(PARAM_ORGANIZATION, request.getOrganization())
       .setParam(PARAM_PROJECT_ID, request.getProjectId())
@@ -118,7 +118,7 @@ public class PermissionsService extends BaseService {
       .setParam(PARAM_TEMPLATE_NAME, request.getTemplateName()));
   }
 
-  public void bulkApplyTemplate(BulkApplyTemplateWsRequest request) {
+  public void bulkApplyTemplate(BulkApplyTemplateRequest request) {
     call(new PostRequest(path("bulk_apply_template"))
       .setParam(PARAM_ORGANIZATION, request.getOrganization())
       .setParam(PARAM_TEMPLATE_ID, request.getTemplateId())
@@ -131,7 +131,7 @@ public class PermissionsService extends BaseService {
       .setParam(ProjectsWsParameters.PARAM_PROJECTS, inlineMultipleParamValue(request.getProjects())));
   }
 
-  public CreateTemplateWsResponse createTemplate(CreateTemplateWsRequest request) {
+  public CreateTemplateWsResponse createTemplate(CreateTemplateRequest request) {
     PostRequest post = new PostRequest(path("create_template"))
       .setParam(PARAM_ORGANIZATION, request.getOrganization())
       .setParam(PARAM_NAME, request.getName())
@@ -140,14 +140,14 @@ public class PermissionsService extends BaseService {
     return call(post, CreateTemplateWsResponse.parser());
   }
 
-  public void deleteTemplate(DeleteTemplateWsRequest request) {
+  public void deleteTemplate(DeleteTemplateRequest request) {
     call(new PostRequest(path("delete_template"))
       .setParam(PARAM_ORGANIZATION, request.getOrganization())
       .setParam(PARAM_TEMPLATE_ID, request.getTemplateId())
       .setParam(PARAM_TEMPLATE_NAME, request.getTemplateName()));
   }
 
-  public void removeGroup(RemoveGroupWsRequest request) {
+  public void removeGroup(RemoveGroupRequest request) {
     call(new PostRequest(path("remove_group"))
       .setParam(PARAM_ORGANIZATION, request.getOrganization())
       .setParam(PARAM_PERMISSION, request.getPermission())
@@ -157,7 +157,7 @@ public class PermissionsService extends BaseService {
       .setParam(PARAM_PROJECT_KEY, request.getProjectKey()));
   }
 
-  public void removeGroupFromTemplate(RemoveGroupFromTemplateWsRequest request) {
+  public void removeGroupFromTemplate(RemoveGroupFromTemplateRequest request) {
     call(new PostRequest(path("remove_group_from_template"))
       .setParam(PARAM_ORGANIZATION, request.getOrganization())
       .setParam(PARAM_PERMISSION, request.getPermission())
@@ -167,7 +167,7 @@ public class PermissionsService extends BaseService {
       .setParam(PARAM_TEMPLATE_NAME, request.getTemplateName()));
   }
 
-  public void removeProjectCreatorFromTemplate(RemoveProjectCreatorFromTemplateWsRequest request) {
+  public void removeProjectCreatorFromTemplate(RemoveProjectCreatorFromTemplateRequest request) {
     call(
       new PostRequest(path("remove_project_creator_from_template"))
         .setParam(PARAM_ORGANIZATION, request.getOrganization())
@@ -176,7 +176,7 @@ public class PermissionsService extends BaseService {
         .setParam(PARAM_TEMPLATE_NAME, request.getTemplateName()));
   }
 
-  public void removeUser(RemoveUserWsRequest request) {
+  public void removeUser(RemoveUserRequest request) {
     call(new PostRequest(path("remove_user"))
       .setParam(PARAM_PERMISSION, request.getPermission())
       .setParam(PARAM_USER_LOGIN, request.getLogin())
@@ -184,7 +184,7 @@ public class PermissionsService extends BaseService {
       .setParam(PARAM_PROJECT_KEY, request.getProjectKey()));
   }
 
-  public void removeUserFromTemplate(RemoveUserFromTemplateWsRequest request) {
+  public void removeUserFromTemplate(RemoveUserFromTemplateRequest request) {
     call(new PostRequest(path("remove_user_from_template"))
       .setParam(PARAM_ORGANIZATION, request.getOrganization())
       .setParam(PARAM_PERMISSION, request.getPermission())
@@ -198,7 +198,7 @@ public class PermissionsService extends BaseService {
     return call(get, WsSearchGlobalPermissionsResponse.parser());
   }
 
-  public SearchProjectPermissionsWsResponse searchProjectPermissions(SearchProjectPermissionsWsRequest request) {
+  public SearchProjectPermissionsWsResponse searchProjectPermissions(SearchProjectPermissionsRequest request) {
     GetRequest get = new GetRequest(path("search_project_permissions"))
       .setParam(PARAM_PROJECT_ID, request.getProjectId())
       .setParam(PARAM_PROJECT_KEY, request.getProjectKey())
@@ -209,20 +209,20 @@ public class PermissionsService extends BaseService {
     return call(get, SearchProjectPermissionsWsResponse.parser());
   }
 
-  public SearchTemplatesWsResponse searchTemplates(SearchTemplatesWsRequest request) {
+  public SearchTemplatesWsResponse searchTemplates(SearchTemplatesRequest request) {
     GetRequest get = new GetRequest(path("search_templates"))
       .setParam("q", request.getQuery());
     return call(get, SearchTemplatesWsResponse.parser());
   }
 
-  public void setDefaultTemplate(SetDefaultTemplateWsRequest request) {
+  public void setDefaultTemplate(SetDefaultTemplateRequest request) {
     call(new PostRequest(path("set_default_template"))
       .setParam(PARAM_QUALIFIER, request.getQualifier())
       .setParam(PARAM_TEMPLATE_ID, request.getTemplateId())
       .setParam(PARAM_TEMPLATE_NAME, request.getTemplateName()));
   }
 
-  public UpdateTemplateWsResponse updateTemplate(UpdateTemplateWsRequest request) {
+  public UpdateTemplateWsResponse updateTemplate(UpdateTemplateRequest request) {
     return call(new PostRequest(path("update_template"))
       .setParam(PARAM_DESCRIPTION, request.getDescription())
       .setParam(PARAM_ID, request.getId())
@@ -230,7 +230,7 @@ public class PermissionsService extends BaseService {
       .setParam(PARAM_PROJECT_KEY_PATTERN, request.getProjectKeyPattern()), UpdateTemplateWsResponse.parser());
   }
 
-  public UsersWsResponse users(UsersWsRequest request) {
+  public UsersWsResponse users(UsersRequest request) {
     return call(new GetRequest(path("users"))
       .setParam(PARAM_ORGANIZATION, request.getOrganization())
       .setParam(PARAM_PERMISSION, request.getPermission())
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/RemoveGroupFromTemplateRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/RemoveGroupFromTemplateRequest.java
new file mode 100644 (file)
index 0000000..b64c3d6
--- /dev/null
@@ -0,0 +1,93 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.permission;
+
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+
+import static java.util.Objects.requireNonNull;
+
+public class RemoveGroupFromTemplateRequest {
+  private String organization;
+  private String permission;
+  private String groupId;
+  private String groupName;
+  private String templateId;
+  private String templateName;
+
+  public String getPermission() {
+    return permission;
+  }
+
+  public RemoveGroupFromTemplateRequest setPermission(String permission) {
+    this.permission = requireNonNull(permission);
+    return this;
+  }
+
+  @CheckForNull
+  public String getOrganization() {
+    return organization;
+  }
+
+  public RemoveGroupFromTemplateRequest setOrganization(@Nullable String s) {
+    this.organization = s;
+    return this;
+  }
+
+  @CheckForNull
+  public String getGroupId() {
+    return groupId;
+  }
+
+  public RemoveGroupFromTemplateRequest setGroupId(@Nullable String groupId) {
+    this.groupId = groupId;
+    return this;
+  }
+
+  @CheckForNull
+  public String getGroupName() {
+    return groupName;
+  }
+
+  public RemoveGroupFromTemplateRequest setGroupName(@Nullable String groupName) {
+    this.groupName = groupName;
+    return this;
+  }
+
+  @CheckForNull
+  public String getTemplateId() {
+    return templateId;
+  }
+
+  public RemoveGroupFromTemplateRequest setTemplateId(@Nullable String templateId) {
+    this.templateId = templateId;
+    return this;
+  }
+
+  @CheckForNull
+  public String getTemplateName() {
+    return templateName;
+  }
+
+  public RemoveGroupFromTemplateRequest setTemplateName(@Nullable String templateName) {
+    this.templateName = templateName;
+    return this;
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/RemoveGroupFromTemplateWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/RemoveGroupFromTemplateWsRequest.java
deleted file mode 100644 (file)
index 91e4815..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.permission;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
-import static java.util.Objects.requireNonNull;
-
-public class RemoveGroupFromTemplateWsRequest {
-  private String organization;
-  private String permission;
-  private String groupId;
-  private String groupName;
-  private String templateId;
-  private String templateName;
-
-  public String getPermission() {
-    return permission;
-  }
-
-  public RemoveGroupFromTemplateWsRequest setPermission(String permission) {
-    this.permission = requireNonNull(permission);
-    return this;
-  }
-
-  @CheckForNull
-  public String getOrganization() {
-    return organization;
-  }
-
-  public RemoveGroupFromTemplateWsRequest setOrganization(@Nullable String s) {
-    this.organization = s;
-    return this;
-  }
-
-  @CheckForNull
-  public String getGroupId() {
-    return groupId;
-  }
-
-  public RemoveGroupFromTemplateWsRequest setGroupId(@Nullable String groupId) {
-    this.groupId = groupId;
-    return this;
-  }
-
-  @CheckForNull
-  public String getGroupName() {
-    return groupName;
-  }
-
-  public RemoveGroupFromTemplateWsRequest setGroupName(@Nullable String groupName) {
-    this.groupName = groupName;
-    return this;
-  }
-
-  @CheckForNull
-  public String getTemplateId() {
-    return templateId;
-  }
-
-  public RemoveGroupFromTemplateWsRequest setTemplateId(@Nullable String templateId) {
-    this.templateId = templateId;
-    return this;
-  }
-
-  @CheckForNull
-  public String getTemplateName() {
-    return templateName;
-  }
-
-  public RemoveGroupFromTemplateWsRequest setTemplateName(@Nullable String templateName) {
-    this.templateName = templateName;
-    return this;
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/RemoveGroupRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/RemoveGroupRequest.java
new file mode 100644 (file)
index 0000000..290d328
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.permission;
+
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+
+public class RemoveGroupRequest {
+  private String organization;
+  private String groupId;
+  private String groupName;
+  private String permission;
+  private String projectId;
+  private String projectKey;
+
+  @CheckForNull
+  public String getOrganization() {
+    return organization;
+  }
+
+  public RemoveGroupRequest setOrganization(@Nullable String s) {
+    this.organization = s;
+    return this;
+  }
+
+  @CheckForNull
+  public String getGroupId() {
+    return groupId;
+  }
+
+  public RemoveGroupRequest setGroupId(@Nullable String groupId) {
+    this.groupId = groupId;
+    return this;
+  }
+
+  @CheckForNull
+  public String getGroupName() {
+    return groupName;
+  }
+
+  public RemoveGroupRequest setGroupName(@Nullable String groupName) {
+    this.groupName = groupName;
+    return this;
+  }
+
+  public String getPermission() {
+    return permission;
+  }
+
+  public RemoveGroupRequest setPermission(String permission) {
+    this.permission = permission;
+    return this;
+  }
+
+  @CheckForNull
+  public String getProjectId() {
+    return projectId;
+  }
+
+  public RemoveGroupRequest setProjectId(@Nullable String projectId) {
+    this.projectId = projectId;
+    return this;
+  }
+
+  @CheckForNull
+  public String getProjectKey() {
+    return projectKey;
+  }
+
+  public RemoveGroupRequest setProjectKey(@Nullable String projectKey) {
+    this.projectKey = projectKey;
+    return this;
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/RemoveGroupWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/RemoveGroupWsRequest.java
deleted file mode 100644 (file)
index 0a7930a..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.permission;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
-public class RemoveGroupWsRequest {
-  private String organization;
-  private String groupId;
-  private String groupName;
-  private String permission;
-  private String projectId;
-  private String projectKey;
-
-  @CheckForNull
-  public String getOrganization() {
-    return organization;
-  }
-
-  public RemoveGroupWsRequest setOrganization(@Nullable String s) {
-    this.organization = s;
-    return this;
-  }
-
-  @CheckForNull
-  public String getGroupId() {
-    return groupId;
-  }
-
-  public RemoveGroupWsRequest setGroupId(@Nullable String groupId) {
-    this.groupId = groupId;
-    return this;
-  }
-
-  @CheckForNull
-  public String getGroupName() {
-    return groupName;
-  }
-
-  public RemoveGroupWsRequest setGroupName(@Nullable String groupName) {
-    this.groupName = groupName;
-    return this;
-  }
-
-  public String getPermission() {
-    return permission;
-  }
-
-  public RemoveGroupWsRequest setPermission(String permission) {
-    this.permission = permission;
-    return this;
-  }
-
-  @CheckForNull
-  public String getProjectId() {
-    return projectId;
-  }
-
-  public RemoveGroupWsRequest setProjectId(@Nullable String projectId) {
-    this.projectId = projectId;
-    return this;
-  }
-
-  @CheckForNull
-  public String getProjectKey() {
-    return projectKey;
-  }
-
-  public RemoveGroupWsRequest setProjectKey(@Nullable String projectKey) {
-    this.projectKey = projectKey;
-    return this;
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/RemoveProjectCreatorFromTemplateRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/RemoveProjectCreatorFromTemplateRequest.java
new file mode 100644 (file)
index 0000000..4910105
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.permission;
+
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+import javax.annotation.concurrent.Immutable;
+
+import static java.util.Objects.requireNonNull;
+
+@Immutable
+public class RemoveProjectCreatorFromTemplateRequest {
+  private final String templateId;
+  private final String organization;
+  private final String templateName;
+  private final String permission;
+
+  private RemoveProjectCreatorFromTemplateRequest(Builder builder) {
+    this.templateId = builder.templateId;
+    this.organization = builder.organization;
+    this.templateName = builder.templateName;
+    this.permission = requireNonNull(builder.permission);
+  }
+
+  @CheckForNull
+  public String getTemplateId() {
+    return templateId;
+  }
+
+  @CheckForNull
+  public String getOrganization() {
+    return organization;
+  }
+
+  @CheckForNull
+  public String getTemplateName() {
+    return templateName;
+  }
+
+  public String getPermission() {
+    return permission;
+  }
+
+  public static Builder builder() {
+    return new Builder();
+  }
+
+  public static class Builder {
+    private String templateId;
+    private String organization;
+    private String templateName;
+    private String permission;
+
+    private Builder() {
+      // enforce method constructor
+    }
+
+    public Builder setTemplateId(@Nullable String templateId) {
+      this.templateId = templateId;
+      return this;
+    }
+
+    public Builder setOrganization(@Nullable String s) {
+      this.organization = s;
+      return this;
+    }
+
+    public Builder setTemplateName(@Nullable String templateName) {
+      this.templateName = templateName;
+      return this;
+    }
+
+    public Builder setPermission(@Nullable String permission) {
+      this.permission = permission;
+      return this;
+    }
+
+    public RemoveProjectCreatorFromTemplateRequest build() {
+      return new RemoveProjectCreatorFromTemplateRequest(this);
+    }
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/RemoveProjectCreatorFromTemplateWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/RemoveProjectCreatorFromTemplateWsRequest.java
deleted file mode 100644 (file)
index f5ee935..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.permission;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-import javax.annotation.concurrent.Immutable;
-
-import static java.util.Objects.requireNonNull;
-
-@Immutable
-public class RemoveProjectCreatorFromTemplateWsRequest {
-  private final String templateId;
-  private final String organization;
-  private final String templateName;
-  private final String permission;
-
-  private RemoveProjectCreatorFromTemplateWsRequest(Builder builder) {
-    this.templateId = builder.templateId;
-    this.organization = builder.organization;
-    this.templateName = builder.templateName;
-    this.permission = requireNonNull(builder.permission);
-  }
-
-  @CheckForNull
-  public String getTemplateId() {
-    return templateId;
-  }
-
-  @CheckForNull
-  public String getOrganization() {
-    return organization;
-  }
-
-  @CheckForNull
-  public String getTemplateName() {
-    return templateName;
-  }
-
-  public String getPermission() {
-    return permission;
-  }
-
-  public static Builder builder() {
-    return new Builder();
-  }
-
-  public static class Builder {
-    private String templateId;
-    private String organization;
-    private String templateName;
-    private String permission;
-
-    private Builder() {
-      // enforce method constructor
-    }
-
-    public Builder setTemplateId(@Nullable String templateId) {
-      this.templateId = templateId;
-      return this;
-    }
-
-    public Builder setOrganization(@Nullable String s) {
-      this.organization = s;
-      return this;
-    }
-
-    public Builder setTemplateName(@Nullable String templateName) {
-      this.templateName = templateName;
-      return this;
-    }
-
-    public Builder setPermission(@Nullable String permission) {
-      this.permission = permission;
-      return this;
-    }
-
-    public RemoveProjectCreatorFromTemplateWsRequest build() {
-      return new RemoveProjectCreatorFromTemplateWsRequest(this);
-    }
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/RemoveUserFromTemplateRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/RemoveUserFromTemplateRequest.java
new file mode 100644 (file)
index 0000000..4db6cc2
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.permission;
+
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+
+import static java.util.Objects.requireNonNull;
+
+public class RemoveUserFromTemplateRequest {
+  private String login;
+  private String permission;
+  private String templateId;
+  private String organization;
+  private String templateName;
+
+  public String getLogin() {
+    return login;
+  }
+
+  public RemoveUserFromTemplateRequest setLogin(String login) {
+    this.login = requireNonNull(login);
+    return this;
+  }
+
+  public String getPermission() {
+    return permission;
+  }
+
+  public RemoveUserFromTemplateRequest setPermission(String permission) {
+    this.permission = requireNonNull(permission);
+    return this;
+  }
+
+  @CheckForNull
+  public String getTemplateId() {
+    return templateId;
+  }
+
+  public RemoveUserFromTemplateRequest setTemplateId(@Nullable String templateId) {
+    this.templateId = templateId;
+    return this;
+  }
+
+  @CheckForNull
+  public String getOrganization() {
+    return organization;
+  }
+
+  public RemoveUserFromTemplateRequest setOrganization(@Nullable String s) {
+    this.organization = s;
+    return this;
+  }
+
+  @CheckForNull
+  public String getTemplateName() {
+    return templateName;
+  }
+
+  public RemoveUserFromTemplateRequest setTemplateName(@Nullable String templateName) {
+    this.templateName = templateName;
+    return this;
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/RemoveUserFromTemplateWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/RemoveUserFromTemplateWsRequest.java
deleted file mode 100644 (file)
index 42a5fb8..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.permission;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
-import static java.util.Objects.requireNonNull;
-
-public class RemoveUserFromTemplateWsRequest {
-  private String login;
-  private String permission;
-  private String templateId;
-  private String organization;
-  private String templateName;
-
-  public String getLogin() {
-    return login;
-  }
-
-  public RemoveUserFromTemplateWsRequest setLogin(String login) {
-    this.login = requireNonNull(login);
-    return this;
-  }
-
-  public String getPermission() {
-    return permission;
-  }
-
-  public RemoveUserFromTemplateWsRequest setPermission(String permission) {
-    this.permission = requireNonNull(permission);
-    return this;
-  }
-
-  @CheckForNull
-  public String getTemplateId() {
-    return templateId;
-  }
-
-  public RemoveUserFromTemplateWsRequest setTemplateId(@Nullable String templateId) {
-    this.templateId = templateId;
-    return this;
-  }
-
-  @CheckForNull
-  public String getOrganization() {
-    return organization;
-  }
-
-  public RemoveUserFromTemplateWsRequest setOrganization(@Nullable String s) {
-    this.organization = s;
-    return this;
-  }
-
-  @CheckForNull
-  public String getTemplateName() {
-    return templateName;
-  }
-
-  public RemoveUserFromTemplateWsRequest setTemplateName(@Nullable String templateName) {
-    this.templateName = templateName;
-    return this;
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/RemoveUserRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/RemoveUserRequest.java
new file mode 100644 (file)
index 0000000..8e92b49
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.permission;
+
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+
+import static java.util.Objects.requireNonNull;
+
+public class RemoveUserRequest {
+  private String permission;
+  private String login;
+  private String projectId;
+  private String projectKey;
+
+  public String getPermission() {
+    return permission;
+  }
+
+  public RemoveUserRequest setPermission(String permission) {
+    this.permission = requireNonNull(permission);
+    return this;
+  }
+
+  public String getLogin() {
+    return login;
+  }
+
+  public RemoveUserRequest setLogin(String login) {
+    this.login = requireNonNull(login);
+    return this;
+  }
+
+  @CheckForNull
+  public String getProjectId() {
+    return projectId;
+  }
+
+  public RemoveUserRequest setProjectId(@Nullable String projectId) {
+    this.projectId = projectId;
+    return this;
+  }
+
+  @CheckForNull
+  public String getProjectKey() {
+    return projectKey;
+  }
+
+  public RemoveUserRequest setProjectKey(@Nullable String projectKey) {
+    this.projectKey = projectKey;
+    return this;
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/RemoveUserWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/RemoveUserWsRequest.java
deleted file mode 100644 (file)
index 2cd59a8..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.permission;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
-import static java.util.Objects.requireNonNull;
-
-public class RemoveUserWsRequest {
-  private String permission;
-  private String login;
-  private String projectId;
-  private String projectKey;
-
-  public String getPermission() {
-    return permission;
-  }
-
-  public RemoveUserWsRequest setPermission(String permission) {
-    this.permission = requireNonNull(permission);
-    return this;
-  }
-
-  public String getLogin() {
-    return login;
-  }
-
-  public RemoveUserWsRequest setLogin(String login) {
-    this.login = requireNonNull(login);
-    return this;
-  }
-
-  @CheckForNull
-  public String getProjectId() {
-    return projectId;
-  }
-
-  public RemoveUserWsRequest setProjectId(@Nullable String projectId) {
-    this.projectId = projectId;
-    return this;
-  }
-
-  @CheckForNull
-  public String getProjectKey() {
-    return projectKey;
-  }
-
-  public RemoveUserWsRequest setProjectKey(@Nullable String projectKey) {
-    this.projectKey = projectKey;
-    return this;
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/SearchProjectPermissionsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/SearchProjectPermissionsRequest.java
new file mode 100644 (file)
index 0000000..770dcbf
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.permission;
+
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+
+public class SearchProjectPermissionsRequest {
+  private String projectId;
+  private String projectKey;
+  private String qualifier;
+  private Integer page;
+  private Integer pageSize;
+  private String query;
+
+  @CheckForNull
+  public String getProjectId() {
+    return projectId;
+  }
+
+  public SearchProjectPermissionsRequest setProjectId(@Nullable String projectId) {
+    this.projectId = projectId;
+    return this;
+  }
+
+  @CheckForNull
+  public String getProjectKey() {
+    return projectKey;
+  }
+
+  public SearchProjectPermissionsRequest setProjectKey(@Nullable String projectKey) {
+    this.projectKey = projectKey;
+    return this;
+  }
+
+  @CheckForNull
+  public Integer getPage() {
+    return page;
+  }
+
+  public SearchProjectPermissionsRequest setPage(int page) {
+    this.page = page;
+    return this;
+  }
+
+  @CheckForNull
+  public Integer getPageSize() {
+    return pageSize;
+  }
+
+  public SearchProjectPermissionsRequest setPageSize(int pageSize) {
+    this.pageSize = pageSize;
+    return this;
+  }
+
+  @CheckForNull
+  public String getQuery() {
+    return query;
+  }
+
+  public SearchProjectPermissionsRequest setQuery(@Nullable String query) {
+    this.query = query;
+    return this;
+  }
+
+  @CheckForNull
+  public String getQualifier() {
+    return qualifier;
+  }
+
+  public SearchProjectPermissionsRequest setQualifier(@Nullable String qualifier) {
+    this.qualifier = qualifier;
+    return this;
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/SearchProjectPermissionsWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/SearchProjectPermissionsWsRequest.java
deleted file mode 100644 (file)
index e1f0d0c..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.permission;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
-public class SearchProjectPermissionsWsRequest {
-  private String projectId;
-  private String projectKey;
-  private String qualifier;
-  private Integer page;
-  private Integer pageSize;
-  private String query;
-
-  @CheckForNull
-  public String getProjectId() {
-    return projectId;
-  }
-
-  public SearchProjectPermissionsWsRequest setProjectId(@Nullable String projectId) {
-    this.projectId = projectId;
-    return this;
-  }
-
-  @CheckForNull
-  public String getProjectKey() {
-    return projectKey;
-  }
-
-  public SearchProjectPermissionsWsRequest setProjectKey(@Nullable String projectKey) {
-    this.projectKey = projectKey;
-    return this;
-  }
-
-  @CheckForNull
-  public Integer getPage() {
-    return page;
-  }
-
-  public SearchProjectPermissionsWsRequest setPage(int page) {
-    this.page = page;
-    return this;
-  }
-
-  @CheckForNull
-  public Integer getPageSize() {
-    return pageSize;
-  }
-
-  public SearchProjectPermissionsWsRequest setPageSize(int pageSize) {
-    this.pageSize = pageSize;
-    return this;
-  }
-
-  @CheckForNull
-  public String getQuery() {
-    return query;
-  }
-
-  public SearchProjectPermissionsWsRequest setQuery(@Nullable String query) {
-    this.query = query;
-    return this;
-  }
-
-  @CheckForNull
-  public String getQualifier() {
-    return qualifier;
-  }
-
-  public SearchProjectPermissionsWsRequest setQualifier(@Nullable String qualifier) {
-    this.qualifier = qualifier;
-    return this;
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/SearchTemplatesRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/SearchTemplatesRequest.java
new file mode 100644 (file)
index 0000000..33cf11b
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.permission;
+
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+
+public class SearchTemplatesRequest {
+  private String query;
+  private String organizationUuid;
+
+  @CheckForNull
+  public String getQuery() {
+    return query;
+  }
+
+  public SearchTemplatesRequest setQuery(@Nullable String query) {
+    this.query = query;
+    return this;
+  }
+
+  public String getOrganizationUuid() {
+    return organizationUuid;
+  }
+
+  public SearchTemplatesRequest setOrganizationUuid(String s) {
+    this.organizationUuid = s;
+    return this;
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/SearchTemplatesWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/SearchTemplatesWsRequest.java
deleted file mode 100644 (file)
index 05587a0..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.permission;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
-public class SearchTemplatesWsRequest {
-  private String query;
-  private String organizationUuid;
-
-  @CheckForNull
-  public String getQuery() {
-    return query;
-  }
-
-  public SearchTemplatesWsRequest setQuery(@Nullable String query) {
-    this.query = query;
-    return this;
-  }
-
-  public String getOrganizationUuid() {
-    return organizationUuid;
-  }
-
-  public SearchTemplatesWsRequest setOrganizationUuid(String s) {
-    this.organizationUuid = s;
-    return this;
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/SetDefaultTemplateRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/SetDefaultTemplateRequest.java
new file mode 100644 (file)
index 0000000..14f6aae
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.permission;
+
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+
+public class SetDefaultTemplateRequest {
+  private String qualifier;
+  private String templateId;
+  private String organization;
+  private String templateName;
+
+  @CheckForNull
+  public String getQualifier() {
+    return qualifier;
+  }
+
+  public SetDefaultTemplateRequest setQualifier(@Nullable String qualifier) {
+    this.qualifier = qualifier;
+    return this;
+  }
+
+  @CheckForNull
+  public String getTemplateId() {
+    return templateId;
+  }
+
+  public SetDefaultTemplateRequest setTemplateId(@Nullable String templateId) {
+    this.templateId = templateId;
+    return this;
+  }
+
+  @CheckForNull
+  public String getOrganization() {
+    return organization;
+  }
+
+  public SetDefaultTemplateRequest setOrganization(@Nullable String s) {
+    this.organization = s;
+    return this;
+  }
+
+  @CheckForNull
+  public String getTemplateName() {
+    return templateName;
+  }
+
+  public SetDefaultTemplateRequest setTemplateName(@Nullable String templateName) {
+    this.templateName = templateName;
+    return this;
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/SetDefaultTemplateWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/SetDefaultTemplateWsRequest.java
deleted file mode 100644 (file)
index 7f4a052..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.permission;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
-public class SetDefaultTemplateWsRequest {
-  private String qualifier;
-  private String templateId;
-  private String organization;
-  private String templateName;
-
-  @CheckForNull
-  public String getQualifier() {
-    return qualifier;
-  }
-
-  public SetDefaultTemplateWsRequest setQualifier(@Nullable String qualifier) {
-    this.qualifier = qualifier;
-    return this;
-  }
-
-  @CheckForNull
-  public String getTemplateId() {
-    return templateId;
-  }
-
-  public SetDefaultTemplateWsRequest setTemplateId(@Nullable String templateId) {
-    this.templateId = templateId;
-    return this;
-  }
-
-  @CheckForNull
-  public String getOrganization() {
-    return organization;
-  }
-
-  public SetDefaultTemplateWsRequest setOrganization(@Nullable String s) {
-    this.organization = s;
-    return this;
-  }
-
-  @CheckForNull
-  public String getTemplateName() {
-    return templateName;
-  }
-
-  public SetDefaultTemplateWsRequest setTemplateName(@Nullable String templateName) {
-    this.templateName = templateName;
-    return this;
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/UpdateTemplateRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/UpdateTemplateRequest.java
new file mode 100644 (file)
index 0000000..931af14
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.permission;
+
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+
+import static java.util.Objects.requireNonNull;
+
+public class UpdateTemplateRequest {
+  private String id;
+  private String description;
+  private String name;
+  private String projectKeyPattern;
+
+  public String getId() {
+    return id;
+  }
+
+  public UpdateTemplateRequest setId(String id) {
+    this.id = requireNonNull(id);
+    return this;
+  }
+
+  @CheckForNull
+  public String getDescription() {
+    return description;
+  }
+
+  public UpdateTemplateRequest setDescription(@Nullable String description) {
+    this.description = description;
+    return this;
+  }
+
+  @CheckForNull
+  public String getName() {
+    return name;
+  }
+
+  public UpdateTemplateRequest setName(@Nullable String name) {
+    this.name = name;
+    return this;
+  }
+
+  @CheckForNull
+  public String getProjectKeyPattern() {
+    return projectKeyPattern;
+  }
+
+  public UpdateTemplateRequest setProjectKeyPattern(@Nullable String projectKeyPattern) {
+    this.projectKeyPattern = projectKeyPattern;
+    return this;
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/UpdateTemplateWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/UpdateTemplateWsRequest.java
deleted file mode 100644 (file)
index a378464..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.permission;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
-import static java.util.Objects.requireNonNull;
-
-public class UpdateTemplateWsRequest {
-  private String id;
-  private String description;
-  private String name;
-  private String projectKeyPattern;
-
-  public String getId() {
-    return id;
-  }
-
-  public UpdateTemplateWsRequest setId(String id) {
-    this.id = requireNonNull(id);
-    return this;
-  }
-
-  @CheckForNull
-  public String getDescription() {
-    return description;
-  }
-
-  public UpdateTemplateWsRequest setDescription(@Nullable String description) {
-    this.description = description;
-    return this;
-  }
-
-  @CheckForNull
-  public String getName() {
-    return name;
-  }
-
-  public UpdateTemplateWsRequest setName(@Nullable String name) {
-    this.name = name;
-    return this;
-  }
-
-  @CheckForNull
-  public String getProjectKeyPattern() {
-    return projectKeyPattern;
-  }
-
-  public UpdateTemplateWsRequest setProjectKeyPattern(@Nullable String projectKeyPattern) {
-    this.projectKeyPattern = projectKeyPattern;
-    return this;
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/UsersRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/UsersRequest.java
new file mode 100644 (file)
index 0000000..08e4168
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.permission;
+
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+
+public class UsersRequest {
+  private String organization;
+  private String permission;
+  private String projectId;
+  private String projectKey;
+  private String query;
+  private Integer page;
+  private Integer pageSize;
+
+  @CheckForNull
+  public String getOrganization() {
+    return organization;
+  }
+
+  public UsersRequest setOrganization(@Nullable String s) {
+    this.organization = s;
+    return this;
+  }
+
+  @CheckForNull
+  public String getPermission() {
+    return permission;
+  }
+
+  public UsersRequest setPermission(@Nullable String permission) {
+    this.permission = permission;
+    return this;
+  }
+
+  @CheckForNull
+  public String getProjectId() {
+    return projectId;
+  }
+
+  public UsersRequest setProjectId(@Nullable String projectId) {
+    this.projectId = projectId;
+    return this;
+  }
+
+  @CheckForNull
+  public String getProjectKey() {
+    return projectKey;
+  }
+
+  public UsersRequest setProjectKey(@Nullable String projectKey) {
+    this.projectKey = projectKey;
+    return this;
+  }
+
+  @CheckForNull
+  public String getQuery() {
+    return query;
+  }
+
+  public UsersRequest setQuery(@Nullable String query) {
+    this.query = query;
+    return this;
+  }
+
+  @CheckForNull
+  public Integer getPage() {
+    return page;
+  }
+
+  public UsersRequest setPage(int page) {
+    this.page = page;
+    return this;
+  }
+
+  @CheckForNull
+  public Integer getPageSize() {
+    return pageSize;
+  }
+
+  public UsersRequest setPageSize(int pageSize) {
+    this.pageSize = pageSize;
+    return this;
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/UsersWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/UsersWsRequest.java
deleted file mode 100644 (file)
index 930178e..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.permission;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
-public class UsersWsRequest {
-  private String organization;
-  private String permission;
-  private String projectId;
-  private String projectKey;
-  private String query;
-  private Integer page;
-  private Integer pageSize;
-
-  @CheckForNull
-  public String getOrganization() {
-    return organization;
-  }
-
-  public UsersWsRequest setOrganization(@Nullable String s) {
-    this.organization = s;
-    return this;
-  }
-
-  @CheckForNull
-  public String getPermission() {
-    return permission;
-  }
-
-  public UsersWsRequest setPermission(@Nullable String permission) {
-    this.permission = permission;
-    return this;
-  }
-
-  @CheckForNull
-  public String getProjectId() {
-    return projectId;
-  }
-
-  public UsersWsRequest setProjectId(@Nullable String projectId) {
-    this.projectId = projectId;
-    return this;
-  }
-
-  @CheckForNull
-  public String getProjectKey() {
-    return projectKey;
-  }
-
-  public UsersWsRequest setProjectKey(@Nullable String projectKey) {
-    this.projectKey = projectKey;
-    return this;
-  }
-
-  @CheckForNull
-  public String getQuery() {
-    return query;
-  }
-
-  public UsersWsRequest setQuery(@Nullable String query) {
-    this.query = query;
-    return this;
-  }
-
-  @CheckForNull
-  public Integer getPage() {
-    return page;
-  }
-
-  public UsersWsRequest setPage(int page) {
-    this.page = page;
-    return this;
-  }
-
-  @CheckForNull
-  public Integer getPageSize() {
-    return pageSize;
-  }
-
-  public UsersWsRequest setPageSize(int pageSize) {
-    this.pageSize = pageSize;
-    return this;
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/project/BulkUpdateKeyRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/project/BulkUpdateKeyRequest.java
new file mode 100644 (file)
index 0000000..980f636
--- /dev/null
@@ -0,0 +1,113 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.project;
+
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+import javax.annotation.concurrent.Immutable;
+
+import static com.google.common.base.Preconditions.checkArgument;
+
+@Immutable
+public class BulkUpdateKeyRequest {
+  private final String id;
+  private final String key;
+  private final String from;
+  private final String to;
+  private final boolean dryRun;
+
+  public BulkUpdateKeyRequest(Builder builder) {
+    this.id = builder.id;
+    this.key = builder.key;
+    this.from = builder.from;
+    this.to = builder.to;
+    this.dryRun = builder.dryRun;
+  }
+
+  @CheckForNull
+  public String getId() {
+    return id;
+  }
+
+  @CheckForNull
+  public String getKey() {
+    return key;
+  }
+
+  public String getFrom() {
+    return from;
+  }
+
+  public String getTo() {
+    return to;
+  }
+
+  public boolean isDryRun() {
+    return dryRun;
+  }
+
+  public static Builder builder() {
+    return new Builder();
+  }
+
+  public static class Builder {
+    private String id;
+    private String key;
+    private String from;
+    private String to;
+    private boolean dryRun;
+
+    private Builder() {
+      // enforce method constructor
+    }
+
+    public Builder setId(@Nullable String id) {
+      this.id = id;
+      return this;
+    }
+
+    public Builder setKey(@Nullable String key) {
+      this.key = key;
+      return this;
+    }
+
+    public Builder setFrom(String from) {
+      this.from = from;
+      return this;
+    }
+
+    public Builder setTo(String to) {
+      this.to = to;
+      return this;
+    }
+
+    public Builder setDryRun(boolean dryRun) {
+      this.dryRun = dryRun;
+      return this;
+    }
+
+    public BulkUpdateKeyRequest build() {
+      checkArgument(from != null && !from.isEmpty(), "The string to match must not be empty");
+      checkArgument(to != null && !to.isEmpty(), "The string replacement must not be empty");
+      return new BulkUpdateKeyRequest(this);
+    }
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/project/BulkUpdateKeyWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/project/BulkUpdateKeyWsRequest.java
deleted file mode 100644 (file)
index 41a72f3..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.project;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-import javax.annotation.concurrent.Immutable;
-
-import static com.google.common.base.Preconditions.checkArgument;
-
-@Immutable
-public class BulkUpdateKeyWsRequest {
-  private final String id;
-  private final String key;
-  private final String from;
-  private final String to;
-  private final boolean dryRun;
-
-  public BulkUpdateKeyWsRequest(Builder builder) {
-    this.id = builder.id;
-    this.key = builder.key;
-    this.from = builder.from;
-    this.to = builder.to;
-    this.dryRun = builder.dryRun;
-  }
-
-  @CheckForNull
-  public String getId() {
-    return id;
-  }
-
-  @CheckForNull
-  public String getKey() {
-    return key;
-  }
-
-  public String getFrom() {
-    return from;
-  }
-
-  public String getTo() {
-    return to;
-  }
-
-  public boolean isDryRun() {
-    return dryRun;
-  }
-
-  public static Builder builder() {
-    return new Builder();
-  }
-
-  public static class Builder {
-    private String id;
-    private String key;
-    private String from;
-    private String to;
-    private boolean dryRun;
-
-    private Builder() {
-      // enforce method constructor
-    }
-
-    public Builder setId(@Nullable String id) {
-      this.id = id;
-      return this;
-    }
-
-    public Builder setKey(@Nullable String key) {
-      this.key = key;
-      return this;
-    }
-
-    public Builder setFrom(String from) {
-      this.from = from;
-      return this;
-    }
-
-    public Builder setTo(String to) {
-      this.to = to;
-      return this;
-    }
-
-    public Builder setDryRun(boolean dryRun) {
-      this.dryRun = dryRun;
-      return this;
-    }
-
-    public BulkUpdateKeyWsRequest build() {
-      checkArgument(from != null && !from.isEmpty(), "The string to match must not be empty");
-      checkArgument(to != null && !to.isEmpty(), "The string replacement must not be empty");
-      return new BulkUpdateKeyWsRequest(this);
-    }
-  }
-}
index 9a42c155add0abaffce11a6b0c05c983b1ecff1c..e169f4f96e1ce31c9620862563726f67d140875e 100644 (file)
@@ -85,7 +85,7 @@ public class ProjectsService extends BaseService {
       .setParam("project", request.getKey()));
   }
 
-  public void bulkDelete(SearchWsRequest request) {
+  public void bulkDelete(SearchRequest request) {
     PostRequest post = new PostRequest(path("bulk_delete"))
       .setParam(PARAM_ORGANIZATION, request.getOrganization())
       .setParam(PARAM_QUALIFIERS, inlineMultipleParamValue(request.getQualifiers()))
@@ -98,7 +98,7 @@ public class ProjectsService extends BaseService {
     call(post);
   }
 
-  public void updateKey(UpdateKeyWsRequest request) {
+  public void updateKey(UpdateKeyRequest request) {
     PostRequest post = new PostRequest(path(ACTION_UPDATE_KEY))
       .setParam(PARAM_PROJECT_ID, request.getId())
       .setParam(PARAM_FROM, request.getKey())
@@ -107,7 +107,7 @@ public class ProjectsService extends BaseService {
     call(post);
   }
 
-  public BulkUpdateKeyWsResponse bulkUpdateKey(BulkUpdateKeyWsRequest request) {
+  public BulkUpdateKeyWsResponse bulkUpdateKey(BulkUpdateKeyRequest request) {
     PostRequest post = new PostRequest(path(ACTION_BULK_UPDATE_KEY))
       .setParam(PARAM_PROJECT_ID, request.getId())
       .setParam(PARAM_PROJECT, request.getKey())
@@ -117,7 +117,7 @@ public class ProjectsService extends BaseService {
     return call(post, BulkUpdateKeyWsResponse.parser());
   }
 
-  public SearchWsResponse search(SearchWsRequest request) {
+  public SearchWsResponse search(SearchRequest request) {
     GetRequest get = new GetRequest(path(ACTION_SEARCH))
       .setParam(PARAM_ORGANIZATION, request.getOrganization())
       .setParam(PARAM_QUALIFIERS, Joiner.on(",").join(request.getQualifiers()))
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/project/SearchRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/project/SearchRequest.java
new file mode 100644 (file)
index 0000000..5cf2b55
--- /dev/null
@@ -0,0 +1,179 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.project;
+
+import java.util.List;
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+import org.sonar.api.resources.Qualifiers;
+
+import static com.google.common.base.Preconditions.checkArgument;
+import static java.util.Collections.singletonList;
+import static java.util.Objects.requireNonNull;
+import static org.sonarqube.ws.client.project.ProjectsWsParameters.MAX_PAGE_SIZE;
+
+public class SearchRequest {
+
+  private final String organization;
+  private final String query;
+  private final List<String> qualifiers;
+  private final String visibility;
+  private final Integer page;
+  private final Integer pageSize;
+  private final String analyzedBefore;
+  private final boolean onProvisionedOnly;
+  private final List<String> projects;
+  private final List<String> projectIds;
+
+  public SearchRequest(Builder builder) {
+    this.organization = builder.organization;
+    this.query = builder.query;
+    this.qualifiers = builder.qualifiers;
+    this.visibility = builder.visibility;
+    this.page = builder.page;
+    this.pageSize = builder.pageSize;
+    this.analyzedBefore = builder.analyzedBefore;
+    this.onProvisionedOnly = builder.onProvisionedOnly;
+    this.projects = builder.projects;
+    this.projectIds = builder.projectIds;
+  }
+
+  @CheckForNull
+  public String getOrganization() {
+    return organization;
+  }
+
+  public List<String> getQualifiers() {
+    return qualifiers;
+  }
+
+  @CheckForNull
+  public Integer getPage() {
+    return page;
+  }
+
+  @CheckForNull
+  public Integer getPageSize() {
+    return pageSize;
+  }
+
+  @CheckForNull
+  public String getQuery() {
+    return query;
+  }
+
+  @CheckForNull
+  public String getVisibility() {
+    return visibility;
+  }
+
+  @CheckForNull
+  public String getAnalyzedBefore() {
+    return analyzedBefore;
+  }
+
+  public boolean isOnProvisionedOnly() {
+    return onProvisionedOnly;
+  }
+
+  @CheckForNull
+  public List<String> getProjects() {
+    return projects;
+  }
+
+  @CheckForNull
+  public List<String> getProjectIds() {
+    return projectIds;
+  }
+
+  public static Builder builder() {
+    return new Builder();
+  }
+
+  public static class Builder {
+    private String organization;
+    private List<String> qualifiers = singletonList(Qualifiers.PROJECT);
+    private Integer page;
+    private Integer pageSize;
+    private String query;
+    private String visibility;
+    private String analyzedBefore;
+    private boolean onProvisionedOnly = false;
+    private List<String> projects;
+    private List<String> projectIds;
+
+    public Builder setOrganization(@Nullable String organization) {
+      this.organization = organization;
+      return this;
+    }
+
+    public Builder setQualifiers(List<String> qualifiers) {
+      this.qualifiers = requireNonNull(qualifiers, "Qualifiers cannot be null");
+      return this;
+    }
+
+    public Builder setPage(@Nullable Integer page) {
+      this.page = page;
+      return this;
+    }
+
+    public Builder setPageSize(@Nullable Integer pageSize) {
+      this.pageSize = pageSize;
+      return this;
+    }
+
+    public Builder setQuery(@Nullable String query) {
+      this.query = query;
+      return this;
+    }
+
+    public Builder setVisibility(@Nullable String visibility) {
+      this.visibility = visibility;
+      return this;
+    }
+
+    public Builder setAnalyzedBefore(@Nullable String lastAnalysisBefore) {
+      this.analyzedBefore = lastAnalysisBefore;
+      return this;
+    }
+
+    public Builder setOnProvisionedOnly(boolean onProvisionedOnly) {
+      this.onProvisionedOnly = onProvisionedOnly;
+      return this;
+    }
+
+    public Builder setProjects(@Nullable List<String> projects) {
+      this.projects = projects;
+      return this;
+    }
+
+    public Builder setProjectIds(@Nullable List<String> projectIds) {
+      this.projectIds = projectIds;
+      return this;
+    }
+
+    public SearchRequest build() {
+      checkArgument(projects==null || !projects.isEmpty(), "Project key list must not be empty");
+      checkArgument(projectIds==null || !projectIds.isEmpty(), "Project id list must not be empty");
+      checkArgument(pageSize == null || pageSize <= MAX_PAGE_SIZE, "Page size must not be greater than %s", MAX_PAGE_SIZE);
+      return new SearchRequest(this);
+    }
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/project/SearchWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/project/SearchWsRequest.java
deleted file mode 100644 (file)
index 90544b3..0000000
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.project;
-
-import java.util.List;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-import org.sonar.api.resources.Qualifiers;
-
-import static com.google.common.base.Preconditions.checkArgument;
-import static java.util.Collections.singletonList;
-import static java.util.Objects.requireNonNull;
-import static org.sonarqube.ws.client.project.ProjectsWsParameters.MAX_PAGE_SIZE;
-
-public class SearchWsRequest {
-
-  private final String organization;
-  private final String query;
-  private final List<String> qualifiers;
-  private final String visibility;
-  private final Integer page;
-  private final Integer pageSize;
-  private final String analyzedBefore;
-  private final boolean onProvisionedOnly;
-  private final List<String> projects;
-  private final List<String> projectIds;
-
-  public SearchWsRequest(Builder builder) {
-    this.organization = builder.organization;
-    this.query = builder.query;
-    this.qualifiers = builder.qualifiers;
-    this.visibility = builder.visibility;
-    this.page = builder.page;
-    this.pageSize = builder.pageSize;
-    this.analyzedBefore = builder.analyzedBefore;
-    this.onProvisionedOnly = builder.onProvisionedOnly;
-    this.projects = builder.projects;
-    this.projectIds = builder.projectIds;
-  }
-
-  @CheckForNull
-  public String getOrganization() {
-    return organization;
-  }
-
-  public List<String> getQualifiers() {
-    return qualifiers;
-  }
-
-  @CheckForNull
-  public Integer getPage() {
-    return page;
-  }
-
-  @CheckForNull
-  public Integer getPageSize() {
-    return pageSize;
-  }
-
-  @CheckForNull
-  public String getQuery() {
-    return query;
-  }
-
-  @CheckForNull
-  public String getVisibility() {
-    return visibility;
-  }
-
-  @CheckForNull
-  public String getAnalyzedBefore() {
-    return analyzedBefore;
-  }
-
-  public boolean isOnProvisionedOnly() {
-    return onProvisionedOnly;
-  }
-
-  @CheckForNull
-  public List<String> getProjects() {
-    return projects;
-  }
-
-  @CheckForNull
-  public List<String> getProjectIds() {
-    return projectIds;
-  }
-
-  public static Builder builder() {
-    return new Builder();
-  }
-
-  public static class Builder {
-    private String organization;
-    private List<String> qualifiers = singletonList(Qualifiers.PROJECT);
-    private Integer page;
-    private Integer pageSize;
-    private String query;
-    private String visibility;
-    private String analyzedBefore;
-    private boolean onProvisionedOnly = false;
-    private List<String> projects;
-    private List<String> projectIds;
-
-    public Builder setOrganization(@Nullable String organization) {
-      this.organization = organization;
-      return this;
-    }
-
-    public Builder setQualifiers(List<String> qualifiers) {
-      this.qualifiers = requireNonNull(qualifiers, "Qualifiers cannot be null");
-      return this;
-    }
-
-    public Builder setPage(@Nullable Integer page) {
-      this.page = page;
-      return this;
-    }
-
-    public Builder setPageSize(@Nullable Integer pageSize) {
-      this.pageSize = pageSize;
-      return this;
-    }
-
-    public Builder setQuery(@Nullable String query) {
-      this.query = query;
-      return this;
-    }
-
-    public Builder setVisibility(@Nullable String visibility) {
-      this.visibility = visibility;
-      return this;
-    }
-
-    public Builder setAnalyzedBefore(@Nullable String lastAnalysisBefore) {
-      this.analyzedBefore = lastAnalysisBefore;
-      return this;
-    }
-
-    public Builder setOnProvisionedOnly(boolean onProvisionedOnly) {
-      this.onProvisionedOnly = onProvisionedOnly;
-      return this;
-    }
-
-    public Builder setProjects(@Nullable List<String> projects) {
-      this.projects = projects;
-      return this;
-    }
-
-    public Builder setProjectIds(@Nullable List<String> projectIds) {
-      this.projectIds = projectIds;
-      return this;
-    }
-
-    public SearchWsRequest build() {
-      checkArgument(projects==null || !projects.isEmpty(), "Project key list must not be empty");
-      checkArgument(projectIds==null || !projectIds.isEmpty(), "Project id list must not be empty");
-      checkArgument(pageSize == null || pageSize <= MAX_PAGE_SIZE, "Page size must not be greater than %s", MAX_PAGE_SIZE);
-      return new SearchWsRequest(this);
-    }
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/project/UpdateKeyRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/project/UpdateKeyRequest.java
new file mode 100644 (file)
index 0000000..0995a38
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.project;
+
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+import javax.annotation.concurrent.Immutable;
+
+import static com.google.common.base.Preconditions.checkArgument;
+
+@Immutable
+public class UpdateKeyRequest {
+  private final String id;
+  private final String key;
+  private final String newKey;
+
+  public UpdateKeyRequest(Builder builder) {
+    this.id = builder.id;
+    this.key = builder.key;
+    this.newKey = builder.newKey;
+  }
+
+  @CheckForNull
+  public String getId() {
+    return id;
+  }
+
+  @CheckForNull
+  public String getKey() {
+    return key;
+  }
+
+  public String getNewKey() {
+    return newKey;
+  }
+
+  public static Builder builder() {
+    return new Builder();
+  }
+
+  public static class Builder {
+    private String id;
+    private String key;
+    private String newKey;
+
+    private Builder() {
+      // enforce method constructor
+    }
+
+    public Builder setId(@Nullable String id) {
+      this.id = id;
+      return this;
+    }
+
+    public Builder setKey(@Nullable String key) {
+      this.key = key;
+      return this;
+    }
+
+    public Builder setNewKey(String newKey) {
+      this.newKey = newKey;
+      return this;
+    }
+
+    public UpdateKeyRequest build() {
+      checkArgument(newKey != null && !newKey.isEmpty(), "The new key must not be empty");
+      return new UpdateKeyRequest(this);
+    }
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/project/UpdateKeyWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/project/UpdateKeyWsRequest.java
deleted file mode 100644 (file)
index 206cb82..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.project;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-import javax.annotation.concurrent.Immutable;
-
-import static com.google.common.base.Preconditions.checkArgument;
-
-@Immutable
-public class UpdateKeyWsRequest {
-  private final String id;
-  private final String key;
-  private final String newKey;
-
-  public UpdateKeyWsRequest(Builder builder) {
-    this.id = builder.id;
-    this.key = builder.key;
-    this.newKey = builder.newKey;
-  }
-
-  @CheckForNull
-  public String getId() {
-    return id;
-  }
-
-  @CheckForNull
-  public String getKey() {
-    return key;
-  }
-
-  public String getNewKey() {
-    return newKey;
-  }
-
-  public static Builder builder() {
-    return new Builder();
-  }
-
-  public static class Builder {
-    private String id;
-    private String key;
-    private String newKey;
-
-    private Builder() {
-      // enforce method constructor
-    }
-
-    public Builder setId(@Nullable String id) {
-      this.id = id;
-      return this;
-    }
-
-    public Builder setKey(@Nullable String key) {
-      this.key = key;
-      return this;
-    }
-
-    public Builder setNewKey(String newKey) {
-      this.newKey = newKey;
-      return this;
-    }
-
-    public UpdateKeyWsRequest build() {
-      checkArgument(newKey != null && !newKey.isEmpty(), "The new key must not be empty");
-      return new UpdateKeyWsRequest(this);
-    }
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/ActivateRuleRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/ActivateRuleRequest.java
new file mode 100644 (file)
index 0000000..70499d8
--- /dev/null
@@ -0,0 +1,118 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.qualityprofile;
+
+import java.util.Optional;
+import javax.annotation.Nullable;
+import org.sonarqube.ws.Common.Severity;
+
+import static java.util.Objects.requireNonNull;
+
+public class ActivateRuleRequest {
+  private final Optional<String> params;
+  private final String key;
+  private final Optional<Boolean> reset;
+  private final String ruleKey;
+  private final Optional<Severity> severity;
+  private final Optional<String> organization;
+
+  private ActivateRuleRequest(Builder builder) {
+    organization = requireNonNull(builder.organization);
+    params = requireNonNull(builder.params);
+    key = requireNonNull(builder.key);
+    reset = requireNonNull(builder.reset);
+    ruleKey = requireNonNull(builder.ruleKey);
+    severity = requireNonNull(builder.severity);
+  }
+
+  public static ActivateRuleRequest.Builder builder() {
+    return new Builder();
+  }
+
+  public Optional<String> getParams() {
+    return params;
+  }
+
+  public String getKey() {
+    return key;
+  }
+
+  public Optional<Boolean> getReset() {
+    return reset;
+  }
+
+  public String getRuleKey() {
+    return ruleKey;
+  }
+
+  public Optional<Severity> getSeverity() {
+    return severity;
+  }
+
+  public Optional<String> getOrganization() {
+    return organization;
+  }
+
+  public static class Builder {
+    private Optional<String> organization = Optional.empty();
+    private Optional<String> params = Optional.empty();
+    private String key;
+    private Optional<Boolean> reset = Optional.empty();
+    private String ruleKey;
+    private Optional<Severity> severity = Optional.empty();
+
+    private Builder() {
+    }
+
+    public Builder setOrganization(@Nullable String organization) {
+      this.organization = Optional.ofNullable(organization);
+      return this;
+    }
+
+    public Builder setParams(@Nullable String params) {
+      this.params = Optional.ofNullable(params);
+      return this;
+    }
+
+    public Builder setKey(String key) {
+      this.key = key;
+      return this;
+    }
+
+    public Builder setReset(@Nullable Boolean reset) {
+      this.reset = Optional.ofNullable(reset);
+      return this;
+    }
+
+    public Builder setRuleKey(String ruleKey) {
+      this.ruleKey = ruleKey;
+      return this;
+    }
+
+    public Builder setSeverity(@Nullable Severity severity) {
+      this.severity = Optional.ofNullable(severity);
+      return this;
+    }
+
+    public ActivateRuleRequest build() {
+      return new ActivateRuleRequest(this);
+    }
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/ActivateRuleWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/ActivateRuleWsRequest.java
deleted file mode 100644 (file)
index e98b2b3..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.qualityprofile;
-
-import java.util.Optional;
-import javax.annotation.Nullable;
-import org.sonarqube.ws.Common.Severity;
-
-import static java.util.Objects.requireNonNull;
-
-public class ActivateRuleWsRequest {
-  private final Optional<String> params;
-  private final String key;
-  private final Optional<Boolean> reset;
-  private final String ruleKey;
-  private final Optional<Severity> severity;
-  private final Optional<String> organization;
-
-  private ActivateRuleWsRequest(Builder builder) {
-    organization = requireNonNull(builder.organization);
-    params = requireNonNull(builder.params);
-    key = requireNonNull(builder.key);
-    reset = requireNonNull(builder.reset);
-    ruleKey = requireNonNull(builder.ruleKey);
-    severity = requireNonNull(builder.severity);
-  }
-
-  public static ActivateRuleWsRequest.Builder builder() {
-    return new Builder();
-  }
-
-  public Optional<String> getParams() {
-    return params;
-  }
-
-  public String getKey() {
-    return key;
-  }
-
-  public Optional<Boolean> getReset() {
-    return reset;
-  }
-
-  public String getRuleKey() {
-    return ruleKey;
-  }
-
-  public Optional<Severity> getSeverity() {
-    return severity;
-  }
-
-  public Optional<String> getOrganization() {
-    return organization;
-  }
-
-  public static class Builder {
-    private Optional<String> organization = Optional.empty();
-    private Optional<String> params = Optional.empty();
-    private String key;
-    private Optional<Boolean> reset = Optional.empty();
-    private String ruleKey;
-    private Optional<Severity> severity = Optional.empty();
-
-    private Builder() {
-    }
-
-    public Builder setOrganization(@Nullable String organization) {
-      this.organization = Optional.ofNullable(organization);
-      return this;
-    }
-
-    public Builder setParams(@Nullable String params) {
-      this.params = Optional.ofNullable(params);
-      return this;
-    }
-
-    public Builder setKey(String key) {
-      this.key = key;
-      return this;
-    }
-
-    public Builder setReset(@Nullable Boolean reset) {
-      this.reset = Optional.ofNullable(reset);
-      return this;
-    }
-
-    public Builder setRuleKey(String ruleKey) {
-      this.ruleKey = ruleKey;
-      return this;
-    }
-
-    public Builder setSeverity(@Nullable Severity severity) {
-      this.severity = Optional.ofNullable(severity);
-      return this;
-    }
-
-    public ActivateRuleWsRequest build() {
-      return new ActivateRuleWsRequest(this);
-    }
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/ChangelogRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/ChangelogRequest.java
new file mode 100644 (file)
index 0000000..5c74416
--- /dev/null
@@ -0,0 +1,126 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.qualityprofile;
+
+public class ChangelogRequest {
+
+  private final String language;
+  private final String organization;
+  private final Integer p;
+  private final Integer ps;
+  private final String qualityProfile;
+  private final String since;
+  private final String to;
+
+  private ChangelogRequest(Builder builder) {
+    this.language = builder.language;
+    this.organization = builder.organization;
+    this.p = builder.p;
+    this.ps = builder.ps;
+    this.qualityProfile = builder.qualityProfile;
+    this.since = builder.since;
+    this.to = builder.to;
+  }
+
+  public String getLanguage() {
+    return language;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  public Integer getP() {
+    return p;
+  }
+
+  public Integer getPs() {
+    return ps;
+  }
+
+  public String getQualityProfile() {
+    return qualityProfile;
+  }
+
+  public String getSince() {
+    return since;
+  }
+
+  public String getTo() {
+    return to;
+  }
+
+  public static Builder builder() {
+    return new Builder();
+  }
+
+  public static class Builder {
+    private String language;
+    private String organization;
+    private Integer p;
+    private Integer ps;
+    private String qualityProfile;
+    private String since;
+    private String to;
+
+    private Builder() {
+    }
+
+    public Builder setLanguage(String language) {
+      this.language = language;
+      return this;
+    }
+
+    public Builder setOrganization(String organization) {
+      this.organization = organization;
+      return this;
+    }
+
+    public Builder setP(Integer p) {
+      this.p = p;
+      return this;
+    }
+
+    public Builder setPs(Integer ps) {
+      this.ps = ps;
+      return this;
+    }
+
+    public Builder setQualityProfile(String qualityProfile) {
+      this.qualityProfile = qualityProfile;
+      return this;
+    }
+
+    public Builder setSince(String since) {
+      this.since = since;
+      return this;
+    }
+
+    public Builder setTo(String to) {
+      this.to = to;
+      return this;
+    }
+
+    public ChangelogRequest build() {
+      return new ChangelogRequest(this);
+    }
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/ChangelogWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/ChangelogWsRequest.java
deleted file mode 100644 (file)
index d470246..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.qualityprofile;
-
-public class ChangelogWsRequest {
-
-  private final String language;
-  private final String organization;
-  private final Integer p;
-  private final Integer ps;
-  private final String qualityProfile;
-  private final String since;
-  private final String to;
-
-  private ChangelogWsRequest(Builder builder) {
-    this.language = builder.language;
-    this.organization = builder.organization;
-    this.p = builder.p;
-    this.ps = builder.ps;
-    this.qualityProfile = builder.qualityProfile;
-    this.since = builder.since;
-    this.to = builder.to;
-  }
-
-  public String getLanguage() {
-    return language;
-  }
-
-  public String getOrganization() {
-    return organization;
-  }
-
-  public Integer getP() {
-    return p;
-  }
-
-  public Integer getPs() {
-    return ps;
-  }
-
-  public String getQualityProfile() {
-    return qualityProfile;
-  }
-
-  public String getSince() {
-    return since;
-  }
-
-  public String getTo() {
-    return to;
-  }
-
-  public static Builder builder() {
-    return new Builder();
-  }
-
-  public static class Builder {
-    private String language;
-    private String organization;
-    private Integer p;
-    private Integer ps;
-    private String qualityProfile;
-    private String since;
-    private String to;
-
-    private Builder() {
-    }
-
-    public Builder setLanguage(String language) {
-      this.language = language;
-      return this;
-    }
-
-    public Builder setOrganization(String organization) {
-      this.organization = organization;
-      return this;
-    }
-
-    public Builder setP(Integer p) {
-      this.p = p;
-      return this;
-    }
-
-    public Builder setPs(Integer ps) {
-      this.ps = ps;
-      return this;
-    }
-
-    public Builder setQualityProfile(String qualityProfile) {
-      this.qualityProfile = qualityProfile;
-      return this;
-    }
-
-    public Builder setSince(String since) {
-      this.since = since;
-      return this;
-    }
-
-    public Builder setTo(String to) {
-      this.to = to;
-      return this;
-    }
-
-    public ChangelogWsRequest build() {
-      return new ChangelogWsRequest(this);
-    }
-  }
-}
index 30d6141fa5d76b902ccefdf506c6a974d1a2ca25..45451c61de2e62b99a88c5ccc456b96ca3f23505 100644 (file)
@@ -82,7 +82,7 @@ public class QualityProfilesService extends BaseService {
     super(wsConnector, CONTROLLER_QUALITY_PROFILES);
   }
 
-  public void activateRule(ActivateRuleWsRequest request) {
+  public void activateRule(ActivateRuleRequest request) {
     PostRequest httpRequest = new PostRequest(path(ACTION_ACTIVATE_RULE));
     httpRequest.setParam(PARAM_ORGANIZATION, request.getOrganization().orElse(null));
     httpRequest.setParam(PARAM_PARAMS, request.getParams().orElse(null));
@@ -100,14 +100,14 @@ public class QualityProfilesService extends BaseService {
     call(httpRequest);
   }
 
-  public void restoreProfile(RestoreWsRequest request) {
+  public void restoreProfile(RestoreRequest request) {
     PostRequest httpRequest = new PostRequest(path(ACTION_RESTORE));
     httpRequest.setParam(PARAM_ORGANIZATION, request.getOrganization().orElse(null));
     httpRequest.setPart(PARAM_BACKUP, new PostRequest.Part(MediaTypes.XML, request.getBackup()));
     call(httpRequest);
   }
 
-  public SearchWsResponse search(SearchWsRequest request) {
+  public SearchWsResponse search(SearchRequest request) {
     return call(
       new GetRequest(path(ACTION_SEARCH))
         .setParam(PARAM_DEFAULTS, request.getDefaults())
@@ -243,7 +243,7 @@ public class QualityProfilesService extends BaseService {
       SearchGroupsResponse.parser());
   }
 
-  public String changelog(ChangelogWsRequest request) {
+  public String changelog(ChangelogRequest request) {
     PostRequest postRequest = new PostRequest(path("changelog"))
       .setParam("language", request.getLanguage())
       .setParam("organization", request.getOrganization())
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/RestoreRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/RestoreRequest.java
new file mode 100644 (file)
index 0000000..c4cbdae
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.qualityprofile;
+
+import java.io.File;
+import java.util.Optional;
+import javax.annotation.Nullable;
+
+import static java.util.Objects.requireNonNull;
+
+public class RestoreRequest {
+
+  private final File backup;
+  private final Optional<String> organization;
+
+  private RestoreRequest(Builder builder) {
+    backup = requireNonNull(builder.backup);
+    organization = requireNonNull(builder.organization);
+  }
+
+  public File getBackup() {
+    return backup;
+  }
+
+  public Optional<String> getOrganization() {
+    return organization;
+  }
+
+  public static Builder builder() {
+    return new Builder();
+  }
+
+  public static class Builder {
+    private File backup;
+    private Optional<String> organization = Optional.empty();
+
+    public Builder setBackup(File backup) {
+      this.backup = backup;
+      return this;
+    }
+
+    public Builder setOrganization(@Nullable String organization) {
+      this.organization = Optional.ofNullable(organization);
+      return this;
+    }
+
+    public RestoreRequest build() {
+      return new RestoreRequest(this);
+    }
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/RestoreWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/RestoreWsRequest.java
deleted file mode 100644 (file)
index 908115d..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.qualityprofile;
-
-import java.io.File;
-import java.util.Optional;
-import javax.annotation.Nullable;
-
-import static java.util.Objects.requireNonNull;
-
-public class RestoreWsRequest {
-
-  private final File backup;
-  private final Optional<String> organization;
-
-  private RestoreWsRequest(Builder builder) {
-    backup = requireNonNull(builder.backup);
-    organization = requireNonNull(builder.organization);
-  }
-
-  public File getBackup() {
-    return backup;
-  }
-
-  public Optional<String> getOrganization() {
-    return organization;
-  }
-
-  public static Builder builder() {
-    return new Builder();
-  }
-
-  public static class Builder {
-    private File backup;
-    private Optional<String> organization = Optional.empty();
-
-    public Builder setBackup(File backup) {
-      this.backup = backup;
-      return this;
-    }
-
-    public Builder setOrganization(@Nullable String organization) {
-      this.organization = Optional.ofNullable(organization);
-      return this;
-    }
-
-    public RestoreWsRequest build() {
-      return new RestoreWsRequest(this);
-    }
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/SearchRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/SearchRequest.java
new file mode 100644 (file)
index 0000000..1df9c05
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.qualityprofile;
+
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+
+public class SearchRequest {
+  private String organizationKey;
+  private boolean defaults;
+  private String language;
+  private String qualityProfile;
+  private String projectKey;
+
+  public String getOrganizationKey() {
+    return organizationKey;
+  }
+
+  public SearchRequest setOrganizationKey(String organizationKey) {
+    this.organizationKey = organizationKey;
+    return this;
+  }
+
+  public boolean getDefaults() {
+    return defaults;
+  }
+
+  public SearchRequest setDefaults(boolean defaults) {
+    this.defaults = defaults;
+    return this;
+  }
+
+  @CheckForNull
+  public String getLanguage() {
+    return language;
+  }
+
+  public SearchRequest setLanguage(@Nullable String language) {
+    this.language = language;
+    return this;
+  }
+
+  @CheckForNull
+  public String getQualityProfile() {
+    return qualityProfile;
+  }
+
+  public SearchRequest setQualityProfile(@Nullable String qualityProfile) {
+    this.qualityProfile = qualityProfile;
+    return this;
+  }
+
+  @CheckForNull
+  public String getProjectKey() {
+    return projectKey;
+  }
+
+  public SearchRequest setProjectKey(@Nullable String projectKey) {
+    this.projectKey = projectKey;
+    return this;
+  }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/SearchWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/SearchWsRequest.java
deleted file mode 100644 (file)
index 7cf4b96..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.qualityprofile;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
-public class SearchWsRequest {
-  private String organizationKey;
-  private boolean defaults;
-  private String language;
-  private String qualityProfile;
-  private String projectKey;
-
-  public String getOrganizationKey() {
-    return organizationKey;
-  }
-
-  public SearchWsRequest setOrganizationKey(String organizationKey) {
-    this.organizationKey = organizationKey;
-    return this;
-  }
-
-  public boolean getDefaults() {
-    return defaults;
-  }
-
-  public SearchWsRequest setDefaults(boolean defaults) {
-    this.defaults = defaults;
-    return this;
-  }
-
-  @CheckForNull
-  public String getLanguage() {
-    return language;
-  }
-
-  public SearchWsRequest setLanguage(@Nullable String language) {
-    this.language = language;
-    return this;
-  }
-
-  @CheckForNull
-  public String getQualityProfile() {
-    return qualityProfile;
-  }
-
-  public SearchWsRequest setQualityProfile(@Nullable String qualityProfile) {
-    this.qualityProfile = qualityProfile;
-    return this;
-  }
-
-  @CheckForNull
-  public String getProjectKey() {
-    return projectKey;
-  }
-
-  public SearchWsRequest setProjectKey(@Nullable String projectKey) {
-    this.projectKey = projectKey;
-    return this;
-  }
-}
index 5e6f3fa211abaa966832fdeed7133019839f4dac..86f01cbc3704a7980f9cb1e9f5ddeb7f85cbc8da 100644 (file)
@@ -93,7 +93,7 @@ public class ComponentsServiceTest {
   public void show() {
     String key = randomAlphanumeric(20);
     String id = randomAlphanumeric(20);
-    underTest.show(new ShowWsRequest()
+    underTest.show(new ShowRequest()
       .setKey(key)
       .setId(id)
       .setBranch("my_branch"));
@@ -109,9 +109,9 @@ public class ComponentsServiceTest {
 
   @Test
   public void suggestions() {
-    SuggestionsWsRequest.More more = SuggestionsWsRequest.More.BRC;
+    SuggestionsRequest.More more = SuggestionsRequest.More.BRC;
     String s = randomAlphanumeric(20);
-    underTest.suggestions(SuggestionsWsRequest.builder()
+    underTest.suggestions(SuggestionsRequest.builder()
       .setMore(more)
       .setS(s)
       .setRecentlyBrowsed(asList("key-1", "key-2"))
@@ -134,7 +134,7 @@ public class ComponentsServiceTest {
     int page = 17;
     int pageSize = 39;
     String textQuery = randomAlphanumeric(20);
-    underTest.search(new SearchWsRequest()
+    underTest.search(new SearchRequest()
       .setOrganization(organization)
       .setQualifiers(asList("q1", "q2"))
       .setPage(page)
@@ -160,7 +160,7 @@ public class ComponentsServiceTest {
     int page = 17;
     int pageSize = 39;
     String query = randomAlphanumeric(20);
-    underTest.tree(new TreeWsRequest()
+    underTest.tree(new TreeRequest()
       .setBaseComponentId(componentId)
       .setBaseComponentKey(componentKey)
       .setComponent(componentKey)
diff --git a/sonar-ws/src/test/java/org/sonarqube/ws/client/issue/SearchRequestTest.java b/sonar-ws/src/test/java/org/sonarqube/ws/client/issue/SearchRequestTest.java
new file mode 100644 (file)
index 0000000..b422837
--- /dev/null
@@ -0,0 +1,588 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.issue;
+
+import com.google.common.collect.ImmutableList;
+import org.junit.Test;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+public class SearchRequestTest {
+  private static final ImmutableList<String> LIST_OF_STRINGS = ImmutableList.of("A", "B");
+  private static final String SOME_STRING = "some string";
+  public static final int SOME_INT = 894352;
+
+  private SearchRequest underTest = new SearchRequest();
+
+  @Test
+  public void getActionPlans_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
+    assertThat(underTest.getActionPlans()).isNull();
+  }
+
+  @Test
+  public void setActionPlans_accepts_null() {
+    underTest.setActionPlans(null);
+  }
+
+  @Test
+  public void getActionPlans_returns_object_from_setActionPlans() {
+    underTest.setActionPlans(LIST_OF_STRINGS);
+
+    assertThat(underTest.getActionPlans()).isSameAs(LIST_OF_STRINGS);
+  }
+
+  @Test
+  public void getAdditionalFields_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
+    assertThat(underTest.getAdditionalFields()).isNull();
+  }
+
+  @Test
+  public void setAdditionalFields_accepts_null() {
+    underTest.setAdditionalFields(null);
+  }
+
+  @Test
+  public void getAdditionalFields_returns_object_from_setAdditionalFields() {
+    underTest.setAdditionalFields(LIST_OF_STRINGS);
+    assertThat(underTest.getAdditionalFields()).isSameAs(LIST_OF_STRINGS);
+  }
+
+  @Test
+  public void getAssignees_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
+    assertThat(underTest.getAssignees()).isNull();
+  }
+
+  @Test
+  public void setAssignees_accepts_null() {
+    underTest.setAssignees(null);
+  }
+
+  @Test
+  public void getAssignees_returns_object_from_setAssignees() {
+    underTest.setAssignees(LIST_OF_STRINGS);
+    assertThat(underTest.getAssignees()).isSameAs(LIST_OF_STRINGS);
+  }
+
+  @Test
+  public void getAuthors_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
+    assertThat(underTest.getAuthors()).isNull();
+  }
+
+  @Test
+  public void setAuthors_accepts_null() {
+    underTest.setAuthors(null);
+  }
+
+  @Test
+  public void getAuthors_returns_object_from_setAuthors() {
+    underTest.setAuthors(LIST_OF_STRINGS);
+    assertThat(underTest.getAuthors()).isSameAs(LIST_OF_STRINGS);
+  }
+
+  @Test
+  public void getComponentKeys_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
+    assertThat(underTest.getComponentKeys()).isNull();
+  }
+
+  @Test
+  public void setComponentKeys_accepts_null() {
+    underTest.setComponentKeys(null);
+  }
+
+  @Test
+  public void getComponentKeys_returns_object_from_setComponentKeys() {
+    underTest.setComponentKeys(LIST_OF_STRINGS);
+    assertThat(underTest.getComponentKeys()).isSameAs(LIST_OF_STRINGS);
+  }
+
+  @Test
+  public void getComponentRootUuids_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
+    assertThat(underTest.getComponentRootUuids()).isNull();
+  }
+
+  @Test
+  public void setComponentRootUuids_accepts_null() {
+    underTest.setComponentRootUuids(null);
+  }
+
+  @Test
+  public void getComponentRootUuids_returns_object_from_setComponentRootUuids() {
+    underTest.setComponentRootUuids(LIST_OF_STRINGS);
+    assertThat(underTest.getComponentRootUuids()).isSameAs(LIST_OF_STRINGS);
+  }
+
+  @Test
+  public void getComponentRoots_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
+    assertThat(underTest.getComponentRoots()).isNull();
+  }
+
+  @Test
+  public void setComponentRoots_accepts_null() {
+    underTest.setComponentRoots(null);
+  }
+
+  @Test
+  public void getComponentRoots_returns_object_from_setComponentRoots() {
+    underTest.setComponentRoots(LIST_OF_STRINGS);
+    assertThat(underTest.getComponentRoots()).isSameAs(LIST_OF_STRINGS);
+  }
+
+  @Test
+  public void getComponentUuids_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
+    assertThat(underTest.getComponentUuids()).isNull();
+  }
+
+  @Test
+  public void setComponentUuids_accepts_null() {
+    underTest.setComponentUuids(null);
+  }
+
+  @Test
+  public void getComponentUuids_returns_object_from_setComponentUuids() {
+    underTest.setComponentUuids(LIST_OF_STRINGS);
+    assertThat(underTest.getComponentUuids()).isSameAs(LIST_OF_STRINGS);
+  }
+
+  @Test
+  public void getComponents_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
+    assertThat(underTest.getComponents()).isNull();
+  }
+
+  @Test
+  public void setComponents_accepts_null() {
+    underTest.setComponents(null);
+  }
+
+  @Test
+  public void getComponents_returns_object_from_setComponents() {
+    underTest.setComponents(LIST_OF_STRINGS);
+    assertThat(underTest.getComponents()).isSameAs(LIST_OF_STRINGS);
+  }
+
+  @Test
+  public void getDirectories_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
+    assertThat(underTest.getDirectories()).isNull();
+  }
+
+  @Test
+  public void setDirectories_accepts_null() {
+    underTest.setDirectories(null);
+  }
+
+  @Test
+  public void getDirectories_returns_object_from_setDirectories() {
+    underTest.setDirectories(LIST_OF_STRINGS);
+    assertThat(underTest.getDirectories()).isSameAs(LIST_OF_STRINGS);
+  }
+
+  @Test
+  public void getFacets_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
+    assertThat(underTest.getFacets()).isNull();
+  }
+
+  @Test
+  public void setFacets_accepts_null() {
+    underTest.setFacets(null);
+  }
+
+  @Test
+  public void getFacets_returns_object_from_setFacets() {
+    underTest.setFacets(LIST_OF_STRINGS);
+    assertThat(underTest.getFacets()).isSameAs(LIST_OF_STRINGS);
+  }
+
+  @Test
+  public void getFileUuids_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
+    assertThat(underTest.getFileUuids()).isNull();
+  }
+
+  @Test
+  public void setFileUuids_accepts_null() {
+    underTest.setFileUuids(null);
+  }
+
+  @Test
+  public void getFileUuids_returns_object_from_setFileUuids() {
+    underTest.setFileUuids(LIST_OF_STRINGS);
+    assertThat(underTest.getFileUuids()).isSameAs(LIST_OF_STRINGS);
+  }
+
+  @Test
+  public void getIssues_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
+    assertThat(underTest.getIssues()).isNull();
+  }
+
+  @Test
+  public void setIssues_accepts_null() {
+    underTest.setIssues(null);
+  }
+
+  @Test
+  public void getIssues_returns_object_from_setIssues() {
+    underTest.setIssues(LIST_OF_STRINGS);
+    assertThat(underTest.getIssues()).isSameAs(LIST_OF_STRINGS);
+  }
+
+  @Test
+  public void getLanguages_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
+    assertThat(underTest.getLanguages()).isNull();
+  }
+
+  @Test
+  public void setLanguages_accepts_null() {
+    underTest.setLanguages(null);
+  }
+
+  @Test
+  public void getLanguages_returns_object_from_setLanguages() {
+    underTest.setLanguages(LIST_OF_STRINGS);
+    assertThat(underTest.getLanguages()).isSameAs(LIST_OF_STRINGS);
+  }
+
+  @Test
+  public void getModuleUuids_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
+    assertThat(underTest.getModuleUuids()).isNull();
+  }
+
+  @Test
+  public void setModuleUuids_accepts_null() {
+    underTest.setModuleUuids(null);
+  }
+
+  @Test
+  public void getModuleUuids_returns_object_from_setModuleUuids() {
+    underTest.setModuleUuids(LIST_OF_STRINGS);
+    assertThat(underTest.getModuleUuids()).isSameAs(LIST_OF_STRINGS);
+  }
+
+  @Test
+  public void getProjectKeys_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
+    assertThat(underTest.getProjectKeys()).isNull();
+  }
+
+  @Test
+  public void setProjectKeys_accepts_null() {
+    underTest.setProjectKeys(null);
+  }
+
+  @Test
+  public void getProjectKeys_returns_object_from_setProjectKeys() {
+    underTest.setProjectKeys(LIST_OF_STRINGS);
+    assertThat(underTest.getProjectKeys()).isSameAs(LIST_OF_STRINGS);
+  }
+
+  @Test
+  public void getProjectUuids_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
+    assertThat(underTest.getProjectUuids()).isNull();
+  }
+
+  @Test
+  public void setProjectUuids_accepts_null() {
+    underTest.setProjectUuids(null);
+  }
+
+  @Test
+  public void getProjectUuids_returns_object_from_setProjectUuids() {
+    underTest.setProjectUuids(LIST_OF_STRINGS);
+    assertThat(underTest.getProjectUuids()).isSameAs(LIST_OF_STRINGS);
+  }
+
+  @Test
+  public void getProjects_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
+    assertThat(underTest.getProjects()).isNull();
+  }
+
+  @Test
+  public void setProjects_accepts_null() {
+    underTest.setProjects(null);
+  }
+
+  @Test
+  public void getProjects_returns_object_from_setProjects() {
+    underTest.setProjects(LIST_OF_STRINGS);
+    assertThat(underTest.getProjects()).isSameAs(LIST_OF_STRINGS);
+  }
+
+  @Test
+  public void getResolutions_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
+    assertThat(underTest.getResolutions()).isNull();
+  }
+
+  @Test
+  public void setResolutions_accepts_null() {
+    underTest.setResolutions(null);
+  }
+
+  @Test
+  public void getResolutions_returns_object_from_setResolutions() {
+    underTest.setResolutions(LIST_OF_STRINGS);
+    assertThat(underTest.getResolutions()).isSameAs(LIST_OF_STRINGS);
+  }
+
+  @Test
+  public void getRules_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
+    assertThat(underTest.getRules()).isNull();
+  }
+
+  @Test
+  public void setRules_accepts_null() {
+    underTest.setRules(null);
+  }
+
+  @Test
+  public void getRules_returns_object_from_setRules() {
+    underTest.setRules(LIST_OF_STRINGS);
+    assertThat(underTest.getRules()).isSameAs(LIST_OF_STRINGS);
+  }
+
+  @Test
+  public void getSeverities_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
+    assertThat(underTest.getSeverities()).isNull();
+  }
+
+  @Test
+  public void setSeverities_accepts_null() {
+    underTest.setSeverities(null);
+  }
+
+  @Test
+  public void getSeverities_returns_object_from_setSeverities() {
+    underTest.setSeverities(LIST_OF_STRINGS);
+    assertThat(underTest.getSeverities()).isSameAs(LIST_OF_STRINGS);
+  }
+
+  @Test
+  public void getStatuses_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
+    assertThat(underTest.getStatuses()).isNull();
+  }
+
+  @Test
+  public void setStatuses_accepts_null() {
+    underTest.setStatuses(null);
+  }
+
+  @Test
+  public void getStatuses_returns_object_from_setStatuses() {
+    underTest.setStatuses(LIST_OF_STRINGS);
+    assertThat(underTest.getStatuses()).isSameAs(LIST_OF_STRINGS);
+  }
+
+  @Test
+  public void getTags_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
+    assertThat(underTest.getTags()).isNull();
+  }
+
+  @Test
+  public void setTags_accepts_null() {
+    underTest.setTags(null);
+  }
+
+  @Test
+  public void getTags_returns_object_from_setTags() {
+    underTest.setTags(LIST_OF_STRINGS);
+    assertThat(underTest.getTags()).isSameAs(LIST_OF_STRINGS);
+  }
+
+  @Test
+  public void getAsc_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
+    assertThat(underTest.getAsc()).isNull();
+  }
+
+  @Test
+  public void getAsc_returns_boolean_from_setTags() {
+    underTest.setAsc(true);
+    assertThat(underTest.getAsc()).isTrue();
+    underTest.setAsc(false);
+    assertThat(underTest.getAsc()).isFalse();
+  }
+
+  @Test
+  public void getAssigned_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
+    assertThat(underTest.getAssigned()).isNull();
+  }
+
+  @Test
+  public void setAssigned_accepts_null() {
+    underTest.setAssigned(null);
+  }
+
+  @Test
+  public void getAssigned_returns_boolean_from_setTags() {
+    underTest.setAssigned(true);
+    assertThat(underTest.getAssigned()).isTrue();
+    underTest.setAssigned(false);
+    assertThat(underTest.getAssigned()).isFalse();
+  }
+
+  @Test
+  public void getOnComponentOnly_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
+    assertThat(underTest.getOnComponentOnly()).isNull();
+  }
+
+  @Test
+  public void setOnComponentOnly_accepts_null() {
+    underTest.setOnComponentOnly(null);
+  }
+
+  @Test
+  public void getOnComponentOnly_returns_boolean_from_setOnComponentOnly() {
+    underTest.setOnComponentOnly(true);
+    assertThat(underTest.getOnComponentOnly()).isTrue();
+    underTest.setOnComponentOnly(false);
+    assertThat(underTest.getOnComponentOnly()).isFalse();
+  }
+
+  @Test
+  public void getResolved_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
+    assertThat(underTest.getResolved()).isNull();
+  }
+
+  @Test
+  public void setResolved_accepts_null() {
+    underTest.setResolved(null);
+  }
+
+  @Test
+  public void getResolved_returns_boolean_from_setResolved() {
+    underTest.setResolved(true);
+    assertThat(underTest.getResolved()).isTrue();
+    underTest.setResolved(false);
+    assertThat(underTest.getResolved()).isFalse();
+  }
+
+  @Test
+  public void getCreatedAfter_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
+    assertThat(underTest.getCreatedAfter()).isNull();
+  }
+
+  @Test
+  public void setCreatedAfter_accepts_null() {
+    underTest.setCreatedAfter(null);
+  }
+
+  @Test
+  public void getCreatedAfter_returns_object_from_setCreatedAfter() {
+    underTest.setCreatedAfter(SOME_STRING);
+    assertThat(underTest.getCreatedAfter()).isEqualTo(SOME_STRING);
+  }
+
+  @Test
+  public void getCreatedAt_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
+    assertThat(underTest.getCreatedAt()).isNull();
+  }
+
+  @Test
+  public void setCreatedAt_accepts_null() {
+    underTest.setCreatedAt(null);
+  }
+
+  @Test
+  public void getCreatedAt_returns_object_from_setCreatedAt() {
+    underTest.setCreatedAt(SOME_STRING);
+    assertThat(underTest.getCreatedAt()).isEqualTo(SOME_STRING);
+  }
+
+  @Test
+  public void getCreatedBefore_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
+    assertThat(underTest.getCreatedBefore()).isNull();
+  }
+
+  @Test
+  public void setCreatedBefore_accepts_null() {
+    underTest.setCreatedBefore(null);
+  }
+
+  @Test
+  public void getCreatedBefore_returns_object_from_setCreatedBefore() {
+    underTest.setCreatedBefore(SOME_STRING);
+    assertThat(underTest.getCreatedBefore()).isEqualTo(SOME_STRING);
+  }
+
+  @Test
+  public void getCreatedInLast_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
+    assertThat(underTest.getCreatedInLast()).isNull();
+  }
+
+  @Test
+  public void setCreatedInLast_accepts_null() {
+    underTest.setCreatedInLast(null);
+  }
+
+  @Test
+  public void getCreatedInLast_returns_object_from_setCreatedInLast() {
+    underTest.setCreatedInLast(SOME_STRING);
+    assertThat(underTest.getCreatedInLast()).isEqualTo(SOME_STRING);
+  }
+
+  @Test
+  public void getFacetMode_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
+    assertThat(underTest.getFacetMode()).isNull();
+  }
+
+  @Test
+  public void setFacetMode_accepts_null() {
+    underTest.setFacetMode(null);
+  }
+
+  @Test
+  public void getFacetMode_returns_object_from_setFacetMode() {
+    underTest.setFacetMode(SOME_STRING);
+    assertThat(underTest.getFacetMode()).isEqualTo(SOME_STRING);
+  }
+
+  @Test
+  public void getSort_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
+    assertThat(underTest.getSort()).isNull();
+  }
+
+  @Test
+  public void setSort_accepts_null() {
+    underTest.setSort(null);
+  }
+
+  @Test
+  public void getSort_returns_object_from_setSort() {
+    underTest.setSort(SOME_STRING);
+    assertThat(underTest.getSort()).isEqualTo(SOME_STRING);
+  }
+
+  @Test
+  public void getPage_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
+    assertThat(underTest.getPage()).isNull();
+  }
+
+  @Test
+  public void getPage_returns_object_from_setPage() {
+    underTest.setPage(SOME_INT);
+    assertThat(underTest.getPage()).isEqualTo(SOME_INT);
+  }
+
+  @Test
+  public void getPageSize_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
+    assertThat(underTest.getPageSize()).isNull();
+  }
+
+  @Test
+  public void getPageSize_returns_object_from_setPageSize() {
+    underTest.setPageSize(SOME_INT);
+    assertThat(underTest.getPageSize()).isEqualTo(SOME_INT);
+  }
+
+}
diff --git a/sonar-ws/src/test/java/org/sonarqube/ws/client/issue/SearchWsRequestTest.java b/sonar-ws/src/test/java/org/sonarqube/ws/client/issue/SearchWsRequestTest.java
deleted file mode 100644 (file)
index 2d05fda..0000000
+++ /dev/null
@@ -1,588 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.issue;
-
-import com.google.common.collect.ImmutableList;
-import org.junit.Test;
-
-import static org.assertj.core.api.Assertions.assertThat;
-
-public class SearchWsRequestTest {
-  private static final ImmutableList<String> LIST_OF_STRINGS = ImmutableList.of("A", "B");
-  private static final String SOME_STRING = "some string";
-  public static final int SOME_INT = 894352;
-
-  private SearchWsRequest underTest = new SearchWsRequest();
-
-  @Test
-  public void getActionPlans_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
-    assertThat(underTest.getActionPlans()).isNull();
-  }
-
-  @Test
-  public void setActionPlans_accepts_null() {
-    underTest.setActionPlans(null);
-  }
-
-  @Test
-  public void getActionPlans_returns_object_from_setActionPlans() {
-    underTest.setActionPlans(LIST_OF_STRINGS);
-
-    assertThat(underTest.getActionPlans()).isSameAs(LIST_OF_STRINGS);
-  }
-
-  @Test
-  public void getAdditionalFields_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
-    assertThat(underTest.getAdditionalFields()).isNull();
-  }
-
-  @Test
-  public void setAdditionalFields_accepts_null() {
-    underTest.setAdditionalFields(null);
-  }
-
-  @Test
-  public void getAdditionalFields_returns_object_from_setAdditionalFields() {
-    underTest.setAdditionalFields(LIST_OF_STRINGS);
-    assertThat(underTest.getAdditionalFields()).isSameAs(LIST_OF_STRINGS);
-  }
-
-  @Test
-  public void getAssignees_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
-    assertThat(underTest.getAssignees()).isNull();
-  }
-
-  @Test
-  public void setAssignees_accepts_null() {
-    underTest.setAssignees(null);
-  }
-
-  @Test
-  public void getAssignees_returns_object_from_setAssignees() {
-    underTest.setAssignees(LIST_OF_STRINGS);
-    assertThat(underTest.getAssignees()).isSameAs(LIST_OF_STRINGS);
-  }
-
-  @Test
-  public void getAuthors_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
-    assertThat(underTest.getAuthors()).isNull();
-  }
-
-  @Test
-  public void setAuthors_accepts_null() {
-    underTest.setAuthors(null);
-  }
-
-  @Test
-  public void getAuthors_returns_object_from_setAuthors() {
-    underTest.setAuthors(LIST_OF_STRINGS);
-    assertThat(underTest.getAuthors()).isSameAs(LIST_OF_STRINGS);
-  }
-
-  @Test
-  public void getComponentKeys_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
-    assertThat(underTest.getComponentKeys()).isNull();
-  }
-
-  @Test
-  public void setComponentKeys_accepts_null() {
-    underTest.setComponentKeys(null);
-  }
-
-  @Test
-  public void getComponentKeys_returns_object_from_setComponentKeys() {
-    underTest.setComponentKeys(LIST_OF_STRINGS);
-    assertThat(underTest.getComponentKeys()).isSameAs(LIST_OF_STRINGS);
-  }
-
-  @Test
-  public void getComponentRootUuids_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
-    assertThat(underTest.getComponentRootUuids()).isNull();
-  }
-
-  @Test
-  public void setComponentRootUuids_accepts_null() {
-    underTest.setComponentRootUuids(null);
-  }
-
-  @Test
-  public void getComponentRootUuids_returns_object_from_setComponentRootUuids() {
-    underTest.setComponentRootUuids(LIST_OF_STRINGS);
-    assertThat(underTest.getComponentRootUuids()).isSameAs(LIST_OF_STRINGS);
-  }
-
-  @Test
-  public void getComponentRoots_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
-    assertThat(underTest.getComponentRoots()).isNull();
-  }
-
-  @Test
-  public void setComponentRoots_accepts_null() {
-    underTest.setComponentRoots(null);
-  }
-
-  @Test
-  public void getComponentRoots_returns_object_from_setComponentRoots() {
-    underTest.setComponentRoots(LIST_OF_STRINGS);
-    assertThat(underTest.getComponentRoots()).isSameAs(LIST_OF_STRINGS);
-  }
-
-  @Test
-  public void getComponentUuids_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
-    assertThat(underTest.getComponentUuids()).isNull();
-  }
-
-  @Test
-  public void setComponentUuids_accepts_null() {
-    underTest.setComponentUuids(null);
-  }
-
-  @Test
-  public void getComponentUuids_returns_object_from_setComponentUuids() {
-    underTest.setComponentUuids(LIST_OF_STRINGS);
-    assertThat(underTest.getComponentUuids()).isSameAs(LIST_OF_STRINGS);
-  }
-
-  @Test
-  public void getComponents_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
-    assertThat(underTest.getComponents()).isNull();
-  }
-
-  @Test
-  public void setComponents_accepts_null() {
-    underTest.setComponents(null);
-  }
-
-  @Test
-  public void getComponents_returns_object_from_setComponents() {
-    underTest.setComponents(LIST_OF_STRINGS);
-    assertThat(underTest.getComponents()).isSameAs(LIST_OF_STRINGS);
-  }
-
-  @Test
-  public void getDirectories_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
-    assertThat(underTest.getDirectories()).isNull();
-  }
-
-  @Test
-  public void setDirectories_accepts_null() {
-    underTest.setDirectories(null);
-  }
-
-  @Test
-  public void getDirectories_returns_object_from_setDirectories() {
-    underTest.setDirectories(LIST_OF_STRINGS);
-    assertThat(underTest.getDirectories()).isSameAs(LIST_OF_STRINGS);
-  }
-
-  @Test
-  public void getFacets_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
-    assertThat(underTest.getFacets()).isNull();
-  }
-
-  @Test
-  public void setFacets_accepts_null() {
-    underTest.setFacets(null);
-  }
-
-  @Test
-  public void getFacets_returns_object_from_setFacets() {
-    underTest.setFacets(LIST_OF_STRINGS);
-    assertThat(underTest.getFacets()).isSameAs(LIST_OF_STRINGS);
-  }
-
-  @Test
-  public void getFileUuids_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
-    assertThat(underTest.getFileUuids()).isNull();
-  }
-
-  @Test
-  public void setFileUuids_accepts_null() {
-    underTest.setFileUuids(null);
-  }
-
-  @Test
-  public void getFileUuids_returns_object_from_setFileUuids() {
-    underTest.setFileUuids(LIST_OF_STRINGS);
-    assertThat(underTest.getFileUuids()).isSameAs(LIST_OF_STRINGS);
-  }
-
-  @Test
-  public void getIssues_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
-    assertThat(underTest.getIssues()).isNull();
-  }
-
-  @Test
-  public void setIssues_accepts_null() {
-    underTest.setIssues(null);
-  }
-
-  @Test
-  public void getIssues_returns_object_from_setIssues() {
-    underTest.setIssues(LIST_OF_STRINGS);
-    assertThat(underTest.getIssues()).isSameAs(LIST_OF_STRINGS);
-  }
-
-  @Test
-  public void getLanguages_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
-    assertThat(underTest.getLanguages()).isNull();
-  }
-
-  @Test
-  public void setLanguages_accepts_null() {
-    underTest.setLanguages(null);
-  }
-
-  @Test
-  public void getLanguages_returns_object_from_setLanguages() {
-    underTest.setLanguages(LIST_OF_STRINGS);
-    assertThat(underTest.getLanguages()).isSameAs(LIST_OF_STRINGS);
-  }
-
-  @Test
-  public void getModuleUuids_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
-    assertThat(underTest.getModuleUuids()).isNull();
-  }
-
-  @Test
-  public void setModuleUuids_accepts_null() {
-    underTest.setModuleUuids(null);
-  }
-
-  @Test
-  public void getModuleUuids_returns_object_from_setModuleUuids() {
-    underTest.setModuleUuids(LIST_OF_STRINGS);
-    assertThat(underTest.getModuleUuids()).isSameAs(LIST_OF_STRINGS);
-  }
-
-  @Test
-  public void getProjectKeys_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
-    assertThat(underTest.getProjectKeys()).isNull();
-  }
-
-  @Test
-  public void setProjectKeys_accepts_null() {
-    underTest.setProjectKeys(null);
-  }
-
-  @Test
-  public void getProjectKeys_returns_object_from_setProjectKeys() {
-    underTest.setProjectKeys(LIST_OF_STRINGS);
-    assertThat(underTest.getProjectKeys()).isSameAs(LIST_OF_STRINGS);
-  }
-
-  @Test
-  public void getProjectUuids_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
-    assertThat(underTest.getProjectUuids()).isNull();
-  }
-
-  @Test
-  public void setProjectUuids_accepts_null() {
-    underTest.setProjectUuids(null);
-  }
-
-  @Test
-  public void getProjectUuids_returns_object_from_setProjectUuids() {
-    underTest.setProjectUuids(LIST_OF_STRINGS);
-    assertThat(underTest.getProjectUuids()).isSameAs(LIST_OF_STRINGS);
-  }
-
-  @Test
-  public void getProjects_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
-    assertThat(underTest.getProjects()).isNull();
-  }
-
-  @Test
-  public void setProjects_accepts_null() {
-    underTest.setProjects(null);
-  }
-
-  @Test
-  public void getProjects_returns_object_from_setProjects() {
-    underTest.setProjects(LIST_OF_STRINGS);
-    assertThat(underTest.getProjects()).isSameAs(LIST_OF_STRINGS);
-  }
-
-  @Test
-  public void getResolutions_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
-    assertThat(underTest.getResolutions()).isNull();
-  }
-
-  @Test
-  public void setResolutions_accepts_null() {
-    underTest.setResolutions(null);
-  }
-
-  @Test
-  public void getResolutions_returns_object_from_setResolutions() {
-    underTest.setResolutions(LIST_OF_STRINGS);
-    assertThat(underTest.getResolutions()).isSameAs(LIST_OF_STRINGS);
-  }
-
-  @Test
-  public void getRules_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
-    assertThat(underTest.getRules()).isNull();
-  }
-
-  @Test
-  public void setRules_accepts_null() {
-    underTest.setRules(null);
-  }
-
-  @Test
-  public void getRules_returns_object_from_setRules() {
-    underTest.setRules(LIST_OF_STRINGS);
-    assertThat(underTest.getRules()).isSameAs(LIST_OF_STRINGS);
-  }
-
-  @Test
-  public void getSeverities_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
-    assertThat(underTest.getSeverities()).isNull();
-  }
-
-  @Test
-  public void setSeverities_accepts_null() {
-    underTest.setSeverities(null);
-  }
-
-  @Test
-  public void getSeverities_returns_object_from_setSeverities() {
-    underTest.setSeverities(LIST_OF_STRINGS);
-    assertThat(underTest.getSeverities()).isSameAs(LIST_OF_STRINGS);
-  }
-
-  @Test
-  public void getStatuses_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
-    assertThat(underTest.getStatuses()).isNull();
-  }
-
-  @Test
-  public void setStatuses_accepts_null() {
-    underTest.setStatuses(null);
-  }
-
-  @Test
-  public void getStatuses_returns_object_from_setStatuses() {
-    underTest.setStatuses(LIST_OF_STRINGS);
-    assertThat(underTest.getStatuses()).isSameAs(LIST_OF_STRINGS);
-  }
-
-  @Test
-  public void getTags_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
-    assertThat(underTest.getTags()).isNull();
-  }
-
-  @Test
-  public void setTags_accepts_null() {
-    underTest.setTags(null);
-  }
-
-  @Test
-  public void getTags_returns_object_from_setTags() {
-    underTest.setTags(LIST_OF_STRINGS);
-    assertThat(underTest.getTags()).isSameAs(LIST_OF_STRINGS);
-  }
-
-  @Test
-  public void getAsc_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
-    assertThat(underTest.getAsc()).isNull();
-  }
-
-  @Test
-  public void getAsc_returns_boolean_from_setTags() {
-    underTest.setAsc(true);
-    assertThat(underTest.getAsc()).isTrue();
-    underTest.setAsc(false);
-    assertThat(underTest.getAsc()).isFalse();
-  }
-
-  @Test
-  public void getAssigned_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
-    assertThat(underTest.getAssigned()).isNull();
-  }
-
-  @Test
-  public void setAssigned_accepts_null() {
-    underTest.setAssigned(null);
-  }
-
-  @Test
-  public void getAssigned_returns_boolean_from_setTags() {
-    underTest.setAssigned(true);
-    assertThat(underTest.getAssigned()).isTrue();
-    underTest.setAssigned(false);
-    assertThat(underTest.getAssigned()).isFalse();
-  }
-
-  @Test
-  public void getOnComponentOnly_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
-    assertThat(underTest.getOnComponentOnly()).isNull();
-  }
-
-  @Test
-  public void setOnComponentOnly_accepts_null() {
-    underTest.setOnComponentOnly(null);
-  }
-
-  @Test
-  public void getOnComponentOnly_returns_boolean_from_setOnComponentOnly() {
-    underTest.setOnComponentOnly(true);
-    assertThat(underTest.getOnComponentOnly()).isTrue();
-    underTest.setOnComponentOnly(false);
-    assertThat(underTest.getOnComponentOnly()).isFalse();
-  }
-
-  @Test
-  public void getResolved_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
-    assertThat(underTest.getResolved()).isNull();
-  }
-
-  @Test
-  public void setResolved_accepts_null() {
-    underTest.setResolved(null);
-  }
-
-  @Test
-  public void getResolved_returns_boolean_from_setResolved() {
-    underTest.setResolved(true);
-    assertThat(underTest.getResolved()).isTrue();
-    underTest.setResolved(false);
-    assertThat(underTest.getResolved()).isFalse();
-  }
-
-  @Test
-  public void getCreatedAfter_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
-    assertThat(underTest.getCreatedAfter()).isNull();
-  }
-
-  @Test
-  public void setCreatedAfter_accepts_null() {
-    underTest.setCreatedAfter(null);
-  }
-
-  @Test
-  public void getCreatedAfter_returns_object_from_setCreatedAfter() {
-    underTest.setCreatedAfter(SOME_STRING);
-    assertThat(underTest.getCreatedAfter()).isEqualTo(SOME_STRING);
-  }
-
-  @Test
-  public void getCreatedAt_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
-    assertThat(underTest.getCreatedAt()).isNull();
-  }
-
-  @Test
-  public void setCreatedAt_accepts_null() {
-    underTest.setCreatedAt(null);
-  }
-
-  @Test
-  public void getCreatedAt_returns_object_from_setCreatedAt() {
-    underTest.setCreatedAt(SOME_STRING);
-    assertThat(underTest.getCreatedAt()).isEqualTo(SOME_STRING);
-  }
-
-  @Test
-  public void getCreatedBefore_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
-    assertThat(underTest.getCreatedBefore()).isNull();
-  }
-
-  @Test
-  public void setCreatedBefore_accepts_null() {
-    underTest.setCreatedBefore(null);
-  }
-
-  @Test
-  public void getCreatedBefore_returns_object_from_setCreatedBefore() {
-    underTest.setCreatedBefore(SOME_STRING);
-    assertThat(underTest.getCreatedBefore()).isEqualTo(SOME_STRING);
-  }
-
-  @Test
-  public void getCreatedInLast_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
-    assertThat(underTest.getCreatedInLast()).isNull();
-  }
-
-  @Test
-  public void setCreatedInLast_accepts_null() {
-    underTest.setCreatedInLast(null);
-  }
-
-  @Test
-  public void getCreatedInLast_returns_object_from_setCreatedInLast() {
-    underTest.setCreatedInLast(SOME_STRING);
-    assertThat(underTest.getCreatedInLast()).isEqualTo(SOME_STRING);
-  }
-
-  @Test
-  public void getFacetMode_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
-    assertThat(underTest.getFacetMode()).isNull();
-  }
-
-  @Test
-  public void setFacetMode_accepts_null() {
-    underTest.setFacetMode(null);
-  }
-
-  @Test
-  public void getFacetMode_returns_object_from_setFacetMode() {
-    underTest.setFacetMode(SOME_STRING);
-    assertThat(underTest.getFacetMode()).isEqualTo(SOME_STRING);
-  }
-
-  @Test
-  public void getSort_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
-    assertThat(underTest.getSort()).isNull();
-  }
-
-  @Test
-  public void setSort_accepts_null() {
-    underTest.setSort(null);
-  }
-
-  @Test
-  public void getSort_returns_object_from_setSort() {
-    underTest.setSort(SOME_STRING);
-    assertThat(underTest.getSort()).isEqualTo(SOME_STRING);
-  }
-
-  @Test
-  public void getPage_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
-    assertThat(underTest.getPage()).isNull();
-  }
-
-  @Test
-  public void getPage_returns_object_from_setPage() {
-    underTest.setPage(SOME_INT);
-    assertThat(underTest.getPage()).isEqualTo(SOME_INT);
-  }
-
-  @Test
-  public void getPageSize_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
-    assertThat(underTest.getPageSize()).isNull();
-  }
-
-  @Test
-  public void getPageSize_returns_object_from_setPageSize() {
-    underTest.setPageSize(SOME_INT);
-    assertThat(underTest.getPageSize()).isEqualTo(SOME_INT);
-  }
-
-}
index 653d79aba19db4a8533508494338997e453c3715..cfdc00f510c5aee34514ca4bcf1c8cd5c35e2dfe 100644 (file)
@@ -81,7 +81,7 @@ public class MeasuresServiceTest {
 
   @Test
   public void component() {
-    ComponentWsRequest request = new ComponentWsRequest()
+    ComponentRequest request = new ComponentRequest()
       .setComponentId(VALUE_BASE_COMPONENT_ID)
       .setComponentKey(VALUE_BASE_COMPONENT_KEY)
       .setComponent(VALUE_BASE_COMPONENT_KEY)
@@ -110,7 +110,7 @@ public class MeasuresServiceTest {
 
   @Test
   public void component_tree() {
-    ComponentTreeWsRequest componentTreeRequest = new ComponentTreeWsRequest()
+    ComponentTreeRequest componentTreeRequest = new ComponentTreeRequest()
       .setBaseComponentId(VALUE_BASE_COMPONENT_ID)
       .setBaseComponentKey(VALUE_BASE_COMPONENT_KEY)
       .setComponent(VALUE_BASE_COMPONENT_KEY)
index aefc8a6411afe42ecc6d2de49fe5d4309be81048..f15381affaaf613b523eaf16e7751d4b2f269c7e 100644 (file)
@@ -39,7 +39,7 @@ public class OrganizationServiceTest {
 
   @Test
   public void search() {
-    underTest.search(SearchWsRequest.builder()
+    underTest.search(SearchRequest.builder()
       .setOrganizations("orga1", "orga2")
       .setPage(2)
       .setPageSize(10)
@@ -56,7 +56,7 @@ public class OrganizationServiceTest {
 
   @Test
   public void search_members() {
-    underTest.searchMembers(new SearchMembersWsRequest()
+    underTest.searchMembers(new SearchMembersRequest()
       .setOrganization("orga")
       .setSelected("selected")
       .setQuery("john")
@@ -99,7 +99,7 @@ public class OrganizationServiceTest {
 
   @Test
   public void update_project_visibility() {
-    underTest.updateProjectVisibility(UpdateProjectVisibilityWsRequest.builder()
+    underTest.updateProjectVisibility(UpdateProjectVisibilityRequest.builder()
       .setOrganization("O1")
       .setProjectVisibility("private")
     .build());
index 0d51269ce804b5dc71e3b4b0603bd05c4476d52d..9287748363f42994f5424b0973e136f48ad3b13a 100644 (file)
@@ -83,7 +83,7 @@ public class PermissionsServiceTest {
 
   @Test
   public void groups_does_POST_on_WS_groups() {
-    GroupsWsRequest request = new GroupsWsRequest();
+    GroupsRequest request = new GroupsRequest();
     underTest.groups(request
       .setPermission(PERMISSION_VALUE)
       .setProjectId(PROJECT_ID_VALUE)
@@ -107,7 +107,7 @@ public class PermissionsServiceTest {
 
   @Test
   public void addGroup_does_POST_on_Ws_add_group() {
-    underTest.addGroup(new AddGroupWsRequest()
+    underTest.addGroup(new AddGroupRequest()
       .setOrganization(ORGANIZATION_VALUE)
       .setPermission(PERMISSION_VALUE)
       .setProjectId(PROJECT_ID_VALUE)
@@ -131,7 +131,7 @@ public class PermissionsServiceTest {
   @Test
   public void addGroupToTemplate_does_POST_on_Ws_add_group_to_template() {
     underTest.addGroupToTemplate(
-      new AddGroupToTemplateWsRequest()
+      new AddGroupToTemplateRequest()
         .setGroupId(GROUP_ID_VALUE)
         .setGroupName(GROUP_NAME_VALUE)
         .setPermission(PERMISSION_VALUE)
@@ -153,7 +153,7 @@ public class PermissionsServiceTest {
 
   @Test
   public void addUser_does_POST_on_Ws_add_user() {
-    underTest.addUser(new AddUserWsRequest()
+    underTest.addUser(new AddUserRequest()
       .setLogin(LOGIN_VALUE)
       .setOrganization(ORGANIZATION_VALUE)
       .setPermission(PERMISSION_VALUE)
@@ -175,7 +175,7 @@ public class PermissionsServiceTest {
 
   @Test
   public void addUserToTemplate_does_POST_on_Ws_add_user_to_template() {
-    underTest.addUserToTemplate(new AddUserToTemplateWsRequest()
+    underTest.addUserToTemplate(new AddUserToTemplateRequest()
       .setOrganization(ORGANIZATION_VALUE)
       .setPermission(PERMISSION_VALUE)
       .setLogin(LOGIN_VALUE)
@@ -197,7 +197,7 @@ public class PermissionsServiceTest {
 
   @Test
   public void applyTemplate_does_POST_on_Ws_apply_template() {
-    underTest.applyTemplate(new ApplyTemplateWsRequest()
+    underTest.applyTemplate(new ApplyTemplateRequest()
       .setOrganization(ORGANIZATION_VALUE)
       .setProjectId(PROJECT_ID_VALUE)
       .setProjectKey(PROJECT_KEY_VALUE)
@@ -219,7 +219,7 @@ public class PermissionsServiceTest {
 
   @Test
   public void bulk_apply_template() {
-    underTest.bulkApplyTemplate(new BulkApplyTemplateWsRequest()
+    underTest.bulkApplyTemplate(new BulkApplyTemplateRequest()
       .setOrganization(ORGANIZATION_VALUE)
       .setTemplateId(TEMPLATE_ID_VALUE)
       .setTemplateName(TEMPLATE_NAME_VALUE)
@@ -248,7 +248,7 @@ public class PermissionsServiceTest {
 
   @Test
   public void createTemplate_does_POST_on_Ws_create_template() {
-    underTest.createTemplate(new CreateTemplateWsRequest()
+    underTest.createTemplate(new CreateTemplateRequest()
       .setOrganization(ORGANIZATION_VALUE)
       .setName(NAME_VALUE)
       .setDescription(DESCRIPTION_VALUE)
@@ -268,7 +268,7 @@ public class PermissionsServiceTest {
 
   @Test
   public void deleteTemplate_does_POST_on_Ws_delete_template() {
-    underTest.deleteTemplate(new DeleteTemplateWsRequest()
+    underTest.deleteTemplate(new DeleteTemplateRequest()
       .setTemplateId(TEMPLATE_ID_VALUE)
       .setTemplateName(TEMPLATE_NAME_VALUE)
       .setOrganization(ORGANIZATION_VALUE)
@@ -286,7 +286,7 @@ public class PermissionsServiceTest {
 
   @Test
   public void removeGroup_does_POST_on_Ws_remove_group() {
-    underTest.removeGroup(new RemoveGroupWsRequest()
+    underTest.removeGroup(new RemoveGroupRequest()
       .setPermission(PERMISSION_VALUE)
       .setGroupId(GROUP_ID_VALUE)
       .setGroupName(GROUP_NAME_VALUE)
@@ -310,7 +310,7 @@ public class PermissionsServiceTest {
 
   @Test
   public void removeGroupFromTemplate_does_POST_on_Ws_remove_group_from_template() {
-    underTest.removeGroupFromTemplate(new RemoveGroupFromTemplateWsRequest()
+    underTest.removeGroupFromTemplate(new RemoveGroupFromTemplateRequest()
       .setPermission(PERMISSION_VALUE)
       .setGroupId(GROUP_ID_VALUE)
       .setGroupName(GROUP_NAME_VALUE)
@@ -334,7 +334,7 @@ public class PermissionsServiceTest {
 
   @Test
   public void removeUser_does_POST_on_Ws_remove_user() {
-    underTest.removeUser(new RemoveUserWsRequest()
+    underTest.removeUser(new RemoveUserRequest()
       .setPermission(PERMISSION_VALUE)
       .setLogin(LOGIN_VALUE)
       .setProjectId(PROJECT_ID_VALUE)
@@ -354,7 +354,7 @@ public class PermissionsServiceTest {
 
   @Test
   public void removeUserFromTemplate_does_POST_on_Ws_remove_user_from_template() {
-    underTest.removeUserFromTemplate(new RemoveUserFromTemplateWsRequest()
+    underTest.removeUserFromTemplate(new RemoveUserFromTemplateRequest()
       .setPermission(PERMISSION_VALUE)
       .setLogin(LOGIN_VALUE)
       .setTemplateId(TEMPLATE_ID_VALUE)
@@ -387,7 +387,7 @@ public class PermissionsServiceTest {
 
   @Test
   public void searchProjectPermissions_does_GET_on_Ws_search_project_permissions() {
-    underTest.searchProjectPermissions(new SearchProjectPermissionsWsRequest()
+    underTest.searchProjectPermissions(new SearchProjectPermissionsRequest()
       .setProjectId(PROJECT_ID_VALUE)
       .setProjectKey(PROJECT_KEY_VALUE)
       .setQualifier(QUALIFIER_VALUE)
@@ -411,7 +411,7 @@ public class PermissionsServiceTest {
 
   @Test
   public void searchTemplates_does_GET_on_Ws_search_templates() {
-    underTest.searchTemplates(new SearchTemplatesWsRequest()
+    underTest.searchTemplates(new SearchTemplatesRequest()
       .setQuery(QUERY_VALUE)
     );
 
@@ -425,7 +425,7 @@ public class PermissionsServiceTest {
 
   @Test
   public void setDefaultTemplate_does_POST_on_Ws_set_default_template() {
-    underTest.setDefaultTemplate(new SetDefaultTemplateWsRequest()
+    underTest.setDefaultTemplate(new SetDefaultTemplateRequest()
       .setQualifier(QUALIFIER_VALUE)
       .setTemplateId(TEMPLATE_ID_VALUE)
       .setTemplateName(TEMPLATE_NAME_VALUE)
@@ -443,7 +443,7 @@ public class PermissionsServiceTest {
 
   @Test
   public void updateTemplate_does_POST_on_Ws_update_template() {
-    underTest.updateTemplate(new UpdateTemplateWsRequest()
+    underTest.updateTemplate(new UpdateTemplateRequest()
       .setDescription(DESCRIPTION_VALUE)
       .setId(TEMPLATE_ID_VALUE)
       .setName(TEMPLATE_NAME_VALUE)
@@ -463,7 +463,7 @@ public class PermissionsServiceTest {
 
   @Test
   public void add_project_creator_to_template() {
-    underTest.addProjectCreatorToTemplate(AddProjectCreatorToTemplateWsRequest.builder()
+    underTest.addProjectCreatorToTemplate(AddProjectCreatorToTemplateRequest.builder()
       .setPermission(PERMISSION_VALUE)
       .setTemplateId(TEMPLATE_ID_VALUE)
       .setTemplateName(TEMPLATE_NAME_VALUE)
@@ -483,7 +483,7 @@ public class PermissionsServiceTest {
 
   @Test
   public void remove_project_creator_from_template() {
-    underTest.removeProjectCreatorFromTemplate(RemoveProjectCreatorFromTemplateWsRequest.builder()
+    underTest.removeProjectCreatorFromTemplate(RemoveProjectCreatorFromTemplateRequest.builder()
       .setPermission(PERMISSION_VALUE)
       .setTemplateId(TEMPLATE_ID_VALUE)
       .setTemplateName(TEMPLATE_NAME_VALUE)
@@ -503,7 +503,7 @@ public class PermissionsServiceTest {
 
   @Test
   public void users() {
-    underTest.users(new UsersWsRequest()
+    underTest.users(new UsersRequest()
       .setOrganization("org")
       .setProjectKey("project")
       .setProjectId("ABCD")
index 657b7f0e47862d18ccbf8967a249cfd61009951b..9b8fbb04478f434e40b56cde21eb85aca9388ed3 100644 (file)
@@ -125,7 +125,7 @@ public class ProjectsServiceTest {
 
   @Test
   public void bulk_delete() {
-    underTest.bulkDelete(SearchWsRequest.builder()
+    underTest.bulkDelete(SearchRequest.builder()
       .setOrganization("default")
       .setQuery("project")
       .setQualifiers(asList("TRK", "VW"))
@@ -147,7 +147,7 @@ public class ProjectsServiceTest {
 
   @Test
   public void search() {
-    underTest.search(SearchWsRequest.builder()
+    underTest.search(SearchRequest.builder()
       .setOrganization("default")
       .setQuery("project")
       .setQualifiers(asList("TRK", "VW"))
diff --git a/sonar-ws/src/test/java/org/sonarqube/ws/client/project/SearchRequestTest.java b/sonar-ws/src/test/java/org/sonarqube/ws/client/project/SearchRequestTest.java
new file mode 100644 (file)
index 0000000..ee64ad7
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.project;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+
+import static java.util.Arrays.asList;
+import static java.util.Collections.emptyList;
+import static org.assertj.core.api.Assertions.assertThat;
+
+public class SearchRequestTest {
+
+  @Rule
+  public ExpectedException expectedException = ExpectedException.none();
+
+  @Test
+  public void create_request() throws Exception {
+    SearchRequest underTest = SearchRequest.builder()
+      .setOrganization("orga")
+      .setQuery("project")
+      .setQualifiers(asList("TRK", "VW"))
+      .setPage(5)
+      .setPageSize(10)
+      .build();
+
+    assertThat(underTest.getOrganization()).isEqualTo("orga");
+    assertThat(underTest.getQuery()).isEqualTo("project");
+    assertThat(underTest.getQualifiers()).containsOnly("TRK", "VW");
+    assertThat(underTest.getPage()).isEqualTo(5);
+    assertThat(underTest.getPageSize()).isEqualTo(10);
+  }
+
+  @Test
+  public void fail_when_page_size_is_greater_then_500() throws Exception {
+    expectedException.expect(IllegalArgumentException.class);
+    expectedException.expectMessage("Page size must not be greater than 500");
+
+    SearchRequest.builder()
+      .setPageSize(10000)
+      .build();
+  }
+
+  @Test
+  public void fail_if_project_key_list_is_empty() {
+    expectedException.expect(IllegalArgumentException.class);
+    expectedException.expectMessage("Project key list must not be empty");
+
+    SearchRequest.builder()
+      .setProjects(emptyList())
+      .build();
+  }
+
+  @Test
+  public void fail_if_project_id_list_is_empty() {
+    expectedException.expect(IllegalArgumentException.class);
+    expectedException.expectMessage("Project id list must not be empty");
+
+    SearchRequest.builder()
+      .setProjectIds(emptyList())
+      .build();
+  }
+}
diff --git a/sonar-ws/src/test/java/org/sonarqube/ws/client/project/SearchWsRequestTest.java b/sonar-ws/src/test/java/org/sonarqube/ws/client/project/SearchWsRequestTest.java
deleted file mode 100644 (file)
index bf0f455..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.project;
-
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-
-import static java.util.Arrays.asList;
-import static java.util.Collections.emptyList;
-import static org.assertj.core.api.Assertions.assertThat;
-
-public class SearchWsRequestTest {
-
-  @Rule
-  public ExpectedException expectedException = ExpectedException.none();
-
-  @Test
-  public void create_request() throws Exception {
-    SearchWsRequest underTest = SearchWsRequest.builder()
-      .setOrganization("orga")
-      .setQuery("project")
-      .setQualifiers(asList("TRK", "VW"))
-      .setPage(5)
-      .setPageSize(10)
-      .build();
-
-    assertThat(underTest.getOrganization()).isEqualTo("orga");
-    assertThat(underTest.getQuery()).isEqualTo("project");
-    assertThat(underTest.getQualifiers()).containsOnly("TRK", "VW");
-    assertThat(underTest.getPage()).isEqualTo(5);
-    assertThat(underTest.getPageSize()).isEqualTo(10);
-  }
-
-  @Test
-  public void fail_when_page_size_is_greater_then_500() throws Exception {
-    expectedException.expect(IllegalArgumentException.class);
-    expectedException.expectMessage("Page size must not be greater than 500");
-
-    SearchWsRequest.builder()
-      .setPageSize(10000)
-      .build();
-  }
-
-  @Test
-  public void fail_if_project_key_list_is_empty() {
-    expectedException.expect(IllegalArgumentException.class);
-    expectedException.expectMessage("Project key list must not be empty");
-
-    SearchWsRequest.builder()
-      .setProjects(emptyList())
-      .build();
-  }
-
-  @Test
-  public void fail_if_project_id_list_is_empty() {
-    expectedException.expect(IllegalArgumentException.class);
-    expectedException.expectMessage("Project id list must not be empty");
-
-    SearchWsRequest.builder()
-      .setProjectIds(emptyList())
-      .build();
-  }
-}
diff --git a/sonar-ws/src/test/java/org/sonarqube/ws/client/project/UpdateKeyRequestTest.java b/sonar-ws/src/test/java/org/sonarqube/ws/client/project/UpdateKeyRequestTest.java
new file mode 100644 (file)
index 0000000..7b99e95
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.sonarqube.ws.client.project;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+
+public class UpdateKeyRequestTest {
+
+  @Rule
+  public ExpectedException expectedException = ExpectedException.none();
+
+  UpdateKeyRequest.Builder underTest = UpdateKeyRequest.builder();
+
+  @Test
+  public void fail_if_new_key_is_null() {
+    expectedException.expect(IllegalArgumentException.class);
+    expectedException.expectMessage("The new key must not be empty");
+
+    underTest.setNewKey(null).build();
+  }
+
+  @Test
+  public void fail_if_new_key_is_empty() {
+    expectedException.expect(IllegalArgumentException.class);
+    expectedException.expectMessage("The new key must not be empty");
+
+    underTest.setNewKey("").build();
+  }
+}
diff --git a/sonar-ws/src/test/java/org/sonarqube/ws/client/project/UpdateKeyWsRequestTest.java b/sonar-ws/src/test/java/org/sonarqube/ws/client/project/UpdateKeyWsRequestTest.java
deleted file mode 100644 (file)
index 0eb5197..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.sonarqube.ws.client.project;
-
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-
-public class UpdateKeyWsRequestTest {
-
-  @Rule
-  public ExpectedException expectedException = ExpectedException.none();
-
-  UpdateKeyWsRequest.Builder underTest = UpdateKeyWsRequest.builder();
-
-  @Test
-  public void fail_if_new_key_is_null() {
-    expectedException.expect(IllegalArgumentException.class);
-    expectedException.expectMessage("The new key must not be empty");
-
-    underTest.setNewKey(null).build();
-  }
-
-  @Test
-  public void fail_if_new_key_is_empty() {
-    expectedException.expect(IllegalArgumentException.class);
-    expectedException.expectMessage("The new key must not be empty");
-
-    underTest.setNewKey("").build();
-  }
-}
index 015186a588e059bed00d1d314baf96e9bf7d3f48..2718136410c0e4df8019118ba0e6579697929dd7 100644 (file)
@@ -61,7 +61,7 @@ public class QualityProfilesServiceTest {
 
   @Test
   public void search() {
-    underTest.search(new SearchWsRequest()
+    underTest.search(new SearchRequest()
       .setDefaults(true)
       .setProjectKey("project")
       .setLanguage("language")
@@ -184,7 +184,7 @@ public class QualityProfilesServiceTest {
 
   @Test
   public void activate_rule() {
-    underTest.activateRule(ActivateRuleWsRequest.builder()
+    underTest.activateRule(ActivateRuleRequest.builder()
       .setRuleKey("R1")
       .setKey("P1")
       .setOrganization("O1")
index c0615144afdcfee5547b17b07fbd7302e3c45e09..a02bb02e8beae5fe18c3935250015ffeff856b1e 100644 (file)
@@ -45,8 +45,8 @@ import org.sonarqube.ws.Qualityprofiles.CreateWsResponse.QualityProfile;
 import org.sonarqube.ws.Projects;
 import org.sonarqube.ws.Users.CreateWsResponse.User;
 import org.sonarqube.ws.client.ce.TaskRequest;
-import org.sonarqube.ws.client.component.SuggestionsWsRequest;
-import org.sonarqube.ws.client.issue.SearchWsRequest;
+import org.sonarqube.ws.client.component.SuggestionsRequest;
+import org.sonarqube.ws.client.issue.SearchRequest;
 import util.ItUtils;
 
 import static org.assertj.core.api.Assertions.assertThat;
@@ -226,14 +226,14 @@ public class AnalysisEsResilienceTest {
   }
 
   private Issues.SearchWsResponse searchIssues(String projectKey) {
-    SearchWsRequest request = new SearchWsRequest()
+    SearchRequest request = new SearchRequest()
       .setProjectKeys(Collections.singletonList(projectKey))
       .setFacets(Collections.singletonList("statuses"));
     return tester.wsClient().issues().search(request);
   }
 
   private List<String> searchFile(String key, Organization organization) {
-    SuggestionsWsRequest query = SuggestionsWsRequest.builder()
+    SuggestionsRequest query = SuggestionsRequest.builder()
       .setS(key)
       .build();
     Map<String, Object> response = ItUtils.jsonToMap(
index 14b60781d47bda8973666b8300241b86330db2c7..6d291bca43dca80d678ccc654f87a12665577648 100644 (file)
@@ -32,9 +32,9 @@ import org.sonarqube.ws.Favorites.Favorite;
 import org.sonarqube.ws.Permissions;
 import org.sonarqube.ws.client.WsClient;
 import org.sonarqube.ws.client.favorites.SearchRequest;
-import org.sonarqube.ws.client.permission.AddProjectCreatorToTemplateWsRequest;
-import org.sonarqube.ws.client.permission.RemoveProjectCreatorFromTemplateWsRequest;
-import org.sonarqube.ws.client.permission.SearchTemplatesWsRequest;
+import org.sonarqube.ws.client.permission.AddProjectCreatorToTemplateRequest;
+import org.sonarqube.ws.client.permission.RemoveProjectCreatorFromTemplateRequest;
+import org.sonarqube.ws.client.permission.SearchTemplatesRequest;
 
 import static com.sonar.orchestrator.container.Server.ADMIN_LOGIN;
 import static com.sonar.orchestrator.container.Server.ADMIN_PASSWORD;
@@ -105,18 +105,18 @@ public class FavoriteTest {
   }
 
   private void addProjectCreatorPermission() {
-    Permissions.SearchTemplatesWsResponse permissionTemplates = adminWsClient.permissions().searchTemplates(new SearchTemplatesWsRequest());
+    Permissions.SearchTemplatesWsResponse permissionTemplates = adminWsClient.permissions().searchTemplates(new SearchTemplatesRequest());
     assertThat(permissionTemplates.getDefaultTemplatesCount()).isEqualTo(1);
-    adminWsClient.permissions().addProjectCreatorToTemplate(AddProjectCreatorToTemplateWsRequest.builder()
+    adminWsClient.permissions().addProjectCreatorToTemplate(AddProjectCreatorToTemplateRequest.builder()
       .setTemplateId(permissionTemplates.getDefaultTemplates(0).getTemplateId())
       .setPermission("admin")
       .build());
   }
 
   private void removeProjectCreatorPermission() {
-    Permissions.SearchTemplatesWsResponse permissionTemplates = adminWsClient.permissions().searchTemplates(new SearchTemplatesWsRequest());
+    Permissions.SearchTemplatesWsResponse permissionTemplates = adminWsClient.permissions().searchTemplates(new SearchTemplatesRequest());
     assertThat(permissionTemplates.getDefaultTemplatesCount()).isEqualTo(1);
-    adminWsClient.permissions().removeProjectCreatorFromTemplate(RemoveProjectCreatorFromTemplateWsRequest.builder()
+    adminWsClient.permissions().removeProjectCreatorFromTemplate(RemoveProjectCreatorFromTemplateRequest.builder()
       .setTemplateId(permissionTemplates.getDefaultTemplates(0).getTemplateId())
       .setPermission("admin")
       .build());
index 980cd9cafae2e87b6ad1f5303dbaac7d548838e8..17c6a7357bb3d199d4fbf7cfc7bf41f0e92fc1d0 100644 (file)
@@ -28,7 +28,7 @@ import org.junit.Before;
 import org.junit.ClassRule;
 import org.junit.Test;
 import org.sonarqube.ws.Components.Component;
-import org.sonarqube.ws.client.component.TreeWsRequest;
+import org.sonarqube.ws.client.component.TreeRequest;
 import util.ItUtils;
 
 import static java.util.Collections.singletonList;
@@ -134,6 +134,6 @@ public class FileExclusionsTest {
   }
 
   public static List<Component> getComponents(String qualifier) {
-    return newWsClient(orchestrator).components().tree(new TreeWsRequest().setBaseComponentKey(PROJECT).setQualifiers(singletonList(qualifier))).getComponentsList();
+    return newWsClient(orchestrator).components().tree(new TreeRequest().setBaseComponentKey(PROJECT).setQualifiers(singletonList(qualifier))).getComponentsList();
   }
 }
index b7d8921246d410cdc72675764e4ea0247b5400a6..d595e032cadef77578d2976086e774d2bdc7f881 100644 (file)
@@ -31,7 +31,7 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.sonarqube.ws.UserTokens;
 import org.sonarqube.ws.client.WsClient;
-import org.sonarqube.ws.client.permission.AddUserWsRequest;
+import org.sonarqube.ws.client.permission.AddUserRequest;
 import org.sonarqube.ws.client.usertokens.GenerateRequest;
 import org.sonarqube.ws.client.usertokens.RevokeRequest;
 import org.sonarqube.ws.client.usertokens.UserTokensService;
@@ -147,7 +147,7 @@ public class PermissionTest {
   }
 
   private void addUserPermission(String login, String permission, @Nullable String projectKey) {
-    adminWsClient.permissions().addUser(new AddUserWsRequest()
+    adminWsClient.permissions().addUser(new AddUserRequest()
       .setLogin(login)
       .setPermission(permission)
       .setProjectKey(projectKey));
index 53e0dc50abb5c011c4d2cbe73c3798ce8b05b40f..bdc330eec29e8c26f48302116e4bb726c21cfd43 100644 (file)
@@ -33,7 +33,7 @@ import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.tests.Category3Suite;
-import org.sonarqube.ws.client.component.SearchWsRequest;
+import org.sonarqube.ws.client.component.SearchRequest;
 import util.ItUtils;
 
 import static java.util.Collections.singletonList;
@@ -68,7 +68,7 @@ public class ScannerTest {
     scan("shared/xoo-multi-modules-sample");
     scan("shared/xoo-multi-modules-sample", "sonar.branch", "branch/0.x");
 
-    assertThat(tester.wsClient().components().search(new SearchWsRequest().setQualifiers(singletonList("TRK"))).getComponentsList()).hasSize(2);
+    assertThat(tester.wsClient().components().search(new SearchRequest().setQualifiers(singletonList("TRK"))).getComponentsList()).hasSize(2);
     assertThat(getComponent(orchestrator, "com.sonarsource.it.samples:multi-modules-sample").getName()).isEqualTo("Sonar :: Integration Tests :: Multi-modules Sample");
     assertThat(getComponent(orchestrator, "com.sonarsource.it.samples:multi-modules-sample:branch/0.x").getName())
       .isEqualTo("Sonar :: Integration Tests :: Multi-modules Sample branch/0.x");
index 78f8cfc1e0aa951a9b8393606b3be2c88f3dd596..3f3c0750f75702e0dc20d520348d0a8bcf4e6ead 100644 (file)
@@ -27,9 +27,9 @@ import org.junit.ClassRule;
 import org.junit.Rule;
 import org.junit.Test;
 import org.sonarqube.qa.util.Tester;
-import org.sonarqube.ws.client.permission.AddGroupWsRequest;
-import org.sonarqube.ws.client.permission.AddProjectCreatorToTemplateWsRequest;
-import org.sonarqube.ws.client.permission.RemoveGroupWsRequest;
+import org.sonarqube.ws.client.permission.AddGroupRequest;
+import org.sonarqube.ws.client.permission.AddProjectCreatorToTemplateRequest;
+import org.sonarqube.ws.client.permission.RemoveGroupRequest;
 import org.sonarqube.ws.client.project.UpdateVisibilityRequest;
 
 import static org.assertj.core.api.Assertions.assertThat;
@@ -112,7 +112,7 @@ public class ExecuteAnalysisPermissionTest {
   @Test
   public void execute_analysis_with_scan_on_default_template() {
     removeGlobalPermission("anyone", "scan");
-    tester.wsClient().permissions().addProjectCreatorToTemplate(AddProjectCreatorToTemplateWsRequest.builder()
+    tester.wsClient().permissions().addProjectCreatorToTemplate(AddProjectCreatorToTemplateRequest.builder()
       .setPermission("scan")
       .setTemplateId("default_template")
       .build());
@@ -121,15 +121,15 @@ public class ExecuteAnalysisPermissionTest {
   }
 
   private void addProjectPermission(String groupName, String projectKey, String permission) {
-    tester.wsClient().permissions().addGroup(new AddGroupWsRequest().setGroupName(groupName).setProjectKey(projectKey).setPermission(permission));
+    tester.wsClient().permissions().addGroup(new AddGroupRequest().setGroupName(groupName).setProjectKey(projectKey).setPermission(permission));
   }
 
   private void addGlobalPermission(String groupName, String permission) {
-    tester.wsClient().permissions().addGroup(new AddGroupWsRequest().setGroupName(groupName).setPermission(permission));
+    tester.wsClient().permissions().addGroup(new AddGroupRequest().setGroupName(groupName).setPermission(permission));
   }
 
   private void removeGlobalPermission(String groupName, String permission) {
-    tester.wsClient().permissions().removeGroup(new RemoveGroupWsRequest().setGroupName(groupName).setPermission(permission));
+    tester.wsClient().permissions().removeGroup(new RemoveGroupRequest().setGroupName(groupName).setPermission(permission));
   }
 
   private static void executeLoggedAnalysis() {
index 910bb6124c21355c3232962cf04afcad08287f1a..d3734d24e054024a7abc5b041c2d3232bfa0afea 100644 (file)
@@ -33,7 +33,7 @@ import org.sonar.wsclient.user.UserParameters;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.Issues;
 import org.sonarqube.ws.client.issue.BulkChangeRequest;
-import org.sonarqube.ws.client.permission.AddUserWsRequest;
+import org.sonarqube.ws.client.permission.AddUserRequest;
 import org.sonarqube.ws.client.project.UpdateVisibilityRequest;
 import util.ItUtils;
 
@@ -265,7 +265,7 @@ public class IssuePermissionTest {
 
   private void addUserPermission(String login, String projectKey, String permission) {
     tester.wsClient().permissions().addUser(
-      new AddUserWsRequest()
+      new AddUserRequest()
         .setLogin(login)
         .setProjectKey(projectKey)
         .setPermission(permission));
index f14d2264b71a8bbcb95251885cb83c990ef0e6c2..77a24d8497621dabb8a2a004357b2e747eadc6cf 100644 (file)
@@ -30,18 +30,18 @@ import org.sonarqube.ws.Permissions;
 import org.sonarqube.ws.Permissions.Permission;
 import org.sonarqube.ws.Permissions.SearchTemplatesWsResponse;
 import org.sonarqube.ws.client.PostRequest;
-import org.sonarqube.ws.client.permission.AddGroupToTemplateWsRequest;
-import org.sonarqube.ws.client.permission.AddGroupWsRequest;
-import org.sonarqube.ws.client.permission.AddProjectCreatorToTemplateWsRequest;
-import org.sonarqube.ws.client.permission.AddUserToTemplateWsRequest;
-import org.sonarqube.ws.client.permission.AddUserWsRequest;
-import org.sonarqube.ws.client.permission.CreateTemplateWsRequest;
-import org.sonarqube.ws.client.permission.GroupsWsRequest;
-import org.sonarqube.ws.client.permission.RemoveGroupFromTemplateWsRequest;
-import org.sonarqube.ws.client.permission.RemoveProjectCreatorFromTemplateWsRequest;
-import org.sonarqube.ws.client.permission.RemoveUserFromTemplateWsRequest;
-import org.sonarqube.ws.client.permission.SearchTemplatesWsRequest;
-import org.sonarqube.ws.client.permission.UsersWsRequest;
+import org.sonarqube.ws.client.permission.AddGroupToTemplateRequest;
+import org.sonarqube.ws.client.permission.AddGroupRequest;
+import org.sonarqube.ws.client.permission.AddProjectCreatorToTemplateRequest;
+import org.sonarqube.ws.client.permission.AddUserToTemplateRequest;
+import org.sonarqube.ws.client.permission.AddUserRequest;
+import org.sonarqube.ws.client.permission.CreateTemplateRequest;
+import org.sonarqube.ws.client.permission.GroupsRequest;
+import org.sonarqube.ws.client.permission.RemoveGroupFromTemplateRequest;
+import org.sonarqube.ws.client.permission.RemoveProjectCreatorFromTemplateRequest;
+import org.sonarqube.ws.client.permission.RemoveUserFromTemplateRequest;
+import org.sonarqube.ws.client.permission.SearchTemplatesRequest;
+import org.sonarqube.ws.client.permission.UsersRequest;
 import util.ItUtils;
 
 import static org.assertj.core.api.Assertions.assertThat;
@@ -79,11 +79,11 @@ public class PermissionSearchTest {
   @Test
   public void permission_web_services() {
     tester.wsClient().permissions().addUser(
-      new AddUserWsRequest()
+      new AddUserRequest()
         .setPermission("admin")
         .setLogin(LOGIN));
     tester.wsClient().permissions().addGroup(
-      new AddGroupWsRequest()
+      new AddGroupRequest()
         .setPermission("admin")
         .setGroupName(GROUP_NAME));
 
@@ -94,11 +94,11 @@ public class PermissionSearchTest {
     assertThat(searchGlobalPermissionsWsResponse.getPermissionsList().get(0).getGroupsCount()).isEqualTo(2);
 
     Permissions.UsersWsResponse users = tester.wsClient().permissions()
-      .users(new UsersWsRequest().setPermission("admin"));
+      .users(new UsersRequest().setPermission("admin"));
     assertThat(users.getUsersList()).extracting("login").contains(LOGIN);
 
     Permissions.WsGroupsResponse groupsResponse = tester.wsClient().permissions()
-      .groups(new GroupsWsRequest()
+      .groups(new GroupsRequest()
         .setPermission("admin"));
     assertThat(groupsResponse.getGroupsList()).extracting("name").contains(GROUP_NAME);
   }
@@ -106,31 +106,31 @@ public class PermissionSearchTest {
   @Test
   public void template_permission_web_services() {
     Permissions.CreateTemplateWsResponse createTemplateWsResponse = tester.wsClient().permissions().createTemplate(
-      new CreateTemplateWsRequest()
+      new CreateTemplateRequest()
         .setName("my-new-template")
         .setDescription("template-used-in-tests"));
     assertThat(createTemplateWsResponse.getPermissionTemplate().getName()).isEqualTo("my-new-template");
 
     tester.wsClient().permissions().addUserToTemplate(
-      new AddUserToTemplateWsRequest()
+      new AddUserToTemplateRequest()
         .setPermission("admin")
         .setTemplateName("my-new-template")
         .setLogin(LOGIN));
 
     tester.wsClient().permissions().addGroupToTemplate(
-      new AddGroupToTemplateWsRequest()
+      new AddGroupToTemplateRequest()
         .setPermission("admin")
         .setTemplateName("my-new-template")
         .setGroupName(GROUP_NAME));
 
     tester.wsClient().permissions().addProjectCreatorToTemplate(
-      AddProjectCreatorToTemplateWsRequest.builder()
+      AddProjectCreatorToTemplateRequest.builder()
         .setPermission("admin")
         .setTemplateName("my-new-template")
         .build());
 
     SearchTemplatesWsResponse searchTemplatesWsResponse = tester.wsClient().permissions().searchTemplates(
-      new SearchTemplatesWsRequest()
+      new SearchTemplatesRequest()
         .setQuery("my-new-template"));
     assertThat(searchTemplatesWsResponse.getPermissionTemplates(0).getName()).isEqualTo("my-new-template");
     assertThat(searchTemplatesWsResponse.getPermissionTemplates(0).getPermissions(0).getKey()).isEqualTo("admin");
@@ -139,26 +139,26 @@ public class PermissionSearchTest {
     assertThat(searchTemplatesWsResponse.getPermissionTemplates(0).getPermissions(0).getWithProjectCreator()).isTrue();
 
     tester.wsClient().permissions().removeGroupFromTemplate(
-      new RemoveGroupFromTemplateWsRequest()
+      new RemoveGroupFromTemplateRequest()
         .setPermission("admin")
         .setTemplateName("my-new-template")
         .setGroupName(GROUP_NAME));
 
     tester.wsClient().permissions().removeUserFromTemplate(
-      new RemoveUserFromTemplateWsRequest()
+      new RemoveUserFromTemplateRequest()
         .setPermission("admin")
         .setTemplateName("my-new-template")
         .setLogin(LOGIN));
 
     tester.wsClient().permissions().removeProjectCreatorFromTemplate(
-      RemoveProjectCreatorFromTemplateWsRequest.builder()
+      RemoveProjectCreatorFromTemplateRequest.builder()
         .setPermission("admin")
         .setTemplateName("my-new-template")
       .build()
     );
 
     SearchTemplatesWsResponse clearedSearchTemplatesWsResponse = tester.wsClient().permissions().searchTemplates(
-      new SearchTemplatesWsRequest()
+      new SearchTemplatesRequest()
         .setQuery("my-new-template"));
     assertThat(clearedSearchTemplatesWsResponse.getPermissionTemplates(0).getPermissionsList())
       .extracting(Permission::getUsersCount, Permission::getGroupsCount, Permission::getWithProjectCreator)
index 8ef4d43e9f95cdb894abc72b75586a84412bc57a..f5149f8c63140ccbbc5b038b2c516d81b15267f0 100644 (file)
@@ -26,9 +26,9 @@ import org.junit.Test;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.qa.util.pageobjects.ProjectsManagementPage;
 import org.sonarqube.ws.Permissions;
-import org.sonarqube.ws.client.permission.AddUserToTemplateWsRequest;
-import org.sonarqube.ws.client.permission.CreateTemplateWsRequest;
-import org.sonarqube.ws.client.permission.UsersWsRequest;
+import org.sonarqube.ws.client.permission.AddUserToTemplateRequest;
+import org.sonarqube.ws.client.permission.CreateTemplateRequest;
+import org.sonarqube.ws.client.permission.UsersRequest;
 
 import static org.assertj.core.api.Assertions.assertThat;
 
@@ -48,9 +48,9 @@ public class PermissionTemplatePageTest {
     String userLogin = tester.users().generateMemberOfDefaultOrganization().getLogin();
     String adminLogin = tester.users().generateAdministratorOnDefaultOrganization().getLogin();
 
-    tester.wsClient().permissions().createTemplate(new CreateTemplateWsRequest().setName("foo-template"));
+    tester.wsClient().permissions().createTemplate(new CreateTemplateRequest().setName("foo-template"));
     tester.wsClient().permissions().addUserToTemplate(
-      new AddUserToTemplateWsRequest()
+      new AddUserToTemplateRequest()
         .setPermission("admin")
         .setTemplateName("foo-template")
         .setLogin(userLogin));
@@ -58,7 +58,7 @@ public class PermissionTemplatePageTest {
     ProjectsManagementPage page = tester.openBrowser().logIn().submitCredentials(adminLogin).openProjectsManagement();
     page.shouldHaveProject(project);
     page.bulkApplyPermissionTemplate("foo-template");
-    Permissions.UsersWsResponse usersResponse = tester.wsClient().permissions().users(new UsersWsRequest()
+    Permissions.UsersWsResponse usersResponse = tester.wsClient().permissions().users(new UsersRequest()
       .setProjectKey(project)
       .setPermission("admin")
     );
index a0d4d4c7860b99cd734e455cc5d6347e5d9e7cc8..1f20a5b549a35bfd57071c7c8f6caeef81ed5176 100644 (file)
@@ -38,12 +38,12 @@ import org.sonarqube.ws.Projects.CreateWsResponse.Project;
 import org.sonarqube.ws.Users.CreateWsResponse;
 import org.sonarqube.ws.client.WsClient;
 import org.sonarqube.ws.client.component.SearchProjectsRequest;
-import org.sonarqube.ws.client.permission.AddUserToTemplateWsRequest;
-import org.sonarqube.ws.client.permission.ApplyTemplateWsRequest;
-import org.sonarqube.ws.client.permission.BulkApplyTemplateWsRequest;
-import org.sonarqube.ws.client.permission.CreateTemplateWsRequest;
+import org.sonarqube.ws.client.permission.AddUserToTemplateRequest;
+import org.sonarqube.ws.client.permission.ApplyTemplateRequest;
+import org.sonarqube.ws.client.permission.BulkApplyTemplateRequest;
+import org.sonarqube.ws.client.permission.CreateTemplateRequest;
 import org.sonarqube.ws.client.permission.PermissionsService;
-import org.sonarqube.ws.client.permission.UsersWsRequest;
+import org.sonarqube.ws.client.permission.UsersRequest;
 
 import static org.apache.commons.lang.RandomStringUtils.randomAlphabetic;
 import static org.assertj.core.api.Assertions.assertThat;
@@ -90,7 +90,7 @@ public class PermissionTemplateTest {
     CreateWsResponse.User user = tester.users().generateMember(organization);
     CreateWsResponse.User anotherUser = tester.users().generateMember(organization);
     Permissions.PermissionTemplate template = createTemplate(organization).getPermissionTemplate();
-    tester.wsClient().permissions().addUserToTemplate(new AddUserToTemplateWsRequest()
+    tester.wsClient().permissions().addUserToTemplate(new AddUserToTemplateRequest()
       .setOrganization(organization.getKey())
       .setTemplateId(template.getId())
       .setLogin(user.getLogin())
@@ -99,7 +99,7 @@ public class PermissionTemplateTest {
     Project project2 = createPrivateProject(organization);
     Project untouchedProject = createPrivateProject(organization);
 
-    tester.wsClient().permissions().bulkApplyTemplate(new BulkApplyTemplateWsRequest()
+    tester.wsClient().permissions().bulkApplyTemplate(new BulkApplyTemplateRequest()
       .setOrganization(organization.getKey())
       .setTemplateId(template.getId())
       .setProjects(Arrays.asList(project1.getKey(), project2.getKey())));
@@ -157,23 +157,23 @@ public class PermissionTemplateTest {
   private void createAndApplyTemplate(Organization organization, Project project, CreateWsResponse.User user) {
     String templateName = "For user";
     PermissionsService service = tester.wsClient().permissions();
-    service.createTemplate(new CreateTemplateWsRequest()
+    service.createTemplate(new CreateTemplateRequest()
       .setOrganization(organization.getKey())
       .setName(templateName)
       .setDescription("Give admin permissions to single user"));
-    service.addUserToTemplate(new AddUserToTemplateWsRequest()
+    service.addUserToTemplate(new AddUserToTemplateRequest()
       .setOrganization(organization.getKey())
       .setLogin(user.getLogin())
       .setPermission("user")
       .setTemplateName(templateName));
-    service.applyTemplate(new ApplyTemplateWsRequest()
+    service.applyTemplate(new ApplyTemplateRequest()
       .setOrganization(organization.getKey())
       .setProjectKey(project.getKey())
       .setTemplateName(templateName));
   }
 
   private CreateTemplateWsResponse createTemplate(Organization organization) {
-    return tester.wsClient().permissions().createTemplate(new CreateTemplateWsRequest()
+    return tester.wsClient().permissions().createTemplate(new CreateTemplateRequest()
       .setOrganization(organization.getKey())
       .setName(randomAlphabetic(20)));
   }
@@ -199,7 +199,7 @@ public class PermissionTemplateTest {
   }
 
   private boolean hasBrowsePermission(CreateWsResponse.User user, Organization organization, Project project) {
-    UsersWsRequest request = new UsersWsRequest()
+    UsersRequest request = new UsersRequest()
       .setOrganization(organization.getKey())
       .setProjectKey(project.getKey())
       .setPermission("user");
index 3a9da8f55a094bcf087f12ecca22a7d51812ee49..f2dd1d9a7043c9dbab1bdf11ec0452c4821c96cc 100644 (file)
@@ -27,10 +27,10 @@ import org.junit.Test;
 import org.junit.rules.RuleChain;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.Projects.CreateWsResponse.Project;
-import org.sonarqube.ws.client.permission.AddGroupWsRequest;
-import org.sonarqube.ws.client.permission.AddUserWsRequest;
-import org.sonarqube.ws.client.permission.RemoveGroupWsRequest;
-import org.sonarqube.ws.client.permission.RemoveUserWsRequest;
+import org.sonarqube.ws.client.permission.AddGroupRequest;
+import org.sonarqube.ws.client.permission.AddUserRequest;
+import org.sonarqube.ws.client.permission.RemoveGroupRequest;
+import org.sonarqube.ws.client.permission.RemoveUserRequest;
 import org.sonarqube.ws.client.project.CreateRequest;
 import util.ItUtils;
 
@@ -58,7 +58,7 @@ public class ProvisioningPermissionTest {
   @BeforeClass
   public static void init() {
     // remove default permission "provisioning" from anyone();
-    tester.wsClient().permissions().removeGroup(new RemoveGroupWsRequest().setGroupName("anyone").setPermission("provisioning"));
+    tester.wsClient().permissions().removeGroup(new RemoveGroupRequest().setGroupName("anyone").setPermission("provisioning"));
 
     tester.users().generate(u -> u.setLogin(ADMIN_WITH_PROVISIONING).setPassword(PASSWORD));
     addUserPermission(ADMIN_WITH_PROVISIONING, "admin");
@@ -77,7 +77,7 @@ public class ProvisioningPermissionTest {
 
   @AfterClass
   public static void restoreData() throws Exception {
-    tester.wsClient().permissions().addGroup(new AddGroupWsRequest().setGroupName("anyone").setPermission("provisioning"));
+    tester.wsClient().permissions().addGroup(new AddGroupRequest().setGroupName("anyone").setPermission("provisioning"));
   }
 
   /**
@@ -130,10 +130,10 @@ public class ProvisioningPermissionTest {
   }
 
   private static void addUserPermission(String login, String permission) {
-    tester.wsClient().permissions().addUser(new AddUserWsRequest().setLogin(login).setPermission(permission));
+    tester.wsClient().permissions().addUser(new AddUserRequest().setLogin(login).setPermission(permission));
   }
 
   private static void removeUserPermission(String login, String permission) {
-    tester.wsClient().permissions().removeUser(new RemoveUserWsRequest().setLogin(login).setPermission(permission));
+    tester.wsClient().permissions().removeUser(new RemoveUserRequest().setLogin(login).setPermission(permission));
   }
 }
index 97d784d596a68b44393a14519c83c5876f122c58..c06e735a0316c91281f779a17b8c97becee4fb03 100644 (file)
@@ -24,7 +24,7 @@ import org.junit.ClassRule;
 import org.junit.Rule;
 import org.junit.Test;
 import org.sonarqube.qa.util.Tester;
-import org.sonarqube.ws.client.permission.AddUserWsRequest;
+import org.sonarqube.ws.client.permission.AddUserRequest;
 import org.sonarqube.ws.client.qualityprofile.CreateRequest;
 import util.selenium.Selenese;
 
@@ -49,7 +49,7 @@ public class QualityProfileAdminPermissionTest {
 
     tester.users().generate(u -> u.setLogin("not_profileadm").setPassword("userpwd"));
     tester.users().generate(u -> u.setLogin("profileadm").setPassword("papwd"));
-    tester.wsClient().permissions().addUser(new AddUserWsRequest().setLogin("profileadm").setPermission("profileadmin"));
+    tester.wsClient().permissions().addUser(new AddUserRequest().setLogin("profileadm").setPermission("profileadmin"));
     createProfile("xoo", "foo");
 
     Selenese.runSelenese(orchestrator,
index ed6f9c9f82fdafc60cd325d6531eb0eb89ef85b7..ccb74e981ec5e9082566bf9d2de40b8b45694b9f 100644 (file)
@@ -48,7 +48,7 @@ import org.sonarqube.ws.Projects;
 import org.sonarqube.ws.Users;
 import org.sonarqube.ws.client.PostRequest;
 import org.sonarqube.ws.client.WsClient;
-import org.sonarqube.ws.client.permission.AddUserWsRequest;
+import org.sonarqube.ws.client.permission.AddUserRequest;
 import org.subethamail.wiser.Wiser;
 import org.subethamail.wiser.WiserMessage;
 
@@ -109,12 +109,12 @@ public class ReportFailureNotificationTest {
     Projects.CreateWsResponse.Project project2 = tester.projects().provision(organization, t -> t.setName("Project2"));
     Projects.CreateWsResponse.Project project3 = tester.projects().provision(organization, t -> t.setName("Project3"));
     // user 1 is admin of project 1 and will subscribe to global notifications
-    tester.wsClient().permissions().addUser(new AddUserWsRequest()
+    tester.wsClient().permissions().addUser(new AddUserRequest()
       .setLogin(user1.getLogin())
       .setPermission("admin")
       .setProjectKey(project1.getKey()));
     // user 2 is admin of project 2 but won't subscribe to global notifications
-    tester.wsClient().permissions().addUser(new AddUserWsRequest()
+    tester.wsClient().permissions().addUser(new AddUserRequest()
       .setLogin(user2.getLogin())
       .setPermission("admin")
       .setProjectKey(project2.getKey()));
index 81a621d0e053cdef2b41ac03bebb9602c006cd6e..a14c73445dfc1644acbc3f52d73e97ed04fb82e1 100644 (file)
@@ -27,8 +27,8 @@ import org.junit.Test;
 import org.junit.rules.RuleChain;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.Components;
-import org.sonarqube.ws.client.component.SearchWsRequest;
-import org.sonarqube.ws.client.component.ShowWsRequest;
+import org.sonarqube.ws.client.component.SearchRequest;
+import org.sonarqube.ws.client.component.ShowRequest;
 
 import static java.util.Collections.singletonList;
 import static org.assertj.core.api.Assertions.assertThat;
@@ -53,7 +53,7 @@ public class ComponentsWsTest {
 
   @Test
   public void show() {
-    Components.ShowWsResponse response = tester.wsClient().components().show(new ShowWsRequest().setKey(FILE_KEY));
+    Components.ShowWsResponse response = tester.wsClient().components().show(new ShowRequest().setKey(FILE_KEY));
 
     assertThat(response).isNotNull();
     assertThat(response.getComponent().getKey()).isEqualTo(FILE_KEY);
@@ -62,7 +62,7 @@ public class ComponentsWsTest {
 
   @Test
   public void search() {
-    Components.SearchWsResponse response = tester.wsClient().components().search(new SearchWsRequest()
+    Components.SearchWsResponse response = tester.wsClient().components().search(new SearchRequest()
       .setQualifiers(singletonList("FIL")));
 
     assertThat(response).isNotNull();
index 10d46f72611386df2419fd9c5a03a884690b75f1..934b045de475abd6e36269b51a0cacd9d3133060 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.Test;
 import org.junit.rules.RuleChain;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.client.GetRequest;
-import org.sonarqube.ws.client.issue.SearchWsRequest;
+import org.sonarqube.ws.client.issue.SearchRequest;
 import util.ItUtils;
 import util.issue.IssueRule;
 
@@ -94,7 +94,7 @@ public class CrossProjectDuplicationsTest {
 
   @Test
   public void issue_on_duplicated_blocks_is_generated_on_file() throws Exception {
-    assertThat(issueRule.search(new SearchWsRequest().setComponentKeys(singletonList(DUPLICATE_FILE)).setRules(singletonList("common-xoo:DuplicatedBlocks"))).getIssuesList())
+    assertThat(issueRule.search(new SearchRequest().setComponentKeys(singletonList(DUPLICATE_FILE)).setRules(singletonList("common-xoo:DuplicatedBlocks"))).getIssuesList())
       .hasSize(1);
   }
 
index 671513c579a997441dc63cf3c3ceab67b0887b2a..0efe0c0837bfe796a7deea235fc48d95d08688e5 100644 (file)
@@ -30,7 +30,7 @@ import org.junit.rules.RuleChain;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.WsResponse;
-import org.sonarqube.ws.client.issue.SearchWsRequest;
+import org.sonarqube.ws.client.issue.SearchRequest;
 import util.ItUtils;
 import util.issue.IssueRule;
 
@@ -153,7 +153,7 @@ public class DuplicationsTest {
 
   @Test
   public void issues_on_duplicated_blocks_are_generated_on_each_file() throws Exception {
-    assertThat(issueRule.search(new SearchWsRequest().setRules(singletonList("common-xoo:DuplicatedBlocks"))).getIssuesList()).hasSize(13);
+    assertThat(issueRule.search(new SearchRequest().setRules(singletonList("common-xoo:DuplicatedBlocks"))).getIssuesList()).hasSize(13);
   }
 
   @Test
index 69cddb89b7afe5cbf5a5f8f88faf4573df2f763a..e5a8aee0e5fbb9fd7ce469ae235e6ec55a7b8bdc 100644 (file)
@@ -24,7 +24,7 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 import org.sonarqube.ws.Issues.Issue;
 import org.sonarqube.ws.client.WsClient;
-import org.sonarqube.ws.client.issue.SearchWsRequest;
+import org.sonarqube.ws.client.issue.SearchRequest;
 import util.ItUtils;
 
 import static java.util.Collections.singletonList;
@@ -87,7 +87,7 @@ public class CommonRulesTest extends AbstractIssueTest {
 
   private List<Issue> findIssues(String componentKey, String ruleKey) {
     return adminWsClient.issues().search(
-      new SearchWsRequest()
+      new SearchRequest()
         .setComponents(singletonList(componentKey))
         .setRules(singletonList(ruleKey)))
       .getIssuesList();
index 6ef4ae9573e1215a5bb1f99a6f1b7d8d538f06f7..dbb4d6eef173016a0b5c37a64f7563f963ce8a7e 100644 (file)
@@ -30,7 +30,7 @@ import org.sonarqube.ws.client.issue.AddCommentRequest;
 import org.sonarqube.ws.client.issue.AssignRequest;
 import org.sonarqube.ws.client.issue.EditCommentRequest;
 import org.sonarqube.ws.client.issue.IssuesService;
-import org.sonarqube.ws.client.issue.SearchWsRequest;
+import org.sonarqube.ws.client.issue.SearchRequest;
 import org.sonarqube.ws.client.issue.SetSeverityRequest;
 import util.ProjectAnalysis;
 import util.ProjectAnalysisRule;
@@ -157,18 +157,18 @@ public class IssueActionTest extends AbstractIssueTest {
   @Test
   public void assign() {
     assertThat(randomIssue.hasAssignee()).isFalse();
-    Issues.SearchWsResponse response = issueRule.search(new SearchWsRequest().setIssues(singletonList(randomIssue.getKey())));
+    Issues.SearchWsResponse response = issueRule.search(new SearchRequest().setIssues(singletonList(randomIssue.getKey())));
     assertThat(response.getUsers().getUsersList()).isEmpty();
 
     issuesService.assign(new AssignRequest(randomIssue.getKey(), "admin"));
-    assertThat(issueRule.search(new SearchWsRequest().setAssignees(singletonList("admin"))).getIssuesList()).hasSize(1);
+    assertThat(issueRule.search(new SearchRequest().setAssignees(singletonList("admin"))).getIssuesList()).hasSize(1);
 
     projectAnalysis.run();
     Issue reloaded = issueRule.getByKey(randomIssue.getKey());
     assertThat(reloaded.getAssignee()).isEqualTo("admin");
     assertThat(reloaded.getCreationDate()).isEqualTo(randomIssue.getCreationDate());
 
-    response = issueRule.search(new SearchWsRequest().setIssues(singletonList(randomIssue.getKey())).setAdditionalFields(singletonList("users")));
+    response = issueRule.search(new SearchRequest().setIssues(singletonList(randomIssue.getKey())).setAdditionalFields(singletonList("users")));
     assertThat(response.getUsers().getUsersList().stream().filter(user -> "admin".equals(user.getLogin())).findFirst()).isPresent();
     assertThat(response.getUsers().getUsersList().stream().filter(user -> "Administrator".equals(user.getName())).findFirst()).isPresent();
 
@@ -176,7 +176,7 @@ public class IssueActionTest extends AbstractIssueTest {
     issuesService.assign(new AssignRequest(randomIssue.getKey(), null));
     reloaded = issueRule.getByKey(randomIssue.getKey());
     assertThat(reloaded.hasAssignee()).isFalse();
-    assertThat(issueRule.search(new SearchWsRequest().setAssignees(singletonList("admin"))).getIssuesList()).isEmpty();
+    assertThat(issueRule.search(new SearchRequest().setAssignees(singletonList("admin"))).getIssuesList()).isEmpty();
   }
 
   /**
@@ -194,7 +194,7 @@ public class IssueActionTest extends AbstractIssueTest {
   }
 
   private static List<Issue> searchIssuesBySeverities(String projectKey, String severity) {
-    return issueRule.search(new SearchWsRequest().setProjectKeys(singletonList(projectKey)).setSeverities(singletonList(severity))).getIssuesList();
+    return issueRule.search(new SearchRequest().setProjectKeys(singletonList(projectKey)).setSeverities(singletonList(severity))).getIssuesList();
   }
 
 }
index b62cf49a22caa3e0f1c183e76ab523514fa14b82..4c4fd88cf2d5f0a5bf508777a7f54768e6492bff 100644 (file)
@@ -31,7 +31,7 @@ import org.sonarqube.ws.Issues;
 import org.sonarqube.ws.Issues.BulkChangeWsResponse;
 import org.sonarqube.ws.client.issue.BulkChangeRequest;
 import org.sonarqube.ws.client.issue.IssuesService;
-import org.sonarqube.ws.client.issue.SearchWsRequest;
+import org.sonarqube.ws.client.issue.SearchRequest;
 import util.ProjectAnalysis;
 import util.ProjectAnalysisRule;
 import util.issue.IssueRule;
@@ -259,7 +259,7 @@ public class IssueBulkChangeTest extends AbstractIssueTest {
   }
 
   private static String[] searchIssueKeys(int limit) {
-    return getIssueKeys(issueRule.search(new SearchWsRequest()).getIssuesList(), limit);
+    return getIssueKeys(issueRule.search(new SearchRequest()).getIssuesList(), limit);
   }
 
   private static String[] getIssueKeys(List<Issues.Issue> issues, int nbIssues) {
index 8012aec2ef79f14c344d64cd748843576410e0c1..a7a8708a382c6df6cb32a760963d6ca5de40d433 100644 (file)
@@ -25,7 +25,7 @@ import org.junit.Before;
 import org.junit.Test;
 import org.sonarqube.ws.Issues;
 import org.sonarqube.ws.client.WsClient;
-import org.sonarqube.ws.client.issue.SearchWsRequest;
+import org.sonarqube.ws.client.issue.SearchRequest;
 import util.ItUtils;
 
 import static java.util.Collections.singletonList;
@@ -113,14 +113,14 @@ public class IssueFilterOnCommonRulesTest extends AbstractIssueTest {
 
   private List<Issues.Issue> findIssuesByRuleKey(String ruleKey) {
     return adminWsClient.issues().search(
-      new SearchWsRequest()
+      new SearchRequest()
         .setComponents(singletonList(FILE_KEY))
         .setRules(singletonList(ruleKey)))
       .getIssuesList();
   }
 
   private List<Issues.Issue> findAllIssues() {
-    return adminWsClient.issues().search(new SearchWsRequest()).getIssuesList();
+    return adminWsClient.issues().search(new SearchRequest()).getIssuesList();
   }
 
 }
index b5bcef079549b50fbf71271452a9f5ff20872260..529191d714593ba64d9ed329c16b3a1354e20629 100644 (file)
@@ -52,8 +52,8 @@ import org.sonarqube.ws.client.PostRequest;
 import org.sonarqube.ws.client.WsClient;
 import org.sonarqube.ws.client.issue.AssignRequest;
 import org.sonarqube.ws.client.issue.BulkChangeRequest;
-import org.sonarqube.ws.client.issue.SearchWsRequest;
-import org.sonarqube.ws.client.permission.AddUserWsRequest;
+import org.sonarqube.ws.client.issue.SearchRequest;
+import org.sonarqube.ws.client.permission.AddUserRequest;
 import org.subethamail.wiser.Wiser;
 import org.subethamail.wiser.WiserMessage;
 
@@ -174,7 +174,7 @@ public class IssueNotificationsTest {
     clearSmtpMessages();
 
     // Change assignee
-    SearchWsResponse issues = tester.wsClient().issues().search(new SearchWsRequest().setProjectKeys(singletonList(PROJECT_KEY)));
+    SearchWsResponse issues = tester.wsClient().issues().search(new SearchRequest().setProjectKeys(singletonList(PROJECT_KEY)));
     Issue issue = issues.getIssuesList().get(0);
     tester.wsClient().issues().assign(new AssignRequest(issue.getKey(), userWithUserRole.getLogin()));
 
@@ -245,7 +245,7 @@ public class IssueNotificationsTest {
     assertThat(smtpServer.getMessages()).hasSize(privateProject ? 2 : 3);
     clearSmtpMessages();
 
-    SearchWsResponse issues = tester.wsClient().issues().search(new SearchWsRequest().setProjectKeys(singletonList(PROJECT_KEY)));
+    SearchWsResponse issues = tester.wsClient().issues().search(new SearchRequest().setProjectKeys(singletonList(PROJECT_KEY)));
     Issue issue = issues.getIssuesList().get(0);
 
     // bulk change without notification by default
@@ -307,7 +307,7 @@ public class IssueNotificationsTest {
         .setEmail("userWithUserRole@nowhere.com"));
     tester.organizations().addMember(organization, userWithUserRole);
     tester.wsClient().permissions().addUser(
-      new AddUserWsRequest()
+      new AddUserRequest()
         .setLogin(userWithUserRole.getLogin())
         .setProjectKey(PROJECT_KEY)
         .setPermission("user"));
index 1ad0be32cd97a264e11407f2ff29a279aa4902a9..a6984ddb4eb77a20b5b3fe6876f0c3761c5a1910 100644 (file)
@@ -35,7 +35,7 @@ import org.sonar.wsclient.issue.Issue;
 import org.sonar.wsclient.issue.IssueQuery;
 import org.sonar.wsclient.issue.Issues;
 import org.sonarqube.ws.Common;
-import org.sonarqube.ws.client.issue.SearchWsRequest;
+import org.sonarqube.ws.client.issue.SearchRequest;
 import util.ItUtils;
 
 import static java.util.Arrays.asList;
@@ -261,16 +261,16 @@ public class IssueSearchTest extends AbstractIssueTest {
 
   @Test
   public void search_issues_by_types() throws IOException {
-    assertThat(searchIssues(new SearchWsRequest().setTypes(singletonList("CODE_SMELL"))).getPaging().getTotal()).isEqualTo(142);
-    assertThat(searchIssues(new SearchWsRequest().setTypes(singletonList("BUG"))).getPaging().getTotal()).isEqualTo(122);
-    assertThat(searchIssues(new SearchWsRequest().setTypes(singletonList("VULNERABILITY"))).getPaging().getTotal()).isEqualTo(8);
+    assertThat(searchIssues(new SearchRequest().setTypes(singletonList("CODE_SMELL"))).getPaging().getTotal()).isEqualTo(142);
+    assertThat(searchIssues(new SearchRequest().setTypes(singletonList("BUG"))).getPaging().getTotal()).isEqualTo(122);
+    assertThat(searchIssues(new SearchRequest().setTypes(singletonList("VULNERABILITY"))).getPaging().getTotal()).isEqualTo(8);
   }
 
   private List<org.sonarqube.ws.Issues.Issue> searchByRuleKey(String... ruleKey) throws IOException {
-    return searchIssues(new SearchWsRequest().setRules(asList(ruleKey))).getIssuesList();
+    return searchIssues(new SearchRequest().setRules(asList(ruleKey))).getIssuesList();
   }
 
-  private SearchWsResponse searchIssues(SearchWsRequest request) throws IOException {
+  private SearchWsResponse searchIssues(SearchRequest request) throws IOException {
     return newAdminWsClient(ORCHESTRATOR).issues().search(request);
   }
 
index e802dc945ac734547cff3eb1526a5fdf9ac6deee..2e4f00e1885aef5295de727f2d7db588e9bff5ca 100644 (file)
@@ -32,8 +32,8 @@ import org.junit.Test;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.Organizations.Organization;
 import org.sonarqube.ws.Users.CreateWsResponse.User;
-import org.sonarqube.ws.client.issue.SearchWsRequest;
-import org.sonarqube.ws.client.permission.AddUserWsRequest;
+import org.sonarqube.ws.client.issue.SearchRequest;
+import org.sonarqube.ws.client.permission.AddUserRequest;
 import org.sonarqube.ws.client.project.CreateRequest;
 import util.ItUtils;
 
@@ -75,7 +75,7 @@ public class IssueTagsTest {
         .build());
     analyzeProject(projectKey);
 
-    String issue = tester.wsClient().issues().search(new SearchWsRequest()).getIssues(0).getKey();
+    String issue = tester.wsClient().issues().search(new SearchRequest()).getIssues(0).getKey();
     tester.wsClient().issues().setTags(issue, "bla", "blubb");
 
     String[] publicTags = {"bad-practice", "convention", "pitfall"};
@@ -112,7 +112,7 @@ public class IssueTagsTest {
 
   private void grantUserPermission(String projectKey, User member) {
     tester.wsClient().permissions().addUser(
-      new AddUserWsRequest()
+      new AddUserRequest()
         .setLogin(member.getLogin())
         .setPermission("user")
         .setProjectKey(projectKey));
index 27a9ed0e80feee78cfdf51ab7d2213dbe3a19b0c..632cfa5d810a0d3240d498aa6945add891a3c117 100644 (file)
@@ -27,7 +27,7 @@ import org.junit.Test;
 import org.sonarqube.ws.Issues.Issue;
 import org.sonarqube.ws.Issues.SearchWsResponse;
 import org.sonarqube.ws.client.WsClient;
-import org.sonarqube.ws.client.issue.SearchWsRequest;
+import org.sonarqube.ws.client.issue.SearchRequest;
 import util.ItUtils;
 
 import static java.util.Collections.singletonList;
@@ -71,7 +71,7 @@ public class IssueTrackingTest extends AbstractIssueTest {
       "sonar.projectDate", NEW_DATE_STR,
       "sonar.exclusions", "**/*.xoo");
 
-    issues = searchIssues(new SearchWsRequest().setProjectKeys(singletonList("sample"))).getIssuesList();
+    issues = searchIssues(new SearchRequest().setProjectKeys(singletonList("sample"))).getIssuesList();
     assertThat(issues).hasSize(1);
     assertThat(issues.get(0).getStatus()).isEqualTo("CLOSED");
     assertThat(issues.get(0).getResolution()).isEqualTo("FIXED");
@@ -119,14 +119,14 @@ public class IssueTrackingTest extends AbstractIssueTest {
     runProjectAnalysis(ORCHESTRATOR, "shared/xoo-sample");
 
     // Only one issue is created
-    assertThat(searchIssues(new SearchWsRequest()).getIssuesList()).hasSize(1);
+    assertThat(searchIssues(new SearchRequest()).getIssuesList()).hasSize(1);
     Issue issue = getRandomIssue();
 
     // Re analysis of the same project
     runProjectAnalysis(ORCHESTRATOR, "shared/xoo-sample");
 
     // No new issue should be created
-    assertThat(searchIssues(new SearchWsRequest()).getIssuesList()).hasSize(1);
+    assertThat(searchIssues(new SearchRequest()).getIssuesList()).hasSize(1);
 
     // The issue on module should stay open and be the same from the first analysis
     Issue reloadIssue = getIssueByKey(issue.getKey());
@@ -146,14 +146,14 @@ public class IssueTrackingTest extends AbstractIssueTest {
     runProjectAnalysis(ORCHESTRATOR, "shared/xoo-multi-modules-sample");
 
     // One issue by module are created
-    List<Issue> issues = searchIssues(new SearchWsRequest()).getIssuesList();
+    List<Issue> issues = searchIssues(new SearchRequest()).getIssuesList();
     assertThat(issues).hasSize(4);
 
     // Re analysis of the same project
     runProjectAnalysis(ORCHESTRATOR, "shared/xoo-multi-modules-sample");
 
     // No new issue should be created
-    assertThat(searchIssues(new SearchWsRequest()).getIssuesList()).hasSize(issues.size());
+    assertThat(searchIssues(new SearchRequest()).getIssuesList()).hasSize(issues.size());
 
     // Issues on modules should stay open and be the same from the first analysis
     for (Issue issue : issues) {
@@ -200,20 +200,20 @@ public class IssueTrackingTest extends AbstractIssueTest {
   }
 
   private List<Issue> searchUnresolvedIssuesByComponent(String componentKey) {
-    return searchIssues(new SearchWsRequest().setComponentKeys(singletonList(componentKey)).setResolved(false)).getIssuesList();
+    return searchIssues(new SearchRequest().setComponentKeys(singletonList(componentKey)).setResolved(false)).getIssuesList();
   }
 
   private static Issue getRandomIssue() {
-    return searchIssues(new SearchWsRequest()).getIssues(0);
+    return searchIssues(new SearchRequest()).getIssues(0);
   }
 
   private static Issue getIssueByKey(String issueKey) {
-    SearchWsResponse search = searchIssues(new SearchWsRequest().setIssues(singletonList(issueKey)));
+    SearchWsResponse search = searchIssues(new SearchRequest().setIssues(singletonList(issueKey)));
     assertThat(search.getTotal()).isEqualTo(1);
     return search.getIssues(0);
   }
 
-  private static SearchWsResponse searchIssues(SearchWsRequest request) {
+  private static SearchWsResponse searchIssues(SearchRequest request) {
     return adminClient.issues().search(request);
   }
 
index bfcd4afca840b24ea422c8d805e3cdcc5f488f00..47db3ad031cee573db259e94b077e730d8cfa3a1 100644 (file)
@@ -28,7 +28,7 @@ import org.sonarqube.ws.Issues;
 import org.sonarqube.ws.Issues.Issue;
 import org.sonarqube.ws.client.issue.DoTransitionRequest;
 import org.sonarqube.ws.client.issue.IssuesService;
-import org.sonarqube.ws.client.issue.SearchWsRequest;
+import org.sonarqube.ws.client.issue.SearchRequest;
 import util.ProjectAnalysis;
 import util.ProjectAnalysisRule;
 import util.issue.IssueRule;
@@ -70,7 +70,7 @@ public class IssueWorkflowTest extends AbstractIssueTest {
    */
   @Test
   public void issue_is_closed_as_removed_when_rule_is_disabled() throws Exception {
-    SearchWsRequest ruleSearchRequest = new SearchWsRequest().setRules(singletonList("xoo:OneIssuePerLine"));
+    SearchRequest ruleSearchRequest = new SearchRequest().setRules(singletonList("xoo:OneIssuePerLine"));
     List<Issue> issues = issueRule.search(ruleSearchRequest).getIssuesList();
     assertThat(issues).isNotEmpty();
 
@@ -302,12 +302,12 @@ public class IssueWorkflowTest extends AbstractIssueTest {
   }
 
   private List<String> transitions(String issueKey) {
-    Issues.SearchWsResponse response = searchIssues(new SearchWsRequest().setIssues(singletonList(issueKey)).setAdditionalFields(singletonList("transitions")));
+    Issues.SearchWsResponse response = searchIssues(new SearchRequest().setIssues(singletonList(issueKey)).setAdditionalFields(singletonList("transitions")));
     assertThat(response.getTotal()).isEqualTo(1);
     return response.getIssues(0).getTransitions().getTransitionsList();
   }
 
-  private Issues.SearchWsResponse searchIssues(SearchWsRequest request) {
+  private Issues.SearchWsResponse searchIssues(SearchRequest request) {
     return newAdminWsClient(ORCHESTRATOR).issues().search(request);
   }
 
index db359df105677d78d0ae006259e7dd5836f91fc1..2f223fe66a1e3cf900dd96b48307bdc3f19ad367 100644 (file)
@@ -35,7 +35,7 @@ import org.sonarqube.ws.Organizations;
 import org.sonarqube.ws.Users.CreateWsResponse.User;
 import org.sonarqube.ws.client.issue.AssignRequest;
 import org.sonarqube.ws.client.issue.BulkChangeRequest;
-import org.sonarqube.ws.client.issue.SearchWsRequest;
+import org.sonarqube.ws.client.issue.SearchRequest;
 import org.sonarqube.ws.client.project.CreateRequest;
 import org.sonarqube.ws.client.qualityprofile.AddProjectRequest;
 import org.sonarqube.qa.util.pageobjects.issues.IssuesPage;
@@ -125,15 +125,15 @@ public class OrganizationIssueAssignTest {
     tester.organizations().addMember(org1, user);
     provisionAndAnalyseProject(SAMPLE_PROJECT_KEY, org1.getKey());
     provisionAndAnalyseProject("sample2", org2.getKey());
-    List<String> issues = issueRule.search(new org.sonarqube.ws.client.issue.SearchWsRequest()).getIssuesList().stream().map(Issue::getKey).collect(Collectors.toList());
+    List<String> issues = issueRule.search(new SearchRequest()).getIssuesList().stream().map(Issue::getKey).collect(Collectors.toList());
 
     Issues.BulkChangeWsResponse response = tester.wsClient().issues()
       .bulkChange(BulkChangeRequest.builder().setIssues(issues).setAssign(user.getLogin()).build());
 
     assertThat(response.getIgnored()).isGreaterThan(0);
-    assertThat(issueRule.search(new SearchWsRequest().setProjectKeys(singletonList("sample"))).getIssuesList()).extracting(Issue::getAssignee)
+    assertThat(issueRule.search(new SearchRequest().setProjectKeys(singletonList("sample"))).getIssuesList()).extracting(Issue::getAssignee)
       .containsOnly(user.getLogin());
-    assertThat(issueRule.search(new SearchWsRequest().setProjectKeys(singletonList("sample2"))).getIssuesList()).extracting(Issue::hasAssignee)
+    assertThat(issueRule.search(new SearchRequest().setProjectKeys(singletonList("sample2"))).getIssuesList()).extracting(Issue::hasAssignee)
       .containsOnly(false);
   }
 
index 66245b7259e49647c74bbfe95912c5e0dea61e5d..84c4c4c1bf3ca2bf59b8001f99d5a9c15ee731c0 100644 (file)
@@ -28,11 +28,11 @@ import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.Issues;
 import org.sonarqube.ws.Components;
 import org.sonarqube.ws.Measures;
-import org.sonarqube.ws.client.component.TreeWsRequest;
+import org.sonarqube.ws.client.component.TreeRequest;
 import org.sonarqube.ws.client.issue.IssuesService;
-import org.sonarqube.ws.client.issue.SearchWsRequest;
-import org.sonarqube.ws.client.measure.ComponentTreeWsRequest;
-import org.sonarqube.ws.client.measure.ComponentWsRequest;
+import org.sonarqube.ws.client.issue.SearchRequest;
+import org.sonarqube.ws.client.measure.ComponentTreeRequest;
+import org.sonarqube.ws.client.measure.ComponentRequest;
 import org.sonarqube.ws.client.measure.MeasuresService;
 
 import static java.util.Arrays.asList;
@@ -64,18 +64,18 @@ public class LiteTest {
   public void call_issues_ws() {
     // all issues
     IssuesService issuesService = tester.wsClient().issues();
-    Issues.SearchWsResponse response = issuesService.search(new SearchWsRequest());
+    Issues.SearchWsResponse response = issuesService.search(new SearchRequest());
     assertThat(response.getIssuesCount()).isGreaterThan(0);
 
     // project issues
-    response = issuesService.search(new SearchWsRequest().setProjectKeys(singletonList(PROJECT_KEY)));
+    response = issuesService.search(new SearchRequest().setProjectKeys(singletonList(PROJECT_KEY)));
     assertThat(response.getIssuesCount()).isGreaterThan(0);
   }
 
   @Test
   public void call_components_ws() {
     // files in project
-    Components.TreeWsResponse tree = tester.wsClient().components().tree(new TreeWsRequest()
+    Components.TreeWsResponse tree = tester.wsClient().components().tree(new TreeRequest()
       .setBaseComponentKey(PROJECT_KEY)
       .setQualifiers(singletonList("FIL")));
     assertThat(tree.getComponentsCount()).isEqualTo(4);
@@ -89,13 +89,13 @@ public class LiteTest {
   public void call_measures_ws() {
     // project measures
     MeasuresService measuresService = tester.wsClient().measures();
-    Measures.ComponentWsResponse component = measuresService.component(new ComponentWsRequest()
+    Measures.ComponentWsResponse component = measuresService.component(new ComponentRequest()
       .setComponentKey(PROJECT_KEY)
       .setMetricKeys(asList("lines", "ncloc", "files")));
     assertThat(component.getComponent().getMeasuresCount()).isEqualTo(3);
 
     // file measures
-    Measures.ComponentTreeWsResponse tree = measuresService.componentTree(new ComponentTreeWsRequest()
+    Measures.ComponentTreeWsResponse tree = measuresService.componentTree(new ComponentTreeRequest()
       .setBaseComponentKey(PROJECT_KEY)
       .setQualifiers(singletonList("FIL"))
       .setMetricKeys(asList("lines", "ncloc")));
index e83ab8f5c8a390307cccc7bc7735810f06ea4fe5..71f1460addf4ab21d8abcf220ce3111a9169e549 100644 (file)
@@ -30,8 +30,8 @@ import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.Measures;
 import org.sonarqube.ws.Measures.ComponentTreeWsResponse;
 import org.sonarqube.ws.Measures.ComponentWsResponse;
-import org.sonarqube.ws.client.measure.ComponentTreeWsRequest;
-import org.sonarqube.ws.client.measure.ComponentWsRequest;
+import org.sonarqube.ws.client.measure.ComponentTreeRequest;
+import org.sonarqube.ws.client.measure.ComponentRequest;
 
 import static com.google.common.collect.Lists.newArrayList;
 import static java.util.Arrays.asList;
@@ -59,7 +59,7 @@ public class MeasuresWsTest {
   public void component_tree() {
     scanXooSample();
 
-    ComponentTreeWsResponse response = tester.wsClient().measures().componentTree(new ComponentTreeWsRequest()
+    ComponentTreeWsResponse response = tester.wsClient().measures().componentTree(new ComponentTreeRequest()
       .setComponent("sample")
       .setMetricKeys(singletonList("ncloc"))
       .setAdditionalFields(asList("metrics", "periods")));
@@ -123,7 +123,7 @@ public class MeasuresWsTest {
   }
 
   private void verifyComponentTreeWithChildren(String baseComponentKey, String... childKeys) {
-    ComponentTreeWsResponse response = tester.wsClient().measures().componentTree(new ComponentTreeWsRequest()
+    ComponentTreeWsResponse response = tester.wsClient().measures().componentTree(new ComponentTreeRequest()
       .setComponent(baseComponentKey)
       .setMetricKeys(singletonList("ncloc"))
       .setStrategy("children"));
@@ -137,7 +137,7 @@ public class MeasuresWsTest {
   public void component() {
     scanXooSample();
 
-    ComponentWsResponse response = tester.wsClient().measures().component(new ComponentWsRequest()
+    ComponentWsResponse response = tester.wsClient().measures().component(new ComponentRequest()
       .setComponent("sample")
       .setMetricKeys(singletonList("ncloc"))
       .setAdditionalFields(newArrayList("metrics", "periods")));
index 33c6de854b8b195e1290a1b7075924eda25fab70..3ee724c08a4f354834a51096533047c09f94848a 100644 (file)
@@ -34,7 +34,7 @@ import org.sonarqube.ws.Users.CreateWsResponse.User;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.WsResponse;
 import org.sonarqube.ws.client.ce.TaskRequest;
-import org.sonarqube.ws.client.organization.UpdateProjectVisibilityWsRequest;
+import org.sonarqube.ws.client.organization.UpdateProjectVisibilityRequest;
 import org.sonarqube.ws.client.project.CreateRequest;
 import org.sonarqube.ws.client.project.UpdateVisibilityRequest;
 import util.ItUtils;
@@ -127,7 +127,7 @@ public class BillingTest {
   public void does_not_fail_to_update_default_projects_visibility_to_private() {
     tester.settings().setGlobalSettings("sonar.billing.preventUpdatingProjectsVisibilityToPrivate", "false");
 
-    tester.wsClient().organizations().updateProjectVisibility(UpdateProjectVisibilityWsRequest.builder()
+    tester.wsClient().organizations().updateProjectVisibility(UpdateProjectVisibilityRequest.builder()
       .setOrganization(organization.getKey())
       .setProjectVisibility("private")
       .build());
@@ -143,7 +143,7 @@ public class BillingTest {
     expectHttpError(400,
       format("Organization %s cannot use private project", organization.getKey()),
       () -> tester.wsClient().organizations()
-        .updateProjectVisibility(UpdateProjectVisibilityWsRequest.builder().setOrganization(organization.getKey()).setProjectVisibility("private").build()));
+        .updateProjectVisibility(UpdateProjectVisibilityRequest.builder().setOrganization(organization.getKey()).setProjectVisibility("private").build()));
   }
 
   @Test
index 2b738c24afd227221b70e4cfbc770a4c90a268af..27168955514e5c303cf9963b3890142385647dbc 100644 (file)
@@ -31,7 +31,7 @@ import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.Organizations.Organization;
 import org.sonarqube.ws.Users.CreateWsResponse.User;
 import org.sonarqube.ws.client.HttpException;
-import org.sonarqube.ws.client.permission.AddUserWsRequest;
+import org.sonarqube.ws.client.permission.AddUserRequest;
 
 public class OrganizationMembershipTest {
 
@@ -78,7 +78,7 @@ public class OrganizationMembershipTest {
     User user = tester.users().generate();
     addMembership(organization, user);
 
-    tester.wsClient().permissions().addUser(new AddUserWsRequest().setLogin(user.getLogin()).setPermission("admin").setOrganization(organization.getKey()));
+    tester.wsClient().permissions().addUser(new AddUserRequest().setLogin(user.getLogin()).setPermission("admin").setOrganization(organization.getKey()));
     tester.organizations().assertThatMemberOf(organization, user);
 
     removeMembership(organization, user);
@@ -91,7 +91,7 @@ public class OrganizationMembershipTest {
     User user = tester.users().generate();
     addMembership(organization, user);
 
-    tester.wsClient().permissions().addUser(new AddUserWsRequest().setLogin(user.getLogin()).setPermission("admin").setOrganization(organization.getKey()));
+    tester.wsClient().permissions().addUser(new AddUserRequest().setLogin(user.getLogin()).setPermission("admin").setOrganization(organization.getKey()));
     tester.organizations().assertThatMemberOf(organization, user);
     // Admin is the creator of the organization so he was granted with admin permission
     tester.wsClient().organizations().removeMember(organization.getKey(), "admin");
index a0067d75aa1d740f102efdeba2a6f6531261c457..8995f90a42d9b26c52c7238d3699f756d2b5a7cb 100644 (file)
@@ -37,11 +37,11 @@ import org.sonarqube.ws.UserGroups.Group;
 import org.sonarqube.ws.Users;
 import org.sonarqube.ws.Users.CreateWsResponse.User;
 import org.sonarqube.ws.client.component.ComponentsService;
-import org.sonarqube.ws.client.organization.CreateWsRequest;
+import org.sonarqube.ws.client.organization.CreateRequest;
 import org.sonarqube.ws.client.organization.OrganizationService;
-import org.sonarqube.ws.client.organization.SearchWsRequest;
-import org.sonarqube.ws.client.organization.UpdateWsRequest;
-import org.sonarqube.ws.client.permission.AddUserWsRequest;
+import org.sonarqube.ws.client.organization.SearchRequest;
+import org.sonarqube.ws.client.organization.UpdateRequest;
+import org.sonarqube.ws.client.permission.AddUserRequest;
 import org.sonarqube.ws.client.permission.PermissionsService;
 import org.sonarqube.ws.client.roots.SetRootRequest;
 import org.sonarqube.ws.client.roots.UnsetRootRequest;
@@ -77,7 +77,7 @@ public class OrganizationTest {
 
   @Test
   public void default_organization_should_exist() {
-    Organization defaultOrg = tester.organizations().service().search(SearchWsRequest.builder().build())
+    Organization defaultOrg = tester.organizations().service().search(SearchRequest.builder().build())
       .getOrganizationsList()
       .stream()
       .filter(Organization::getGuarded)
@@ -111,7 +111,7 @@ public class OrganizationTest {
     assertThatBuiltInQualityProfilesExist(org);
 
     // update by key
-    service.update(new UpdateWsRequest.Builder()
+    service.update(new UpdateRequest.Builder()
       .setKey(org.getKey())
       .setName("new name")
       .setDescription("new description")
@@ -121,7 +121,7 @@ public class OrganizationTest {
     verifyOrganization(org, "new name", "new description", "new url", "new avatar url");
 
     // remove optional fields
-    service.update(new UpdateWsRequest.Builder()
+    service.update(new UpdateRequest.Builder()
       .setKey(org.getKey())
       .setName("new name 2")
       .setDescription("")
@@ -136,7 +136,7 @@ public class OrganizationTest {
     assertThatQualityProfilesDoNotExist(org);
 
     // create again
-    service.create(new CreateWsRequest.Builder()
+    service.create(new CreateRequest.Builder()
       .setName(NAME)
       .setKey(org.getKey())
       .build())
@@ -149,7 +149,7 @@ public class OrganizationTest {
     // create organization without key
     String name = "Foo  Company to keyize";
     String expectedKey = "foo-company-to-keyize";
-    Organization createdOrganization = tester.organizations().service().create(new CreateWsRequest.Builder()
+    Organization createdOrganization = tester.organizations().service().create(new CreateRequest.Builder()
       .setName(name)
       .build())
       .getOrganization();
@@ -163,7 +163,7 @@ public class OrganizationTest {
     OrganizationTester anonymousTester = tester.asAnonymous().organizations();
 
     expectForbiddenError(() -> anonymousTester.generate());
-    expectUnauthorizedError(() -> anonymousTester.service().update(new UpdateWsRequest.Builder().setKey(org.getKey()).setName("new name").build()));
+    expectUnauthorizedError(() -> anonymousTester.service().update(new UpdateRequest.Builder().setKey(org.getKey()).setName("new name").build()));
     expectUnauthorizedError(() -> anonymousTester.service().delete(org.getKey()));
   }
 
@@ -174,7 +174,7 @@ public class OrganizationTest {
     OrganizationTester userTester = tester.as(user.getLogin()).organizations();
 
     expectForbiddenError(() -> userTester.generate());
-    expectForbiddenError(() -> userTester.service().update(new UpdateWsRequest.Builder().setKey(org.getKey()).setName("new name").build()));
+    expectForbiddenError(() -> userTester.service().update(new UpdateRequest.Builder().setKey(org.getKey()).setName("new name").build()));
     expectForbiddenError(() -> userTester.service().delete(org.getKey()));
   }
 
@@ -238,9 +238,9 @@ public class OrganizationTest {
 
   private void addPermissionsToUser(String orgKeyAndName, String login, String permission, String... otherPermissions) {
     PermissionsService permissionsService = tester.wsClient().permissions();
-    permissionsService.addUser(new AddUserWsRequest().setLogin(login).setOrganization(orgKeyAndName).setPermission(permission));
+    permissionsService.addUser(new AddUserRequest().setLogin(login).setOrganization(orgKeyAndName).setPermission(permission));
     for (String otherPermission : otherPermissions) {
-      permissionsService.addUser(new AddUserWsRequest().setLogin(login).setOrganization(orgKeyAndName).setPermission(otherPermission));
+      permissionsService.addUser(new AddUserRequest().setLogin(login).setOrganization(orgKeyAndName).setPermission(otherPermission));
     }
   }
 
@@ -294,7 +294,7 @@ public class OrganizationTest {
     assertThat(organization.getKey()).isNotEmpty();
     assertThat(organization.getGuarded()).isFalse();
 
-    List<Organization> reloadedOrgs = tester.organizations().service().search(SearchWsRequest.builder().build()).getOrganizationsList();
+    List<Organization> reloadedOrgs = tester.organizations().service().search(SearchRequest.builder().build()).getOrganizationsList();
     assertThat(reloadedOrgs)
       .filteredOn(o -> o.getKey().equals(organization.getKey()))
       .hasSize(1);
@@ -302,20 +302,20 @@ public class OrganizationTest {
 
   private Components.SearchWsResponse searchSampleProject(String organizationKey, ComponentsService componentsService) {
     return componentsService
-      .search(new org.sonarqube.ws.client.component.SearchWsRequest()
+      .search(new org.sonarqube.ws.client.component.SearchRequest()
         .setOrganization(organizationKey)
         .setQualifiers(singletonList("TRK"))
         .setQuery("sample"));
   }
 
   private void assertThatOrganizationDoesNotExit(Organization org) {
-    SearchWsRequest request = new SearchWsRequest.Builder().setOrganizations(org.getKey()).build();
+    SearchRequest request = new SearchRequest.Builder().setOrganizations(org.getKey()).build();
     assertThat(tester.organizations().service().search(request).getOrganizationsList()).isEmpty();
   }
 
   private void verifyOrganization(Organization createdOrganization, String name, String description, String url,
     String avatarUrl) {
-    SearchWsRequest request = new SearchWsRequest.Builder().setOrganizations(createdOrganization.getKey()).build();
+    SearchRequest request = new SearchRequest.Builder().setOrganizations(createdOrganization.getKey()).build();
     List<Organization> result = tester.organizations().service().search(request).getOrganizationsList();
     assertThat(result).hasSize(1);
     Organization searchedOrganization = result.get(0);
@@ -339,7 +339,7 @@ public class OrganizationTest {
   }
 
   private void assertThatBuiltInQualityProfilesExist(Organization org) {
-    org.sonarqube.ws.client.qualityprofile.SearchWsRequest profilesRequest = new org.sonarqube.ws.client.qualityprofile.SearchWsRequest()
+    org.sonarqube.ws.client.qualityprofile.SearchRequest profilesRequest = new org.sonarqube.ws.client.qualityprofile.SearchRequest()
       .setOrganizationKey(org.getKey());
     Qualityprofiles.SearchWsResponse response = tester.wsClient().qualityProfiles().search(profilesRequest);
     assertThat(response.getProfilesCount()).isGreaterThan(0);
@@ -363,6 +363,6 @@ public class OrganizationTest {
 
   private void assertThatQualityProfilesDoNotExist(Organization org) {
     expectNotFoundError(() -> tester.wsClient().qualityProfiles().search(
-      new org.sonarqube.ws.client.qualityprofile.SearchWsRequest().setOrganizationKey(org.getKey())));
+      new org.sonarqube.ws.client.qualityprofile.SearchRequest().setOrganizationKey(org.getKey())));
   }
 }
index a31f889a89072995435c0d33f38ae337f810fce1..ac98f4e7d423dc86d0d5537a4aeeceb8b03470f3 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.Test;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.Organizations;
 import org.sonarqube.ws.Users;
-import org.sonarqube.ws.client.organization.SearchWsRequest;
+import org.sonarqube.ws.client.organization.SearchRequest;
 
 import static org.assertj.core.api.Assertions.assertThat;
 
@@ -52,7 +52,7 @@ public class PersonalOrganizationTest {
   public void personal_organizations_are_created_for_new_users() {
     Users.CreateWsResponse.User user = tester.users().generate();
 
-    List<Organizations.Organization> existing = tester.wsClient().organizations().search(SearchWsRequest.builder().build()).getOrganizationsList();
+    List<Organizations.Organization> existing = tester.wsClient().organizations().search(SearchRequest.builder().build()).getOrganizationsList();
     assertThat(existing)
       .filteredOn(Organizations.Organization::getGuarded)
       .filteredOn(o -> o.getKey().equals(user.getLogin()))
index 6d18fec7152ab7c596147beaff7b263e5f53db31..0ded98c31a33f5e8a5a7d4bca36aa344ae0f1ef5 100644 (file)
@@ -37,7 +37,7 @@ import org.sonarqube.ws.Measures;
 import org.sonarqube.ws.client.HttpConnector;
 import org.sonarqube.ws.client.WsClient;
 import org.sonarqube.ws.client.WsClientFactories;
-import org.sonarqube.ws.client.measure.ComponentWsRequest;
+import org.sonarqube.ws.client.measure.ComponentRequest;
 
 import static java.lang.Double.parseDouble;
 import static java.util.Arrays.asList;
@@ -80,7 +80,7 @@ public class DuplicationTest extends AbstractPerfTest {
   }
 
   private Map<String, Double> getMeasures(String key) {
-    return newWsClient().measures().component(new ComponentWsRequest()
+    return newWsClient().measures().component(new ComponentRequest()
       .setComponentKey(key)
       .setMetricKeys(asList("duplicated_lines", "duplicated_blocks", "duplicated_files", "duplicated_lines_density")))
       .getComponent().getMeasuresList()
index 7036f46a69d9e4e902e79334621c68a40c7e4ee6..ce7fdb4bc33a37a573aa507e6f76d58f9dc4b577 100644 (file)
@@ -30,7 +30,7 @@ import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.Organizations;
 import org.sonarqube.ws.Projects.CreateWsResponse;
 import org.sonarqube.ws.Projects.SearchWsResponse.Component;
-import org.sonarqube.ws.client.project.SearchWsRequest;
+import org.sonarqube.ws.client.project.SearchRequest;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static util.ItUtils.runProjectAnalysis;
@@ -52,12 +52,12 @@ public class ProjectBulkDeletionTest {
 
     analyzeProject(analyzedProject.getKey(), organization.getKey());
 
-    tester.wsClient().projects().bulkDelete(SearchWsRequest.builder()
+    tester.wsClient().projects().bulkDelete(SearchRequest.builder()
       .setOrganization(organization.getKey())
       .setQuery("FIRST-PROVISIONED")
       .setOnProvisionedOnly(true).build());
 
-    List<Component> projects = tester.wsClient().projects().search(SearchWsRequest.builder().setOrganization(organization.getKey()).build()).getComponentsList();
+    List<Component> projects = tester.wsClient().projects().search(SearchRequest.builder().setOrganization(organization.getKey()).build()).getComponentsList();
     assertThat(projects).extracting(Component::getKey)
       .containsExactlyInAnyOrder(analyzedProject.getKey(), secondProvisionedProject.getKey())
       .doesNotContain(firstProvisionedProject.getKey());
@@ -67,7 +67,7 @@ public class ProjectBulkDeletionTest {
   public void delete_more_than_50_projects_at_the_same_time() {
     Organizations.Organization organization = tester.organizations().generate();
     IntStream.range(0, 60).forEach(i -> tester.projects().provision(organization));
-    SearchWsRequest request = SearchWsRequest.builder().setOrganization(organization.getKey()).build();
+    SearchRequest request = SearchRequest.builder().setOrganization(organization.getKey()).build();
     assertThat(tester.wsClient().projects().search(request).getPaging().getTotal()).isEqualTo(60);
 
     tester.wsClient().projects().bulkDelete(request);
index 6495e14272774482131740ef59e8c34a67391cf7..be1b0b441e67688a180baf060e90735845c436ee 100644 (file)
@@ -43,7 +43,7 @@ import org.sonarqube.ws.client.WsResponse;
 import org.sonarqube.ws.client.component.SearchProjectsRequest;
 import org.sonarqube.ws.client.project.CreateRequest;
 import org.sonarqube.ws.client.project.DeleteRequest;
-import org.sonarqube.ws.client.project.SearchWsRequest;
+import org.sonarqube.ws.client.project.SearchRequest;
 import util.ItUtils;
 
 import static java.util.Collections.singletonList;
@@ -165,7 +165,7 @@ public class ProjectDeletionTest {
   }
 
   private void bulkDeleteProjects(Organizations.Organization organization, Project... projects) {
-    SearchWsRequest request = SearchWsRequest.builder()
+    SearchRequest request = SearchRequest.builder()
       .setOrganization(organization.getKey())
       .setProjects(Arrays.stream(projects).map(Project::getKey).collect(Collectors.toList()))
       .build();
@@ -194,7 +194,7 @@ public class ProjectDeletionTest {
    */
   private boolean isInProjectsSearch(Organizations.Organization organization, String name) {
     Projects.SearchWsResponse response = tester.wsClient().projects().search(
-      SearchWsRequest.builder().setOrganization(organization.getKey()).setQuery(name).setQualifiers(singletonList("TRK")).build());
+      SearchRequest.builder().setOrganization(organization.getKey()).setQuery(name).setQualifiers(singletonList("TRK")).build());
     return response.getComponentsCount() > 0;
   }
 
index b560d54c68f289b77f601b7b0c003dd5327aa200..d209d9154f5ab530db721601f82284d62eb748f5 100644 (file)
@@ -40,10 +40,10 @@ import org.sonarqube.ws.Projects;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.WsResponse;
 import org.sonarqube.ws.client.component.SearchProjectsRequest;
-import org.sonarqube.ws.client.component.ShowWsRequest;
-import org.sonarqube.ws.client.project.BulkUpdateKeyWsRequest;
+import org.sonarqube.ws.client.component.ShowRequest;
+import org.sonarqube.ws.client.project.BulkUpdateKeyRequest;
 import org.sonarqube.ws.client.project.CreateRequest;
-import org.sonarqube.ws.client.project.UpdateKeyWsRequest;
+import org.sonarqube.ws.client.project.UpdateKeyRequest;
 import util.ItUtils;
 
 import static org.assertj.core.api.Assertions.assertThat;
@@ -71,31 +71,31 @@ public class ProjectKeyUpdateTest {
   public void update_key() {
     analyzeXooSample();
     String newProjectKey = "another_project_key";
-    Components.Component project = tester.wsClient().components().show(new ShowWsRequest().setKey(PROJECT_KEY)).getComponent();
+    Components.Component project = tester.wsClient().components().show(new ShowRequest().setKey(PROJECT_KEY)).getComponent();
     assertThat(project.getKey()).isEqualTo(PROJECT_KEY);
 
-    tester.wsClient().projects().updateKey(UpdateKeyWsRequest.builder()
+    tester.wsClient().projects().updateKey(UpdateKeyRequest.builder()
       .setKey(PROJECT_KEY)
       .setNewKey(newProjectKey)
       .build());
 
-    assertThat(tester.wsClient().components().show(new ShowWsRequest().setId(project.getId())).getComponent().getKey()).isEqualTo(newProjectKey);
+    assertThat(tester.wsClient().components().show(new ShowRequest().setId(project.getId())).getComponent().getKey()).isEqualTo(newProjectKey);
   }
 
   @Test
   public void bulk_update_key() {
     analyzeXooSample();
     String newProjectKey = "another_project_key";
-    Components.Component project = tester.wsClient().components().show(new ShowWsRequest().setKey(PROJECT_KEY)).getComponent();
+    Components.Component project = tester.wsClient().components().show(new ShowRequest().setKey(PROJECT_KEY)).getComponent();
     assertThat(project.getKey()).isEqualTo(PROJECT_KEY);
 
-    Projects.BulkUpdateKeyWsResponse result = tester.wsClient().projects().bulkUpdateKey(BulkUpdateKeyWsRequest.builder()
+    Projects.BulkUpdateKeyWsResponse result = tester.wsClient().projects().bulkUpdateKey(BulkUpdateKeyRequest.builder()
       .setKey(PROJECT_KEY)
       .setFrom(PROJECT_KEY)
       .setTo(newProjectKey)
       .build());
 
-    assertThat(tester.wsClient().components().show(new ShowWsRequest().setId(project.getId())).getComponent().getKey()).isEqualTo(newProjectKey);
+    assertThat(tester.wsClient().components().show(new ShowRequest().setId(project.getId())).getComponent().getKey()).isEqualTo(newProjectKey);
     assertThat(result.getKeysCount()).isEqualTo(1);
     assertThat(result.getKeys(0))
       .extracting(Projects.BulkUpdateKeyWsResponse.Key::getKey, Projects.BulkUpdateKeyWsResponse.Key::getNewKey, Projects.BulkUpdateKeyWsResponse.Key::getDuplicate)
@@ -229,11 +229,11 @@ public class ProjectKeyUpdateTest {
   }
 
   private void updateKey(Projects.CreateWsResponse.Project project, String newKey) {
-    tester.wsClient().projects().updateKey(UpdateKeyWsRequest.builder().setKey(project.getKey()).setNewKey(newKey).build());
+    tester.wsClient().projects().updateKey(UpdateKeyRequest.builder().setKey(project.getKey()).setNewKey(newKey).build());
   }
 
   private void updateKey(String initialKey, String newKey) {
-    tester.wsClient().projects().updateKey(UpdateKeyWsRequest.builder().setKey(initialKey).setNewKey(newKey).build());
+    tester.wsClient().projects().updateKey(UpdateKeyRequest.builder().setKey(initialKey).setNewKey(newKey).build());
   }
 
   private Projects.CreateWsResponse.Project createProject(Organizations.Organization organization, String key, String name) {
index de8a6b65abcd8701d556944897d305f8bacd141f..4eb51516718a003909ec009faa217e1b1192ff38 100644 (file)
@@ -37,7 +37,7 @@ import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.WsResponse;
 import org.sonarqube.ws.client.component.SearchProjectsRequest;
 import org.sonarqube.ws.client.project.CreateRequest;
-import org.sonarqube.ws.client.project.SearchWsRequest;
+import org.sonarqube.ws.client.project.SearchRequest;
 import util.ItUtils;
 
 import static java.util.Collections.singletonList;
@@ -101,7 +101,7 @@ public class ProjectProvisioningTest {
    */
   private boolean isInProjectsSearch(Organizations.Organization organization, String name) {
     Projects.SearchWsResponse response = tester.wsClient().projects().search(
-      SearchWsRequest.builder().setOrganization(organization.getKey()).setQuery(name).setQualifiers(singletonList("TRK")).build());
+      SearchRequest.builder().setOrganization(organization.getKey()).setQuery(name).setQualifiers(singletonList("TRK")).build());
     return response.getComponentsCount() > 0;
   }
 
index 65da3c029818acdebf6f9733a85afa523c2c3af8..12508573f70b63036c20ecfc79821ed08ba6807a 100644 (file)
@@ -32,7 +32,7 @@ import org.sonarqube.ws.Projects.CreateWsResponse;
 import org.sonarqube.ws.Projects.SearchWsResponse;
 import org.sonarqube.ws.Projects.SearchWsResponse.Component;
 import org.sonarqube.ws.client.GetRequest;
-import org.sonarqube.ws.client.project.SearchWsRequest;
+import org.sonarqube.ws.client.project.SearchRequest;
 
 import static java.util.Collections.singletonList;
 import static org.assertj.core.api.Assertions.assertThat;
@@ -59,7 +59,7 @@ public class ProjectSearchTest {
     analyzeProject(oldProject.getKey(), moreThanOneYearAgo, organization.getKey());
     analyzeProject(recentProject.getKey(), now, organization.getKey());
 
-    SearchWsResponse result = tester.wsClient().projects().search(SearchWsRequest.builder()
+    SearchWsResponse result = tester.wsClient().projects().search(SearchRequest.builder()
       .setOrganization(organization.getKey())
       .setQualifiers(singletonList("TRK"))
       .setAnalyzedBefore(formatDate(oneYearAgo)).build());
@@ -78,7 +78,7 @@ public class ProjectSearchTest {
     analyzeProject(upperCaseProject.getKey(), organization.getKey());
     analyzeProject(anotherProject.getKey(), organization.getKey());
 
-    SearchWsResponse result = tester.wsClient().projects().search(SearchWsRequest.builder()
+    SearchWsResponse result = tester.wsClient().projects().search(SearchRequest.builder()
       .setOrganization(organization.getKey())
       .setQualifiers(singletonList("TRK"))
       .setQuery("JeCt-K")
@@ -101,7 +101,7 @@ public class ProjectSearchTest {
     String result = tester.wsClient().wsConnector().call(new GetRequest("api/projects/provisioned")
       .setParam("organization", organization.getKey()))
       .failIfNotSuccessful().content();
-   SearchWsResponse searchResult = tester.wsClient().projects().search(SearchWsRequest.builder()
+   SearchWsResponse searchResult = tester.wsClient().projects().search(SearchRequest.builder()
      .setQualifiers(singletonList("TRK"))
      .setOrganization(organization.getKey())
      .setOnProvisionedOnly(true).build());
index 92699c3332ca9d70ae7547834964c08da2e7d04a..cc7546065c2633b2081d924fabcafbb145ce6f4b 100644 (file)
@@ -29,7 +29,7 @@ import org.sonarqube.qa.util.Tester;
 import org.sonarqube.qa.util.pageobjects.ProjectsManagementPage;
 import org.sonarqube.ws.Components;
 import org.sonarqube.ws.client.component.SearchProjectsRequest;
-import org.sonarqube.ws.client.permission.RemoveGroupWsRequest;
+import org.sonarqube.ws.client.permission.RemoveGroupRequest;
 import org.sonarqube.ws.client.project.UpdateVisibilityRequest;
 
 import static org.assertj.core.api.Assertions.assertThat;
@@ -57,7 +57,7 @@ public class ProjectVisibilityPageTest {
     orchestrator.executeBuild(SonarScanner.create(projectDir("shared/xoo-sample")).setProperties("sonar.projectKey", "sample2"));
     tester.wsClient().projects().updateVisibility(UpdateVisibilityRequest.builder().setProject("sample2").setVisibility("private").build());
     // Remove 'Admin' permission for admin group on project 2 -> No one can access or admin this project, expect System Admin
-    tester.wsClient().permissions().removeGroup(new RemoveGroupWsRequest().setProjectKey("sample2").setGroupName("sonar-administrators").setPermission("admin"));
+    tester.wsClient().permissions().removeGroup(new RemoveGroupRequest().setProjectKey("sample2").setGroupName("sonar-administrators").setPermission("admin"));
 
     tester.openBrowser().logIn().submitCredentials(adminUser)
       .openProjectsManagement("default-organization")
index 507410d6b6bca5a6ba993d4a449e52622dcc5001..d311e4aab1bab1c0b752cf699f0fb1ed46110c45 100644 (file)
@@ -32,6 +32,7 @@ import org.sonarqube.qa.util.pageobjects.ProjectDashboardPage;
 import org.sonarqube.qa.util.pageobjects.QualityGatePage;
 import org.sonarqube.ws.Organizations;
 import org.sonarqube.ws.Users;
+import org.sonarqube.ws.client.permission.AddUserRequest;
 import util.issue.IssueRule;
 
 import static com.codeborne.selenide.Selenide.$;
@@ -58,7 +59,7 @@ public class OrganizationQualityGateUiTest {
     organization = tester.organizations().generate();
     gateAdmin = tester.users().generate();
     tester.organizations().addMember(tester.organizations().getDefaultOrganization(), gateAdmin);
-    tester.wsClient().permissions().addUser(new org.sonarqube.ws.client.permission.AddUserWsRequest().setLogin(gateAdmin.getLogin()).setPermission("gateadmin"));
+    tester.wsClient().permissions().addUser(new AddUserRequest().setLogin(gateAdmin.getLogin()).setPermission("gateadmin"));
     user = tester.users().generate();
     tester.organizations().addMember(organization, user);
     restoreProfile(orchestrator, getClass().getResource("/issue/with-many-rules.xml"), organization.getKey());
index 12be1f958546d4465db0b7e9aca21130933b79ed..51439df8ea936ba6ec9d6f523b192d44185eb7e3 100644 (file)
@@ -54,7 +54,7 @@ import org.sonarqube.ws.Users;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.PostRequest;
 import org.sonarqube.ws.client.WsResponse;
-import org.sonarqube.ws.client.permission.AddUserWsRequest;
+import org.sonarqube.ws.client.permission.AddUserRequest;
 import org.sonarqube.ws.client.qualitygates.CreateConditionRequest;
 import org.sonarqube.ws.client.qualitygates.CreateRequest;
 import org.sonarqube.ws.client.qualitygates.ProjectStatusRequest;
@@ -293,7 +293,7 @@ public class QualityGateTest {
     // user is quality gate admin of default organization
     Organization organization = tester.organizations().getDefaultOrganization();
     Users.CreateWsResponse.User user = tester.users().generateMember(organization);
-    tester.wsClient().permissions().addUser(new AddUserWsRequest().setLogin(user.getLogin()).setPermission("gateadmin").setOrganization(organization.getKey()));
+    tester.wsClient().permissions().addUser(new AddUserRequest().setLogin(user.getLogin()).setPermission("gateadmin").setOrganization(organization.getKey()));
     TesterSession qGateAdminTester = tester.as(user.getLogin());
     QualitygatesService qGateService = qGateAdminTester.qGates().service();
     // perform administration operations
index 0bf2f9db32b2c88a36ad1ff27e66db1598052a65..6e2ef0c067459e9c963c7827acd7a6e2a2e86ac7 100644 (file)
@@ -27,7 +27,7 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.Issues;
-import org.sonarqube.ws.client.issue.SearchWsRequest;
+import org.sonarqube.ws.client.issue.SearchRequest;
 import util.ItUtils;
 
 import static org.assertj.core.api.Assertions.assertThat;
@@ -58,7 +58,7 @@ public class TechnicalDebtInIssueChangelogTest {
     orchestrator.executeBuild(SonarScanner.create(projectDir("shared/xoo-sample"))
       .setProperties("sonar.oneIssuePerFile.effortToFix", "10"));
 
-    Issues.Issue firstIssue = tester.wsClient().issues().search(new SearchWsRequest()).getIssues(0);
+    Issues.Issue firstIssue = tester.wsClient().issues().search(new SearchRequest()).getIssues(0);
 
     List<Issues.ChangelogWsResponse.Changelog> changes = changelog(firstIssue.getKey()).getChangelogList();
     assertThat(changes).hasSize(1);
index 5ce1e174a441d04f424b9ef7eb3b9209720e0e23..24d60d3b88a8ebbc69562b3d4f26afe20152c3f1 100644 (file)
@@ -27,7 +27,7 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.Issues;
-import org.sonarqube.ws.client.issue.SearchWsRequest;
+import org.sonarqube.ws.client.issue.SearchRequest;
 import util.ItUtils;
 
 import static org.assertj.core.api.Assertions.assertThat;
@@ -54,7 +54,7 @@ public class TechnicalDebtTest {
     orchestrator.executeBuild(SonarScanner.create(projectDir("shared/xoo-sample")));
 
     // All the issues should have a technical debt
-    List<Issues.Issue> issues = tester.wsClient().issues().search(new SearchWsRequest()).getIssuesList();
+    List<Issues.Issue> issues = tester.wsClient().issues().search(new SearchRequest()).getIssuesList();
     assertThat(issues).isNotEmpty();
     for (Issues.Issue issue : issues) {
       assertThat(issue.getDebt()).isEqualTo("1min");
index 3922d96b29c29824b0549ae507b0c5f0a78ce761..ef08e8e8317266f5fc4049ae093eb55c878800ae 100644 (file)
@@ -31,8 +31,8 @@ import org.junit.Test;
 import org.sonarqube.ws.Users;
 import org.sonarqube.ws.client.PostRequest;
 import org.sonarqube.ws.client.WsClient;
-import org.sonarqube.ws.client.permission.AddGroupWsRequest;
-import org.sonarqube.ws.client.permission.AddUserWsRequest;
+import org.sonarqube.ws.client.permission.AddGroupRequest;
+import org.sonarqube.ws.client.permission.AddUserRequest;
 import org.sonarqube.ws.client.qualityprofile.ChangeParentRequest;
 import org.sonarqube.ws.client.qualityprofile.CreateRequest;
 import org.subethamail.wiser.Wiser;
@@ -77,7 +77,7 @@ public class BuiltInQualityProfilesNotificationTest {
     userRule = UserRule.from(orchestrator);
     Users.CreateWsResponse.User profileAdmin1 = userRule.generate();
     WsClient wsClient = ItUtils.newAdminWsClient(orchestrator);
-    wsClient.permissions().addUser(new AddUserWsRequest().setLogin(profileAdmin1.getLogin()).setPermission("profileadmin"));
+    wsClient.permissions().addUser(new AddUserRequest().setLogin(profileAdmin1.getLogin()).setPermission("profileadmin"));
 
     orchestrator.restartServer();
 
@@ -100,12 +100,12 @@ public class BuiltInQualityProfilesNotificationTest {
     // Create a quality profile administrator (user having direct permission)
     Users.CreateWsResponse.User profileAdmin1 = userRule.generate();
     WsClient wsClient = ItUtils.newAdminWsClient(orchestrator);
-    wsClient.permissions().addUser(new AddUserWsRequest().setLogin(profileAdmin1.getLogin()).setPermission("profileadmin"));
+    wsClient.permissions().addUser(new AddUserRequest().setLogin(profileAdmin1.getLogin()).setPermission("profileadmin"));
     // Create a quality profile administrator (user having permission from a group)
     Users.CreateWsResponse.User profileAdmin2 = userRule.generate();
     String groupName = randomAlphanumeric(20);
     wsClient.wsConnector().call(new PostRequest("api/user_groups/create").setParam("name", groupName)).failIfNotSuccessful();
-    wsClient.permissions().addGroup(new AddGroupWsRequest().setPermission("profileadmin").setGroupName(groupName));
+    wsClient.permissions().addGroup(new AddGroupRequest().setPermission("profileadmin").setGroupName(groupName));
     wsClient.wsConnector().call(new PostRequest("api/user_groups/add_user").setParam("name", groupName).setParam("login", profileAdmin2.getLogin())).failIfNotSuccessful();
     // Create a user not being quality profile administrator
     Users.CreateWsResponse.User noProfileAdmin = userRule.generate();
@@ -156,7 +156,7 @@ public class BuiltInQualityProfilesNotificationTest {
     userRule = UserRule.from(orchestrator);
     Users.CreateWsResponse.User profileAdmin1 = userRule.generate();
     WsClient wsClient = ItUtils.newAdminWsClient(orchestrator);
-    wsClient.permissions().addUser(new AddUserWsRequest().setLogin(profileAdmin1.getLogin()).setPermission("profileadmin"));
+    wsClient.permissions().addUser(new AddUserRequest().setLogin(profileAdmin1.getLogin()).setPermission("profileadmin"));
 
     // uninstall plugin V1
     wsClient.wsConnector().call(new PostRequest("api/plugins/uninstall").setParam("key", "foo")).failIfNotSuccessful();
index 2ace14e222aafac769074e70cd33ca2ed8bbc30a..be5eb2a3ee92bb1cbd2e393d4757e0c07f6bcb23 100644 (file)
@@ -36,7 +36,7 @@ import org.sonarqube.ws.Users.CreateWsResponse.User;
 import org.sonarqube.ws.client.qualityprofile.ChangeParentRequest;
 import org.sonarqube.ws.client.qualityprofile.CopyRequest;
 import org.sonarqube.ws.client.qualityprofile.QualityProfilesService;
-import org.sonarqube.ws.client.qualityprofile.SearchWsRequest;
+import org.sonarqube.ws.client.qualityprofile.SearchRequest;
 import org.sonarqube.ws.client.qualityprofile.SetDefaultRequest;
 
 import static org.assertj.core.api.Assertions.assertThat;
@@ -55,7 +55,7 @@ public class BuiltInQualityProfilesTest {
   @Test
   public void built_in_profiles_are_available_in_new_organization() {
     Organization org = tester.organizations().generate();
-    SearchWsResponse result = tester.qProfiles().service().search(new SearchWsRequest().setOrganizationKey(org.getKey()));
+    SearchWsResponse result = tester.qProfiles().service().search(new SearchRequest().setOrganizationKey(org.getKey()));
 
     assertThat(result.getProfilesList())
       .extracting(QualityProfile::getName, QualityProfile::getLanguage, QualityProfile::getIsBuiltIn, QualityProfile::getIsDefault)
@@ -70,7 +70,7 @@ public class BuiltInQualityProfilesTest {
 
   @Test
   public void built_in_profiles_are_available_in_default_organization() {
-    SearchWsResponse result = tester.qProfiles().service().search(new SearchWsRequest().setOrganizationKey("default-organization"));
+    SearchWsResponse result = tester.qProfiles().service().search(new SearchRequest().setOrganizationKey("default-organization"));
 
     assertThat(result.getProfilesList())
       .extracting(QualityProfile::getOrganization, QualityProfile::getName, QualityProfile::getLanguage, QualityProfile::getIsBuiltIn, QualityProfile::getIsDefault)
@@ -154,7 +154,7 @@ public class BuiltInQualityProfilesTest {
   }
 
   private QualityProfile getProfile(Organization organization, Predicate<QualityProfile> filter) {
-    return tester.qProfiles().service().search(new SearchWsRequest()
+    return tester.qProfiles().service().search(new SearchRequest()
       .setOrganizationKey(organization.getKey())).getProfilesList()
       .stream()
       .filter(filter)
index fe00a8d4472befe2ac125a3708a76383cd443f17..ef5199d1b6471b302382b79495ce5955898a49e3 100644 (file)
@@ -41,7 +41,7 @@ import org.sonarqube.ws.client.qualityprofile.AddProjectRequest;
 import org.sonarqube.ws.client.qualityprofile.ChangeParentRequest;
 import org.sonarqube.ws.client.qualityprofile.CopyRequest;
 import org.sonarqube.ws.client.qualityprofile.CreateRequest;
-import org.sonarqube.ws.client.qualityprofile.SearchWsRequest;
+import org.sonarqube.ws.client.qualityprofile.SearchRequest;
 import org.sonarqube.ws.client.qualityprofile.SetDefaultRequest;
 import util.ItUtils;
 
@@ -154,10 +154,10 @@ public class CustomQualityProfilesTest {
 
     tester.organizations().service().delete(org.getKey());
 
-    expectMissingError(() -> tester.qProfiles().service().search(new SearchWsRequest()
+    expectMissingError(() -> tester.qProfiles().service().search(new SearchRequest()
       .setOrganizationKey(org.getKey())));
 
-    tester.qProfiles().service().search(new SearchWsRequest()).getProfilesList()
+    tester.qProfiles().service().search(new SearchRequest()).getProfilesList()
       .forEach(p -> {
         assertThat(p.getOrganization()).isNotEqualTo(org.getKey());
         assertThat(p.getKey()).isNotIn(parentProfile.getKey(), copyResponse.getKey(), inheritedProfile1.getKey(), inheritedProfile2.getKey());
@@ -319,7 +319,7 @@ public class CustomQualityProfilesTest {
   }
 
   private Qualityprofiles.SearchWsResponse.QualityProfile getProfile(Organization organization, Predicate<Qualityprofiles.SearchWsResponse.QualityProfile> filter) {
-    return tester.qProfiles().service().search(new SearchWsRequest()
+    return tester.qProfiles().service().search(new SearchRequest()
       .setOrganizationKey(organization.getKey())).getProfilesList()
       .stream()
       .filter(filter)
index b6e884eaa77826e944563ecd4649afd1d00b2c7b..6b6ed14999339ee7c449a11f77c57e74ee1f1606 100644 (file)
@@ -35,14 +35,13 @@ import org.sonarqube.ws.Qualityprofiles.SearchWsResponse;
 import org.sonarqube.ws.UserGroups;
 import org.sonarqube.ws.Users.CreateWsResponse.User;
 import org.sonarqube.ws.client.PostRequest;
-import org.sonarqube.ws.client.permission.AddUserWsRequest;
+import org.sonarqube.ws.client.permission.AddUserRequest;
 import org.sonarqube.ws.client.qualityprofile.AddGroupRequest;
-import org.sonarqube.ws.client.qualityprofile.AddUserRequest;
 import org.sonarqube.ws.client.qualityprofile.RemoveGroupRequest;
 import org.sonarqube.ws.client.qualityprofile.RemoveUserRequest;
 import org.sonarqube.ws.client.qualityprofile.SearchGroupsRequest;
 import org.sonarqube.ws.client.qualityprofile.SearchUsersRequest;
-import org.sonarqube.ws.client.qualityprofile.SearchWsRequest;
+import org.sonarqube.ws.client.qualityprofile.SearchRequest;
 import org.sonarqube.ws.client.qualityprofile.ShowRequest;
 
 import static org.assertj.core.api.Assertions.assertThat;
@@ -211,7 +210,7 @@ public class QualityProfilesEditTest {
     CreateWsResponse.QualityProfile xooProfile3 = tester.qProfiles().createXooProfile(organization);
 
     SearchWsResponse result = tester.as(user.getLogin())
-      .qProfiles().service().search(new SearchWsRequest().setOrganizationKey(organization.getKey()));
+      .qProfiles().service().search(new SearchRequest().setOrganizationKey(organization.getKey()));
     assertThat(result.getActions().getCreate()).isFalse();
     assertThat(result.getProfilesList())
       .extracting(SearchWsResponse.QualityProfile::getKey, qp -> qp.getActions().getEdit(), qp -> qp.getActions().getCopy(), qp -> qp.getActions().getSetAsDefault())
@@ -226,10 +225,10 @@ public class QualityProfilesEditTest {
     Organization organization = tester.organizations().generate();
     User user = tester.users().generateMember(organization);
     CreateWsResponse.QualityProfile xooProfile = tester.qProfiles().createXooProfile(organization);
-    tester.wsClient().permissions().addUser(new AddUserWsRequest().setOrganization(organization.getKey()).setLogin(user.getLogin()).setPermission("profileadmin"));
+    tester.wsClient().permissions().addUser(new AddUserRequest().setOrganization(organization.getKey()).setLogin(user.getLogin()).setPermission("profileadmin"));
 
     SearchWsResponse result = tester.as(user.getLogin())
-      .qProfiles().service().search(new SearchWsRequest().setOrganizationKey(organization.getKey()));
+      .qProfiles().service().search(new SearchRequest().setOrganizationKey(organization.getKey()));
     assertThat(result.getActions().getCreate()).isTrue();
     assertThat(result.getProfilesList())
       .extracting(SearchWsResponse.QualityProfile::getKey, qp -> qp.getActions().getEdit(), qp -> qp.getActions().getCopy(), qp -> qp.getActions().getSetAsDefault())
@@ -267,7 +266,7 @@ public class QualityProfilesEditTest {
   }
 
   private void addUserPermission(Organization organization, User user, CreateWsResponse.QualityProfile qProfile) {
-    tester.qProfiles().service().addUser(AddUserRequest.builder()
+    tester.qProfiles().service().addUser(org.sonarqube.ws.client.qualityprofile.AddUserRequest.builder()
       .setOrganization(organization.getKey())
       .setQualityProfile(qProfile.getName())
       .setLanguage(qProfile.getLanguage())
@@ -285,7 +284,7 @@ public class QualityProfilesEditTest {
   }
 
   private SearchWsResponse.QualityProfile getProfile(Organization organization, Predicate<SearchWsResponse.QualityProfile> filter) {
-    return tester.qProfiles().service().search(new SearchWsRequest()
+    return tester.qProfiles().service().search(new SearchRequest()
       .setOrganizationKey(organization.getKey())).getProfilesList()
       .stream()
       .filter(filter)
index 21b319f6f787ccc4c2e4a951e3c0f7a6ce42b775..f78378975563fd126f13eab1ac010dc86475b77a 100644 (file)
@@ -38,8 +38,8 @@ import org.sonarqube.ws.Qualityprofiles.ShowResponse.QualityProfile;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.PostRequest;
 import org.sonarqube.ws.client.WsResponse;
-import org.sonarqube.ws.client.qualityprofile.ChangelogWsRequest;
-import org.sonarqube.ws.client.qualityprofile.SearchWsRequest;
+import org.sonarqube.ws.client.qualityprofile.ChangelogRequest;
+import org.sonarqube.ws.client.qualityprofile.SearchRequest;
 import org.sonarqube.ws.client.qualityprofile.ShowRequest;
 
 import static org.assertj.core.api.Assertions.assertThat;
@@ -133,7 +133,7 @@ public class QualityProfilesWsTest {
     Organization org = tester.organizations().generate();
     CreateWsResponse.QualityProfile profile = tester.qProfiles().createXooProfile(org);
 
-    String changelog = tester.wsClient().qualityProfiles().changelog(ChangelogWsRequest.builder()
+    String changelog = tester.wsClient().qualityProfiles().changelog(ChangelogRequest.builder()
       .setOrganization(org.getKey())
       .setLanguage(profile.getLanguage())
       .setQualityProfile(profile.getName())
@@ -143,14 +143,14 @@ public class QualityProfilesWsTest {
     tester.qProfiles().activateRule(profile, RULE_ONE_BUG_PER_LINE);
     tester.qProfiles().activateRule(profile, RULE_ONE_ISSUE_PER_LINE);
 
-    String changelog2 = tester.wsClient().qualityProfiles().changelog(ChangelogWsRequest.builder()
+    String changelog2 = tester.wsClient().qualityProfiles().changelog(ChangelogRequest.builder()
       .setOrganization(org.getKey())
       .setLanguage(profile.getLanguage())
       .setQualityProfile(profile.getName())
       .build());
     JSONAssert.assertEquals(EXPECTED_CHANGELOG, changelog2, JSONCompareMode.LENIENT);
 
-    String changelog3 = tester.wsClient().qualityProfiles().changelog(ChangelogWsRequest.builder()
+    String changelog3 = tester.wsClient().qualityProfiles().changelog(ChangelogRequest.builder()
       .setOrganization(org.getKey())
       .setLanguage(profile.getLanguage())
       .setQualityProfile(profile.getName())
@@ -160,7 +160,7 @@ public class QualityProfilesWsTest {
   }
 
   private SearchWsResponse.QualityProfile getProfile(Organization organization, Predicate<SearchWsResponse.QualityProfile> filter) {
-    return tester.qProfiles().service().search(new SearchWsRequest()
+    return tester.qProfiles().service().search(new SearchRequest()
       .setOrganizationKey(organization.getKey())).getProfilesList()
       .stream()
       .filter(filter)
index f2249a9b6a8791f8f514ced7a60d4cf2e6862a51..31cef84c190bab42aac2694d55805450c1fe100b 100644 (file)
@@ -83,7 +83,7 @@ public class RulesWsTest {
   }
 
   private SearchWsResponse.QualityProfile getProfile(Organization organization, Predicate<SearchWsResponse.QualityProfile> filter) {
-    return tester.qProfiles().service().search(new org.sonarqube.ws.client.qualityprofile.SearchWsRequest()
+    return tester.qProfiles().service().search(new org.sonarqube.ws.client.qualityprofile.SearchRequest()
       .setOrganizationKey(organization.getKey())).getProfilesList()
       .stream()
       .filter(filter)
index e9eb13360e9a89c53b564ad70b62f8f4476b33de..d312aa09a3c69cfafc2cf228f7e7b5e58bce6f31 100644 (file)
@@ -36,7 +36,7 @@ import org.junit.ClassRule;
 import org.junit.Test;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.WsClient;
-import org.sonarqube.ws.client.issue.SearchWsRequest;
+import org.sonarqube.ws.client.issue.SearchRequest;
 import util.ItUtils;
 
 import static java.lang.String.format;
@@ -116,7 +116,7 @@ public class LogsTest {
 
   private void generateSqlAndEsLogsInWebAndCe() {
     orchestrator.executeBuild(SonarScanner.create(projectDir("shared/xoo-sample")));
-    ItUtils.newAdminWsClient(orchestrator).issues().search(new SearchWsRequest()
+    ItUtils.newAdminWsClient(orchestrator).issues().search(new SearchRequest()
       .setProjectKeys(Collections.singletonList("sample")));
   }
 
index e1219ae9ee6b312b28403f8a6ddf31ba2335a159..17bf67767464729b482db0f88a4998ae355a34d5 100644 (file)
@@ -32,7 +32,7 @@ import org.junit.rules.Timeout;
 import org.sonarqube.ws.System;
 import org.sonarqube.ws.client.PostRequest;
 import org.sonarqube.ws.client.WsClient;
-import org.sonarqube.ws.client.permission.AddUserWsRequest;
+import org.sonarqube.ws.client.permission.AddUserRequest;
 import util.ItUtils;
 
 import static org.assertj.core.api.Assertions.assertThat;
@@ -97,7 +97,7 @@ public class RestartTest {
   private void createSystemAdministrator(String login, String password) {
     WsClient wsClient = newAdminWsClient(orchestrator);
     createNonSystemAdministrator(wsClient, login, password);
-    wsClient.permissions().addUser(new AddUserWsRequest().setLogin(login).setPermission("admin"));
+    wsClient.permissions().addUser(new AddUserRequest().setLogin(login).setPermission("admin"));
   }
 
   private void createNonSystemAdministrator(String login, String password) {
index 9733ff6bb471cbf1ab789b232075e3a274ca4fe8..35741444b28bf869e30474c8f2bb0f8f0b6a9513 100644 (file)
@@ -35,9 +35,9 @@ import org.junit.rules.RuleChain;
 import org.sonarqube.tests.Category1Suite;
 import org.sonarqube.ws.Settings;
 import org.sonarqube.ws.client.WsClient;
-import org.sonarqube.ws.client.permission.AddGroupWsRequest;
-import org.sonarqube.ws.client.permission.AddUserWsRequest;
-import org.sonarqube.ws.client.permission.RemoveGroupWsRequest;
+import org.sonarqube.ws.client.permission.AddGroupRequest;
+import org.sonarqube.ws.client.permission.AddUserRequest;
+import org.sonarqube.ws.client.permission.RemoveGroupRequest;
 import org.sonarqube.ws.client.settings.ResetRequest;
 import org.sonarqube.ws.client.settings.SetRequest;
 import org.sonarqube.ws.client.settings.SettingsService;
@@ -81,7 +81,7 @@ public class SettingsTest {
     userRule.createUser("scanner-user", "scanner-user");
     adminWsClient = newAdminWsClient(orchestrator);
     // Remove 'Execute Analysis' permission from anyone
-    adminWsClient.permissions().removeGroup(new RemoveGroupWsRequest().setGroupName("anyone").setPermission("scan"));
+    adminWsClient.permissions().removeGroup(new RemoveGroupRequest().setGroupName("anyone").setPermission("scan"));
 
     // Anonymous user, without 'Execute Analysis' permission
     anonymousSettingsService = newWsClient(orchestrator).settings();
@@ -90,7 +90,7 @@ public class SettingsTest {
     userSettingsService = newUserWsClient(orchestrator, "setting-user", "setting-user").settings();
 
     // User with 'Execute Analysis' permission
-    adminWsClient.permissions().addUser(new AddUserWsRequest().setLogin("scanner-user").setPermission("scan"));
+    adminWsClient.permissions().addUser(new AddUserRequest().setLogin("scanner-user").setPermission("scan"));
     scanSettingsService = newUserWsClient(orchestrator, "scanner-user", "scanner-user").settings();
 
     // User with 'Administer System' permission but without 'Execute Analysis' permission
@@ -101,7 +101,7 @@ public class SettingsTest {
   public static void tearDown() throws Exception {
     userRule.deactivateUsers("setting-user", "scanner-user");
     // Restore 'Execute Analysis' permission to anyone
-    adminWsClient.permissions().addGroup(new AddGroupWsRequest().setGroupName("anyone").setPermission("scan"));
+    adminWsClient.permissions().addGroup(new AddGroupRequest().setGroupName("anyone").setPermission("scan"));
   }
 
   @After
index 607ef2d461591bc84a8e11e5be8600a729c39e86..9f5f1a87b9facc7a6b4c38a2da2e4b73e6f6af1c 100644 (file)
@@ -42,7 +42,7 @@ import org.sonarqube.ws.client.HttpConnector;
 import org.sonarqube.ws.client.WsClient;
 import org.sonarqube.ws.client.WsClientFactories;
 import org.sonarqube.ws.client.WsResponse;
-import org.sonarqube.ws.client.measure.ComponentWsRequest;
+import org.sonarqube.ws.client.measure.ComponentRequest;
 
 import static com.codeborne.selenide.Condition.hasText;
 import static com.codeborne.selenide.Selenide.$;
@@ -198,7 +198,7 @@ public class UpgradeTest {
   }
 
   private int countFiles(String key) {
-    Measure measure = newWsClient(orchestrator).measures().component(new ComponentWsRequest().setComponentKey(key).setMetricKeys(Collections.singletonList("files")))
+    Measure measure = newWsClient(orchestrator).measures().component(new ComponentRequest().setComponentKey(key).setMetricKeys(Collections.singletonList("files")))
       .getComponent().getMeasures(0);
     return parseInt(measure.getValue());
   }
index 2f6e7f36f1bb60641875f91a70e789471fa733cd..7e9a294fc49d2b6b9a6ae09547cc9b6a2e243cb2 100644 (file)
@@ -38,7 +38,7 @@ import org.sonarqube.tests.Category4Suite;
 import org.sonarqube.ws.Users.SearchWsResponse.User;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.WsResponse;
-import org.sonarqube.ws.client.permission.AddUserWsRequest;
+import org.sonarqube.ws.client.permission.AddUserRequest;
 import org.sonarqube.ws.client.user.CreateRequest;
 import util.selenium.Selenese;
 
@@ -125,7 +125,7 @@ public class OAuth2IdentityProviderTest {
     enablePlugin();
     tester.users().generate(u -> u.setLogin(USER_LOGIN));
     // Give user global admin permission as we want to go to a page where authentication is required
-    tester.wsClient().permissions().addUser(new AddUserWsRequest().setLogin(USER_LOGIN).setPermission("admin"));
+    tester.wsClient().permissions().addUser(new AddUserRequest().setLogin(USER_LOGIN).setPermission("admin"));
 
     Navigation nav = tester.openBrowser();
     // Try to go to the settings page
index 5f8a5a4b76bd7276adcb7099c3b1f1b7774f3e66..7a9fbafcd542b115822752241c0dea9199e77e11 100644 (file)
@@ -70,9 +70,9 @@ import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.HttpConnector;
 import org.sonarqube.ws.client.WsClient;
 import org.sonarqube.ws.client.WsClientFactories;
-import org.sonarqube.ws.client.component.ShowWsRequest;
-import org.sonarqube.ws.client.measure.ComponentWsRequest;
-import org.sonarqube.ws.client.qualityprofile.RestoreWsRequest;
+import org.sonarqube.ws.client.component.ShowRequest;
+import org.sonarqube.ws.client.measure.ComponentRequest;
+import org.sonarqube.ws.client.qualityprofile.RestoreRequest;
 import org.sonarqube.ws.client.settings.ResetRequest;
 import org.sonarqube.ws.client.settings.SetRequest;
 
@@ -334,7 +334,7 @@ public class ItUtils {
   }
 
   private static Stream<Measure> getStreamMeasures(Orchestrator orchestrator, String componentKey, String... metricKeys) {
-    return newWsClient(orchestrator).measures().component(new ComponentWsRequest()
+    return newWsClient(orchestrator).measures().component(new ComponentRequest()
       .setComponent(componentKey)
       .setMetricKeys(asList(metricKeys)))
       .getComponent().getMeasuresList()
@@ -343,7 +343,7 @@ public class ItUtils {
 
   @CheckForNull
   public static Measure getMeasureWithVariation(Orchestrator orchestrator, String componentKey, String metricKey) {
-    Measures.ComponentWsResponse response = newWsClient(orchestrator).measures().component(new ComponentWsRequest()
+    Measures.ComponentWsResponse response = newWsClient(orchestrator).measures().component(new ComponentRequest()
       .setComponentKey(componentKey)
       .setMetricKeys(singletonList(metricKey))
       .setAdditionalFields(singletonList("periods")));
@@ -353,7 +353,7 @@ public class ItUtils {
 
   @CheckForNull
   public static Map<String, Measure> getMeasuresWithVariationsByMetricKey(Orchestrator orchestrator, String componentKey, String... metricKeys) {
-    return newWsClient(orchestrator).measures().component(new ComponentWsRequest()
+    return newWsClient(orchestrator).measures().component(new ComponentRequest()
       .setComponentKey(componentKey)
       .setMetricKeys(asList(metricKeys))
       .setAdditionalFields(singletonList("periods"))).getComponent().getMeasuresList()
@@ -373,7 +373,7 @@ public class ItUtils {
   @CheckForNull
   public static Component getComponent(Orchestrator orchestrator, String componentKey) {
     try {
-      return newWsClient(orchestrator).components().show(new ShowWsRequest().setKey((componentKey))).getComponent();
+      return newWsClient(orchestrator).components().show(new ShowRequest().setKey((componentKey))).getComponent();
     } catch (org.sonarqube.ws.client.HttpException e) {
       if (e.code() == 404) {
         return null;
@@ -405,7 +405,7 @@ public class ItUtils {
     newAdminWsClient(orchestrator)
       .qualityProfiles()
       .restoreProfile(
-        RestoreWsRequest.builder()
+        RestoreRequest.builder()
           .setBackup(new File(uri))
           .setOrganization(organization)
           .build());
index 7857d3cabdc1a82d79f72f3ff8fcf7dad486ee8c..c055a2b43851a6f3ea8674d939488cf41dddebaf 100644 (file)
@@ -25,7 +25,7 @@ import org.junit.rules.ExternalResource;
 import org.sonarqube.ws.Issues.Issue;
 import org.sonarqube.ws.Issues.SearchWsResponse;
 import org.sonarqube.ws.client.WsClient;
-import org.sonarqube.ws.client.issue.SearchWsRequest;
+import org.sonarqube.ws.client.issue.SearchRequest;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.singletonList;
@@ -47,24 +47,24 @@ public class IssueRule extends ExternalResource {
     return new IssueRule(requireNonNull(orchestrator, "Orchestrator instance can not be null"));
   }
 
-  public SearchWsResponse search(SearchWsRequest request) {
+  public SearchWsResponse search(SearchRequest request) {
     return adminWsClient().issues().search(request);
   }
 
   public Issue getRandomIssue() {
-    List<Issue> issues = search(new SearchWsRequest()).getIssuesList();
+    List<Issue> issues = search(new SearchRequest()).getIssuesList();
     assertThat(issues).isNotEmpty();
     return issues.get(0);
   }
 
   public Issue getByKey(String issueKey) {
-    List<Issue> issues = search(new SearchWsRequest().setIssues(singletonList(issueKey)).setAdditionalFields(singletonList("_all"))).getIssuesList();
+    List<Issue> issues = search(new SearchRequest().setIssues(singletonList(issueKey)).setAdditionalFields(singletonList("_all"))).getIssuesList();
     assertThat(issues).hasSize(1);
     return issues.iterator().next();
   }
 
   public List<Issue> getByKeys(String... issueKeys) {
-    List<Issue> issues = search(new SearchWsRequest().setIssues(asList(issueKeys)).setAdditionalFields(singletonList("_all"))).getIssuesList();
+    List<Issue> issues = search(new SearchRequest().setIssues(asList(issueKeys)).setAdditionalFields(singletonList("_all"))).getIssuesList();
     assertThat(issues).hasSize(issueKeys.length);
     return issues;
   }
index 9e8cc191020016ed042a0379d5457ee1d172aef8..9c2db03e6e7458c1e3bed9bee0a94c114b097107 100644 (file)
@@ -35,12 +35,11 @@ import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.PostRequest;
 import org.sonarqube.ws.client.WsClient;
 import org.sonarqube.ws.client.WsResponse;
-import org.sonarqube.ws.client.permission.AddUserWsRequest;
+import org.sonarqube.ws.client.permission.AddUserRequest;
 import org.sonarqube.ws.client.roots.SetRootRequest;
 import org.sonarqube.ws.client.user.CreateRequest;
 import org.sonarqube.ws.client.user.SearchRequest;
 import org.sonarqube.ws.client.user.UsersService;
-import org.sonarqube.ws.client.usergroups.AddUserRequest;
 import util.selenium.Consumer;
 
 import static java.util.Arrays.asList;
@@ -148,8 +147,8 @@ public class UserRule extends ExternalResource implements GroupManagement {
 
   public String createAdminUser(String login, String password) {
     createUser(login, password);
-    adminWsClient.permissions().addUser(new AddUserWsRequest().setLogin(login).setPermission("admin"));
-    adminWsClient.userGroups().addUser(new AddUserRequest().setLogin(login).setName("sonar-administrators"));
+    adminWsClient.permissions().addUser(new AddUserRequest().setLogin(login).setPermission("admin"));
+    adminWsClient.userGroups().addUser(new org.sonarqube.ws.client.usergroups.AddUserRequest().setLogin(login).setName("sonar-administrators"));
     return login;
   }