Fixed trId session

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@84116 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2013-10-24 15:50:25 +00:00
parent f1b8cc1b87
commit fca3c40ac4
1 changed files with 18 additions and 9 deletions

View File

@ -81,7 +81,20 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
throws TDGWTServiceException {
try {
session = this.getThreadLocalRequest().getSession();
if (tabResource == null) {
logger.error("Error setting TabResource: null");
throw new TDGWTServiceException(
"Error setting TabResource: null");
}
if (tabResource.getTrId() == null) {
logger.error("Error setting TabResource trId is null");
throw new TDGWTServiceException(
"Error setting TabResource trId is null");
}
SessionUtil.setTabResource(session, tabResource);
SessionUtil.setTRId(session, tabResource.getTrId());
return;
} catch (Exception e) {
@ -260,7 +273,6 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
}
/**
*
* @param tabResource
@ -309,7 +321,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
throw new TDGWTServiceException(
"Error creating new TabularResource no parameters set");
}
service = new TabularDataServiceMock();
service = new TabularDataServiceMock();
TabularResource serviceTR = service.createTabularResource();
Table table = service.getLastTable(serviceTR.getId());
@ -377,10 +389,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
}
/**
* SDMX Import
* SDMX Import
*
*/
protected Map<String, Object> retrieveOperationParameters(
@ -556,9 +566,9 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
/**
* CSV Import
*
*
*/
@Override
public void setCSVSession(CSVImportSession importSession)
throws TDGWTServiceException {
@ -727,7 +737,6 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
importCSVFileOnService(user, fileUploadSession, columnToImportMask);
}
protected Map<String, Object> csvImportFileParameter(
@ -763,7 +772,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
Map<String, Object> parameterInstance = csvImportFileParameter(
fileUrlOnStorage, fileUploadSession, columnToImportMask);
service = new TabularDataServiceMock();
service = new TabularDataServiceMock();
List<EligibleOperation> capabilities = service.getCapabilities();