|
|
@ -221,6 +221,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() { |
|
|
|
CarouselStateManger.getInstance().suspend(CarouselStateManger.DOWNLOAD_COMPONENT); |
|
|
|
CarouselStateManger.getInstance().suspend(CarouselStateManger.DOWNLOAD_COMPONENT); |
|
|
|
if (OnlineWidgetRepoPane.getInstance().isShowPackagePanel()) { |
|
|
|
if (OnlineWidgetRepoPane.getInstance().isShowPackagePanel()) { |
|
|
@ -242,7 +250,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; |
|
|
|