diff options
author | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2015-08-19 15:10:38 +0200 |
---|---|---|
committer | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2015-08-19 15:10:47 +0200 |
commit | 82564709cf06447b8a7e5fcadc609d892fc85509 (patch) | |
tree | 1d8e4c289b67dda92639a1e7d088947625078035 /sonar-db | |
parent | b59537c890314a22a1fa44c41fea1b1bdcc726eb (diff) | |
download | sonarqube-82564709cf06447b8a7e5fcadc609d892fc85509.tar.gz sonarqube-82564709cf06447b8a7e5fcadc609d892fc85509.zip |
SONAR-6485 WS permissions/search_project_permissions add paging field in response
Diffstat (limited to 'sonar-db')
-rw-r--r-- | sonar-db/src/main/java/org/sonar/db/permission/PermissionDao.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sonar-db/src/main/java/org/sonar/db/permission/PermissionDao.java b/sonar-db/src/main/java/org/sonar/db/permission/PermissionDao.java index 48d4c327736..773c28a44e0 100644 --- a/sonar-db/src/main/java/org/sonar/db/permission/PermissionDao.java +++ b/sonar-db/src/main/java/org/sonar/db/permission/PermissionDao.java @@ -41,6 +41,7 @@ public class PermissionDao implements Dao { private static final String QUERY_PARAMETER = "query"; private static final String COMPONENT_ID_PARAMETER = "componentId"; + private static final String ANYONE_GROUP_PARAMETER = "anyoneGroup"; private final MyBatis myBatis; @@ -93,7 +94,7 @@ public class PermissionDao implements Dao { public int countGroups(DbSession session, String permission, @Nullable Long componentId) { Map<String, Object> parameters = new HashMap<>(); parameters.put("permission", permission); - parameters.put("anyoneGroup", DefaultGroups.ANYONE); + parameters.put(ANYONE_GROUP_PARAMETER, DefaultGroups.ANYONE); parameters.put(COMPONENT_ID_PARAMETER, componentId); return mapper(session).countGroups(parameters); @@ -120,7 +121,7 @@ public class PermissionDao implements Dao { */ public void groupsCountByComponentIdAndPermission(final DbSession dbSession, final List<Long> componentIds, final ResultHandler resultHandler) { final Map<String, Object> parameters = new HashMap<>(); - parameters.put("anyoneGroup", DefaultGroups.ANYONE); + parameters.put(ANYONE_GROUP_PARAMETER, DefaultGroups.ANYONE); DatabaseUtils.executeLargeInputsWithoutOutput(componentIds, new Function<List<Long>, Void>() { @Override @@ -136,7 +137,7 @@ public class PermissionDao implements Dao { Map<String, Object> params = newHashMap(); params.put(QUERY_PARAMETER, query); params.put(COMPONENT_ID_PARAMETER, componentId); - params.put("anyoneGroup", DefaultGroups.ANYONE); + params.put(ANYONE_GROUP_PARAMETER, DefaultGroups.ANYONE); return params; } |