diff options
author | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2016-07-04 15:38:09 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2016-07-12 10:16:53 +0200 |
commit | f92a18e60d3f94aa0ac09bd529a1d21c2eaeadf3 (patch) | |
tree | 97a2ec3aba5a9f6bcf5f01ddd590921dfb29ad89 /sonar-ws | |
parent | d5bf0e2401800d1639a99deb3db9797ad6bd5d72 (diff) | |
download | sonarqube-f92a18e60d3f94aa0ac09bd529a1d21c2eaeadf3.tar.gz sonarqube-f92a18e60d3f94aa0ac09bd529a1d21c2eaeadf3.zip |
SONAR-7835 Rename UsersAction to OldUsersAction
Diffstat (limited to 'sonar-ws')
-rw-r--r-- | sonar-ws/src/main/java/org/sonarqube/ws/client/permission/OldUsersWsRequest.java (renamed from sonar-ws/src/main/java/org/sonarqube/ws/client/permission/UsersWsRequest.java) | 16 | ||||
-rw-r--r-- | sonar-ws/src/main/java/org/sonarqube/ws/client/permission/PermissionsService.java | 2 | ||||
-rw-r--r-- | sonar-ws/src/main/protobuf/ws-permissions.proto | 14 | ||||
-rw-r--r-- | sonar-ws/src/test/java/org/sonarqube/ws/client/permission/PermissionsServiceTest.java | 2 |
4 files changed, 24 insertions, 10 deletions
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/OldUsersWsRequest.java index 2abe8177969..d17f32d54e8 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/UsersWsRequest.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/OldUsersWsRequest.java @@ -24,7 +24,7 @@ import javax.annotation.Nullable; import static java.util.Objects.requireNonNull; -public class UsersWsRequest { +public class OldUsersWsRequest { private String permission; private String projectId; private String projectKey; @@ -37,7 +37,7 @@ public class UsersWsRequest { return permission; } - public UsersWsRequest setPermission(String permission) { + public OldUsersWsRequest setPermission(String permission) { this.permission = requireNonNull(permission); return this; } @@ -47,7 +47,7 @@ public class UsersWsRequest { return projectId; } - public UsersWsRequest setProjectId(@Nullable String projectId) { + public OldUsersWsRequest setProjectId(@Nullable String projectId) { this.projectId = projectId; return this; } @@ -57,7 +57,7 @@ public class UsersWsRequest { return projectKey; } - public UsersWsRequest setProjectKey(@Nullable String projectKey) { + public OldUsersWsRequest setProjectKey(@Nullable String projectKey) { this.projectKey = projectKey; return this; } @@ -67,7 +67,7 @@ public class UsersWsRequest { return selected; } - public UsersWsRequest setSelected(@Nullable String selected) { + public OldUsersWsRequest setSelected(@Nullable String selected) { this.selected = selected; return this; } @@ -77,7 +77,7 @@ public class UsersWsRequest { return query; } - public UsersWsRequest setQuery(@Nullable String query) { + public OldUsersWsRequest setQuery(@Nullable String query) { this.query = query; return this; } @@ -87,7 +87,7 @@ public class UsersWsRequest { return page; } - public UsersWsRequest setPage(int page) { + public OldUsersWsRequest setPage(int page) { this.page = page; return this; } @@ -97,7 +97,7 @@ public class UsersWsRequest { return pageSize; } - public UsersWsRequest setPageSize(int pageSize) { + public OldUsersWsRequest setPageSize(int pageSize) { this.pageSize = pageSize; return this; } diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/PermissionsService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/PermissionsService.java index b39aca3bfc8..2ce33d1fef6 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/PermissionsService.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/PermissionsService.java @@ -213,7 +213,7 @@ public class PermissionsService extends BaseService { .setParam(PARAM_PROJECT_KEY_PATTERN, request.getProjectKeyPattern()), UpdateTemplateWsResponse.parser()); } - public UsersWsResponse users(UsersWsRequest request) { + public UsersWsResponse users(OldUsersWsRequest request) { return call(new GetRequest(path("users")) .setParam(PARAM_PERMISSION, request.getPermission()) .setParam(PARAM_PROJECT_ID, request.getProjectId()) diff --git a/sonar-ws/src/main/protobuf/ws-permissions.proto b/sonar-ws/src/main/protobuf/ws-permissions.proto index 75b9f3a1c8d..7477ee25d34 100644 --- a/sonar-ws/src/main/protobuf/ws-permissions.proto +++ b/sonar-ws/src/main/protobuf/ws-permissions.proto @@ -28,6 +28,13 @@ option optimize_for = SPEED; // WS api/permissions/users for internal use only // and WS api/permissions/template_users for internal use only +message OldUsersWsResponse { + optional sonarqube.ws.commons.Paging paging = 1; + repeated OldUser users = 2; +} + +// WS api/permissions/users for internal use only +// and WS api/permissions/template_users for internal use only message UsersWsResponse { optional sonarqube.ws.commons.Paging paging = 1; repeated User users = 2; @@ -98,6 +105,13 @@ message PermissionTemplate { repeated Permission permissions = 7; } +message OldUser { + optional string login = 1; + optional string name = 2; + optional string email = 3; + optional bool selected = 4; +} + message User { optional string login = 1; optional string name = 2; diff --git a/sonar-ws/src/test/java/org/sonarqube/ws/client/permission/PermissionsServiceTest.java b/sonar-ws/src/test/java/org/sonarqube/ws/client/permission/PermissionsServiceTest.java index f82ae59934b..f9bdee7f197 100644 --- a/sonar-ws/src/test/java/org/sonarqube/ws/client/permission/PermissionsServiceTest.java +++ b/sonar-ws/src/test/java/org/sonarqube/ws/client/permission/PermissionsServiceTest.java @@ -431,7 +431,7 @@ public class PermissionsServiceTest { @Test public void users_does_GET_on_Ws_users() { - underTest.users(new UsersWsRequest() + underTest.users(new OldUsersWsRequest() .setPermission(PERMISSION_VALUE) .setProjectId(PROJECT_ID_VALUE) .setProjectKey(PROJECT_KEY_VALUE) |