private final UpdateChecker updateChecker;
/** The trust updater. */
- private final WebOfTrustUpdater trustUpdater;
+ private final WebOfTrustUpdater webOfTrustUpdater;
/** The FCP interface. */
private volatile FcpInterface fcpInterface;
* The freenet interface
* @param identityManager
* The identity manager
+ * @param webOfTrustUpdater
+ * The WebOfTrust updater
*/
- public Core(Configuration configuration, FreenetInterface freenetInterface, IdentityManager identityManager, WebOfTrustUpdater trustUpdater) {
+ public Core(Configuration configuration, FreenetInterface freenetInterface, IdentityManager identityManager, WebOfTrustUpdater webOfTrustUpdater) {
super("Sone Core");
this.configuration = configuration;
this.freenetInterface = freenetInterface;
this.soneDownloader = new SoneDownloader(this, freenetInterface);
this.imageInserter = new ImageInserter(this, freenetInterface);
this.updateChecker = new UpdateChecker(freenetInterface);
- this.trustUpdater = trustUpdater;
+ this.webOfTrustUpdater = webOfTrustUpdater;
}
//
logger.log(Level.WARNING, String.format("Tried to get trust from remote Sone: %s", origin));
return null;
}
- trustUpdater.getTrust((OwnIdentity) origin.getIdentity(), target.getIdentity());
+ webOfTrustUpdater.getTrust((OwnIdentity) origin.getIdentity(), target.getIdentity());
return target.getIdentity().getTrust((OwnIdentity) origin.getIdentity());
}
*/
public void setTrust(Sone origin, Sone target, int trustValue) {
Validation.begin().isNotNull("Trust Origin", origin).check().isInstanceOf("Trust Origin", origin.getIdentity(), OwnIdentity.class).isNotNull("Trust Target", target).isLessOrEqual("Trust Value", trustValue, 100).isGreaterOrEqual("Trust Value", trustValue, -100).check();
- trustUpdater.setTrust((OwnIdentity) origin.getIdentity(), target.getIdentity(), trustValue, preferences.getTrustComment());
+ webOfTrustUpdater.setTrust((OwnIdentity) origin.getIdentity(), target.getIdentity(), trustValue, preferences.getTrustComment());
}
/**
*/
public void removeTrust(Sone origin, Sone target) {
Validation.begin().isNotNull("Trust Origin", origin).isNotNull("Trust Target", target).check().isInstanceOf("Trust Origin Identity", origin.getIdentity(), OwnIdentity.class).check();
- trustUpdater.setTrust((OwnIdentity) origin.getIdentity(), target.getIdentity(), null, null);
+ webOfTrustUpdater.setTrust((OwnIdentity) origin.getIdentity(), target.getIdentity(), null, null);
}
/**
loadConfiguration();
updateChecker.addUpdateListener(this);
updateChecker.start();
- trustUpdater.start();
+ webOfTrustUpdater.start();
}
/**
soneInserter.stop();
}
}
- trustUpdater.stop();
+ webOfTrustUpdater.stop();
updateChecker.stop();
updateChecker.removeUpdateListener(this);
soneDownloader.stop();