Updated Task Resume added mapping
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-column-widget@98639 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
90c724d858
commit
56c0ced40e
|
@ -5242,3 +5242,35 @@ Compiling...
|
||||||
Compilation completed in 0.00 seconds
|
Compilation completed in 0.00 seconds
|
||||||
Removing invalidated units
|
Removing invalidated units
|
||||||
Finding entry point classes
|
Finding entry point classes
|
||||||
|
Public resources found in...
|
||||||
|
Translatable source found in...
|
||||||
|
Found 0 cached/archived units. Used 0 / 2719 units from cache.
|
||||||
|
Compiling...
|
||||||
|
50% complete (ETR: 5 seconds)
|
||||||
|
50% complete (ETR: 5 seconds)
|
||||||
|
50% complete (ETR: 5 seconds)
|
||||||
|
50% complete (ETR: 5 seconds)
|
||||||
|
50% complete (ETR: 5 seconds)
|
||||||
|
50% complete (ETR: 5 seconds)
|
||||||
|
60% complete (ETR: 4 seconds)
|
||||||
|
70% complete (ETR: 2 seconds)
|
||||||
|
80% complete (ETR: 2 seconds)
|
||||||
|
90% complete (ETR: 1 seconds)
|
||||||
|
100% complete (ETR: 0 seconds)
|
||||||
|
Compilation completed in 13.19 seconds
|
||||||
|
Removing invalidated units
|
||||||
|
Finding entry point classes
|
||||||
|
Public resources found in...
|
||||||
|
Translatable source found in...
|
||||||
|
Found 2719 cached/archived units. Used 2719 / 2719 units from cache.
|
||||||
|
Compiling...
|
||||||
|
Compilation completed in 0.00 seconds
|
||||||
|
Removing invalidated units
|
||||||
|
Finding entry point classes
|
||||||
|
Public resources found in...
|
||||||
|
Translatable source found in...
|
||||||
|
Found 2719 cached/archived units. Used 2719 / 2719 units from cache.
|
||||||
|
Compiling...
|
||||||
|
Compilation completed in 0.00 seconds
|
||||||
|
Removing invalidated units
|
||||||
|
Finding entry point classes
|
||||||
|
|
|
@ -14,14 +14,11 @@ import org.gcube.portlets.user.td.gwtservice.shared.Constants;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.task.InvocationS;
|
import org.gcube.portlets.user.td.gwtservice.shared.task.InvocationS;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.task.TaskResumeSession;
|
import org.gcube.portlets.user.td.gwtservice.shared.task.TaskResumeSession;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.ConditionCode;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.ConditionCode;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.DimensionRow;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.DimensionRow;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.batch.ReplaceBatchColumnSession;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.batch.ReplaceBatchColumnSession;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.batch.ReplaceEntry;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.batch.ReplaceEntry;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.column.mapping.ColumnMappingData;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.column.mapping.ColumnMappingData;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.column.mapping.ColumnMappingList;
|
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.column.type.ChangeColumnTypeSession;
|
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableRequestType;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableRequestType;
|
||||||
|
@ -29,9 +26,6 @@ import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableWhy;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.RequestProperties;
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.RequestProperties;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnDataType;
|
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnTypeCode;
|
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnTypeMap;
|
|
||||||
|
|
||||||
import com.allen_sauer.gwt.log.client.Log;
|
import com.allen_sauer.gwt.log.client.Log;
|
||||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||||
|
@ -265,7 +259,7 @@ public class ReplaceBatchDialog extends Window implements
|
||||||
hide();
|
hide();
|
||||||
} else {
|
} else {
|
||||||
if (conditionCode == null) {
|
if (conditionCode == null) {
|
||||||
StartTaskResume();
|
startTaskResume();
|
||||||
} else {
|
} else {
|
||||||
switch (conditionCode) {
|
switch (conditionCode) {
|
||||||
case AllowedColumnType:
|
case AllowedColumnType:
|
||||||
|
@ -293,7 +287,7 @@ public class ReplaceBatchDialog extends Window implements
|
||||||
case MaxOneCodenameForDataLocale:
|
case MaxOneCodenameForDataLocale:
|
||||||
break;
|
break;
|
||||||
case MissingValueOnExternalReference:
|
case MissingValueOnExternalReference:
|
||||||
StartTaskResume();
|
startTaskResume();
|
||||||
break;
|
break;
|
||||||
case MustContainAtLeastOneDimension:
|
case MustContainAtLeastOneDimension:
|
||||||
break;
|
break;
|
||||||
|
@ -308,7 +302,7 @@ public class ReplaceBatchDialog extends Window implements
|
||||||
case ValidPeriodFormat:
|
case ValidPeriodFormat:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
StartTaskResume();
|
startTaskResume();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -334,7 +328,7 @@ public class ReplaceBatchDialog extends Window implements
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void StartTaskResume() {
|
protected void startTaskResume() {
|
||||||
TaskResumeSession taskResumeSession = new TaskResumeSession(trId,
|
TaskResumeSession taskResumeSession = new TaskResumeSession(trId,
|
||||||
taskId);
|
taskId);
|
||||||
TDGWTServiceAsync.INSTANCE.startTaskResume(taskResumeSession,
|
TDGWTServiceAsync.INSTANCE.startTaskResume(taskResumeSession,
|
||||||
|
@ -363,6 +357,37 @@ public class ReplaceBatchDialog extends Window implements
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void startTaskResume(ArrayList<ColumnMappingData> mapping) {
|
||||||
|
TaskResumeSession taskResumeSession = new TaskResumeSession(trId,
|
||||||
|
taskId, mapping);
|
||||||
|
TDGWTServiceAsync.INSTANCE.startTaskResume(taskResumeSession,
|
||||||
|
new AsyncCallback<Void>() {
|
||||||
|
|
||||||
|
public void onFailure(Throwable caught) {
|
||||||
|
if (caught instanceof TDGWTSessionExpiredException) {
|
||||||
|
eventBus.fireEvent(new SessionExpiredEvent(
|
||||||
|
SessionExpiredType.EXPIREDONSERVER));
|
||||||
|
} else {
|
||||||
|
Log.error("Task Resume failed:"
|
||||||
|
+ caught.getLocalizedMessage());
|
||||||
|
UtilsGXT3.alert("Error on task resume",
|
||||||
|
"Error on task resume (taskId=" + taskId
|
||||||
|
+ ")");
|
||||||
|
}
|
||||||
|
close();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onSuccess(Void v) {
|
||||||
|
Log.trace("Started task resume");
|
||||||
|
callForTaskResume();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
protected void callForTaskResume() {
|
protected void callForTaskResume() {
|
||||||
TaskResumeProgressDialog dialog = new TaskResumeProgressDialog(eventBus);
|
TaskResumeProgressDialog dialog = new TaskResumeProgressDialog(eventBus);
|
||||||
|
@ -402,6 +427,8 @@ public class ReplaceBatchDialog extends Window implements
|
||||||
ReplaceBatchColumnSession replaceBatchColumnSession) {
|
ReplaceBatchColumnSession replaceBatchColumnSession) {
|
||||||
Log.debug("ReplaceBatchColumnSession: "+replaceBatchColumnSession.toString());
|
Log.debug("ReplaceBatchColumnSession: "+replaceBatchColumnSession.toString());
|
||||||
|
|
||||||
|
/*TODO: Remove this lines
|
||||||
|
|
||||||
ColumnData col = replaceBatchColumnSession.getColumnData();
|
ColumnData col = replaceBatchColumnSession.getColumnData();
|
||||||
ColumnTypeCode colTypeCode = ColumnTypeMap.getColumnTypeCode(col
|
ColumnTypeCode colTypeCode = ColumnTypeMap.getColumnTypeCode(col
|
||||||
.getTypeCode());
|
.getTypeCode());
|
||||||
|
@ -409,7 +436,8 @@ public class ReplaceBatchDialog extends Window implements
|
||||||
.getDataTypeName());
|
.getDataTypeName());
|
||||||
ColumnData codelistColumnReference = replaceBatchColumnSession
|
ColumnData codelistColumnReference = replaceBatchColumnSession
|
||||||
.getConnection();
|
.getConnection();
|
||||||
|
*/
|
||||||
|
|
||||||
ArrayList<ReplaceEntry> replaceEntryList = replaceBatchColumnSession
|
ArrayList<ReplaceEntry> replaceEntryList = replaceBatchColumnSession
|
||||||
.getReplaceEntryList();
|
.getReplaceEntryList();
|
||||||
ArrayList<ColumnMappingData> mapping = new ArrayList<ColumnMappingData>();
|
ArrayList<ColumnMappingData> mapping = new ArrayList<ColumnMappingData>();
|
||||||
|
@ -422,15 +450,18 @@ public class ReplaceBatchDialog extends Window implements
|
||||||
sourceArg, targetArg);
|
sourceArg, targetArg);
|
||||||
mapping.add(columnMappingData);
|
mapping.add(columnMappingData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
startTaskResume(mapping);
|
||||||
|
|
||||||
ColumnMappingList columnMappingList = new ColumnMappingList("1", "map",
|
/*TODO: Remove this lines
|
||||||
|
ColumnMappingList columnMappingList = new ColumnMappingList("1", "map",
|
||||||
mapping);
|
mapping);
|
||||||
|
|
||||||
ChangeColumnTypeSession changeColumnTypeSession = new ChangeColumnTypeSession(
|
ChangeColumnTypeSession changeColumnTypeSession = new ChangeColumnTypeSession(
|
||||||
col, colTypeCode, colDataType, ColumnTypeCode.DIMENSION,
|
col, colTypeCode, colDataType, ColumnTypeCode.DIMENSION,
|
||||||
ColumnDataType.Integer, codelistColumnReference,
|
ColumnDataType.Integer, codelistColumnReference,
|
||||||
columnMappingList);
|
columnMappingList);
|
||||||
|
|
||||||
Log.debug("ChangeColumnTypeSession: "+changeColumnTypeSession.toString());
|
Log.debug("ChangeColumnTypeSession: "+changeColumnTypeSession.toString());
|
||||||
|
|
||||||
TDGWTServiceAsync.INSTANCE.startChangeColumnType(
|
TDGWTServiceAsync.INSTANCE.startChangeColumnType(
|
||||||
|
@ -454,6 +485,7 @@ public class ReplaceBatchDialog extends Window implements
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue