projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Set version to 0.3.
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
main
/
SonePlugin.java
diff --git
a/src/main/java/net/pterodactylus/sone/main/SonePlugin.java
b/src/main/java/net/pterodactylus/sone/main/SonePlugin.java
index
e156967
..
a57a71e
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/main/SonePlugin.java
+++ b/
src/main/java/net/pterodactylus/sone/main/SonePlugin.java
@@
-26,6
+26,7
@@
import java.util.logging.Logger;
import net.pterodactylus.sone.core.Core;
import net.pterodactylus.sone.core.FreenetInterface;
import net.pterodactylus.sone.freenet.PluginStoreConfigurationBackend;
import net.pterodactylus.sone.core.Core;
import net.pterodactylus.sone.core.FreenetInterface;
import net.pterodactylus.sone.freenet.PluginStoreConfigurationBackend;
+import net.pterodactylus.sone.freenet.wot.IdentityManager;
import net.pterodactylus.sone.freenet.wot.PluginConnector;
import net.pterodactylus.sone.freenet.wot.WebOfTrustConnector;
import net.pterodactylus.sone.web.WebInterface;
import net.pterodactylus.sone.freenet.wot.PluginConnector;
import net.pterodactylus.sone.freenet.wot.WebOfTrustConnector;
import net.pterodactylus.sone.web.WebInterface;
@@
-76,12
+77,11
@@
public class SonePlugin implements FredPlugin, FredPluginL10n, FredPluginBaseL10
freenet.support.Logger.error(loggerClass, String.format(logRecord.getMessage(), logRecord.getParameters()), logRecord.getThrown());
}
}
freenet.support.Logger.error(loggerClass, String.format(logRecord.getMessage(), logRecord.getParameters()), logRecord.getThrown());
}
}
-
});
}
/** The version. */
});
}
/** The version. */
- public static final Version VERSION = new Version(
"RC3", 0, 1
);
+ public static final Version VERSION = new Version(
0, 3
);
/** The logger. */
private static final Logger logger = Logging.getLogger(SonePlugin.class);
/** The logger. */
private static final Logger logger = Logging.getLogger(SonePlugin.class);
@@
-101,6
+101,9
@@
public class SonePlugin implements FredPlugin, FredPluginL10n, FredPluginBaseL10
/** The plugin store. */
private PluginStore pluginStore;
/** The plugin store. */
private PluginStore pluginStore;
+ /** The identity manager. */
+ private IdentityManager identityManager;
+
//
// ACCESSORS
//
//
// ACCESSORS
//
@@
-146,7
+149,7
@@
public class SonePlugin implements FredPlugin, FredPluginL10n, FredPluginBaseL10
/* create a configuration. */
Configuration configuration;
try {
/* create a configuration. */
Configuration configuration;
try {
- configuration = new Configuration(new PluginStoreConfigurationBackend(plugin
Store = pluginRespirator.getStore()
));
+ configuration = new Configuration(new PluginStoreConfigurationBackend(plugin
Respirator
));
} catch (DatabaseDisabledException dde1) {
logger.log(Level.WARNING, "Could not load plugin store, using XML files.");
try {
} catch (DatabaseDisabledException dde1) {
logger.log(Level.WARNING, "Could not load plugin store, using XML files.");
try {
@@
-163,21
+166,25
@@
public class SonePlugin implements FredPlugin, FredPluginL10n, FredPluginBaseL10
/* create web of trust connector. */
PluginConnector pluginConnector = new PluginConnector(pluginRespirator);
WebOfTrustConnector webOfTrustConnector = new WebOfTrustConnector(pluginConnector);
/* create web of trust connector. */
PluginConnector pluginConnector = new PluginConnector(pluginRespirator);
WebOfTrustConnector webOfTrustConnector = new WebOfTrustConnector(pluginConnector);
+ identityManager = new IdentityManager(webOfTrustConnector);
+ identityManager.setContext("Sone");
+
+ /* create core. */
+ core = new Core(configuration, freenetInterface, identityManager);
/* create the web interface. */
webInterface = new WebInterface(this);
/* create the web interface. */
webInterface = new WebInterface(this);
+ core.addCoreListener(webInterface);
- /* create core. */
- core = new Core();
- core.configuration(configuration);
- core.freenetInterface(freenetInterface);
- core.setWebOfTrustConnector(webOfTrustConnector);
+ /* create the identity manager. */
+ identityManager.addIdentityListener(core);
/* start core! */
boolean startupFailed = true;
try {
core.start();
webInterface.start();
/* start core! */
boolean startupFailed = true;
try {
core.start();
webInterface.start();
+ identityManager.start();
startupFailed = false;
} finally {
if (startupFailed) {
startupFailed = false;
} finally {
if (startupFailed) {
@@
-203,6
+210,9
@@
public class SonePlugin implements FredPlugin, FredPluginL10n, FredPluginBaseL10
/* stop the core. */
core.stop();
/* stop the core. */
core.stop();
+ /* stop the identity manager. */
+ identityManager.stop();
+
/* TODO wait for core to stop? */
try {
pluginRespirator.putStore(pluginStore);
/* TODO wait for core to stop? */
try {
pluginRespirator.putStore(pluginStore);