- public Sone setInsertUri(FreenetURI insertUri) {
- if (this.insertUri == null) {
- this.insertUri = insertUri.setKeyType("USK").setDocName("Sone").setMetaString(new String[0]);
- return this;
- }
- if (!this.insertUri.equalsKeypair(insertUri)) {
- logger.log(Level.WARNING, "Request URI %s tried to overwrite %s!", new Object[] { insertUri, this.insertUri });
- return this;
- }
- return this;
- }
-
- /**
- * Returns the latest edition of this Sone.
- *
- * @return The latest edition of this Sone
- */
- public long getLatestEdition() {
- return latestEdition;
- }
-
- /**
- * Sets the latest edition of this Sone. If the given latest edition is not
- * greater than the current latest edition, the latest edition of this Sone
- * is not changed.
- *
- * @param latestEdition
- * The latest edition of this Sone
- */
- public void setLatestEdition(long latestEdition) {
- if (!(latestEdition > this.latestEdition)) {
- logger.log(Level.INFO, "New latest edition %d is not greater than current latest edition %d!", new Object[] { latestEdition, this.latestEdition });
- return;
- }
- this.latestEdition = latestEdition;
- }