private static final Logger logger = Logging.getLogger(WebOfTrustConnector.class);
/** The name of the WoT plugin. */
- private static final String WOT_PLUGIN_NAME = "plugins.WoT.WoT";
+ private static final String WOT_PLUGIN_NAME = "plugins.WebOfTrust.WebOfTrust";
/** A random connection identifier. */
private static final String PLUGIN_CONNECTION_IDENTIFIER = "Sone-WoT-Connector-" + Math.abs(Math.random());
* if the own identities can not be loaded
*/
public Set<OwnIdentity> loadAllOwnIdentities() throws WebOfTrustException {
+ @SuppressWarnings("hiding")
Reply reply = performRequest(SimpleFieldSetConstructor.create().put("Message", "GetOwnIdentities").get());
SimpleFieldSet fields = reply.getFields();
int ownIdentityCounter = -1;
* if an error occured talking to the Web of Trust plugin
*/
public Set<Identity> loadTrustedIdentities(OwnIdentity ownIdentity, String context) throws PluginException {
+ @SuppressWarnings("hiding")
Reply reply = performRequest(SimpleFieldSetConstructor.create().put("Message", "GetIdentitiesByScore").put("TreeOwner", ownIdentity.getId()).put("Selection", "+").put("Context", (context == null) ? "" : context).get());
SimpleFieldSet fields = reply.getFields();
Set<Identity> identities = new HashSet<Identity>();
* if an error occured talking to the Web of Trust plugin
*/
public String getProperty(Identity identity, String name) throws PluginException {
+ @SuppressWarnings("hiding")
Reply reply = performRequest(SimpleFieldSetConstructor.create().put("Message", "GetProperty").put("Identity", identity.getId()).put("Property", name).get());
return reply.getFields().get("Property");
}
* if an error occured talking to the Web of Trust plugin
*/
public Trust getTrust(OwnIdentity ownIdentity, Identity identity) throws PluginException {
- Reply getTrustReply = performRequest(SimpleFieldSetConstructor.create().put("Message", "GetIdentity").put("TreeOwner", ownIdentity.getId()).put("Identity", identity.getId()).get());
+ Reply getTrustReply = performRequest(SimpleFieldSetConstructor.create().put("Message", "GetIdentity").put("Truster", ownIdentity.getId()).put("Identity", identity.getId()).get());
String trust = getTrustReply.getFields().get("Trust");
String score = getTrustReply.getFields().get("Score");
String rank = getTrustReply.getFields().get("Rank");
* {@inheritDoc}
*/
@Override
- public void receivedReply(PluginConnector pluginConnector, SimpleFieldSet fields, Bucket data) {
+ public void receivedReply(@SuppressWarnings("hiding") PluginConnector pluginConnector, SimpleFieldSet fields, Bucket data) {
String messageName = fields.get("Message");
logger.log(Level.FINEST, "Received Reply from Plugin: " + messageName);
synchronized (reply) {