- protected final String propertyName;
-
- /**
- * Creates a new property update job.
- *
- * @param ownIdentity
- * The own identity to update the property on
- * @param propertyName
- * The name of the property to update
- */
- @SuppressWarnings("synthetic-access")
- public WebOfTrustPropertyUpdateJob(OwnIdentity ownIdentity, String propertyName) {
- this.ownIdentity = ownIdentity;
- this.propertyName = propertyName;
- }
-
- //
- // OBJECT METHODS
- //
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean equals(Object object) {
- if ((object == null) || !object.getClass().equals(getClass())) {
- return false;
- }
- WebOfTrustPropertyUpdateJob updateJob = (WebOfTrustPropertyUpdateJob) object;
- return updateJob.ownIdentity.equals(ownIdentity) && updateJob.propertyName.equals(propertyName);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public int hashCode() {
- return getClass().hashCode() ^ ownIdentity.hashCode() ^ propertyName.hashCode();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String toString() {
- return String.format("%s[ownIdentity=%s,propertyName=%s]", getClass().getSimpleName(), ownIdentity, propertyName);
- }
-
- }
-
- /**
- * WebOfTrust update job that sets a property on an {@link OwnIdentity}.
- *
- * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
- */
- private class SetPropertyJob extends WebOfTrustPropertyUpdateJob {