|
@@ -22,17 +22,18 @@
|
22
|
22
|
|
23
|
23
|
package com.dmdirc.addons.ui_swing.components.addonbrowser;
|
24
|
24
|
|
25
|
|
-import com.dmdirc.DMDircMBassador;
|
26
|
25
|
import com.dmdirc.commandline.CommandLineOptionsModule.Directory;
|
27
|
26
|
import com.dmdirc.commandline.CommandLineOptionsModule.DirectoryType;
|
28
|
27
|
import com.dmdirc.plugins.PluginManager;
|
29
|
28
|
import com.dmdirc.util.io.Downloader;
|
30
|
29
|
|
31
|
30
|
import javax.inject.Inject;
|
|
31
|
+import javax.inject.Singleton;
|
32
|
32
|
|
33
|
33
|
/**
|
34
|
34
|
* Factory for {@link InstallWorker}s.
|
35
|
35
|
*/
|
|
36
|
+@Singleton
|
36
|
37
|
public class InstallWorkerFactory {
|
37
|
38
|
|
38
|
39
|
private final Downloader downloader;
|
|
@@ -40,23 +41,21 @@ public class InstallWorkerFactory {
|
40
|
41
|
private final String pluginDirectory;
|
41
|
42
|
private final String themeDirectory;
|
42
|
43
|
private final PluginManager pluginManager;
|
43
|
|
- private final DMDircMBassador eventBus;
|
44
|
44
|
|
45
|
45
|
@Inject
|
46
|
46
|
public InstallWorkerFactory(final Downloader downloader,
|
47
|
47
|
@Directory(DirectoryType.TEMPORARY) final String tempDirectory,
|
48
|
48
|
@Directory(DirectoryType.PLUGINS) final String pluginDirectory,
|
49
|
49
|
@Directory(DirectoryType.THEMES) final String themeDirectory,
|
50
|
|
- final PluginManager pluginManager, final DMDircMBassador eventBus) {
|
|
50
|
+ final PluginManager pluginManager) {
|
51
|
51
|
this.downloader = downloader;
|
52
|
52
|
this.tempDirectory = tempDirectory;
|
53
|
53
|
this.pluginDirectory = pluginDirectory;
|
54
|
54
|
this.themeDirectory = themeDirectory;
|
55
|
55
|
this.pluginManager = pluginManager;
|
56
|
|
- this.eventBus = eventBus;
|
57
|
56
|
}
|
58
|
57
|
public InstallWorker getInstallWorker(final AddonInfo info, final InstallerWindow installer) {
|
59
|
58
|
return new InstallWorker(downloader, tempDirectory, pluginDirectory,
|
60
|
|
- themeDirectory, pluginManager, eventBus, info, installer);
|
|
59
|
+ themeDirectory, pluginManager, info, installer);
|
61
|
60
|
}
|
62
|
61
|
}
|