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-ifaces/src/main/java/com/megatim/fdxconsultation/service/ifaces/stats/TableauBordGlobalRS.java |  123 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 123 insertions(+), 0 deletions(-)

diff --git a/fdx-consultation/fdxconsultation-service-ifaces/src/main/java/com/megatim/fdxconsultation/service/ifaces/stats/TableauBordGlobalRS.java b/fdx-consultation/fdxconsultation-service-ifaces/src/main/java/com/megatim/fdxconsultation/service/ifaces/stats/TableauBordGlobalRS.java
new file mode 100644
index 0000000..fc71bf1
--- /dev/null
+++ b/fdx-consultation/fdxconsultation-service-ifaces/src/main/java/com/megatim/fdxconsultation/service/ifaces/stats/TableauBordGlobalRS.java
@@ -0,0 +1,123 @@
+package com.megatim.fdxconsultation.service.ifaces.stats;
+
+import com.megatim.fdxcommons.core.ifaces.interceptor.LoggingInterceptorBinding;
+import com.megatim.fdxcommons.model.pojo.CriteriaFormRequest;
+import com.megatim.fdxconsultation.model.dto.stats.TableauBordDto;
+import com.megatim.fdxconsultation.model.dto.stats.TableauBordSlimDto;
+import com.megatim.fdxconsultation.model.stats.TableauBord;
+import com.megatim.fdxconsultation.model.stats.dto.TableauBordRequest;
+import com.mgt.rs.security.core.common.Secured;
+import java.util.ArrayList;
+import java.util.List;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.validation.Valid;
+import javax.ws.rs.POST;
+
+/**
+ *
+ * @author ASUS
+ */
+public interface TableauBordGlobalRS /*extends AbstractReadWithCriteriaEntityIFaces<TableauBord, TableauBordDto, Long>*/ {
+
+    public TableauBordSlimDto mapToSlimDto(TableauBord entity);
+
+    //@Override
+    public default TableauBordDto mapToDto(TableauBord entity) {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    public default List<TableauBordSlimDto> allToSlimDto(List<TableauBord> datas) {
+        List<TableauBordSlimDto> dtos = new ArrayList<>();
+
+        if (datas != null) {
+            for (TableauBord data : datas) {
+                dtos.add(mapToSlimDto(data));
+            }
+        }
+        return dtos;
+    }
+
+    @GET
+    @Produces({MediaType.APPLICATION_JSON})
+    @Consumes({MediaType.APPLICATION_JSON})
+    @Path("print-metadata/{referentiel_version}/{code_type_fichier}")
+    @Secured(actions = {"ajouter", "modifier"})
+    @LoggingInterceptorBinding(message = "Consultation des colonnes de recherche pour le tableau de bord dont associé au typefichier {code_type_fichier}", classe = TableauBordSlimDto.class)
+    public Response getColumns(@Context HttpHeaders headers, @PathParam("referentiel_version") String referentielVersion, @PathParam("code_type_fichier") String codeTypeFichier);
+
+    @GET
+    @Produces({MediaType.APPLICATION_JSON})
+    @Consumes({MediaType.APPLICATION_JSON})
+    @Path("get-datas/{referentiel_version}/{code_type_fichier}")
+    @Secured(action = "consulter", actions = {"ajouter", "modifier"}, enable = true)
+    @LoggingInterceptorBinding(message = "Consultation des données pour le tableau de bord dont associé au typefichier {code_type_fichier}", classe = TableauBordSlimDto.class)
+    public Response getDatas(@Context HttpHeaders headers, @PathParam("referentiel_version") String referentielVersion, @PathParam("code_type_fichier") String codeTypeFichier);
+
+    @POST
+    @Consumes({MediaType.APPLICATION_JSON})
+    @Produces({MediaType.APPLICATION_JSON})
+    @Path("add")
+    @Secured(action = "ajouter", enable = true)
+    @LoggingInterceptorBinding(message = "Ajout d'un nouveau tableau de bord du typefichier [1.typeFichier.code], l'identifiant est (id)", classe = TableauBordSlimDto.class)
+    public Response save(@Context HttpHeaders headers, @Valid TableauBordRequest tableauBordRequest);
+
+    @POST
+    @Produces({MediaType.APPLICATION_JSON})
+    @Consumes({MediaType.APPLICATION_JSON})
+    @Path("update/{id}")
+    @Secured(action = "modifier", enable = true)
+    public Response update(@Context HttpHeaders headers, @PathParam("id") Long id, @Valid TableauBordRequest tableauBordRequest);
+
+    @POST
+    @Produces({MediaType.APPLICATION_JSON})
+    @Path("delete/{id}")
+    @Secured(action = "ajouter", enable = true)
+    @LoggingInterceptorBinding(message = "Suppression du tableau de bord dont l'identifiant est {id}")
+    public Response delete(@Context HttpHeaders headers, @PathParam("id") Long id);
+
+    @POST
+    @Produces({MediaType.APPLICATION_JSON})
+    @Path("delete-user-tableaubord/{userName}")
+    @Secured(action = "ajouter", enable = true)
+    public Response deleteUserTableauBord(@Context HttpHeaders headers, @PathParam("userName") String userName);
+
+    //public K mapToDto(T entity);
+    @GET
+    @Produces({MediaType.APPLICATION_JSON})
+    @Path("findbyid/{id}")
+    @Secured(actions = {"ajouter", "modifier"})
+    public Response findById(@Context HttpHeaders headers, @PathParam("id") Long id);
+
+    @POST
+    @Produces({MediaType.APPLICATION_JSON})
+    @Path("findwithpagination/{pageNumber}/{pagesize}")
+    @Secured(actions = {"ajouter", "modifier"})
+    @LoggingInterceptorBinding(message = "Consultation des colonnes de recherche pour le tableau de bord dont associé au typefichier {code_type_fichier}", classe = TableauBordSlimDto.class)
+    public Response findWithPagination(@Context HttpHeaders headers, @PathParam("pageNumber") Integer pageNumber, @PathParam("pagesize") Integer pageSize, CriteriaFormRequest criteriaFormRequest);
+
+    @POST
+    @Produces({MediaType.APPLICATION_JSON})
+    @Path("count")
+    @Secured(actions = {"ajouter", "modifier"})
+    public Long count(@Context HttpHeaders headers, CriteriaFormRequest criteriaFormRequest);
+
+    @GET
+    @Produces({MediaType.APPLICATION_JSON})
+    @Path("search-columns")
+    @Secured(actions = {"ajouter", "modifier"})
+    public Response getSearchColumns(@Context HttpHeaders headers);
+
+    @POST
+    @Produces({MediaType.APPLICATION_JSON})
+    @Secured(actions = {"ajouter", "modifier"})
+    @Path("find-all")
+    public Response findAll(@Context HttpHeaders headers, CriteriaFormRequest criteriaFormRequest);
+}

--
Gitblit v1.10.0