How to get list of users? using Java plain API
Accepted answer
IContributorManager icm = teamRepository.contributorManager();
List<IContributor> allContribs = icm.fetchAllContributors(monitor);
System.out.println("I have " + allContribs.size() + " total users in the repository");
Returns all, including archived. You can iterate on the allContribs list and check each IContributor to see if they are archived:
contributor.isArchived() (where contributor came from the loop for (IContributor contributor : allContribs)).
List<IContributor> allContribs = icm.fetchAllContributors(monitor);
System.out.println("I have " + allContribs.size() + " total users in the repository");
Returns all, including archived. You can iterate on the allContribs list and check each IContributor to see if they are archived:
contributor.isArchived() (where contributor came from the loop for (IContributor contributor : allContribs)).