diff --git a/src/main/java/fr/igred/omero/Client.java b/src/main/java/fr/igred/omero/Client.java index 60c678fa..072c66ba 100644 --- a/src/main/java/fr/igred/omero/Client.java +++ b/src/main/java/fr/igred/omero/Client.java @@ -372,37 +372,6 @@ public GroupWrapper getGroup(long groupId) } - /** - * List of all groups to which the specified user belongs - * - * @param userId The ID of the user - * - * @return the list of groups - * - * @throws ServiceException Cannot connect to OMERO. - * @throws AccessException Cannot access data. - * @throws ExecutionException A Facility can't be retrieved or instantiated. - */ - public List getAllAvailableGroups(long userId) - throws ServiceException, AccessException, ExecutionException { - String error = String.format("Cannot retrieve available groups from user %d: ", userId); - List groups = ExceptionHandler.of(getGateway(), - g -> g.getAdminService(getCtx()).containedGroups(userId)) - .handleServiceOrAccess(error) - .get(); - - if (groups != null && !groups.isEmpty()) { - List groupWrappers = new ArrayList<>(groups.size()); - for (ExperimenterGroup group : groups) { - groupWrappers.add(getGroup(group.getName().getValue())); - } - return groupWrappers; - } else { - throw new NoSuchElementException(String.format("Groups not found for user: %d", userId)); - } - } - - /** * Gets the client associated with the username in the parameters. The user calling this function needs to have * administrator rights. All action realized with the client returned will be considered as his.