Merge branch 'feature/translation' into module/messagebus

This commit is contained in:
2026-01-16 21:45:49 +01:00
109 changed files with 2311 additions and 1275 deletions

View File

@@ -2,7 +2,7 @@
package de.srsoftware.umbrella.journal;
import static de.srsoftware.umbrella.core.ConnectionProvider.connect;
import static de.srsoftware.umbrella.core.exceptions.UmbrellaException.missingFieldException;
import static de.srsoftware.umbrella.core.exceptions.UmbrellaException.missingField;
import static de.srsoftware.umbrella.journal.Constants.CONFIG_DATABASE;
import static de.srsoftware.umbrella.messagebus.MessageBus.messageBus;
import static java.lang.System.Logger.Level.DEBUG;
@@ -20,7 +20,7 @@ public class JournalModule extends BaseHandler implements EventListener {
public JournalModule(Configuration config){
super();
var dbFile = config.get(CONFIG_DATABASE).orElseThrow(() -> missingFieldException(CONFIG_DATABASE));
var dbFile = config.get(CONFIG_DATABASE).orElseThrow(() -> missingField(CONFIG_DATABASE));
journalDb = new SqliteDb(connect(dbFile));
ModuleRegistry.add(this);
messageBus().register(this);

View File

@@ -2,8 +2,9 @@
package de.srsoftware.umbrella.journal;
import static de.srsoftware.tools.jdbc.Query.insertInto;
import static de.srsoftware.umbrella.core.Constants.*;
import static de.srsoftware.umbrella.core.constants.Field.*;
import static de.srsoftware.umbrella.core.exceptions.UmbrellaException.databaseException;
import static de.srsoftware.umbrella.core.exceptions.UmbrellaException.failedToCreateTable;
import static de.srsoftware.umbrella.journal.Constants.ERROR_WRITE_EVENT;
import static de.srsoftware.umbrella.journal.Constants.TABLE_JOURNAL;
import static java.text.MessageFormat.format;
@@ -42,7 +43,7 @@ public class SqliteDb extends BaseDb implements JournalDb{
try {
db.prepareStatement(sql).execute();
} catch (SQLException e) {
throw databaseException(ERROR_FAILED_CREATE_TABLE,TABLE_JOURNAL);
throw failedToCreateTable(TABLE_JOURNAL);
}
}