Merge branch 'feature/translation' into dev
All checks were successful
Build Docker Image / Docker-Build (push) Successful in 2m41s
Build Docker Image / Clean-Registry (push) Successful in 2s

This commit is contained in:
2026-01-15 14:31:32 +01:00
105 changed files with 1480 additions and 1205 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,13 +2,14 @@
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.journal.Constants.ERROR_WRITE_EVENT;
import static de.srsoftware.umbrella.journal.Constants.TABLE_JOURNAL;
import static java.text.MessageFormat.format;
import de.srsoftware.umbrella.core.BaseDb;
import de.srsoftware.umbrella.core.exceptions.UmbrellaException;
import de.srsoftware.umbrella.messagebus.events.Event;
import java.sql.Connection;
import java.sql.SQLException;
@@ -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 UmbrellaException.failedToCreateTable(TABLE_JOURNAL);
}
}