use of org.sonar.api.server.ws.WebService.SelectionMode in project sonarqube by SonarSource.
the class UsersAction method getMembership.
private static String getMembership(String selected) {
SelectionMode selectionMode = SelectionMode.fromParam(selected);
String membership = GroupMembershipQuery.ANY;
if (SelectionMode.SELECTED == selectionMode) {
membership = GroupMembershipQuery.IN;
} else if (SelectionMode.DESELECTED == selectionMode) {
membership = GroupMembershipQuery.OUT;
}
return membership;
}
use of org.sonar.api.server.ws.WebService.SelectionMode in project sonarqube by SonarSource.
the class ProjectsAction method loadProjects.
private List<ProjectQprofileAssociationDto> loadProjects(String profileKey, DbSession session, String selected, String query) {
List<ProjectQprofileAssociationDto> projects = Lists.newArrayList();
SelectionMode selectionMode = SelectionMode.fromParam(selected);
if (SelectionMode.SELECTED == selectionMode) {
projects.addAll(dbClient.qualityProfileDao().selectSelectedProjects(profileKey, query, session));
} else if (SelectionMode.DESELECTED == selectionMode) {
projects.addAll(dbClient.qualityProfileDao().selectDeselectedProjects(profileKey, query, session));
} else {
projects.addAll(dbClient.qualityProfileDao().selectProjectAssociations(profileKey, query, session));
}
return projects;
}
use of org.sonar.api.server.ws.WebService.SelectionMode in project sonarqube by SonarSource.
the class GroupsAction method getMembership.
private String getMembership(String selected) {
SelectionMode selectionMode = SelectionMode.fromParam(selected);
String membership = GroupMembershipQuery.ANY;
if (SelectionMode.SELECTED == selectionMode) {
membership = GroupMembershipQuery.IN;
} else if (SelectionMode.DESELECTED == selectionMode) {
membership = GroupMembershipQuery.OUT;
}
return membership;
}
Aggregations