From: Roland Haeder Date: Wed, 12 Aug 2015 10:52:08 +0000 (+0200) Subject: Data path is now configurable X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f146674735565eecce43b11b1f57d422724934e5;p=jcore.git Data path is now configurable Signed-off-by:Roland Häder --- 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