diff --git a/.gwt/.gwt-log b/.gwt/.gwt-log index 1468793..f6b8b96 100644 --- a/.gwt/.gwt-log +++ b/.gwt/.gwt-log @@ -5242,3 +5242,35 @@ Compiling... Compilation completed in 0.00 seconds Removing invalidated units 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 diff --git a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/batch/ReplaceBatchDialog.java b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/batch/ReplaceBatchDialog.java index 0ab4273..a46021a 100644 --- a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/batch/ReplaceBatchDialog.java +++ b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/batch/ReplaceBatchDialog.java @@ -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.task.InvocationS; 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.DimensionRow; 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.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.SessionExpiredEvent; 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.shared.RequestProperties; 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.google.gwt.user.client.rpc.AsyncCallback; @@ -265,7 +259,7 @@ public class ReplaceBatchDialog extends Window implements hide(); } else { if (conditionCode == null) { - StartTaskResume(); + startTaskResume(); } else { switch (conditionCode) { case AllowedColumnType: @@ -293,7 +287,7 @@ public class ReplaceBatchDialog extends Window implements case MaxOneCodenameForDataLocale: break; case MissingValueOnExternalReference: - StartTaskResume(); + startTaskResume(); break; case MustContainAtLeastOneDimension: break; @@ -308,7 +302,7 @@ public class ReplaceBatchDialog extends Window implements case ValidPeriodFormat: break; default: - StartTaskResume(); + startTaskResume(); break; } @@ -334,7 +328,7 @@ public class ReplaceBatchDialog extends Window implements } - protected void StartTaskResume() { + protected void startTaskResume() { TaskResumeSession taskResumeSession = new TaskResumeSession(trId, taskId); TDGWTServiceAsync.INSTANCE.startTaskResume(taskResumeSession, @@ -363,6 +357,37 @@ public class ReplaceBatchDialog extends Window implements }); } + + protected void startTaskResume(ArrayList mapping) { + TaskResumeSession taskResumeSession = new TaskResumeSession(trId, + taskId, mapping); + TDGWTServiceAsync.INSTANCE.startTaskResume(taskResumeSession, + new AsyncCallback() { + + 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() { TaskResumeProgressDialog dialog = new TaskResumeProgressDialog(eventBus); @@ -402,6 +427,8 @@ public class ReplaceBatchDialog extends Window implements ReplaceBatchColumnSession replaceBatchColumnSession) { Log.debug("ReplaceBatchColumnSession: "+replaceBatchColumnSession.toString()); + /*TODO: Remove this lines + ColumnData col = replaceBatchColumnSession.getColumnData(); ColumnTypeCode colTypeCode = ColumnTypeMap.getColumnTypeCode(col .getTypeCode()); @@ -409,7 +436,8 @@ public class ReplaceBatchDialog extends Window implements .getDataTypeName()); ColumnData codelistColumnReference = replaceBatchColumnSession .getConnection(); - + */ + ArrayList replaceEntryList = replaceBatchColumnSession .getReplaceEntryList(); ArrayList mapping = new ArrayList(); @@ -422,15 +450,18 @@ public class ReplaceBatchDialog extends Window implements sourceArg, targetArg); mapping.add(columnMappingData); } + + startTaskResume(mapping); - ColumnMappingList columnMappingList = new ColumnMappingList("1", "map", + /*TODO: Remove this lines + ColumnMappingList columnMappingList = new ColumnMappingList("1", "map", mapping); ChangeColumnTypeSession changeColumnTypeSession = new ChangeColumnTypeSession( col, colTypeCode, colDataType, ColumnTypeCode.DIMENSION, ColumnDataType.Integer, codelistColumnReference, columnMappingList); - + Log.debug("ChangeColumnTypeSession: "+changeColumnTypeSession.toString()); TDGWTServiceAsync.INSTANCE.startChangeColumnType( @@ -454,6 +485,7 @@ public class ReplaceBatchDialog extends Window implements } }); + */ }