From 4426d9461b32b52cba1eb09173ad19fe42a7cf7d Mon Sep 17 00:00:00 2001 From: sofyenne Date: Tue, 7 Jul 2026 14:08:32 +0100 Subject: [PATCH] feat: Improve the loading of users by group - MEED-10462 - Meeds-io/MIPs#237 --- .../services/organization/UserHandler.java | 12 ++++++++++++ .../impl/mock/DummyOrganizationService.java | 5 +++++ 2 files changed, 17 insertions(+) diff --git a/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/UserHandler.java b/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/UserHandler.java index 105d428ce..a283a676c 100644 --- a/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/UserHandler.java +++ b/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/UserHandler.java @@ -200,6 +200,18 @@ default ListAccess findUsersByQuery(Query query, List groupIds, Us throw new UnsupportedOperationException(); } + /** + * This method return the list of the users in a given + * group. + * + * @param groupId id of the group. + * @return return a list of identifiers of users in the group + * @throws Exception any exception + */ + default List findUserNamesByGroupId(String groupId) { + throw new UnsupportedOperationException(); + } + /** * This method should search and return the list of the users in a given * group. diff --git a/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/impl/mock/DummyOrganizationService.java b/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/impl/mock/DummyOrganizationService.java index 2776b029b..b2ac9f2c5 100644 --- a/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/impl/mock/DummyOrganizationService.java +++ b/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/impl/mock/DummyOrganizationService.java @@ -439,6 +439,11 @@ public ListAccess findUsersByQuery(Query query, UserStatus status) throws { return findAllUsers(status); } + + @Override + public List findUserNamesByGroupId(String groupId) { + return Arrays.stream(new String[] {"john", "test"}).toList(); + } } public static class GroupHandlerImpl implements GroupHandler