// The callback has already been notified.
return;
}
ServerInfo server = getConfiguration().getServerInfo();
// Call web service.
CDownloadedFile requestedFile = new CDownloadedFile();
requestedFile.setPath(path);
CFileDownloadResult downloadResult = fileMgr.downloadFile(getConfiguration().getUserName(),
getConfiguration().getPassword(), requestedFile);
CDownloadedFile downloadedFile = downloadResult.getDownloadedFile();
CDownloadedFile[] cdependencies = downloadResult.getDependencies();
List<FileDownloadDependencyImpl> dependencies = Lists.newArrayList();
if (cdependencies != null) {
for (CDownloadedFile cdependency : cdependencies) {
dependencies.add(new FileDownloadDependencyImpl(cdependency.getPath(), cdependency.getMD5()));
}
}
callback.fileWasDownloaded(server, downloadedFile.getPath(), downloadedFile
.getZippedBase64EncodedContents(), dependencies);
} catch (RemoteException e) {
callback.caught(convert(e));
} catch (IntegrationServerException e) {
callback.caught(new IntegrationServerException("Server exception: " + e.getMessage(), e));