ref 11724: SAI - Update to StorageHUB

https://support.d4science.org/issues/11724

Updated to StorageHub 

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/statistical-algorithms-importer@171902 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2018-10-03 17:56:20 +00:00
parent affcf404e3
commit 9f3249946e
1 changed files with 3 additions and 2 deletions

View File

@ -84,10 +84,11 @@ public class DownloadServlet extends HttpServlet {
}
String itemId = req.getParameter("itemId");
logger.info("DownloadServlet(): [scopeGroupId=" + scopeGroupId + ",ItemId=" + itemId + "]");
logger.info("DownloadServlet() [scopeGroupId=" + scopeGroupId + ",ItemId=" + itemId + "]");
ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(req, scopeGroupId);
FilesStorage filesStorage = new FilesStorage();
ItemDownload itemDownload = filesStorage.getItemDownload(serviceCredentials.getUserName(), itemId);
logger.debug("ItemDownload: "+itemDownload);
if (itemDownload == null) {
logger.error("This type of item does not support download operation");
throw new ServletException("This type of item does not support download operation");
@ -107,7 +108,7 @@ public class DownloadServlet extends HttpServlet {
.getType().compareTo(FolderItem.class.getSimpleName()) == 0) {
fileName = "folder.zip";
} else {
fileName = itemDownload.getItemDescription().getName();
fileName = "filename";
}
} else {
if (itemDownload.getItemDescription().getType() != null && itemDownload.getItemDescription()