From adb1bccb465775981bb6b6c85c1df4d3ad9191dd Mon Sep 17 00:00:00 2001 From: Teryk Bellahsene Date: Mon, 7 Sep 2015 16:45:38 +0200 Subject: [PATCH] Rename Parameters to WsPermissionsParameters --- .../sonar/server/permission/ws/AddGroupAction.java | 8 ++++---- .../permission/ws/AddGroupToTemplateAction.java | 10 +++++----- .../sonar/server/permission/ws/AddUserAction.java | 6 +++--- .../permission/ws/AddUserToTemplateAction.java | 10 +++++----- .../server/permission/ws/ApplyTemplateAction.java | 4 ++-- .../server/permission/ws/CreateTemplateAction.java | 10 +++++----- .../server/permission/ws/DeleteTemplateAction.java | 2 +- .../sonar/server/permission/ws/GroupsAction.java | 4 ++-- .../server/permission/ws/PermissionRequest.java | 4 ++-- .../permission/ws/PermissionRequestValidator.java | 6 +++--- .../server/permission/ws/RemoveGroupAction.java | 8 ++++---- .../ws/RemoveGroupFromTemplateAction.java | 10 +++++----- .../server/permission/ws/RemoveUserAction.java | 6 +++--- .../ws/RemoveUserFromTemplateAction.java | 10 +++++----- .../ws/SearchProjectPermissionsAction.java | 2 +- .../permission/ws/SetDefaultTemplateAction.java | 4 ++-- .../server/permission/ws/UpdateTemplateAction.java | 14 +++++++------- .../sonar/server/permission/ws/UsersAction.java | 4 ++-- .../org/sonar/server/permission/ws/WsGroupRef.java | 4 ++-- ...Parameters.java => WsPermissionParameters.java} | 4 ++-- .../sonar/server/permission/ws/WsProjectRef.java | 4 ++-- .../sonar/server/permission/ws/WsTemplateRef.java | 4 ++-- .../server/permission/ws/AddGroupActionTest.java | 10 +++++----- .../ws/AddGroupToTemplateActionTest.java | 14 +++++++------- .../server/permission/ws/AddUserActionTest.java | 8 ++++---- .../permission/ws/AddUserToTemplateActionTest.java | 10 +++++----- .../permission/ws/ApplyTemplateActionTest.java | 8 ++++---- .../permission/ws/CreateTemplateActionTest.java | 6 +++--- .../permission/ws/DeleteTemplateActionTest.java | 4 ++-- .../server/permission/ws/GroupsActionTest.java | 6 +++--- .../permission/ws/RemoveGroupActionTest.java | 10 +++++----- .../ws/RemoveGroupFromTemplateActionTest.java | 14 +++++++------- .../server/permission/ws/RemoveUserActionTest.java | 8 ++++---- .../ws/RemoveUserFromTemplateActionTest.java | 10 +++++----- .../ws/SearchProjectPermissionsActionTest.java | 2 +- .../ws/SetDefaultTemplateActionTest.java | 6 +++--- .../permission/ws/UpdateTemplateActionTest.java | 8 ++++---- .../server/permission/ws/UsersActionTest.java | 6 +++--- 38 files changed, 134 insertions(+), 134 deletions(-) rename server/sonar-server/src/main/java/org/sonar/server/permission/ws/{Parameters.java => WsPermissionParameters.java} (98%) diff --git a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/AddGroupAction.java b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/AddGroupAction.java index 8d6e381d631..4ac3370b230 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/AddGroupAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/AddGroupAction.java @@ -29,10 +29,10 @@ import org.sonar.server.permission.PermissionChange; import org.sonar.server.permission.PermissionUpdater; import org.sonar.server.permission.ws.PermissionRequest.Builder; -import static org.sonar.server.permission.ws.Parameters.createGroupIdParameter; -import static org.sonar.server.permission.ws.Parameters.createGroupNameParameter; -import static org.sonar.server.permission.ws.Parameters.createPermissionParameter; -import static org.sonar.server.permission.ws.Parameters.createProjectParameter; +import static org.sonar.server.permission.ws.WsPermissionParameters.createGroupIdParameter; +import static org.sonar.server.permission.ws.WsPermissionParameters.createGroupNameParameter; +import static org.sonar.server.permission.ws.WsPermissionParameters.createPermissionParameter; +import static org.sonar.server.permission.ws.WsPermissionParameters.createProjectParameter; public class AddGroupAction implements PermissionsWsAction { diff --git a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/AddGroupToTemplateAction.java b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/AddGroupToTemplateAction.java index b81c5d3f34b..741b4dcf189 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/AddGroupToTemplateAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/AddGroupToTemplateAction.java @@ -34,11 +34,11 @@ import org.sonar.server.user.UserSession; import static org.sonar.api.security.DefaultGroups.ANYONE; import static org.sonar.db.user.GroupMembershipQuery.IN; import static org.sonar.server.permission.PermissionPrivilegeChecker.checkGlobalAdminUser; -import static org.sonar.server.permission.ws.Parameters.PARAM_PERMISSION; -import static org.sonar.server.permission.ws.Parameters.createGroupIdParameter; -import static org.sonar.server.permission.ws.Parameters.createGroupNameParameter; -import static org.sonar.server.permission.ws.Parameters.createProjectPermissionParameter; -import static org.sonar.server.permission.ws.Parameters.createTemplateParameters; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PERMISSION; +import static org.sonar.server.permission.ws.WsPermissionParameters.createGroupIdParameter; +import static org.sonar.server.permission.ws.WsPermissionParameters.createGroupNameParameter; +import static org.sonar.server.permission.ws.WsPermissionParameters.createProjectPermissionParameter; +import static org.sonar.server.permission.ws.WsPermissionParameters.createTemplateParameters; import static org.sonar.server.permission.ws.PermissionRequestValidator.validateNotAnyoneAndAdminPermission; import static org.sonar.server.permission.ws.PermissionRequestValidator.validateProjectPermission; diff --git a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/AddUserAction.java b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/AddUserAction.java index 612789bef85..b98d9cbf43a 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/AddUserAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/AddUserAction.java @@ -29,9 +29,9 @@ import org.sonar.server.permission.PermissionChange; import org.sonar.server.permission.PermissionUpdater; import org.sonar.server.permission.ws.PermissionRequest.Builder; -import static org.sonar.server.permission.ws.Parameters.createPermissionParameter; -import static org.sonar.server.permission.ws.Parameters.createProjectParameter; -import static org.sonar.server.permission.ws.Parameters.createUserLoginParameter; +import static org.sonar.server.permission.ws.WsPermissionParameters.createPermissionParameter; +import static org.sonar.server.permission.ws.WsPermissionParameters.createProjectParameter; +import static org.sonar.server.permission.ws.WsPermissionParameters.createUserLoginParameter; public class AddUserAction implements PermissionsWsAction { diff --git a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/AddUserToTemplateAction.java b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/AddUserToTemplateAction.java index 5b229797222..16a2f53a0f9 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/AddUserToTemplateAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/AddUserToTemplateAction.java @@ -36,11 +36,11 @@ import org.sonar.server.user.UserSession; import static com.google.common.collect.FluentIterable.from; import static org.sonar.db.user.GroupMembershipQuery.IN; import static org.sonar.server.permission.PermissionPrivilegeChecker.checkGlobalAdminUser; -import static org.sonar.server.permission.ws.Parameters.PARAM_PERMISSION; -import static org.sonar.server.permission.ws.Parameters.PARAM_USER_LOGIN; -import static org.sonar.server.permission.ws.Parameters.createProjectPermissionParameter; -import static org.sonar.server.permission.ws.Parameters.createTemplateParameters; -import static org.sonar.server.permission.ws.Parameters.createUserLoginParameter; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PERMISSION; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_USER_LOGIN; +import static org.sonar.server.permission.ws.WsPermissionParameters.createProjectPermissionParameter; +import static org.sonar.server.permission.ws.WsPermissionParameters.createTemplateParameters; +import static org.sonar.server.permission.ws.WsPermissionParameters.createUserLoginParameter; import static org.sonar.server.permission.ws.PermissionRequestValidator.validateProjectPermission; public class AddUserToTemplateAction implements PermissionsWsAction { diff --git a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/ApplyTemplateAction.java b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/ApplyTemplateAction.java index 54c74cde749..7556a66d110 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/ApplyTemplateAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/ApplyTemplateAction.java @@ -31,8 +31,8 @@ import org.sonar.server.permission.ApplyPermissionTemplateQuery; import org.sonar.server.permission.PermissionService; import static java.util.Collections.singletonList; -import static org.sonar.server.permission.ws.Parameters.createProjectParameter; -import static org.sonar.server.permission.ws.Parameters.createTemplateParameters; +import static org.sonar.server.permission.ws.WsPermissionParameters.createProjectParameter; +import static org.sonar.server.permission.ws.WsPermissionParameters.createTemplateParameters; public class ApplyTemplateAction implements PermissionsWsAction { private final DbClient dbClient; diff --git a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/CreateTemplateAction.java b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/CreateTemplateAction.java index 8a4b959b647..69f2f6fbe18 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/CreateTemplateAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/CreateTemplateAction.java @@ -33,11 +33,11 @@ import org.sonarqube.ws.WsPermissions.WsCreatePermissionTemplateResponse; import static java.lang.String.format; import static org.sonar.server.permission.PermissionPrivilegeChecker.checkGlobalAdminUser; -import static org.sonar.server.permission.ws.Parameters.PARAM_DESCRIPTION; -import static org.sonar.server.permission.ws.Parameters.PARAM_NAME; -import static org.sonar.server.permission.ws.Parameters.PARAM_PATTERN; -import static org.sonar.server.permission.ws.Parameters.createTemplateDescriptionParameter; -import static org.sonar.server.permission.ws.Parameters.createTemplateProjectKeyPatternParameter; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_DESCRIPTION; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_NAME; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PATTERN; +import static org.sonar.server.permission.ws.WsPermissionParameters.createTemplateDescriptionParameter; +import static org.sonar.server.permission.ws.WsPermissionParameters.createTemplateProjectKeyPatternParameter; import static org.sonar.server.permission.ws.PermissionRequestValidator.MSG_TEMPLATE_WITH_SAME_NAME; import static org.sonar.server.permission.ws.PermissionRequestValidator.validateProjectPattern; import static org.sonar.server.permission.ws.PermissionRequestValidator.validateTemplateNameFormat; diff --git a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/DeleteTemplateAction.java b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/DeleteTemplateAction.java index 233f6dec2d9..4acc8fcdff6 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/DeleteTemplateAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/DeleteTemplateAction.java @@ -30,7 +30,7 @@ import org.sonar.db.permission.PermissionTemplateDto; import org.sonar.server.user.UserSession; import static org.sonar.server.permission.PermissionPrivilegeChecker.checkGlobalAdminUser; -import static org.sonar.server.permission.ws.Parameters.createTemplateParameters; +import static org.sonar.server.permission.ws.WsPermissionParameters.createTemplateParameters; import static org.sonar.server.permission.ws.WsTemplateRef.fromRequest; import static org.sonar.server.ws.WsUtils.checkRequest; diff --git a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/GroupsAction.java b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/GroupsAction.java index 0ebcc3fdb10..198b3da2355 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/GroupsAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/GroupsAction.java @@ -43,8 +43,8 @@ import org.sonarqube.ws.WsPermissions.WsGroupsResponse; import static com.google.common.base.Objects.firstNonNull; import static org.sonar.server.permission.PermissionPrivilegeChecker.checkProjectAdminUserByComponentDto; import static org.sonar.server.permission.ws.PermissionQueryParser.fromSelectionModeToMembership; -import static org.sonar.server.permission.ws.Parameters.createPermissionParameter; -import static org.sonar.server.permission.ws.Parameters.createProjectParameter; +import static org.sonar.server.permission.ws.WsPermissionParameters.createPermissionParameter; +import static org.sonar.server.permission.ws.WsPermissionParameters.createProjectParameter; import static org.sonar.server.ws.WsUtils.writeProtobuf; public class GroupsAction implements PermissionsWsAction { diff --git a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/PermissionRequest.java b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/PermissionRequest.java index bc42c1d69df..fcce33c3cd9 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/PermissionRequest.java +++ b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/PermissionRequest.java @@ -30,8 +30,8 @@ import static org.sonar.api.server.ws.WebService.Param.SELECTED; import static org.sonar.api.server.ws.WebService.Param.TEXT_QUERY; import static org.sonar.server.permission.ws.PermissionRequestValidator.validateGlobalPermission; import static org.sonar.server.permission.ws.PermissionRequestValidator.validateProjectPermission; -import static org.sonar.server.permission.ws.Parameters.PARAM_PERMISSION; -import static org.sonar.server.permission.ws.Parameters.PARAM_USER_LOGIN; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PERMISSION; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_USER_LOGIN; class PermissionRequest { private final String permission; diff --git a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/PermissionRequestValidator.java b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/PermissionRequestValidator.java index f21e5608208..528152fba77 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/PermissionRequestValidator.java +++ b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/PermissionRequestValidator.java @@ -32,9 +32,9 @@ import static com.google.common.base.Strings.isNullOrEmpty; import static java.lang.String.format; import static org.apache.commons.lang.StringUtils.isBlank; import static org.sonar.api.security.DefaultGroups.isAnyone; -import static org.sonar.server.permission.ws.Parameters.PARAM_PERMISSION; -import static org.sonar.server.permission.ws.Parameters.PARAM_QUALIFIER; -import static org.sonar.server.permission.ws.Parameters.PARAM_PATTERN; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PERMISSION; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_QUALIFIER; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PATTERN; import static org.sonar.server.ws.WsUtils.checkRequest; public class PermissionRequestValidator { diff --git a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/RemoveGroupAction.java b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/RemoveGroupAction.java index 7c18ae20ede..2a1da412fb3 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/RemoveGroupAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/RemoveGroupAction.java @@ -29,10 +29,10 @@ import org.sonar.server.permission.PermissionChange; import org.sonar.server.permission.PermissionUpdater; import org.sonar.server.permission.ws.PermissionRequest.Builder; -import static org.sonar.server.permission.ws.Parameters.createGroupIdParameter; -import static org.sonar.server.permission.ws.Parameters.createGroupNameParameter; -import static org.sonar.server.permission.ws.Parameters.createPermissionParameter; -import static org.sonar.server.permission.ws.Parameters.createProjectParameter; +import static org.sonar.server.permission.ws.WsPermissionParameters.createGroupIdParameter; +import static org.sonar.server.permission.ws.WsPermissionParameters.createGroupNameParameter; +import static org.sonar.server.permission.ws.WsPermissionParameters.createPermissionParameter; +import static org.sonar.server.permission.ws.WsPermissionParameters.createProjectParameter; public class RemoveGroupAction implements PermissionsWsAction { diff --git a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/RemoveGroupFromTemplateAction.java b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/RemoveGroupFromTemplateAction.java index 6aa46efae65..36614093345 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/RemoveGroupFromTemplateAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/RemoveGroupFromTemplateAction.java @@ -30,11 +30,11 @@ import org.sonar.db.user.GroupDto; import org.sonar.server.user.UserSession; import static org.sonar.server.permission.PermissionPrivilegeChecker.checkGlobalAdminUser; -import static org.sonar.server.permission.ws.Parameters.PARAM_PERMISSION; -import static org.sonar.server.permission.ws.Parameters.createGroupIdParameter; -import static org.sonar.server.permission.ws.Parameters.createGroupNameParameter; -import static org.sonar.server.permission.ws.Parameters.createProjectPermissionParameter; -import static org.sonar.server.permission.ws.Parameters.createTemplateParameters; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PERMISSION; +import static org.sonar.server.permission.ws.WsPermissionParameters.createGroupIdParameter; +import static org.sonar.server.permission.ws.WsPermissionParameters.createGroupNameParameter; +import static org.sonar.server.permission.ws.WsPermissionParameters.createProjectPermissionParameter; +import static org.sonar.server.permission.ws.WsPermissionParameters.createTemplateParameters; import static org.sonar.server.permission.ws.PermissionRequestValidator.validateProjectPermission; public class RemoveGroupFromTemplateAction implements PermissionsWsAction { diff --git a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/RemoveUserAction.java b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/RemoveUserAction.java index 03ff653fa6d..0dfaaa174a5 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/RemoveUserAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/RemoveUserAction.java @@ -29,9 +29,9 @@ import org.sonar.server.permission.PermissionChange; import org.sonar.server.permission.PermissionUpdater; import org.sonar.server.permission.ws.PermissionRequest.Builder; -import static org.sonar.server.permission.ws.Parameters.createPermissionParameter; -import static org.sonar.server.permission.ws.Parameters.createProjectParameter; -import static org.sonar.server.permission.ws.Parameters.createUserLoginParameter; +import static org.sonar.server.permission.ws.WsPermissionParameters.createPermissionParameter; +import static org.sonar.server.permission.ws.WsPermissionParameters.createProjectParameter; +import static org.sonar.server.permission.ws.WsPermissionParameters.createUserLoginParameter; public class RemoveUserAction implements PermissionsWsAction { diff --git a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/RemoveUserFromTemplateAction.java b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/RemoveUserFromTemplateAction.java index 573e7007bb4..dd22e79b2a2 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/RemoveUserFromTemplateAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/RemoveUserFromTemplateAction.java @@ -30,11 +30,11 @@ import org.sonar.db.user.UserDto; import org.sonar.server.user.UserSession; import static org.sonar.server.permission.PermissionPrivilegeChecker.checkGlobalAdminUser; -import static org.sonar.server.permission.ws.Parameters.PARAM_PERMISSION; -import static org.sonar.server.permission.ws.Parameters.PARAM_USER_LOGIN; -import static org.sonar.server.permission.ws.Parameters.createProjectPermissionParameter; -import static org.sonar.server.permission.ws.Parameters.createTemplateParameters; -import static org.sonar.server.permission.ws.Parameters.createUserLoginParameter; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PERMISSION; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_USER_LOGIN; +import static org.sonar.server.permission.ws.WsPermissionParameters.createProjectPermissionParameter; +import static org.sonar.server.permission.ws.WsPermissionParameters.createTemplateParameters; +import static org.sonar.server.permission.ws.WsPermissionParameters.createUserLoginParameter; import static org.sonar.server.permission.ws.PermissionRequestValidator.validateProjectPermission; public class RemoveUserFromTemplateAction implements PermissionsWsAction { diff --git a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/SearchProjectPermissionsAction.java b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/SearchProjectPermissionsAction.java index fa56dab3bd6..8bbec5caa6c 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/SearchProjectPermissionsAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/SearchProjectPermissionsAction.java @@ -39,7 +39,7 @@ import org.sonarqube.ws.WsPermissions.WsSearchProjectPermissionsResponse.Project import static org.sonar.server.permission.PermissionPrivilegeChecker.checkGlobalAdminUser; import static org.sonar.server.permission.PermissionPrivilegeChecker.checkProjectAdminUserByComponentKey; import static org.sonar.server.permission.PermissionPrivilegeChecker.checkProjectAdminUserByComponentUuid; -import static org.sonar.server.permission.ws.Parameters.createProjectParameter; +import static org.sonar.server.permission.ws.WsPermissionParameters.createProjectParameter; import static org.sonar.server.ws.WsUtils.writeProtobuf; public class SearchProjectPermissionsAction implements PermissionsWsAction { diff --git a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/SetDefaultTemplateAction.java b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/SetDefaultTemplateAction.java index 5fc18d16d78..79a54ed1e78 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/SetDefaultTemplateAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/SetDefaultTemplateAction.java @@ -38,8 +38,8 @@ import static com.google.common.collect.Ordering.natural; import static java.lang.String.format; import static org.sonar.server.permission.DefaultPermissionTemplates.defaultRootQualifierTemplateProperty; import static org.sonar.server.permission.PermissionPrivilegeChecker.checkGlobalAdminUser; -import static org.sonar.server.permission.ws.Parameters.PARAM_QUALIFIER; -import static org.sonar.server.permission.ws.Parameters.createTemplateParameters; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_QUALIFIER; +import static org.sonar.server.permission.ws.WsPermissionParameters.createTemplateParameters; import static org.sonar.server.permission.ws.PermissionRequestValidator.validateQualifier; import static org.sonar.server.permission.ws.ResourceTypeToQualifier.RESOURCE_TYPE_TO_QUALIFIER; diff --git a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/UpdateTemplateAction.java b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/UpdateTemplateAction.java index 2c4ae44df62..d7ba4b5b0f5 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/UpdateTemplateAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/UpdateTemplateAction.java @@ -36,13 +36,13 @@ import org.sonarqube.ws.WsPermissions.WsUpdatePermissionTemplateResponse; import static com.google.common.base.Objects.firstNonNull; import static java.lang.String.format; import static org.sonar.server.permission.PermissionPrivilegeChecker.checkGlobalAdminUser; -import static org.sonar.server.permission.ws.Parameters.PARAM_ID; -import static org.sonar.server.permission.ws.Parameters.PARAM_DESCRIPTION; -import static org.sonar.server.permission.ws.Parameters.PARAM_NAME; -import static org.sonar.server.permission.ws.Parameters.PARAM_PATTERN; -import static org.sonar.server.permission.ws.Parameters.createIdParameter; -import static org.sonar.server.permission.ws.Parameters.createTemplateDescriptionParameter; -import static org.sonar.server.permission.ws.Parameters.createTemplateProjectKeyPatternParameter; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_ID; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_DESCRIPTION; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_NAME; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PATTERN; +import static org.sonar.server.permission.ws.WsPermissionParameters.createIdParameter; +import static org.sonar.server.permission.ws.WsPermissionParameters.createTemplateDescriptionParameter; +import static org.sonar.server.permission.ws.WsPermissionParameters.createTemplateProjectKeyPatternParameter; import static org.sonar.server.permission.ws.PermissionRequestValidator.MSG_TEMPLATE_WITH_SAME_NAME; import static org.sonar.server.permission.ws.PermissionRequestValidator.validateProjectPattern; import static org.sonar.server.permission.ws.PermissionRequestValidator.validateTemplateNameFormat; diff --git a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/UsersAction.java b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/UsersAction.java index e1aa68b7686..83d48ebfb6e 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/UsersAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/UsersAction.java @@ -43,8 +43,8 @@ import static com.google.common.base.Objects.firstNonNull; import static com.google.common.base.Strings.nullToEmpty; import static org.sonar.server.permission.PermissionPrivilegeChecker.checkProjectAdminUserByComponentDto; import static org.sonar.server.permission.ws.PermissionQueryParser.fromSelectionModeToMembership; -import static org.sonar.server.permission.ws.Parameters.createPermissionParameter; -import static org.sonar.server.permission.ws.Parameters.createProjectParameter; +import static org.sonar.server.permission.ws.WsPermissionParameters.createPermissionParameter; +import static org.sonar.server.permission.ws.WsPermissionParameters.createProjectParameter; import static org.sonar.server.ws.WsUtils.writeProtobuf; public class UsersAction implements PermissionsWsAction { diff --git a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/WsGroupRef.java b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/WsGroupRef.java index f015d39b229..2c735193a12 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/WsGroupRef.java +++ b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/WsGroupRef.java @@ -24,8 +24,8 @@ import javax.annotation.CheckForNull; import javax.annotation.Nullable; import org.sonar.api.server.ws.Request; -import static org.sonar.server.permission.ws.Parameters.PARAM_GROUP_ID; -import static org.sonar.server.permission.ws.Parameters.PARAM_GROUP_NAME; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_GROUP_ID; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_GROUP_NAME; import static org.sonar.server.ws.WsUtils.checkRequest; /** diff --git a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/Parameters.java b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/WsPermissionParameters.java similarity index 98% rename from server/sonar-server/src/main/java/org/sonar/server/permission/ws/Parameters.java rename to server/sonar-server/src/main/java/org/sonar/server/permission/ws/WsPermissionParameters.java index 65b620ce4b8..274c2c2991b 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/Parameters.java +++ b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/WsPermissionParameters.java @@ -27,7 +27,7 @@ import org.sonar.core.util.Uuids; import static java.lang.String.format; -class Parameters { +class WsPermissionParameters { static final String PARAM_PERMISSION = "permission"; static final String PARAM_GROUP_NAME = "groupName"; @@ -58,7 +58,7 @@ class Parameters { "", ProjectPermissions.ALL_ON_ONE_LINE); - private Parameters() { + private WsPermissionParameters() { // static methods only } diff --git a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/WsProjectRef.java b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/WsProjectRef.java index fba0dbe5411..feda183aba9 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/WsProjectRef.java +++ b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/WsProjectRef.java @@ -24,8 +24,8 @@ import com.google.common.base.Optional; import javax.annotation.CheckForNull; import org.sonar.api.server.ws.Request; -import static org.sonar.server.permission.ws.Parameters.PARAM_PROJECT_ID; -import static org.sonar.server.permission.ws.Parameters.PARAM_PROJECT_KEY; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PROJECT_ID; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PROJECT_KEY; import static org.sonar.server.ws.WsUtils.checkRequest; /** diff --git a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/WsTemplateRef.java b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/WsTemplateRef.java index 20b67e57bf0..82377eea06d 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/WsTemplateRef.java +++ b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/WsTemplateRef.java @@ -24,8 +24,8 @@ import javax.annotation.CheckForNull; import javax.annotation.Nullable; import org.sonar.api.server.ws.Request; -import static org.sonar.server.permission.ws.Parameters.PARAM_TEMPLATE_ID; -import static org.sonar.server.permission.ws.Parameters.PARAM_TEMPLATE_NAME; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_TEMPLATE_ID; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_TEMPLATE_NAME; import static org.sonar.server.ws.WsUtils.checkRequest; /** diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/AddGroupActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/AddGroupActionTest.java index 221c7985d39..2544e3dc145 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/AddGroupActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/AddGroupActionTest.java @@ -49,11 +49,11 @@ import static org.mockito.Mockito.verify; import static org.sonar.core.permission.GlobalPermissions.SYSTEM_ADMIN; import static org.sonar.db.component.ComponentTesting.newProjectDto; import static org.sonar.server.permission.ws.AddGroupAction.ACTION; -import static org.sonar.server.permission.ws.Parameters.PARAM_GROUP_ID; -import static org.sonar.server.permission.ws.Parameters.PARAM_GROUP_NAME; -import static org.sonar.server.permission.ws.Parameters.PARAM_PERMISSION; -import static org.sonar.server.permission.ws.Parameters.PARAM_PROJECT_KEY; -import static org.sonar.server.permission.ws.Parameters.PARAM_PROJECT_ID; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_GROUP_ID; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_GROUP_NAME; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PERMISSION; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PROJECT_KEY; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PROJECT_ID; import static org.sonar.server.permission.ws.PermissionsWs.ENDPOINT; @Category(DbTests.class) diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/AddGroupToTemplateActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/AddGroupToTemplateActionTest.java index 1f587ae6a8a..d84111c2965 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/AddGroupToTemplateActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/AddGroupToTemplateActionTest.java @@ -58,11 +58,11 @@ import static org.sonar.api.web.UserRole.ISSUE_ADMIN; import static org.sonar.db.permission.PermissionTemplateTesting.newPermissionTemplateDto; import static org.sonar.db.user.GroupMembershipQuery.IN; import static org.sonar.db.user.GroupTesting.newGroupDto; -import static org.sonar.server.permission.ws.Parameters.PARAM_GROUP_ID; -import static org.sonar.server.permission.ws.Parameters.PARAM_GROUP_NAME; -import static org.sonar.server.permission.ws.Parameters.PARAM_TEMPLATE_ID; -import static org.sonar.server.permission.ws.Parameters.PARAM_PERMISSION; -import static org.sonar.server.permission.ws.Parameters.PARAM_TEMPLATE_NAME; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_GROUP_ID; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_GROUP_NAME; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_TEMPLATE_ID; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PERMISSION; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_TEMPLATE_NAME; @Category(DbTests.class) public class AddGroupToTemplateActionTest { @@ -211,13 +211,13 @@ public class AddGroupToTemplateActionTest { private void newRequest(@Nullable String groupName, @Nullable String templateKey, @Nullable String permission) { TestRequest request = ws.newRequest(); if (groupName != null) { - request.setParam(Parameters.PARAM_GROUP_NAME, groupName); + request.setParam(WsPermissionParameters.PARAM_GROUP_NAME, groupName); } if (templateKey != null) { request.setParam(PARAM_TEMPLATE_ID, templateKey); } if (permission != null) { - request.setParam(Parameters.PARAM_PERMISSION, permission); + request.setParam(WsPermissionParameters.PARAM_PERMISSION, permission); } request.execute(); diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/AddUserActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/AddUserActionTest.java index 2d9f96bdd31..7b6e00e49f1 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/AddUserActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/AddUserActionTest.java @@ -49,10 +49,10 @@ import static org.sonar.core.permission.GlobalPermissions.SYSTEM_ADMIN; import static org.sonar.db.component.ComponentTesting.newFileDto; import static org.sonar.db.component.ComponentTesting.newProjectDto; import static org.sonar.server.permission.ws.AddUserAction.ACTION; -import static org.sonar.server.permission.ws.Parameters.PARAM_PERMISSION; -import static org.sonar.server.permission.ws.Parameters.PARAM_PROJECT_KEY; -import static org.sonar.server.permission.ws.Parameters.PARAM_PROJECT_ID; -import static org.sonar.server.permission.ws.Parameters.PARAM_USER_LOGIN; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PERMISSION; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PROJECT_KEY; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PROJECT_ID; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_USER_LOGIN; import static org.sonar.server.permission.ws.PermissionsWs.ENDPOINT; @Category(DbTests.class) diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/AddUserToTemplateActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/AddUserToTemplateActionTest.java index d7a1a0ebce9..6a28cbda890 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/AddUserToTemplateActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/AddUserToTemplateActionTest.java @@ -55,9 +55,9 @@ import static org.sonar.api.web.UserRole.ISSUE_ADMIN; import static org.sonar.db.permission.PermissionTemplateTesting.newPermissionTemplateDto; import static org.sonar.db.user.GroupMembershipQuery.IN; import static org.sonar.db.user.UserTesting.newUserDto; -import static org.sonar.server.permission.ws.Parameters.PARAM_PERMISSION; -import static org.sonar.server.permission.ws.Parameters.PARAM_TEMPLATE_NAME; -import static org.sonar.server.permission.ws.Parameters.PARAM_USER_LOGIN; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PERMISSION; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_TEMPLATE_NAME; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_USER_LOGIN; @Category(DbTests.class) public class AddUserToTemplateActionTest { @@ -183,10 +183,10 @@ public class AddUserToTemplateActionTest { request.setParam(PARAM_USER_LOGIN, userLogin); } if (templateKey != null) { - request.setParam(Parameters.PARAM_TEMPLATE_ID, templateKey); + request.setParam(WsPermissionParameters.PARAM_TEMPLATE_ID, templateKey); } if (permission != null) { - request.setParam(Parameters.PARAM_PERMISSION, permission); + request.setParam(WsPermissionParameters.PARAM_PERMISSION, permission); } request.execute(); diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/ApplyTemplateActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/ApplyTemplateActionTest.java index a56ae1e7c63..27f64b19f6e 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/ApplyTemplateActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/ApplyTemplateActionTest.java @@ -68,10 +68,10 @@ import static org.sonar.db.permission.PermissionTemplateTesting.newPermissionTem import static org.sonar.db.user.GroupMembershipQuery.IN; import static org.sonar.db.user.GroupTesting.newGroupDto; import static org.sonar.db.user.UserTesting.newUserDto; -import static org.sonar.server.permission.ws.Parameters.PARAM_PROJECT_ID; -import static org.sonar.server.permission.ws.Parameters.PARAM_PROJECT_KEY; -import static org.sonar.server.permission.ws.Parameters.PARAM_TEMPLATE_ID; -import static org.sonar.server.permission.ws.Parameters.PARAM_TEMPLATE_NAME; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PROJECT_ID; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PROJECT_KEY; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_TEMPLATE_ID; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_TEMPLATE_NAME; @Category(DbTests.class) public class ApplyTemplateActionTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/CreateTemplateActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/CreateTemplateActionTest.java index dd3115c28d2..160aebb1afe 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/CreateTemplateActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/CreateTemplateActionTest.java @@ -43,9 +43,9 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import static org.sonar.db.permission.PermissionTemplateTesting.newPermissionTemplateDto; -import static org.sonar.server.permission.ws.Parameters.PARAM_DESCRIPTION; -import static org.sonar.server.permission.ws.Parameters.PARAM_NAME; -import static org.sonar.server.permission.ws.Parameters.PARAM_PATTERN; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_DESCRIPTION; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_NAME; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PATTERN; import static org.sonar.test.JsonAssert.assertJson; public class CreateTemplateActionTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/DeleteTemplateActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/DeleteTemplateActionTest.java index 60f63ba9ca4..33575ba5b19 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/DeleteTemplateActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/DeleteTemplateActionTest.java @@ -52,8 +52,8 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import static org.mockito.internal.util.collections.Sets.newSet; import static org.sonar.db.permission.PermissionTemplateTesting.newPermissionTemplateDto; -import static org.sonar.server.permission.ws.Parameters.PARAM_TEMPLATE_ID; -import static org.sonar.server.permission.ws.Parameters.PARAM_TEMPLATE_NAME; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_TEMPLATE_ID; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_TEMPLATE_NAME; public class DeleteTemplateActionTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/GroupsActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/GroupsActionTest.java index 707ce4eb5c4..3ca4b95c5de 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/GroupsActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/GroupsActionTest.java @@ -53,9 +53,9 @@ import static org.sonar.api.web.UserRole.ISSUE_ADMIN; import static org.sonar.core.permission.GlobalPermissions.SCAN_EXECUTION; import static org.sonar.core.permission.GlobalPermissions.SYSTEM_ADMIN; import static org.sonar.db.component.ComponentTesting.newProjectDto; -import static org.sonar.server.permission.ws.Parameters.PARAM_PERMISSION; -import static org.sonar.server.permission.ws.Parameters.PARAM_PROJECT_KEY; -import static org.sonar.server.permission.ws.Parameters.PARAM_PROJECT_ID; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PERMISSION; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PROJECT_KEY; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PROJECT_ID; import static org.sonar.test.JsonAssert.assertJson; @Category(DbTests.class) diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/RemoveGroupActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/RemoveGroupActionTest.java index 0fadbf6a91c..0add9e68cd8 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/RemoveGroupActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/RemoveGroupActionTest.java @@ -49,11 +49,11 @@ import static org.mockito.Mockito.verify; import static org.sonar.core.permission.GlobalPermissions.SYSTEM_ADMIN; import static org.sonar.db.component.ComponentTesting.newFileDto; import static org.sonar.db.component.ComponentTesting.newProjectDto; -import static org.sonar.server.permission.ws.Parameters.PARAM_GROUP_ID; -import static org.sonar.server.permission.ws.Parameters.PARAM_GROUP_NAME; -import static org.sonar.server.permission.ws.Parameters.PARAM_PERMISSION; -import static org.sonar.server.permission.ws.Parameters.PARAM_PROJECT_KEY; -import static org.sonar.server.permission.ws.Parameters.PARAM_PROJECT_ID; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_GROUP_ID; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_GROUP_NAME; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PERMISSION; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PROJECT_KEY; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PROJECT_ID; import static org.sonar.server.permission.ws.RemoveGroupAction.ACTION; @Category(DbTests.class) diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/RemoveGroupFromTemplateActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/RemoveGroupFromTemplateActionTest.java index 30d7dbec135..517a9885abe 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/RemoveGroupFromTemplateActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/RemoveGroupFromTemplateActionTest.java @@ -55,11 +55,11 @@ import static org.sonar.api.web.UserRole.CODEVIEWER; import static org.sonar.db.permission.PermissionTemplateTesting.newPermissionTemplateDto; import static org.sonar.db.user.GroupMembershipQuery.IN; import static org.sonar.db.user.GroupTesting.newGroupDto; -import static org.sonar.server.permission.ws.Parameters.PARAM_GROUP_ID; -import static org.sonar.server.permission.ws.Parameters.PARAM_GROUP_NAME; -import static org.sonar.server.permission.ws.Parameters.PARAM_PERMISSION; -import static org.sonar.server.permission.ws.Parameters.PARAM_TEMPLATE_ID; -import static org.sonar.server.permission.ws.Parameters.PARAM_TEMPLATE_NAME; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_GROUP_ID; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_GROUP_NAME; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PERMISSION; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_TEMPLATE_ID; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_TEMPLATE_NAME; @Category(DbTests.class) public class RemoveGroupFromTemplateActionTest { @@ -214,13 +214,13 @@ public class RemoveGroupFromTemplateActionTest { private void newRequest(@Nullable String groupName, @Nullable String templateKey, @Nullable String permission) { TestRequest request = ws.newRequest(); if (groupName != null) { - request.setParam(Parameters.PARAM_GROUP_NAME, groupName); + request.setParam(WsPermissionParameters.PARAM_GROUP_NAME, groupName); } if (templateKey != null) { request.setParam(PARAM_TEMPLATE_ID, templateKey); } if (permission != null) { - request.setParam(Parameters.PARAM_PERMISSION, permission); + request.setParam(WsPermissionParameters.PARAM_PERMISSION, permission); } request.execute(); diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/RemoveUserActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/RemoveUserActionTest.java index bfdb74c7c47..ff47ab463ec 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/RemoveUserActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/RemoveUserActionTest.java @@ -48,10 +48,10 @@ import static org.mockito.Mockito.verify; import static org.sonar.core.permission.GlobalPermissions.SYSTEM_ADMIN; import static org.sonar.db.component.ComponentTesting.newFileDto; import static org.sonar.db.component.ComponentTesting.newProjectDto; -import static org.sonar.server.permission.ws.Parameters.PARAM_PERMISSION; -import static org.sonar.server.permission.ws.Parameters.PARAM_PROJECT_KEY; -import static org.sonar.server.permission.ws.Parameters.PARAM_PROJECT_ID; -import static org.sonar.server.permission.ws.Parameters.PARAM_USER_LOGIN; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PERMISSION; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PROJECT_KEY; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PROJECT_ID; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_USER_LOGIN; import static org.sonar.server.permission.ws.PermissionsWs.ENDPOINT; import static org.sonar.server.permission.ws.RemoveUserAction.ACTION; diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/RemoveUserFromTemplateActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/RemoveUserFromTemplateActionTest.java index 81582e4d8ed..7d71fdd1eb6 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/RemoveUserFromTemplateActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/RemoveUserFromTemplateActionTest.java @@ -55,9 +55,9 @@ import static org.sonar.api.web.UserRole.ISSUE_ADMIN; import static org.sonar.db.permission.PermissionTemplateTesting.newPermissionTemplateDto; import static org.sonar.db.user.GroupMembershipQuery.IN; import static org.sonar.db.user.UserTesting.newUserDto; -import static org.sonar.server.permission.ws.Parameters.PARAM_PERMISSION; -import static org.sonar.server.permission.ws.Parameters.PARAM_TEMPLATE_NAME; -import static org.sonar.server.permission.ws.Parameters.PARAM_USER_LOGIN; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PERMISSION; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_TEMPLATE_NAME; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_USER_LOGIN; @Category(DbTests.class) public class RemoveUserFromTemplateActionTest { @@ -207,10 +207,10 @@ public class RemoveUserFromTemplateActionTest { request.setParam(PARAM_USER_LOGIN, userLogin); } if (templateKey != null) { - request.setParam(Parameters.PARAM_TEMPLATE_ID, templateKey); + request.setParam(WsPermissionParameters.PARAM_TEMPLATE_ID, templateKey); } if (permission != null) { - request.setParam(Parameters.PARAM_PERMISSION, permission); + request.setParam(WsPermissionParameters.PARAM_PERMISSION, permission); } request.execute(); diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/SearchProjectPermissionsActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/SearchProjectPermissionsActionTest.java index aead1d2453e..a2c2649fa7a 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/SearchProjectPermissionsActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/SearchProjectPermissionsActionTest.java @@ -60,7 +60,7 @@ import static org.sonar.db.component.ComponentTesting.newProjectDto; import static org.sonar.db.component.ComponentTesting.newView; import static org.sonar.db.user.GroupTesting.newGroupDto; import static org.sonar.db.user.UserTesting.newUserDto; -import static org.sonar.server.permission.ws.Parameters.PARAM_PROJECT_ID; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PROJECT_ID; import static org.sonar.test.JsonAssert.assertJson; public class SearchProjectPermissionsActionTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/SetDefaultTemplateActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/SetDefaultTemplateActionTest.java index f68de3c4aa0..defa13e539c 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/SetDefaultTemplateActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/SetDefaultTemplateActionTest.java @@ -60,9 +60,9 @@ import static org.sonar.api.resources.Qualifiers.PROJECT; import static org.sonar.api.resources.Qualifiers.VIEW; import static org.sonar.server.permission.DefaultPermissionTemplates.DEFAULT_TEMPLATE_PROPERTY; import static org.sonar.server.permission.DefaultPermissionTemplates.defaultRootQualifierTemplateProperty; -import static org.sonar.server.permission.ws.Parameters.PARAM_QUALIFIER; -import static org.sonar.server.permission.ws.Parameters.PARAM_TEMPLATE_ID; -import static org.sonar.server.permission.ws.Parameters.PARAM_TEMPLATE_NAME; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_QUALIFIER; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_TEMPLATE_ID; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_TEMPLATE_NAME; @Category(DbTests.class) public class SetDefaultTemplateActionTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/UpdateTemplateActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/UpdateTemplateActionTest.java index fe9fe83acbe..82d2404779c 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/UpdateTemplateActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/UpdateTemplateActionTest.java @@ -47,10 +47,10 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import static org.sonar.db.permission.PermissionTemplateTesting.newPermissionTemplateDto; -import static org.sonar.server.permission.ws.Parameters.PARAM_DESCRIPTION; -import static org.sonar.server.permission.ws.Parameters.PARAM_ID; -import static org.sonar.server.permission.ws.Parameters.PARAM_NAME; -import static org.sonar.server.permission.ws.Parameters.PARAM_PATTERN; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_DESCRIPTION; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_ID; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_NAME; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PATTERN; import static org.sonar.test.JsonAssert.assertJson; public class UpdateTemplateActionTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/UsersActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/UsersActionTest.java index f6bb2642ce1..864de4c130a 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/UsersActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/UsersActionTest.java @@ -50,9 +50,9 @@ import static org.sonar.core.permission.GlobalPermissions.SCAN_EXECUTION; import static org.sonar.core.permission.GlobalPermissions.SYSTEM_ADMIN; import static org.sonar.db.component.ComponentTesting.newProjectDto; import static org.sonar.db.user.UserTesting.newUserDto; -import static org.sonar.server.permission.ws.Parameters.PARAM_PERMISSION; -import static org.sonar.server.permission.ws.Parameters.PARAM_PROJECT_KEY; -import static org.sonar.server.permission.ws.Parameters.PARAM_PROJECT_ID; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PERMISSION; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PROJECT_KEY; +import static org.sonar.server.permission.ws.WsPermissionParameters.PARAM_PROJECT_ID; import static org.sonar.test.JsonAssert.assertJson; @Category(DbTests.class) -- 2.39.5