From 23a46b4be35277e06ec89f48730eeb694e686be8 Mon Sep 17 00:00:00 2001
From: Kenmegne <stephanie.kenmegne@gmail.com>
Date: Thu, 18 Jun 2026 15:40:06 +0000
Subject: [PATCH] add fdx-commons and fdx-consultation

---
 fdx-consultation/fdxconsultation-service-impl/src/main/java/com/megatim/fdxconsultation/service/impl/searchs/TableauBordGlobalSearchRSImpl.java |   48 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 48 insertions(+), 0 deletions(-)

diff --git a/fdx-consultation/fdxconsultation-service-impl/src/main/java/com/megatim/fdxconsultation/service/impl/searchs/TableauBordGlobalSearchRSImpl.java b/fdx-consultation/fdxconsultation-service-impl/src/main/java/com/megatim/fdxconsultation/service/impl/searchs/TableauBordGlobalSearchRSImpl.java
new file mode 100644
index 0000000..3f85e88
--- /dev/null
+++ b/fdx-consultation/fdxconsultation-service-impl/src/main/java/com/megatim/fdxconsultation/service/impl/searchs/TableauBordGlobalSearchRSImpl.java
@@ -0,0 +1,48 @@
+package com.megatim.fdxconsultation.service.impl.searchs;
+
+import com.megatim.fdxconsultation.core.ifaces.stats.TableauBordGlobalSearchManager;
+import com.megatim.fdxconsultation.core.impl.stats.ConvertedTableauBordResponse;
+import com.megatim.fdxconsultation.model.searchentities.TableauBordGlobalSearch;
+import com.megatim.fdxconsultation.model.stats.dto.TableauBordFlatResponse;
+import com.megatim.fdxconsultation.service.ifaces.searchs.GlobalDasboardSearchRS;
+import com.mgt.rs.security.core.common.AuthenticatedUser;
+import java.util.List;
+import java.util.stream.Collectors;
+import javax.enterprise.event.Observes;
+import javax.inject.Inject;
+import javax.ws.rs.Path;
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.Response;
+
+/**
+ *
+ * @author Gabuntu
+ */
+@Path("tableau-bord-global-search")
+public class TableauBordGlobalSearchRSImpl implements GlobalDasboardSearchRS {
+
+    @Inject
+    private TableauBordGlobalSearchManager manager;
+
+    @Override
+    public Response formData(HttpHeaders headers) {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Response formDataWithPagination(HttpHeaders headers, Integer pageNumber, Integer pagesize, TableauBordGlobalSearch searchEntity) {
+
+        List<TableauBordFlatResponse> response = manager
+                .findWithPagination(pageNumber, pagesize, searchEntity)
+                .stream()
+                .map(tableauBord -> new ConvertedTableauBordResponse(tableauBord).tableauBordFlatResponse())
+                .collect(Collectors.toList());
+
+        return Response.ok(response).build();
+    }
+
+    @Override
+    public Long countFormData(HttpHeaders headers, TableauBordGlobalSearch searchEntity) {
+        return manager.count(searchEntity);
+    }
+}

--
Gitblit v1.10.0