From 21b0e461d272751b3d6c2721395bf6375b41c5b3 Mon Sep 17 00:00:00 2001
From: Kenmegne <stephanie.kenmegne@gmail.com>
Date: Fri, 19 Jun 2026 11:35:30 +0000
Subject: [PATCH] move to new repo

---
 moteur-zip-megatim/src/main/java/com/megatim/module/compression/ifaces/CompressionFace.java |  161 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 161 insertions(+), 0 deletions(-)

diff --git a/moteur-zip-megatim/src/main/java/com/megatim/module/compression/ifaces/CompressionFace.java b/moteur-zip-megatim/src/main/java/com/megatim/module/compression/ifaces/CompressionFace.java
new file mode 100644
index 0000000..5ce7b7e
--- /dev/null
+++ b/moteur-zip-megatim/src/main/java/com/megatim/module/compression/ifaces/CompressionFace.java
@@ -0,0 +1,161 @@
+package com.megatim.module.compression.ifaces;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+
+import net.lingala.zip4j.exception.ZipException;
+
+//-----------------
+// Interface methods
+//-----------------
+public interface CompressionFace {
+
+    /**
+     * Fonction permettant de compresser un fichier
+     *
+     * @param fichierAZipper
+     * @author derteuffel
+     * @return
+     * @throws java.io.IOException
+	 *
+     */
+    public File zipFile(File fichierAZipper) throws IOException;
+    
+    public File zipFile(File fichierAZipper,File repertoireDestination) throws IOException;
+    
+    public File zipFile(File fichierAZipper,File repertoireDestination, String password) throws IOException;
+
+    /**
+     * Fonction permettant de compresser un repertoire
+     *
+     * @param repertoireAZipper
+     * @author derteuffel
+     * @return
+     * @throws java.io.IOException
+	 *
+     */
+    public File zipRepository(File repertoireAZipper) throws IOException;
+    
+    public File zipRepository(File repertoireAZipper,File repertoireDestination) throws IOException;
+
+    /**
+     * Fonction permettant de decompresser un fichier
+     *
+     * @param fichierZipper
+     * @author derteuffel
+     * @param repertoireSorti
+     * @throws java.io.IOException
+	 *
+     */
+    public void unZipFile(File fichierZipper, File repertoireSorti) throws IOException;
+
+    /**
+     * Fonction permettant de decompresser un repertoire
+     *
+     * @param repertoireZipper
+     * @param repertoireSorti
+     * @author derteuffel
+     * @throws java.io.IOException
+	 *
+     */
+    public void unZipRepository(File repertoireZipper, File repertoireSorti) throws IOException;
+
+    /**
+     * Fonction permettant d'ajouter un fichier dans un zip
+     *
+     * @param fichier a ajouter
+     * @param zipFile
+     * @author derteuffel
+     * @throws java.io.IOException
+	 *
+     */
+    public void addFile(File fichier, File zipFile) throws IOException, Exception;
+
+    /**
+     * Fonction permettant d'ajouter un repertoire dans un fichier zipper
+     *
+     * @param repository
+     * @param zipFile
+     * @author derteuffel
+     * @throws java.io.FileNotFoundException
+	 *
+     */
+    public void addRepository(File repository, File zipFile) throws FileNotFoundException, Exception;
+
+    /**
+     * Fonction permettant de compresser un fichier avec un mot de passe
+     *
+     * @author derteuffel
+     * @param fichierAZipper
+     * @param password
+     * @return
+     * @throws net.lingala.zip4j.exception.ZipException
+     * @throws java.lang.Exception 
+	 *
+     */
+    public File zipFile(File fichierAZipper, String password) throws ZipException, Exception;
+
+    /**
+     * Fonction permettant de compresser un repertoire avec un mot de passe
+     *
+     * @author derteuffel
+     * @param repertoireAZipper
+     * @param password
+     * @return
+     * @throws java.lang.Exception
+	 *
+     */
+    public File zipRepository(File repertoireAZipper, String password) throws Exception;
+
+    /**
+     * Fonction permettant de decompresser un fichier avec un mot de passe
+     *
+     * @param fichierZipper
+     * @author derteuffel
+     * @param repertoireSorti
+     * @param password
+     * @throws java.lang.Exception
+	 *
+     */
+    public void unZipFile(File fichierZipper, File repertoireSorti, String password) throws Exception;
+
+    /**
+     * Fonction permettant de decompresser un repertoire avec un mot de passe
+     *
+     * @param repertoireZipper
+     * @author derteuffel
+     * @param repertoireSorti
+     * @param password
+     * @throws net.lingala.zip4j.exception.ZipException
+	 *
+     */
+    public void unZipRepository(File repertoireZipper, File repertoireSorti, String password) throws ZipException, Exception;
+
+    /**
+     * Fonction permettant d'ajouter un fichier dans un fichier zipper avec un
+     * mot de passe
+     *
+     * @param fichier a ajouter
+     * @param zipFile
+     * @param password
+     * @author derteuffel
+     * @throws java.lang.Exception
+	 *
+     */
+    public void addFile(File fichier, File zipFile, String password) throws Exception;
+
+    /**
+     * Fonction permettant d'ajouter un rtepertoire dans un fichier zipper avec
+     * un mot de passe
+     *
+     * @param repository a ajouter
+     * @param zipFile zipper
+     * @param password mot de passe
+     * @author derteuffel
+     * @throws java.lang.Exception
+	 *
+     */
+    public void addRepository(File repository, File zipFile, String password) throws Exception;
+
+}

--
Gitblit v1.10.0