From f146674735565eecce43b11b1f57d422724934e5 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Wed, 12 Aug 2015 12:52:08 +0200 Subject: [PATCH] =?utf8?q?Data=20path=20is=20now=20configurable=20Signed-o?= =?utf8?q?ff-by:Roland=20H=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/org/mxchange/jcore/BaseFrameworkSystem.java | 2 ++ .../jcore/database/backend/base64/Base64CsvDatabaseBackend.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/org/mxchange/jcore/BaseFrameworkSystem.java b/src/org/mxchange/jcore/BaseFrameworkSystem.java index 2473ac4..4b959c8 100644 --- a/src/org/mxchange/jcore/BaseFrameworkSystem.java +++ b/src/org/mxchange/jcore/BaseFrameworkSystem.java @@ -349,6 +349,7 @@ public class BaseFrameworkSystem implements FrameworkInterface { // Init default values: // Default database backend BaseFrameworkSystem.properties.put("org.mxchange.database.backend.class", "org.mxchange.jcore.database.backend.base64.Base64CsvDatabaseBackend"); //NOI18N + BaseFrameworkSystem.properties.put("database.backend.storagepath", "data"); // For MySQL backend BaseFrameworkSystem.properties.put("org.mxchange.database.mysql.host", "localhost"); //NOI18N @@ -845,6 +846,7 @@ public class BaseFrameworkSystem implements FrameworkInterface { // Init array String[] names = { "database.backend.class", + "database.backend.storagepath", "database.mysql.login", "database.mysql.host", "database.mysql.password", diff --git a/src/org/mxchange/jcore/database/backend/base64/Base64CsvDatabaseBackend.java b/src/org/mxchange/jcore/database/backend/base64/Base64CsvDatabaseBackend.java index 7df0c54..5a6076c 100644 --- a/src/org/mxchange/jcore/database/backend/base64/Base64CsvDatabaseBackend.java +++ b/src/org/mxchange/jcore/database/backend/base64/Base64CsvDatabaseBackend.java @@ -68,7 +68,7 @@ public class Base64CsvDatabaseBackend extends BaseDatabaseBackend implements Dat this.setFrontend(frontend); // Construct file name - String fileName = String.format("data/table_%s.b64", tableName); //NOI18N + String fileName = String.format("%s/table_%s.b64", this.getProperty("database.backend.storagepath"), tableName); //NOI18N // Debug message this.getLogger().debug(MessageFormat.format("Trying to open file {0} ...", fileName)); //NOI18N -- 2.39.5