use of org.eclipse.che.multiuser.organization.spi.impl.MemberImpl in project devspaces-images by redhat-developer.
the class OrganizationManager method removeMembers.
@VisibleForTesting
List<String> removeMembers(String organizationId) throws ServerException {
List<String> removed = new ArrayList<>();
Page<MemberImpl> membersPage;
do {
// skip count always equals to 0 because elements will be shifted after removing previous
// items
membersPage = memberDao.getMembers(organizationId, 100, 0);
for (MemberImpl member : membersPage.getItems()) {
removed.add(member.getUserId());
memberDao.remove(member.getUserId(), member.getOrganizationId());
}
} while (membersPage.hasNextPage());
return removed;
}
Aggregations