Fixed Final and Lock error
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-table-widget@100286 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
94d4482581
commit
74ad4e36fd
|
@ -1,6 +1,8 @@
|
|||
package org.gcube.portlets.user.td.tablewidget.client;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsFinalException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.TableData;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.table.ChangeTableTypeSession;
|
||||
|
@ -141,6 +143,16 @@ public class ChangeTableTypePanel extends FramedPanel implements
|
|||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsFinalException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Final",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.debug("Change The Table Type Error: "
|
||||
+ caught.getLocalizedMessage());
|
||||
|
@ -149,6 +161,8 @@ public class ChangeTableTypePanel extends FramedPanel implements
|
|||
"Error in invocation of Change Table Type operation!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onSuccess(String taskId) {
|
||||
openMonitorDialog(taskId);
|
||||
|
@ -174,6 +188,11 @@ public class ChangeTableTypePanel extends FramedPanel implements
|
|||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("Error retrieving table: "
|
||||
+ caught.getMessage());
|
||||
|
@ -181,6 +200,7 @@ public class ChangeTableTypePanel extends FramedPanel implements
|
|||
caught.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onSuccess(TableData result) {
|
||||
Log.debug("Retrieved table: " + result.toString());
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package org.gcube.portlets.user.td.tablewidget.client;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.clone.CloneTabularResourceSession;
|
||||
import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialog;
|
||||
|
@ -42,13 +43,20 @@ public class CloneTabularResource implements MonitorDialogListener {
|
|||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.debug("Clone Error: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Cloning Tabular Resource",
|
||||
UtilsGXT3.alert(
|
||||
"Error Cloning Tabular Resource",
|
||||
"Error in clone operation!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onSuccess(String taskId) {
|
||||
Log.debug("Start TR Clone");
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package org.gcube.portlets.user.td.tablewidget.client.history;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsFinalException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
||||
import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialog;
|
||||
import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialogListener;
|
||||
|
@ -35,6 +37,11 @@ public class HistoryDiscard implements MonitorDialogListener {
|
|||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("Error retrieving trId: "
|
||||
+ caught.getLocalizedMessage());
|
||||
|
@ -42,6 +49,7 @@ public class HistoryDiscard implements MonitorDialogListener {
|
|||
"Error retrieving current tabular resource id");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onSuccess(TRId result) {
|
||||
Log.debug("retrieved " + result);
|
||||
|
@ -60,6 +68,16 @@ public class HistoryDiscard implements MonitorDialogListener {
|
|||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsFinalException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Final",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("Error in discard: "
|
||||
+ caught.getLocalizedMessage());
|
||||
|
@ -67,6 +85,8 @@ public class HistoryDiscard implements MonitorDialogListener {
|
|||
caught.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onSuccess(String taskId) {
|
||||
Log.debug("Discard Session taskId: " + taskId);
|
||||
|
@ -81,8 +101,6 @@ public class HistoryDiscard implements MonitorDialogListener {
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void close() {
|
||||
/*
|
||||
* if (parent != null) { parent.close(); }
|
||||
|
|
|
@ -4,6 +4,8 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsFinalException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.history.OpHistory;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.history.RollBackSession;
|
||||
|
@ -239,11 +241,25 @@ public class HistoryPanel extends FramedPanel implements MonitorDialogListener {
|
|||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsFinalException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Final",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("Error in rollback: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error in rollback",
|
||||
"Error: "+caught.getLocalizedMessage());
|
||||
UtilsGXT3
|
||||
.alert("Error in rollback",
|
||||
"Error: "
|
||||
+ caught.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -256,8 +272,6 @@ public class HistoryPanel extends FramedPanel implements MonitorDialogListener {
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void loadData(ListLoadConfig loadConfig,
|
||||
final AsyncCallback<ListLoadResult<OpHistory>> callback) {
|
||||
|
||||
|
@ -268,12 +282,18 @@ public class HistoryPanel extends FramedPanel implements MonitorDialogListener {
|
|||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("Error Retrieving History: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error retrieving history",
|
||||
"Error retrieving history");
|
||||
}
|
||||
}
|
||||
callback.onFailure(caught);
|
||||
}
|
||||
|
||||
|
@ -300,6 +320,11 @@ public class HistoryPanel extends FramedPanel implements MonitorDialogListener {
|
|||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("Error retrieving current TRId: "
|
||||
+ caught.getLocalizedMessage());
|
||||
|
@ -307,6 +332,7 @@ public class HistoryPanel extends FramedPanel implements MonitorDialogListener {
|
|||
"Error retrieving current tabular resource id");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onSuccess(TRId result) {
|
||||
Log.debug("retrieved " + result);
|
||||
|
|
|
@ -4,6 +4,8 @@ import java.util.ArrayList;
|
|||
|
||||
import org.gcube.portlets.user.td.columnwidget.client.properties.ColumnDataPropertiesCombo;
|
||||
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsFinalException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.normalization.DenormalizationSession;
|
||||
|
@ -285,6 +287,11 @@ public class DenormalizePanel extends FramedPanel implements
|
|||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("load combo failure:"
|
||||
+ caught.getLocalizedMessage());
|
||||
|
@ -292,6 +299,7 @@ public class DenormalizePanel extends FramedPanel implements
|
|||
"Error retrieving columns of tabular resource:"
|
||||
+ trId.getId());
|
||||
}
|
||||
}
|
||||
callback.onFailure(caught);
|
||||
}
|
||||
|
||||
|
@ -355,6 +363,16 @@ public class DenormalizePanel extends FramedPanel implements
|
|||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsFinalException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Final",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.debug("Denormalize Error: "
|
||||
+ caught.getLocalizedMessage());
|
||||
|
@ -362,6 +380,8 @@ public class DenormalizePanel extends FramedPanel implements
|
|||
caught.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onSuccess(String taskId) {
|
||||
openMonitorDialog(taskId);
|
||||
|
|
|
@ -4,6 +4,8 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsFinalException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.normalization.NormalizationSession;
|
||||
|
@ -72,7 +74,6 @@ MonitorDialogListener {
|
|||
protected TextField valueColumnName;
|
||||
protected NormalizeDialog parent;
|
||||
|
||||
|
||||
public NormalizePanel(NormalizeDialog parent, TRId trId, EventBus eventBus) {
|
||||
this.parent = parent;
|
||||
this.trId = trId;
|
||||
|
@ -167,17 +168,18 @@ MonitorDialogListener {
|
|||
normalizeButton.addSelectHandler(deleteHandler);
|
||||
|
||||
normalizedColumnName = new TextField();
|
||||
FieldLabel normalizedColumnNameLabel=new FieldLabel(normalizedColumnName, "Normalized column");
|
||||
FieldLabel normalizedColumnNameLabel = new FieldLabel(
|
||||
normalizedColumnName, "Normalized column");
|
||||
normalizedColumnNameLabel.setLabelWidth(110);
|
||||
|
||||
valueColumnName = new TextField();
|
||||
FieldLabel valueColumnNameLabel=new FieldLabel(valueColumnName, "Value column");
|
||||
FieldLabel valueColumnNameLabel = new FieldLabel(valueColumnName,
|
||||
"Value column");
|
||||
valueColumnNameLabel.setLabelWidth(110);
|
||||
|
||||
FieldLabel columnsLabel = new FieldLabel(null, "Columns to Normalize");
|
||||
columnsLabel.setLabelWidth(150);
|
||||
|
||||
|
||||
columnsLabel.getElement().applyStyles("font-weight:bold");
|
||||
HBoxLayoutContainer hBox = new HBoxLayoutContainer();
|
||||
hBox.add(normalizeButton, new BoxLayoutData(new Margins(2, 5, 2, 5)));
|
||||
|
@ -185,8 +187,7 @@ MonitorDialogListener {
|
|||
VerticalLayoutContainer v = new VerticalLayoutContainer();
|
||||
v.setScrollMode(ScrollMode.AUTO);
|
||||
v.add(normalizedColumnNameLabel, new VerticalLayoutData(1, -1));
|
||||
v.add(valueColumnNameLabel,
|
||||
new VerticalLayoutData(1, -1));
|
||||
v.add(valueColumnNameLabel, new VerticalLayoutData(1, -1));
|
||||
v.add(columnsLabel, new VerticalLayoutData(-1, -1, new Margins(2, 1, 5,
|
||||
1)));
|
||||
v.add(grid, new VerticalLayoutData(1, -1, new Margins(0)));
|
||||
|
@ -215,12 +216,18 @@ MonitorDialogListener {
|
|||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("load columns failure:"
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error retrieving columns",
|
||||
"Error retrieving columns");
|
||||
}
|
||||
}
|
||||
callback.onFailure(caught);
|
||||
}
|
||||
|
||||
|
@ -245,8 +252,7 @@ MonitorDialogListener {
|
|||
String name = normalizedColumnName.getCurrentValue();
|
||||
String value = valueColumnName.getCurrentValue();
|
||||
|
||||
normalizationSession = new NormalizationSession(trId, col,
|
||||
name,value);
|
||||
normalizationSession = new NormalizationSession(trId, col, name, value);
|
||||
|
||||
TDGWTServiceAsync.INSTANCE.startNormalization(normalizationSession,
|
||||
new AsyncCallback<String>() {
|
||||
|
@ -255,11 +261,23 @@ MonitorDialogListener {
|
|||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsFinalException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Final",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.debug("Normalization Error: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3
|
||||
.alert("Error on Normalization",caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error on Normalization",
|
||||
caught.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -322,6 +340,4 @@ MonitorDialogListener {
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -3,6 +3,8 @@ package org.gcube.portlets.user.td.tablewidget.client.rows;
|
|||
import java.util.ArrayList;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsFinalException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.rows.DeleteRowsSession;
|
||||
import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialog;
|
||||
|
@ -50,6 +52,16 @@ public class DeleteRows implements MonitorDialogListener {
|
|||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsFinalException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Final",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.debug("Delete Rows Error: "
|
||||
+ caught.getLocalizedMessage());
|
||||
|
@ -58,6 +70,8 @@ public class DeleteRows implements MonitorDialogListener {
|
|||
"Error in invocation Delete Rows operation!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onSuccess(String taskId) {
|
||||
openMonitorDialog(taskId);
|
||||
|
@ -68,9 +82,8 @@ public class DeleteRows implements MonitorDialogListener {
|
|||
}
|
||||
|
||||
protected void close() {
|
||||
/*if (parent != null) {
|
||||
parent.close();
|
||||
}
|
||||
/*
|
||||
* if (parent != null) { parent.close(); }
|
||||
*/
|
||||
}
|
||||
|
||||
|
@ -119,5 +132,4 @@ public class DeleteRows implements MonitorDialogListener {
|
|||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -4,6 +4,8 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsFinalException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.rows.DuplicatesSession;
|
||||
|
@ -51,8 +53,8 @@ import com.sencha.gxt.widget.core.client.grid.ColumnConfig;
|
|||
import com.sencha.gxt.widget.core.client.grid.ColumnModel;
|
||||
import com.sencha.gxt.widget.core.client.grid.Grid;
|
||||
|
||||
public class DuplicatesRowsPanel extends FramedPanel
|
||||
implements MonitorDialogListener {
|
||||
public class DuplicatesRowsPanel extends FramedPanel implements
|
||||
MonitorDialogListener {
|
||||
protected String WIDTH = "640px";
|
||||
protected String HEIGHT = "520px";
|
||||
|
||||
|
@ -136,7 +138,8 @@ public class DuplicatesRowsPanel extends FramedPanel
|
|||
|
||||
// Delete Button
|
||||
deleteButton = new TextButton("Delete");
|
||||
deleteButton.setIcon(ResourceBundle.INSTANCE.tableDuplicateRowsRemove());
|
||||
deleteButton
|
||||
.setIcon(ResourceBundle.INSTANCE.tableDuplicateRowsRemove());
|
||||
deleteButton.setIconAlign(IconAlign.RIGHT);
|
||||
deleteButton.setTitle("Delete Duplicates Rows");
|
||||
|
||||
|
@ -200,12 +203,18 @@ public class DuplicatesRowsPanel extends FramedPanel
|
|||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("load columns failure:"
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error retrieving columns",
|
||||
"Error retrieving columns");
|
||||
}
|
||||
}
|
||||
callback.onFailure(caught);
|
||||
}
|
||||
|
||||
|
@ -236,6 +245,16 @@ public class DuplicatesRowsPanel extends FramedPanel
|
|||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsFinalException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Final",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.debug("Delete Duplicates Error: "
|
||||
+ caught.getLocalizedMessage());
|
||||
|
@ -244,6 +263,8 @@ public class DuplicatesRowsPanel extends FramedPanel
|
|||
"Error in invocation Delete Duplicates operation!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onSuccess(String taskId) {
|
||||
openMonitorDialog(taskId);
|
||||
|
@ -269,6 +290,16 @@ public class DuplicatesRowsPanel extends FramedPanel
|
|||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsFinalException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Final",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.debug("Validates Duplicates Error: "
|
||||
+ caught.getLocalizedMessage());
|
||||
|
@ -277,6 +308,8 @@ public class DuplicatesRowsPanel extends FramedPanel
|
|||
"Error in invocation Validates Duplicates operation!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onSuccess(String taskId) {
|
||||
openMonitorDialog(taskId);
|
||||
|
@ -287,9 +320,8 @@ public class DuplicatesRowsPanel extends FramedPanel
|
|||
}
|
||||
|
||||
protected void close() {
|
||||
/*if (parent != null) {
|
||||
parent.close();
|
||||
}
|
||||
/*
|
||||
* if (parent != null) { parent.close(); }
|
||||
*/
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue