import java.util.Map.Entry;
import java.util.Set;
+import net.pterodactylus.util.validation.Validation;
+
/**
* An own identity is an identity that the owner of the node has full control
* over.
@Override
public void addContext(String context) throws WebOfTrustException {
webOfTrustConnector.addContext(this, context);
+ addContextPrivate(context);
}
/**
@Override
public void removeContext(String context) throws WebOfTrustException {
webOfTrustConnector.removeContext(this, context);
+ removeContextPrivate(context);
}
/**
webOfTrustConnector.addContext(this, context);
}
}
+ setContextsPrivate(contexts);
}
/**
@Override
public void setProperty(String name, String value) throws WebOfTrustException {
webOfTrustConnector.setProperty(this, name, value);
+ setPropertyPrivate(name, value);
}
/**
@Override
public void removeProperty(String name) throws WebOfTrustException {
webOfTrustConnector.removeProperty(this, name);
+ removePropertyPrivate(name);
}
/**
webOfTrustConnector.setProperty(this, newProperty.getKey(), newProperty.getValue());
}
}
+ setPropertiesPrivate(properties);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void setTrust(Identity target, int trustValue, String comment) throws WebOfTrustException {
+ Validation.begin().isNotNull("Trust Target", target).isNotNull("Trust Comment", comment).isLessOrEqual("Trust Value", trustValue, 100).isGreaterOrEqual("Trust Value", trustValue, -100).check();
+ webOfTrustConnector.setTrust(this, target, trustValue, comment);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void removeTrust(Identity target) throws WebOfTrustException {
+ Validation.begin().isNotNull("Trust Target", target).check();
+ webOfTrustConnector.removeTrust(this, target);
}
}