ref #11879: TDM - Update to StorageHUB

https://support.d4science.org/issues/#11879

Updated to StorageHub



git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@171477 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2018-09-14 15:06:34 +00:00
parent d22dddbdaf
commit e98efe8f93
2 changed files with 3 additions and 1 deletions

View File

@ -3794,6 +3794,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements TDGWTServi
public void getFileFromWorkspace(CSVImportSession csvImportSession) throws TDGWTServiceException {
HttpServletRequest httpRequest = this.getThreadLocalRequest();
ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest);
logger.debug("GetFileFromWorkspace: "+csvImportSession);
FilesStorage filesStorage = new FilesStorage();
ItemDescription itemDescription = filesStorage.getItem(serviceCredentials.getUserName(),
csvImportSession.getId());
@ -7346,6 +7347,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements TDGWTServi
public void getFileFromWorkspace(CodelistMappingSession codelistMappingSession) throws TDGWTServiceException {
HttpServletRequest httpRequest = this.getThreadLocalRequest();
ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest);
logger.debug("GetFileFromWorkspace: "+codelistMappingSession);
FilesStorage filesStorage = new FilesStorage();
ItemDescription itemDescription = filesStorage.getItem(serviceCredentials.getUserName(),
codelistMappingSession.getItemId());

View File

@ -311,7 +311,7 @@ public class FilesStorage {
*/
public ItemDescription getItem(String user, String itemId) throws TDGWTServiceException {
try {
logger.debug("getItem: [user=" + user + ", itemId=" + itemId + "]");
logger.debug("GetItem: [user=" + user + ", itemId=" + itemId + "]");
StorageHubClient shc = new StorageHubClient();
FileContainer fileContainer = shc.open(itemId).asFile();
AbstractFileItem item = fileContainer.get();