/*
- * Sone - SoneRescuer.java - Copyright © 2011–2019 David Roden
+ * Sone - SoneRescuer.java - Copyright © 2011–2020 David Roden
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* The edition to rescue
* @return This Sone rescuer
*/
- public void setEdition(long edition) {
+ public SoneRescuer setEdition(long edition) {
currentEdition = edition;
+ return this;
}
/**
}
if (fetching) {
core.lockSone(sone);
- FreenetURI soneUri = sone.getRequestUri().setKeyType("SSK").setDocName("Sone-" + getNextEdition()).setMetaString(new String[] { "sone.xml" });
+ FreenetURI soneUri = sone.getRequestUri().setKeyType("SSK").setDocName("Sone-" + currentEdition).setMetaString(new String[] { "sone.xml" });
System.out.println("URI: " + soneUri);
Sone fetchedSone = soneDownloader.fetchSone(sone, soneUri, true);
System.out.println("Sone: " + fetchedSone);