|
|
@ -150,6 +150,14 @@ public class OnlineWidgetBlock extends AbstractOnlineWidgetBlock { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private String createLocalReuFilename() { |
|
|
|
|
|
|
|
String filename = widget.getFileLoca(); |
|
|
|
|
|
|
|
if (StringUtils.isEmpty(filename) || !filename.endsWith(".reu")) { |
|
|
|
|
|
|
|
filename = widget.getName() + "." + widget.getUuid() + ".reu"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return filename; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void downLoadWidget() { |
|
|
|
private void downLoadWidget() { |
|
|
|
if (OnlineWidgetRepoPane.getInstance().isShowPackagePanel()) { |
|
|
|
if (OnlineWidgetRepoPane.getInstance().isShowPackagePanel()) { |
|
|
|
ComponentCollector.getInstance().collectDownloadPktNum(); |
|
|
|
ComponentCollector.getInstance().collectDownloadPktNum(); |
|
|
@ -170,7 +178,8 @@ public class OnlineWidgetBlock extends AbstractOnlineWidgetBlock { |
|
|
|
protected Boolean doInBackground() { |
|
|
|
protected Boolean doInBackground() { |
|
|
|
String filePath; |
|
|
|
String filePath; |
|
|
|
try { |
|
|
|
try { |
|
|
|
filePath = DownloadUtils.download(widget.getId(), widget.getName() + "." + widget.getUuid(), process); |
|
|
|
String filename = createLocalReuFilename(); |
|
|
|
|
|
|
|
filePath = DownloadUtils.download(widget.getId(), filename, process); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
|
|
|
return false; |
|
|
|
return false; |
|
|
|