Minor Update

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@96702 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-06-04 17:35:54 +00:00
parent 3a09fd152a
commit 7b4e8d6aca
2 changed files with 11 additions and 12 deletions

View File

@ -94,8 +94,8 @@ public class SessionUtil {
httpSession.setAttribute(ScopeHelper.USERNAME_ATTRIBUTE, username);
session = SessionManager.getInstance().getASLSession(
httpSession.getId(), username);
session.setScope(scope);
*/
session.setScope(scope);*/
} else {
session = SessionManager.getInstance().getASLSession(
httpSession.getId(), username);

View File

@ -8100,15 +8100,9 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
logger.debug("StartCodelistMappingImport: "
+ codelistMappingSession.toString());
CodelistMappingFileUploadSession codelistMappingFileUploadSession = SessionUtil
.getCodelistMappingFileUploadSession(session);
if (codelistMappingFileUploadSession == null) {
throw new TDGWTServiceException(
"Error retrieving the codelistMappingFileUploadSession: null");
}
importCodelistMappingFileOnService(session, aslSession, user,
codelistMappingFileUploadSession, codelistMappingSession);
importCodelistMappingFileOnService(session, aslSession, user, codelistMappingSession);
} catch (TDGWTSessionExpiredException e) {
throw e;
} catch (Throwable e) {
@ -8227,7 +8221,6 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
*/
protected void importCodelistMappingFileOnService(HttpSession session,
ASLSession aslSession, String user,
CodelistMappingFileUploadSession codelistMappingFileUploadSession,
CodelistMappingSession codelistMappingSession) throws Throwable {
String importUrl = null;
@ -8236,6 +8229,12 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.compareTo(SourceType.URL.toString()) == 0) {
importUrl = codelistMappingSession.getUrl();
} else {
CodelistMappingFileUploadSession codelistMappingFileUploadSession = SessionUtil
.getCodelistMappingFileUploadSession(session);
if (codelistMappingFileUploadSession == null) {
throw new TDGWTServiceException(
"Error retrieving the codelistMappingFileUploadSession: null");
}
logger.debug("File Storage Access");
FilesStorage filesStorage = new FilesStorage();
String fileUrlOnStorage = filesStorage
@ -8251,7 +8250,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
}
importUrl = fileUrlOnStorage;
}
AuthorizationProvider.instance.set(new AuthorizationToken(aslSession
.getUsername()));
TabularDataService service = TabularDataServiceFactory.getService();