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
---
apifdxweb/api/apifdxweb-service-impl/src/main/java/com/megatim/apifdxweb/service/impl/camel/config/LocalConfiguration.java | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 60 insertions(+), 0 deletions(-)
diff --git a/apifdxweb/api/apifdxweb-service-impl/src/main/java/com/megatim/apifdxweb/service/impl/camel/config/LocalConfiguration.java b/apifdxweb/api/apifdxweb-service-impl/src/main/java/com/megatim/apifdxweb/service/impl/camel/config/LocalConfiguration.java
new file mode 100644
index 0000000..183d4d7
--- /dev/null
+++ b/apifdxweb/api/apifdxweb-service-impl/src/main/java/com/megatim/apifdxweb/service/impl/camel/config/LocalConfiguration.java
@@ -0,0 +1,60 @@
+package com.megatim.apifdxweb.service.impl.camel.config;
+
+import java.io.IOException;
+
+/**
+ *
+ * @author Gabuntu
+ */
+public class LocalConfiguration {
+
+ private final FileProperties fileProperties;
+
+ public LocalConfiguration(FileProperties fileProperties) {
+ this.fileProperties = fileProperties;
+ }
+
+ public String referentielRouteURI() throws IOException {
+ return "file:" + referentielLocalPath() + "?include=.*.zip" + routeParameters();
+ }
+
+ public String fichierRouteURI() throws IOException {
+ return "file:" + fichierLocalPath() + "?include=.*.txt" + routeParameters();
+ }
+
+ public String standaloneTmpRouteURI() throws IOException {
+ return "file:" + standaloneTmpDir() + "?include=.*.txt" + routeParameters();
+ }
+
+ public String standaloneRouteURI() throws IOException {
+ return "file:" + standaloneDestinationDir() + "?include=.*.txt" + routeParameters();
+ }
+
+ public String standaloneTmpDir() throws IOException {
+ return fileProperties.properties().getProperty("fdx.api.integration-standalone-temp-dir");
+ }
+
+ public boolean isCorrect() throws IOException {
+ return referentielLocalPath() != null
+ && fichierLocalPath() != null
+ && standaloneTmpDir() != null
+ && standaloneDestinationDir() != null;
+ }
+
+ private String routeParameters() {
+ return "&moveFailed=error&noop=true&readLock=changed";
+ }
+
+ public String referentielLocalPath() throws IOException {
+ return fileProperties.properties().getProperty("fdx.api.referentiel-integration-local-path");
+ }
+
+ public String fichierLocalPath() throws IOException {
+ return fileProperties.properties().getProperty("fdx.api.fichier-integration-local-path");
+ }
+
+ private String standaloneDestinationDir() throws IOException {
+ return fileProperties.properties().getProperty("fdx.api.integration-standalone-destination-dir");
+ }
+
+}
--
Gitblit v1.10.0