Minor Update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@95747 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
e923432c44
commit
c774265772
|
@ -16,6 +16,7 @@ import org.gcube.data.analysis.tabulardata.service.tabular.TabularResource;
|
||||||
import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper;
|
import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper;
|
||||||
import org.gcube.portlets.user.td.gwtservice.server.file.FileUploadSession;
|
import org.gcube.portlets.user.td.gwtservice.server.file.FileUploadSession;
|
||||||
import org.gcube.portlets.user.td.gwtservice.server.trservice.TRTasksManager;
|
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.csv.CSVExportSession;
|
import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVExportSession;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVImportSession;
|
import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVImportSession;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
||||||
|
@ -73,8 +74,8 @@ public class SessionUtil {
|
||||||
ASLSession session;
|
ASLSession session;
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
logger.warn("no user found in session, using test one");
|
logger.warn("no user found in session, using test one");
|
||||||
throw new TDGWTSessionExpiredException("Session Expired!");
|
//throw new TDGWTSessionExpiredException("Session Expired!");
|
||||||
/*
|
|
||||||
username = Constants.DEFAULT_USER;
|
username = Constants.DEFAULT_USER;
|
||||||
String scope = Constants.DEFAULT_SCOPE;
|
String scope = Constants.DEFAULT_SCOPE;
|
||||||
|
|
||||||
|
@ -82,7 +83,7 @@ public class SessionUtil {
|
||||||
session = SessionManager.getInstance().getASLSession(
|
session = SessionManager.getInstance().getASLSession(
|
||||||
httpSession.getId(), username);
|
httpSession.getId(), username);
|
||||||
session.setScope(scope);
|
session.setScope(scope);
|
||||||
*/
|
|
||||||
} else {
|
} else {
|
||||||
session = SessionManager.getInstance().getASLSession(
|
session = SessionManager.getInstance().getASLSession(
|
||||||
httpSession.getId(), username);
|
httpSession.getId(), username);
|
||||||
|
|
|
@ -6578,7 +6578,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
logger.debug("OperationInvocation: \n" + invocation.toString());
|
logger.debug("OperationInvocation: \n" + invocation.toString());
|
||||||
Task trTask = service.execute(invocation, serviceTR);
|
Task trTask = service.execute(invocation, serviceTR);
|
||||||
logger.debug("Start Task on service: TaskId " + trTask.getId());
|
logger.debug("Start Task on service: TaskId " + trTask.getId());
|
||||||
SessionUtil.setReplaceColumnTask(session, trTask);
|
SessionUtil.setEditRowTask(session, trTask);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
} catch (TDGWTSessionExpiredException e) {
|
} catch (TDGWTSessionExpiredException e) {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package org.gcube.portlets.user.td.gwtservice.server.trservice;
|
package org.gcube.portlets.user.td.gwtservice.server.trservice;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -24,8 +25,6 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnTypeC
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import com.google.gwt.i18n.client.DateTimeFormat;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author "Giancarlo Panichi"
|
* @author "Giancarlo Panichi"
|
||||||
|
@ -39,7 +38,7 @@ public class ValueMap {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected DateTimeFormat sdf = DateTimeFormat.getFormat("yyyy-MM-dd");
|
protected SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
|
||||||
public ArrayList<Map<String,Object>> genValueMap(EditRowSession editRowSession){
|
public ArrayList<Map<String,Object>> genValueMap(EditRowSession editRowSession){
|
||||||
ArrayList<Map<String,Object>> composit=new ArrayList<Map<String,Object>>();
|
ArrayList<Map<String,Object>> composit=new ArrayList<Map<String,Object>>();
|
||||||
|
@ -91,7 +90,7 @@ public class ValueMap {
|
||||||
Date d;
|
Date d;
|
||||||
try{
|
try{
|
||||||
d=sdf.parse(value);
|
d=sdf.parse(value);
|
||||||
}catch(IllegalArgumentException e){
|
}catch(Exception e){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
TDDate tdDate=new TDDate(d);
|
TDDate tdDate=new TDDate(d);
|
||||||
|
|
Loading…
Reference in New Issue