X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fmain%2FSonePlugin.java;h=6f2a90866fe3ec24b4d0b5d07f1dc4f2d96263e0;hb=78da2db8d883349c8509a4f4794b844e2e6c6b31;hp=108081875b0b3df20905aff8f3477391a1ff29eb;hpb=da609f721e54691f27113e877a19637bd332abc3;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/main/SonePlugin.java b/src/main/java/net/pterodactylus/sone/main/SonePlugin.java index 1080818..6f2a908 100644 --- a/src/main/java/net/pterodactylus/sone/main/SonePlugin.java +++ b/src/main/java/net/pterodactylus/sone/main/SonePlugin.java @@ -25,8 +25,12 @@ import java.util.logging.Logger; import net.pterodactylus.sone.core.Core; import net.pterodactylus.sone.core.FreenetInterface; import net.pterodactylus.sone.core.WebOfTrustUpdater; -import net.pterodactylus.sone.data.PostBuilderFactory; -import net.pterodactylus.sone.data.impl.DefaultPostBuilderFactory; +import net.pterodactylus.sone.database.Database; +import net.pterodactylus.sone.database.PostBuilderFactory; +import net.pterodactylus.sone.database.PostProvider; +import net.pterodactylus.sone.database.PostReplyBuilderFactory; +import net.pterodactylus.sone.database.SoneProvider; +import net.pterodactylus.sone.database.memory.MemoryDatabase; import net.pterodactylus.sone.fcp.FcpInterface; import net.pterodactylus.sone.freenet.PluginStoreConfigurationBackend; import net.pterodactylus.sone.freenet.plugin.PluginConnector; @@ -100,7 +104,7 @@ public class SonePlugin implements FredPlugin, FredPluginFCP, FredPluginL10n, Fr } /** The version. */ - public static final Version VERSION = new Version(0, 8, 4); + public static final Version VERSION = new Version(0, 8, 6); /** The logger. */ private static final Logger logger = Logging.getLogger(SonePlugin.class); @@ -209,6 +213,8 @@ public class SonePlugin implements FredPlugin, FredPluginFCP, FredPluginL10n, Fr @Override protected void configure() { + bind(Core.class).in(Singleton.class); + bind(MemoryDatabase.class).in(Singleton.class); bind(EventBus.class).toInstance(eventBus); bind(Configuration.class).toInstance(startConfiguration); bind(FreenetInterface.class).in(Singleton.class); @@ -219,7 +225,11 @@ public class SonePlugin implements FredPlugin, FredPluginFCP, FredPluginL10n, Fr bind(String.class).annotatedWith(Names.named("WebOfTrustContext")).toInstance("Sone"); bind(SonePlugin.class).toInstance(SonePlugin.this); bind(FcpInterface.class).in(Singleton.class); - bind(PostBuilderFactory.class).to(DefaultPostBuilderFactory.class).in(Singleton.class); + bind(Database.class).to(MemoryDatabase.class); + bind(PostBuilderFactory.class).to(MemoryDatabase.class); + bind(PostReplyBuilderFactory.class).to(MemoryDatabase.class); + bind(SoneProvider.class).to(Core.class).in(Singleton.class); + bind(PostProvider.class).to(MemoryDatabase.class); bindListener(Matchers.any(), new TypeListener() { @Override