aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2015-09-02 16:52:19 +0200
committerTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2015-09-02 16:52:19 +0200
commitfb3f4e2fe8f4aaaffedf21956ffa808cf79e3a7a (patch)
treea862ef017002e4537ca735615a5e98bd7816b713
parent34220fcd9417ffc286f55c0c77b035dc5c64ec7d (diff)
downloadsonarqube-fb3f4e2fe8f4aaaffedf21956ffa808cf79e3a7a.tar.gz
sonarqube-fb3f4e2fe8f4aaaffedf21956ffa808cf79e3a7a.zip
Rename id and template id parameters in the permission domain
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/permission/ws/AddGroupToTemplateAction.java8
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/permission/ws/AddUserToTemplateAction.java8
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/permission/ws/ApplyTemplateAction.java8
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/permission/ws/DeleteTemplateAction.java8
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/permission/ws/Parameters.java14
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/permission/ws/RemoveGroupFromTemplateAction.java8
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/permission/ws/RemoveUserFromTemplateAction.java8
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/permission/ws/SetDefaultTemplateAction.java8
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/permission/ws/UpdateTemplateAction.java8
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/permission/ws/AddGroupToTemplateActionTest.java6
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/permission/ws/AddUserToTemplateActionTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/permission/ws/ApplyTemplateActionTest.java4
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/permission/ws/DeleteTemplateActionTest.java4
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/permission/ws/RemoveGroupFromTemplateActionTest.java6
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/permission/ws/RemoveUserFromTemplateActionTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/permission/ws/SetDefaultTemplateActionTest.java4
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/permission/ws/UpdateTemplateActionTest.java4
17 files changed, 55 insertions, 55 deletions
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 524b99f8787..5549e67cea7 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
@@ -37,11 +37,11 @@ import static org.sonar.server.permission.PermissionPrivilegeChecker.checkGlobal
import static org.sonar.server.permission.ws.PermissionRequestValidator.validateNotAnyoneAndAdminPermission;
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_TEMPLATE_ID_EXPLICIT;
+import static org.sonar.server.permission.ws.Parameters.PARAM_TEMPLATE_ID;
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.createExplicitTemplateId;
+import static org.sonar.server.permission.ws.Parameters.createTemplateIdParameter;
public class AddGroupToTemplateAction implements PermissionsWsAction {
private final DbClient dbClient;
@@ -65,7 +65,7 @@ public class AddGroupToTemplateAction implements PermissionsWsAction {
"It requires administration permissions to access.")
.setHandler(this);
- createExplicitTemplateId(action);
+ createTemplateIdParameter(action);
createProjectPermissionParameter(action);
createGroupIdParameter(action);
createGroupNameParameter(action);
@@ -75,7 +75,7 @@ public class AddGroupToTemplateAction implements PermissionsWsAction {
public void handle(Request wsRequest, Response wsResponse) throws Exception {
checkGlobalAdminUser(userSession);
- String templateUuid = wsRequest.mandatoryParam(PARAM_TEMPLATE_ID_EXPLICIT);
+ String templateUuid = wsRequest.mandatoryParam(PARAM_TEMPLATE_ID);
String permission = wsRequest.mandatoryParam(PARAM_PERMISSION);
WsGroupRef group = WsGroupRef.fromRequest(wsRequest);
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 7e9656438e6..e5b534b9779 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
@@ -38,10 +38,10 @@ import static org.sonar.db.user.GroupMembershipQuery.IN;
import static org.sonar.server.permission.PermissionPrivilegeChecker.checkGlobalAdminUser;
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_TEMPLATE_ID_EXPLICIT;
+import static org.sonar.server.permission.ws.Parameters.PARAM_TEMPLATE_ID;
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.createExplicitTemplateId;
+import static org.sonar.server.permission.ws.Parameters.createTemplateIdParameter;
import static org.sonar.server.permission.ws.Parameters.createUserLoginParameter;
public class AddUserToTemplateAction implements PermissionsWsAction {
@@ -65,7 +65,7 @@ public class AddUserToTemplateAction implements PermissionsWsAction {
"It requires administration permissions to access.")
.setHandler(this);
- createExplicitTemplateId(action);
+ createTemplateIdParameter(action);
createProjectPermissionParameter(action);
createUserLoginParameter(action);
}
@@ -74,7 +74,7 @@ public class AddUserToTemplateAction implements PermissionsWsAction {
public void handle(Request wsRequest, Response wsResponse) throws Exception {
checkGlobalAdminUser(userSession);
- String templateUuid = wsRequest.mandatoryParam(PARAM_TEMPLATE_ID_EXPLICIT);
+ String templateUuid = wsRequest.mandatoryParam(PARAM_TEMPLATE_ID);
String permission = wsRequest.mandatoryParam(PARAM_PERMISSION);
final String userLogin = wsRequest.mandatoryParam(PARAM_USER_LOGIN);
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 ef3039d7f61..88b79cfde1b 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.PARAM_TEMPLATE_ID_EXPLICIT;
-import static org.sonar.server.permission.ws.Parameters.createExplicitTemplateId;
+import static org.sonar.server.permission.ws.Parameters.PARAM_TEMPLATE_ID;
+import static org.sonar.server.permission.ws.Parameters.createTemplateIdParameter;
import static org.sonar.server.permission.ws.Parameters.createProjectParameter;
public class ApplyTemplateAction implements PermissionsWsAction {
@@ -56,13 +56,13 @@ public class ApplyTemplateAction implements PermissionsWsAction {
.setSince("5.2")
.setHandler(this);
- createExplicitTemplateId(action);
+ createTemplateIdParameter(action);
createProjectParameter(action);
}
@Override
public void handle(Request wsRequest, Response wsResponse) throws Exception {
- String templateUuid = wsRequest.mandatoryParam(PARAM_TEMPLATE_ID_EXPLICIT);
+ String templateUuid = wsRequest.mandatoryParam(PARAM_TEMPLATE_ID);
DbSession dbSession = dbClient.openSession(false);
try {
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 bdafb42fdeb..d0f467e0778 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,8 +30,8 @@ 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.PARAM_TEMPLATE_ID;
-import static org.sonar.server.permission.ws.Parameters.createTemplateIdParameter;
+import static org.sonar.server.permission.ws.Parameters.PARAM_ID;
+import static org.sonar.server.permission.ws.Parameters.createIdParameter;
import static org.sonar.server.ws.WsUtils.checkRequest;
public class DeleteTemplateAction implements PermissionsWsAction {
@@ -56,14 +56,14 @@ public class DeleteTemplateAction implements PermissionsWsAction {
.setPost(true)
.setHandler(this);
- createTemplateIdParameter(action);
+ createIdParameter(action);
}
@Override
public void handle(Request wsRequest, Response wsResponse) throws Exception {
checkGlobalAdminUser(userSession);
- String uuid = wsRequest.mandatoryParam(PARAM_TEMPLATE_ID);
+ String uuid = wsRequest.mandatoryParam(PARAM_ID);
checkTemplateUuidIsNotDefault(uuid);
deleteTemplate(uuid);
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/Parameters.java
index f2ecba4137c..3882689c656 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/Parameters.java
@@ -34,9 +34,9 @@ class Parameters {
static final String PARAM_PROJECT_ID = "projectId";
static final String PARAM_PROJECT_KEY = "projectKey";
static final String PARAM_USER_LOGIN = "login";
- static final String PARAM_TEMPLATE_ID_EXPLICIT = "templateId";
+ static final String PARAM_TEMPLATE_ID = "templateId";
- static final String PARAM_TEMPLATE_ID = "id";
+ static final String PARAM_ID = "id";
static final String PARAM_TEMPLATE_NAME = "name";
static final String PARAM_TEMPLATE_DESCRIPTION = "description";
static final String PARAM_TEMPLATE_PATTERN = "projectKeyPattern";
@@ -108,8 +108,8 @@ class Parameters {
.setExampleValue("g.hopper");
}
- static void createExplicitTemplateId(NewAction action) {
- action.createParam(PARAM_TEMPLATE_ID_EXPLICIT)
+ static void createTemplateIdParameter(NewAction action) {
+ action.createParam(PARAM_TEMPLATE_ID)
.setRequired(true)
.setDescription("Template id")
.setExampleValue("617f3501-3d32-41bd-a7ac-18315d2e3c7a");
@@ -127,10 +127,10 @@ class Parameters {
.setExampleValue("Permissions for all projects related to the financial service");
}
- static void createTemplateIdParameter(NewAction action) {
- action.createParam(PARAM_TEMPLATE_ID)
+ static void createIdParameter(NewAction action) {
+ action.createParam(PARAM_ID)
.setRequired(true)
- .setDescription("Key")
+ .setDescription("Id")
.setExampleValue("af8cb8cc-1e78-4c4e-8c00-ee8e814009a5");
}
}
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 6a367fda991..2da3fdbe987 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
@@ -32,11 +32,11 @@ import org.sonar.server.user.UserSession;
import static org.sonar.server.permission.PermissionPrivilegeChecker.checkGlobalAdminUser;
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_TEMPLATE_ID_EXPLICIT;
+import static org.sonar.server.permission.ws.Parameters.PARAM_TEMPLATE_ID;
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.createExplicitTemplateId;
+import static org.sonar.server.permission.ws.Parameters.createTemplateIdParameter;
public class RemoveGroupFromTemplateAction implements PermissionsWsAction {
private final DbClient dbClient;
@@ -60,7 +60,7 @@ public class RemoveGroupFromTemplateAction implements PermissionsWsAction {
"It requires administration permissions to access.")
.setHandler(this);
- createExplicitTemplateId(action);
+ createTemplateIdParameter(action);
createProjectPermissionParameter(action);
createGroupIdParameter(action);
createGroupNameParameter(action);
@@ -70,7 +70,7 @@ public class RemoveGroupFromTemplateAction implements PermissionsWsAction {
public void handle(Request wsRequest, Response wsResponse) throws Exception {
checkGlobalAdminUser(userSession);
- String templateUuid = wsRequest.mandatoryParam(PARAM_TEMPLATE_ID_EXPLICIT);
+ String templateUuid = wsRequest.mandatoryParam(PARAM_TEMPLATE_ID);
String permission = wsRequest.mandatoryParam(PARAM_PERMISSION);
WsGroupRef group = WsGroupRef.fromRequest(wsRequest);
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 8eeb6269e5e..e65f3d22071 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
@@ -32,10 +32,10 @@ import org.sonar.server.user.UserSession;
import static org.sonar.server.permission.PermissionPrivilegeChecker.checkGlobalAdminUser;
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_TEMPLATE_ID_EXPLICIT;
+import static org.sonar.server.permission.ws.Parameters.PARAM_TEMPLATE_ID;
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.createExplicitTemplateId;
+import static org.sonar.server.permission.ws.Parameters.createTemplateIdParameter;
import static org.sonar.server.permission.ws.Parameters.createUserLoginParameter;
public class RemoveUserFromTemplateAction implements PermissionsWsAction {
@@ -59,7 +59,7 @@ public class RemoveUserFromTemplateAction implements PermissionsWsAction {
"It requires administration permissions to access.")
.setHandler(this);
- createExplicitTemplateId(action);
+ createTemplateIdParameter(action);
createProjectPermissionParameter(action);
createUserLoginParameter(action);
}
@@ -68,7 +68,7 @@ public class RemoveUserFromTemplateAction implements PermissionsWsAction {
public void handle(Request wsRequest, Response wsResponse) throws Exception {
checkGlobalAdminUser(userSession);
- String templateUuid = wsRequest.mandatoryParam(PARAM_TEMPLATE_ID_EXPLICIT);
+ String templateUuid = wsRequest.mandatoryParam(PARAM_TEMPLATE_ID);
String permission = wsRequest.mandatoryParam(PARAM_PERMISSION);
String userLogin = wsRequest.mandatoryParam(PARAM_USER_LOGIN);
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 ec13a4998bf..95d659f119a 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
@@ -39,8 +39,8 @@ import static org.sonar.server.permission.DefaultPermissionTemplates.DEFAULT_TEM
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.PARAM_TEMPLATE_ID_EXPLICIT;
-import static org.sonar.server.permission.ws.Parameters.createExplicitTemplateId;
+import static org.sonar.server.permission.ws.Parameters.PARAM_TEMPLATE_ID;
+import static org.sonar.server.permission.ws.Parameters.createTemplateIdParameter;
import static org.sonar.server.permission.ws.PermissionRequestValidator.validateQualifier;
import static org.sonar.server.permission.ws.ResourceTypeToQualifier.RESOURCE_TYPE_TO_QUALIFIER;
@@ -71,7 +71,7 @@ public class SetDefaultTemplateAction implements PermissionsWsAction {
.setSince("5.2")
.setHandler(this);
- createExplicitTemplateId(action);
+ createTemplateIdParameter(action);
action.createParam(PARAM_QUALIFIER)
.setDescription("Project qualifier. Possible values are:")
@@ -83,7 +83,7 @@ public class SetDefaultTemplateAction implements PermissionsWsAction {
public void handle(Request wsRequest, Response wsResponse) throws Exception {
checkGlobalAdminUser(userSession);
- String templateUuid = wsRequest.mandatoryParam(PARAM_TEMPLATE_ID_EXPLICIT);
+ String templateUuid = wsRequest.mandatoryParam(PARAM_TEMPLATE_ID);
String qualifier = wsRequest.mandatoryParam(PARAM_QUALIFIER);
checkTemplateExists(templateUuid);
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 aece6b22825..a7d2ab6e1e5 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
@@ -37,11 +37,11 @@ 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_TEMPLATE_DESCRIPTION;
-import static org.sonar.server.permission.ws.Parameters.PARAM_TEMPLATE_ID;
+import static org.sonar.server.permission.ws.Parameters.PARAM_ID;
import static org.sonar.server.permission.ws.Parameters.PARAM_TEMPLATE_NAME;
import static org.sonar.server.permission.ws.Parameters.PARAM_TEMPLATE_PATTERN;
import static org.sonar.server.permission.ws.Parameters.createTemplateDescriptionParameter;
-import static org.sonar.server.permission.ws.Parameters.createTemplateIdParameter;
+import static org.sonar.server.permission.ws.Parameters.createIdParameter;
import static org.sonar.server.permission.ws.Parameters.createTemplateProjectKeyPatternParameter;
import static org.sonar.server.permission.ws.PermissionRequestValidator.MSG_TEMPLATE_WITH_SAME_NAME;
import static org.sonar.server.permission.ws.PermissionRequestValidator.validateProjectPattern;
@@ -73,7 +73,7 @@ public class UpdateTemplateAction implements PermissionsWsAction {
.setPost(true)
.setHandler(this);
- createTemplateIdParameter(action);
+ createIdParameter(action);
action.createParam(PARAM_TEMPLATE_NAME)
.setDescription("Name")
@@ -87,7 +87,7 @@ public class UpdateTemplateAction implements PermissionsWsAction {
public void handle(Request wsRequest, Response wsResponse) throws Exception {
checkGlobalAdminUser(userSession);
- String key = wsRequest.mandatoryParam(PARAM_TEMPLATE_ID);
+ String key = wsRequest.mandatoryParam(PARAM_ID);
String nameParam = wsRequest.param(PARAM_TEMPLATE_NAME);
String descriptionParam = wsRequest.param(PARAM_TEMPLATE_DESCRIPTION);
String projectPatternParam = wsRequest.param(PARAM_TEMPLATE_PATTERN);
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 be155cbf5cc..8929be63822 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
@@ -59,7 +59,7 @@ 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.server.permission.ws.Parameters.PARAM_GROUP_ID;
-import static org.sonar.server.permission.ws.Parameters.PARAM_TEMPLATE_ID_EXPLICIT;
+import static org.sonar.server.permission.ws.Parameters.PARAM_TEMPLATE_ID;
import static org.sonar.server.permission.ws.Parameters.PARAM_PERMISSION;
@Category(DbTests.class)
@@ -103,7 +103,7 @@ public class AddGroupToTemplateActionTest {
@Test
public void add_with_group_id() {
ws.newRequest()
- .setParam(PARAM_TEMPLATE_ID_EXPLICIT, permissionTemplate.getKee())
+ .setParam(PARAM_TEMPLATE_ID, permissionTemplate.getKee())
.setParam(PARAM_PERMISSION, CODEVIEWER)
.setParam(PARAM_GROUP_ID, String.valueOf(group.getId()))
.execute();
@@ -200,7 +200,7 @@ public class AddGroupToTemplateActionTest {
request.setParam(Parameters.PARAM_GROUP_NAME, groupName);
}
if (templateKey != null) {
- request.setParam(PARAM_TEMPLATE_ID_EXPLICIT, templateKey);
+ request.setParam(PARAM_TEMPLATE_ID, templateKey);
}
if (permission != null) {
request.setParam(Parameters.PARAM_PERMISSION, permission);
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 ee2cfdd764e..89f911683f9 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
@@ -168,7 +168,7 @@ public class AddUserToTemplateActionTest {
request.setParam(Parameters.PARAM_USER_LOGIN, userLogin);
}
if (templateKey != null) {
- request.setParam(Parameters.PARAM_TEMPLATE_ID_EXPLICIT, templateKey);
+ request.setParam(Parameters.PARAM_TEMPLATE_ID, templateKey);
}
if (permission != null) {
request.setParam(Parameters.PARAM_PERMISSION, permission);
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 33770ed5b72..3e10bc2630d 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
@@ -70,7 +70,7 @@ 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_EXPLICIT;
+import static org.sonar.server.permission.ws.Parameters.PARAM_TEMPLATE_ID;
@Category(DbTests.class)
public class ApplyTemplateActionTest {
@@ -221,7 +221,7 @@ public class ApplyTemplateActionTest {
private TestResponse newRequest(@Nullable String templateUuid, @Nullable String projectUuid, @Nullable String projectKey) {
TestRequest request = ws.newRequest();
if (templateUuid != null) {
- request.setParam(PARAM_TEMPLATE_ID_EXPLICIT, templateUuid);
+ request.setParam(PARAM_TEMPLATE_ID, templateUuid);
}
if (projectUuid != null) {
request.setParam(PARAM_PROJECT_ID, projectUuid);
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 319a7e1fa22..7a5fca2395d 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,7 +52,7 @@ 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_ID;
public class DeleteTemplateActionTest {
@@ -155,7 +155,7 @@ public class DeleteTemplateActionTest {
private TestResponse newRequest(@Nullable String id) {
TestRequest request = ws.newRequest();
if (id != null) {
- request.setParam(PARAM_TEMPLATE_ID, id);
+ request.setParam(PARAM_ID, id);
}
TestResponse result = executeRequest(request);
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 7b880d69a8f..8a335a9d291 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
@@ -57,7 +57,7 @@ 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_PERMISSION;
-import static org.sonar.server.permission.ws.Parameters.PARAM_TEMPLATE_ID_EXPLICIT;
+import static org.sonar.server.permission.ws.Parameters.PARAM_TEMPLATE_ID;
@Category(DbTests.class)
public class RemoveGroupFromTemplateActionTest {
@@ -108,7 +108,7 @@ public class RemoveGroupFromTemplateActionTest {
commit();
ws.newRequest()
- .setParam(PARAM_TEMPLATE_ID_EXPLICIT, permissionTemplate.getKee())
+ .setParam(PARAM_TEMPLATE_ID, permissionTemplate.getKee())
.setParam(PARAM_PERMISSION, PERMISSION)
.setParam(PARAM_GROUP_ID, String.valueOf(group.getId()))
.execute();
@@ -200,7 +200,7 @@ public class RemoveGroupFromTemplateActionTest {
request.setParam(Parameters.PARAM_GROUP_NAME, groupName);
}
if (templateKey != null) {
- request.setParam(PARAM_TEMPLATE_ID_EXPLICIT, templateKey);
+ request.setParam(PARAM_TEMPLATE_ID, templateKey);
}
if (permission != null) {
request.setParam(Parameters.PARAM_PERMISSION, permission);
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 1b7187e335e..aa470855623 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
@@ -192,7 +192,7 @@ public class RemoveUserFromTemplateActionTest {
request.setParam(Parameters.PARAM_USER_LOGIN, userLogin);
}
if (templateKey != null) {
- request.setParam(Parameters.PARAM_TEMPLATE_ID_EXPLICIT, templateKey);
+ request.setParam(Parameters.PARAM_TEMPLATE_ID, templateKey);
}
if (permission != null) {
request.setParam(Parameters.PARAM_PERMISSION, permission);
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 88b04752a4d..a6d3274ebd1 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
@@ -61,7 +61,7 @@ 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_EXPLICIT;
+import static org.sonar.server.permission.ws.Parameters.PARAM_TEMPLATE_ID;
@Category(DbTests.class)
public class SetDefaultTemplateActionTest {
@@ -163,7 +163,7 @@ public class SetDefaultTemplateActionTest {
private String newRequest(@Nullable String templateUuid, @Nullable String qualifier) {
TestRequest request = ws.newRequest();
if (templateUuid != null) {
- request.setParam(PARAM_TEMPLATE_ID_EXPLICIT, templateUuid);
+ request.setParam(PARAM_TEMPLATE_ID, templateUuid);
}
if (qualifier != null) {
request.setParam(PARAM_QUALIFIER, qualifier);
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 cb467bcd7a1..4f12bd9116b 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
@@ -48,7 +48,7 @@ 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_TEMPLATE_DESCRIPTION;
-import static org.sonar.server.permission.ws.Parameters.PARAM_TEMPLATE_ID;
+import static org.sonar.server.permission.ws.Parameters.PARAM_ID;
import static org.sonar.server.permission.ws.Parameters.PARAM_TEMPLATE_NAME;
import static org.sonar.server.permission.ws.Parameters.PARAM_TEMPLATE_PATTERN;
import static org.sonar.test.JsonAssert.assertJson;
@@ -220,7 +220,7 @@ public class UpdateTemplateActionTest {
private TestResponse newRequest(@Nullable String key, @Nullable String name, @Nullable String description, @Nullable String projectPattern) {
TestRequest request = ws.newRequest();
if (key != null) {
- request.setParam(PARAM_TEMPLATE_ID, key);
+ request.setParam(PARAM_ID, key);
}
if (name != null) {
request.setParam(PARAM_TEMPLATE_NAME, name);