Minor Update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@99313 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
5b99711b35
commit
df392995e7
|
@ -17,6 +17,7 @@ import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper;
|
|||
import org.gcube.portlets.user.td.gwtservice.server.file.CSVFileUploadSession;
|
||||
import org.gcube.portlets.user.td.gwtservice.server.file.CodelistMappingFileUploadSession;
|
||||
import org.gcube.portlets.user.td.gwtservice.server.trservice.TRTasksManager;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.Constants;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.codelisthelper.CodelistMappingSession;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVExportSession;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVImportSession;
|
||||
|
@ -75,17 +76,18 @@ public class SessionUtil {
|
|||
ASLSession session;
|
||||
if (username == null) {
|
||||
logger.warn("no user found in session, using test one");
|
||||
throw new TDGWTSessionExpiredException("Session Expired!");
|
||||
/* throw new TDGWTSessionExpiredException("Session Expired!"); */
|
||||
|
||||
// Remove comment for Test
|
||||
/*
|
||||
* username = Constants.DEFAULT_USER; String scope =
|
||||
* Constants.DEFAULT_SCOPE;
|
||||
*
|
||||
* httpSession.setAttribute(ScopeHelper.USERNAME_ATTRIBUTE,
|
||||
* username); session = SessionManager.getInstance().getASLSession(
|
||||
* httpSession.getId(), username); session.setScope(scope);
|
||||
*/
|
||||
|
||||
username = Constants.DEFAULT_USER;
|
||||
String scope = Constants.DEFAULT_SCOPE;
|
||||
|
||||
httpSession.setAttribute(ScopeHelper.USERNAME_ATTRIBUTE, username);
|
||||
session = SessionManager.getInstance().getASLSession(
|
||||
httpSession.getId(), username);
|
||||
session.setScope(scope);
|
||||
|
||||
} else {
|
||||
session = SessionManager.getInstance().getASLSession(
|
||||
httpSession.getId(), username);
|
||||
|
@ -603,7 +605,7 @@ public class SessionUtil {
|
|||
deleteColumnSession);
|
||||
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
|
||||
public static FilterColumnSession getFilterColumnSession(
|
||||
|
@ -1270,7 +1272,8 @@ public class SessionUtil {
|
|||
if (tasksStarted == null) {
|
||||
tasksStarted = new HashMap<String, TaskWrapper>();
|
||||
} else {
|
||||
httpSession.removeAttribute(SessionConstants.OPERATIONS_TASKS_STARTED);
|
||||
httpSession
|
||||
.removeAttribute(SessionConstants.OPERATIONS_TASKS_STARTED);
|
||||
}
|
||||
tasksStarted.put(taskWrapper.getTask().getId().getValue(), taskWrapper);
|
||||
httpSession.setAttribute(SessionConstants.OPERATIONS_TASKS_STARTED,
|
||||
|
|
|
@ -194,12 +194,11 @@ public class OperationMonitorCreator {
|
|||
Table table;
|
||||
ExportMetadata exportMetadata;
|
||||
|
||||
switch(taskWrapper.getOperationId()){
|
||||
switch (taskWrapper.getOperationId()) {
|
||||
case CSVExport:
|
||||
table = taskWrapper.getTask().getResult().getPrimaryTable();
|
||||
logger.debug("Table retrived: " + table.toString());
|
||||
exportMetadata = table
|
||||
.getMetadata(ExportMetadata.class);
|
||||
exportMetadata = table.getMetadata(ExportMetadata.class);
|
||||
logger.debug("ExportMetadata: " + exportMetadata);
|
||||
|
||||
operationMonitor.setTrId(SessionUtil.getTRId(session));
|
||||
|
@ -217,8 +216,7 @@ public class OperationMonitorCreator {
|
|||
case SDMXExport:
|
||||
table = taskWrapper.getTask().getResult().getPrimaryTable();
|
||||
logger.debug("Table retrived: " + table.toString());
|
||||
exportMetadata = table
|
||||
.getMetadata(ExportMetadata.class);
|
||||
exportMetadata = table.getMetadata(ExportMetadata.class);
|
||||
logger.debug("ExportMetadata: " + exportMetadata);
|
||||
operationMonitor.setTrId(SessionUtil.getTRId(session));
|
||||
break;
|
||||
|
@ -229,13 +227,20 @@ public class OperationMonitorCreator {
|
|||
|
||||
operationMonitor.setTrId(trId);
|
||||
tabResource = SessionUtil.getTabResource(session);
|
||||
tabResource.setTrId(trId);
|
||||
SessionUtil.setTabResource(session, tabResource);
|
||||
logger.debug("CurrentTabResource :"+tabResource);
|
||||
if (tabResource != null) {
|
||||
tabResource.setTrId(trId);
|
||||
SessionUtil.setTabResource(session, tabResource);
|
||||
} else {
|
||||
tabResource=new TabResource();
|
||||
tabResource.setTrId(trId);
|
||||
SessionUtil.setTabResource(session, tabResource);
|
||||
}
|
||||
SessionUtil.setTRId(session, trId);
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected TRId retrieveTabularResourceBasicData(TRId trId)
|
||||
|
|
Loading…
Reference in New Issue