parameters.put("RequestURI", requestUri);
parameters.put("InsertURI", insertUri);
}
- Map<String, String> replies = fcpClient.sendPluginMessage("plugins.WoT.WoT", parameters);
+ Map<String, String> replies = fcpClient.sendPluginMessage(webOfTrustPluginName, parameters);
if (!replies.get("Message").equals("IdentityCreated")) {
throw new FcpException("WebOfTrust Plugin did not reply with “IdentityCreated” message!");
}
* if an FCP error occurs
*/
public Set<OwnIdentity> getOwnIdentites() throws IOException, FcpException {
- Map<String, String> replies = fcpClient.sendPluginMessage("plugins.WoT.WoT", createParameters("Message", "GetOwnIdentities"));
+ Map<String, String> replies = fcpClient.sendPluginMessage(webOfTrustPluginName, createParameters("Message", "GetOwnIdentities"));
if (!replies.get("Message").equals("OwnIdentities")) {
throw new FcpException("WebOfTrust Plugin did not reply with “OwnIdentities” message!");
}
* if an FCP error occurs
*/
public CalculatedTrust getIdentityTrust(OwnIdentity ownIdentity, String identifier) throws IOException, FcpException {
- Map<String, String> replies = fcpClient.sendPluginMessage("plugins.WoT.WoT", createParameters("Message", "GetIdentity", "TreeOwner", ownIdentity.getIdentifier(), "Identity", identifier));
+ Map<String, String> replies = fcpClient.sendPluginMessage(webOfTrustPluginName, createParameters("Message", "GetIdentity", "TreeOwner", ownIdentity.getIdentifier(), "Identity", identifier));
if (!replies.get("Message").equals("Identity")) {
throw new FcpException("WebOfTrust Plugin did not reply with “Identity” message!");
}
* if an FCP error occurs
*/
public Identity addIdentity(String requestUri) throws IOException, FcpException {
- Map<String, String> replies = fcpClient.sendPluginMessage("plugins.WoT.WoT", createParameters("Message", "AddIdentity", "RequestURI", requestUri));
+ Map<String, String> replies = fcpClient.sendPluginMessage(webOfTrustPluginName, createParameters("Message", "AddIdentity", "RequestURI", requestUri));
if (!replies.get("Message").equals("IdentityAdded")) {
throw new FcpException("WebOfTrust Plugin did not reply with “IdentityAdded” message!");
}
* if an FCP error occurs
*/
public Set<Identity> getIdentitesByScore(OwnIdentity ownIdentity, String context, Boolean positive) throws IOException, FcpException {
- Map<String, String> replies = fcpClient.sendPluginMessage("plugins.WoT.WoT", createParameters("Message", "GetIdentitiesByScore", "TreeOwner", ownIdentity.getIdentifier(), "Context", context, "Selection", ((positive == null) ? "0" : (positive ? "+" : "-"))));
+ Map<String, String> replies = fcpClient.sendPluginMessage(webOfTrustPluginName, createParameters("Message", "GetIdentitiesByScore", "TreeOwner", ownIdentity.getIdentifier(), "Context", context, "Selection", ((positive == null) ? "0" : (positive ? "+" : "-"))));
if (!replies.get("Message").equals("Identities")) {
throw new FcpException("WebOfTrust Plugin did not reply with “Identities” message!");
}
* if an FCP error occurs
*/
public Map<Identity, IdentityTrust> getTrusters(Identity identity, String context) throws IOException, FcpException {
- Map<String, String> replies = fcpClient.sendPluginMessage("plugins.WoT.WoT", createParameters("Message", "GetTrusters", "Identity", identity.getIdentifier(), "Context", context));
+ Map<String, String> replies = fcpClient.sendPluginMessage(webOfTrustPluginName, createParameters("Message", "GetTrusters", "Identity", identity.getIdentifier(), "Context", context));
if (!replies.get("Message").equals("Identities")) {
throw new FcpException("WebOfTrust Plugin did not reply with “Identities” message!");
}
* if an FCP error occurs
*/
public Map<Identity, IdentityTrust> getTrustees(Identity identity, String context) throws IOException, FcpException {
- Map<String, String> replies = fcpClient.sendPluginMessage("plugins.WoT.WoT", createParameters("Message", "GetTrustees", "Identity", identity.getIdentifier(), "Context", context));
+ Map<String, String> replies = fcpClient.sendPluginMessage(webOfTrustPluginName, createParameters("Message", "GetTrustees", "Identity", identity.getIdentifier(), "Context", context));
if (!replies.get("Message").equals("Identities")) {
throw new FcpException("WebOfTrust Plugin did not reply with “Identities” message!");
}
* if an FCP error occurs
*/
public void setTrust(OwnIdentity ownIdentity, Identity identity, byte trust, String comment) throws IOException, FcpException {
- Map<String, String> replies = fcpClient.sendPluginMessage("plugins.WoT.WoT", createParameters("Message", "SetTrust", "Truster", ownIdentity.getIdentifier(), "Trustee", identity.getIdentifier(), "Value", String.valueOf(trust), "Comment", comment));
+ Map<String, String> replies = fcpClient.sendPluginMessage(webOfTrustPluginName, createParameters("Message", "SetTrust", "Truster", ownIdentity.getIdentifier(), "Trustee", identity.getIdentifier(), "Value", String.valueOf(trust), "Comment", comment));
if (!replies.get("Message").equals("TrustSet")) {
throw new FcpException("WebOfTrust Plugin did not reply with “TrustSet” message!");
}
* if an FCP error occurs
*/
public void addContext(OwnIdentity ownIdentity, String context) throws IOException, FcpException {
- Map<String, String> replies = fcpClient.sendPluginMessage("plugins.WoT.WoT", createParameters("Message", "AddContext", "Identity", ownIdentity.getIdentifier(), "Context", context));
+ Map<String, String> replies = fcpClient.sendPluginMessage(webOfTrustPluginName, createParameters("Message", "AddContext", "Identity", ownIdentity.getIdentifier(), "Context", context));
if (!replies.get("Message").equals("ContextAdded")) {
throw new FcpException("WebOfTrust Plugin did not reply with “ContextAdded” message!");
}
* if an FCP error occurs
*/
public void removeContext(OwnIdentity ownIdentity, String context) throws IOException, FcpException {
- Map<String, String> replies = fcpClient.sendPluginMessage("plugins.WoT.WoT", createParameters("Message", "RemoveContext", "Identity", ownIdentity.getIdentifier(), "Context", context));
+ Map<String, String> replies = fcpClient.sendPluginMessage(webOfTrustPluginName, createParameters("Message", "RemoveContext", "Identity", ownIdentity.getIdentifier(), "Context", context));
if (!replies.get("Message").equals("ContextRemoved")) {
throw new FcpException("WebOfTrust Plugin did not reply with “ContextRemoved” message!");
}
* if an FCP error occurs
*/
public void setProperty(OwnIdentity ownIdentity, String property, String value) throws IOException, FcpException {
- Map<String, String> replies = fcpClient.sendPluginMessage("plugins.WoT.WoT", createParameters("Message", "SetProperty", "Identity", ownIdentity.getIdentifier(), "Property", property, "Value", value));
+ Map<String, String> replies = fcpClient.sendPluginMessage(webOfTrustPluginName, createParameters("Message", "SetProperty", "Identity", ownIdentity.getIdentifier(), "Property", property, "Value", value));
if (!replies.get("Message").equals("PropertyAdded")) {
throw new FcpException("WebOfTrust Plugin did not reply with “PropertyAdded” message!");
}
* if an FCP error occurs
*/
public String getProperty(OwnIdentity ownIdentity, String property) throws IOException, FcpException {
- Map<String, String> replies = fcpClient.sendPluginMessage("plugins.WoT.WoT", createParameters("Message", "GetProperty", "Identity", ownIdentity.getIdentifier(), "Property", property));
+ Map<String, String> replies = fcpClient.sendPluginMessage(webOfTrustPluginName, createParameters("Message", "GetProperty", "Identity", ownIdentity.getIdentifier(), "Property", property));
if (!replies.get("Message").equals("PropertyValue")) {
throw new FcpException("WebOfTrust Plugin did not reply with “PropertyValue” message!");
}
* if an FCP error occurs
*/
public void removeProperty(OwnIdentity ownIdentity, String property) throws IOException, FcpException {
- Map<String, String> replies = fcpClient.sendPluginMessage("plugins.WoT.WoT", createParameters("Message", "RemoveProperty", "Identity", ownIdentity.getIdentifier(), "Property", property));
+ Map<String, String> replies = fcpClient.sendPluginMessage(webOfTrustPluginName, createParameters("Message", "RemoveProperty", "Identity", ownIdentity.getIdentifier(), "Property", property));
if (!replies.get("Message").equals("PropertyRemoved")) {
throw new FcpException("WebOfTrust Plugin did not reply with “PropertyRemoved” message!");
}
return parameterMap;
}
+ private static final String webOfTrustPluginName = "plugins.WoT.WoT";
+
}