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-commons/fdxcommons-model/src/main/java/com/megatim/fdxcommons/model/camel/FileProperties.java | 33 +++++++++++++++++++++++++++++++++
1 files changed, 33 insertions(+), 0 deletions(-)
diff --git a/fdx-commons/fdxcommons-model/src/main/java/com/megatim/fdxcommons/model/camel/FileProperties.java b/fdx-commons/fdxcommons-model/src/main/java/com/megatim/fdxcommons/model/camel/FileProperties.java
new file mode 100644
index 0000000..311fac3
--- /dev/null
+++ b/fdx-commons/fdxcommons-model/src/main/java/com/megatim/fdxcommons/model/camel/FileProperties.java
@@ -0,0 +1,33 @@
+package com.megatim.fdxcommons.model.camel;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+/**
+ *
+ * @author Gabuntu
+ */
+public class FileProperties {
+
+ private final String configurationFilePath;
+ private final List<Properties> cachedProperties = new ArrayList<>(1);
+
+ public FileProperties(String configurationFilePath) {
+ this.configurationFilePath = configurationFilePath;
+ }
+
+ public Properties properties() throws FileNotFoundException, IOException {
+ if (cachedProperties.isEmpty()) {
+ try (FileInputStream fis = new FileInputStream(configurationFilePath)) {
+ Properties properties = new Properties();
+ properties.load(fis);
+ cachedProperties.add(properties);
+ }
+ }
+ return cachedProperties.get(0);
+ }
+}
--
Gitblit v1.10.0