implemented document creation
this required a major refactoring of the object model
This commit is contained in:
@@ -4,12 +4,13 @@ package de.srsoftware.umbrella.message;
|
||||
import static de.srsoftware.tools.PathHandler.CONTENT_TYPE;
|
||||
import static de.srsoftware.umbrella.core.ConnectionProvider.connect;
|
||||
import static de.srsoftware.umbrella.core.Constants.*;
|
||||
import static de.srsoftware.umbrella.core.exceptions.UmbrellaException.missingConfigException;
|
||||
import static de.srsoftware.umbrella.message.Constants.*;
|
||||
import static java.lang.System.Logger.Level.*;
|
||||
|
||||
import de.srsoftware.configuration.Configuration;
|
||||
import de.srsoftware.umbrella.core.UmbrellaException;
|
||||
import de.srsoftware.umbrella.core.api.Translator;
|
||||
import de.srsoftware.umbrella.core.exceptions.UmbrellaException;
|
||||
import de.srsoftware.umbrella.core.model.UmbrellaUser;
|
||||
import de.srsoftware.umbrella.message.model.CombinedMessage;
|
||||
import de.srsoftware.umbrella.message.model.Envelope;
|
||||
@@ -70,7 +71,7 @@ public class MessageSystem implements PostBox {
|
||||
private final Translator translator;
|
||||
|
||||
public MessageSystem(Translator translator, Configuration config) throws UmbrellaException {
|
||||
var messageDbFile = config.get(CONFIG_DB).orElseThrow(() -> new UmbrellaException(500,ERROR_MISSING_CONFIG,CONFIG_DB));
|
||||
var messageDbFile = config.get(CONFIG_DB).orElseThrow(() -> missingConfigException(CONFIG_DB));
|
||||
db = new SqliteMessageDb(connect(messageDbFile));
|
||||
|
||||
this.translator = translator;
|
||||
|
||||
Reference in New Issue
Block a user