StringinitialId=comment.substring(UrlUtils.alreadyDownloadedFromIDMessage.length(),indexOfAlreadyDownloadedFromSourceUrlMessage);// The fileName starts right after the "message".
// Search that ID and sourceUrl inside the list, if that instance is the first-found one, then get the file-data (there might be duplicate ID-sourceUrl instances, but only one of them has the file-data).
@ -172,7 +176,8 @@ public class PublicationsRetrieverPlugin {
break;
}
}
// TODO - The case where the "twin-ID" is not found, should "never" happen. But should we check? How to handle if that is the case..?
// In case the "alreadyDownloaded" full-text is not found, we have an error.
error=newError(Error.ErrorType.couldRetry,comment+" | That ID-sourceUrl was not found inside the WorkerReport!");// We can still try to download it from the found docUrl, in the future.
}
elseif(!comment.equals(HttpConnUtils.docFileNotRetrievedMessage)){// If it was downloaded without an error.
fileLocation=comment;// This is the full-file-path.
@ -181,7 +186,7 @@ public class PublicationsRetrieverPlugin {
error=newError(Error.ErrorType.couldRetry,comment);// We can still try to download it from the found docUrl, in the future.
if(error==null)// If the file was retrieved, in any time.
error=newError(Error.ErrorType.couldRetry,null);// We do not want to send a "null" object, since it just adds more complicated handling in the controller..
error=newError(Error.ErrorType.couldRetry,null);// We do not want to send a "null" Error-object, since it just adds more complicated handling in the controller..