2013-05-14 14:24:27 +02:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
package org.gcube.portlets.user.td.client;
|
|
|
|
|
2014-03-06 12:42:54 +01:00
|
|
|
import java.util.ArrayList;
|
2015-02-09 17:36:13 +01:00
|
|
|
import java.util.HashMap;
|
2014-03-06 12:42:54 +01:00
|
|
|
|
2014-11-10 18:59:21 +01:00
|
|
|
import org.gcube.portlets.user.td.chartswidget.client.ChartsWidgetTD;
|
2014-08-05 18:33:49 +02:00
|
|
|
import org.gcube.portlets.user.td.client.logs.TDMLogs;
|
2015-01-22 12:23:09 +01:00
|
|
|
import org.gcube.portlets.user.td.client.rstudio.RStudio;
|
2014-04-15 14:29:28 +02:00
|
|
|
import org.gcube.portlets.user.td.client.template.TemplateApplyDialog;
|
|
|
|
import org.gcube.portlets.user.td.client.template.TemplateDeleteDialog;
|
|
|
|
import org.gcube.portlets.user.td.client.template.TemplateOpenDialog;
|
2014-06-03 17:35:01 +02:00
|
|
|
import org.gcube.portlets.user.td.codelistmappingimportwidget.client.CodelistMappingImportWizardTD;
|
2014-04-04 16:05:50 +02:00
|
|
|
import org.gcube.portlets.user.td.columnwidget.client.batch.ReplaceBatchDialog;
|
2014-03-26 19:09:14 +01:00
|
|
|
import org.gcube.portlets.user.td.columnwidget.client.replace.ReplaceDialog;
|
2013-12-11 14:28:10 +01:00
|
|
|
import org.gcube.portlets.user.td.csvexportwidget.client.CSVExportWizardTD;
|
|
|
|
import org.gcube.portlets.user.td.csvimportwidget.client.CSVImportWizardTD;
|
2014-02-18 18:40:45 +01:00
|
|
|
import org.gcube.portlets.user.td.expressionwidget.client.ColumnFilterDialog;
|
2014-02-19 13:06:34 +01:00
|
|
|
import org.gcube.portlets.user.td.expressionwidget.client.MultiColumnFilterDialog;
|
2014-09-12 18:55:09 +02:00
|
|
|
import org.gcube.portlets.user.td.expressionwidget.client.ReplaceColumnByExpressionDialog;
|
2014-05-27 18:21:39 +02:00
|
|
|
import org.gcube.portlets.user.td.extractcodelistwidget.client.ExtractCodelistWizardTD;
|
2013-12-11 14:28:10 +01:00
|
|
|
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
2015-01-16 18:19:38 +01:00
|
|
|
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
|
2014-05-16 12:04:48 +02:00
|
|
|
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
2015-01-16 18:19:38 +01:00
|
|
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource;
|
2014-10-15 18:45:45 +02:00
|
|
|
import org.gcube.portlets.user.td.gwtservice.shared.user.UserInfo;
|
2014-10-02 16:22:19 +02:00
|
|
|
import org.gcube.portlets.user.td.jsonexportwidget.client.JSONExportWidgetTD;
|
2014-10-15 18:45:45 +02:00
|
|
|
import org.gcube.portlets.user.td.mainboxwidget.client.MainBoxPanel;
|
2014-10-13 11:58:16 +02:00
|
|
|
import org.gcube.portlets.user.td.mapwidget.client.MapWidgetTD;
|
2013-12-11 14:28:10 +01:00
|
|
|
import org.gcube.portlets.user.td.openwidget.client.TDOpen;
|
2014-11-07 19:02:46 +01:00
|
|
|
import org.gcube.portlets.user.td.replacebyexternalwidget.client.ReplaceByExternalTD;
|
2013-12-04 14:32:36 +01:00
|
|
|
import org.gcube.portlets.user.td.sdmxexportwidget.client.SDMXExportWizardTD;
|
2013-10-24 17:26:01 +02:00
|
|
|
import org.gcube.portlets.user.td.sdmximportwidget.client.SDMXImportWizardTD;
|
2014-03-10 15:21:30 +01:00
|
|
|
import org.gcube.portlets.user.td.sharewidget.client.TRShare;
|
2014-10-22 18:48:08 +02:00
|
|
|
import org.gcube.portlets.user.td.statisticalwidget.client.StatisticalWidget;
|
2014-03-07 15:45:39 +01:00
|
|
|
import org.gcube.portlets.user.td.tablewidget.client.CloneTabularResource;
|
2014-04-16 19:10:47 +02:00
|
|
|
import org.gcube.portlets.user.td.tablewidget.client.history.HistoryDiscard;
|
2014-03-06 15:36:34 +01:00
|
|
|
import org.gcube.portlets.user.td.tablewidget.client.rows.DeleteRows;
|
2014-05-13 18:09:57 +02:00
|
|
|
import org.gcube.portlets.user.td.tablewidget.client.rows.EditRowDialog;
|
2014-03-18 16:13:44 +01:00
|
|
|
import org.gcube.portlets.user.td.tablewidget.client.util.UtilsGXT3;
|
2013-12-18 11:14:26 +01:00
|
|
|
import org.gcube.portlets.user.td.taskswidget.client.TdTaskController;
|
2014-07-18 20:03:12 +02:00
|
|
|
import org.gcube.portlets.user.td.unionwizardwidget.client.UnionWizardTD;
|
2014-09-11 18:39:50 +02:00
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.BackgroundRequestEvent;
|
2014-02-07 09:33:33 +01:00
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent;
|
2014-10-15 18:45:45 +02:00
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.DataViewActiveEvent;
|
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.DataViewRequestEvent;
|
2014-03-06 12:42:54 +01:00
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.GridContextMenuItemEvent;
|
2013-12-17 17:22:23 +01:00
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.GridHeaderColumnMenuItemEvent;
|
2013-12-02 20:04:19 +01:00
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.RibbonEvent;
|
2014-05-16 12:04:48 +02:00
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
|
2014-01-28 16:28:43 +01:00
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.TasksMonitorEvent;
|
2013-11-26 13:57:08 +01:00
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.UIStateEvent;
|
2014-02-04 18:53:38 +01:00
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.WidgetRequestEvent;
|
2014-09-11 18:39:50 +02:00
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.client.type.BackgroundRequestType;
|
2014-10-15 18:45:45 +02:00
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.client.type.DataViewRequestType;
|
2013-12-11 14:28:10 +01:00
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.client.type.RibbonType;
|
2014-08-05 18:33:49 +02:00
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
|
2014-01-28 16:28:43 +01:00
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.client.type.TaskType;
|
2013-11-26 13:57:08 +01:00
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.client.type.UIStateType;
|
2014-02-04 18:53:38 +01:00
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.client.type.WidgetRequestType;
|
2014-03-26 19:09:14 +01:00
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.CellData;
|
2013-12-17 17:27:57 +01:00
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.GridHeaderOperationId;
|
2014-03-06 12:42:54 +01:00
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.GridOperationId;
|
2014-05-20 18:54:56 +02:00
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.RequestProperties;
|
2015-02-09 17:36:13 +01:00
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.RequestPropertiesParameterType;
|
2013-12-05 16:26:43 +01:00
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
2014-10-15 18:45:45 +02:00
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.dataview.DataView;
|
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.dataview.TabularResourceDataView;
|
2015-02-09 17:36:13 +01:00
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.geospatial.GeospatialCoordinatesType;
|
2014-05-14 20:37:41 +02:00
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.grid.model.RowRaw;
|
2013-12-11 14:28:10 +01:00
|
|
|
import org.gcube.portlets.user.td.wizardwidget.client.WizardListener;
|
2014-02-24 14:02:39 +01:00
|
|
|
import org.gcube.portlets.user.tdtemplate.client.TdTemplateController;
|
2014-04-08 18:55:08 +02:00
|
|
|
import org.gcube.portlets.widgets.sessionchecker.client.CheckSession;
|
2013-05-14 14:24:27 +02:00
|
|
|
|
|
|
|
import com.allen_sauer.gwt.log.client.Log;
|
2013-05-14 15:41:50 +02:00
|
|
|
import com.google.gwt.core.client.GWT;
|
|
|
|
import com.google.gwt.core.client.RunAsyncCallback;
|
2014-10-29 18:57:37 +01:00
|
|
|
import com.google.gwt.event.shared.SimpleEventBus;
|
2014-05-20 14:36:38 +02:00
|
|
|
import com.google.gwt.user.client.Timer;
|
2013-12-18 12:57:59 +01:00
|
|
|
import com.google.gwt.user.client.Window;
|
2013-12-03 11:05:53 +01:00
|
|
|
import com.google.gwt.user.client.rpc.AsyncCallback;
|
2013-05-14 14:24:27 +02:00
|
|
|
import com.google.web.bindery.event.shared.EventBus;
|
2013-09-27 17:35:58 +02:00
|
|
|
import com.sencha.gxt.widget.core.client.ContentPanel;
|
2014-02-05 19:58:52 +01:00
|
|
|
import com.sencha.gxt.widget.core.client.box.ConfirmMessageBox;
|
2013-09-27 17:35:58 +02:00
|
|
|
import com.sencha.gxt.widget.core.client.container.BorderLayoutContainer.BorderLayoutData;
|
2014-11-27 18:30:11 +01:00
|
|
|
import com.sencha.gxt.widget.core.client.event.DialogHideEvent;
|
|
|
|
import com.sencha.gxt.widget.core.client.event.DialogHideEvent.DialogHideHandler;
|
2014-04-17 12:28:04 +02:00
|
|
|
|
2014-03-11 20:12:45 +01:00
|
|
|
//import org.gcube.portlets.user.tdtemplate.client.TdTemplateController;
|
2013-09-30 19:30:47 +02:00
|
|
|
|
2013-05-14 14:24:27 +02:00
|
|
|
/**
|
2013-09-16 11:43:07 +02:00
|
|
|
*
|
2013-12-03 11:05:53 +01:00
|
|
|
* @author "Giancarlo Panichi" <a
|
|
|
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
|
|
|
*
|
2013-05-14 14:24:27 +02:00
|
|
|
*/
|
2013-09-30 19:30:47 +02:00
|
|
|
public class TabularDataController {
|
|
|
|
// implements HasCloseHandlers<Long>, HasOpenHandlers<Long> {
|
2014-03-06 12:42:54 +01:00
|
|
|
|
2014-11-20 15:52:28 +01:00
|
|
|
private SimpleEventBus eventBus;
|
2015-01-16 18:19:38 +01:00
|
|
|
// private TabularDataX tabularData;
|
2014-10-15 18:45:45 +02:00
|
|
|
private MainBoxPanel mainBoxPanel;
|
2014-11-20 15:52:28 +01:00
|
|
|
private UIStateType uiState = UIStateType.START;
|
2013-09-30 19:30:47 +02:00
|
|
|
|
2014-02-26 18:12:07 +01:00
|
|
|
private boolean taskManagerInit = false;
|
2014-11-20 15:52:28 +01:00
|
|
|
private TdTaskController tdTaskController;
|
2014-02-05 10:25:26 +01:00
|
|
|
|
2014-11-20 15:52:28 +01:00
|
|
|
private ContentPanel toolBoxPanel;
|
|
|
|
private BorderLayoutData westData;
|
2013-09-30 19:30:47 +02:00
|
|
|
|
2014-10-13 11:58:16 +02:00
|
|
|
/**
|
|
|
|
* Current user
|
|
|
|
*/
|
2014-11-20 15:52:28 +01:00
|
|
|
private UserInfo userInfo;
|
2014-10-15 18:45:45 +02:00
|
|
|
|
2013-09-19 19:11:45 +02:00
|
|
|
/**
|
2013-09-30 19:30:47 +02:00
|
|
|
* Tabular Resource Id
|
2013-09-19 19:11:45 +02:00
|
|
|
*/
|
2014-11-20 15:52:28 +01:00
|
|
|
private TRId trId;
|
2013-09-30 19:30:47 +02:00
|
|
|
|
2013-09-25 17:44:07 +02:00
|
|
|
/**
|
2013-09-30 19:30:47 +02:00
|
|
|
* Grid TableId
|
|
|
|
*/
|
2015-01-16 18:19:38 +01:00
|
|
|
// private TableId tableOpening;
|
2014-10-15 18:45:45 +02:00
|
|
|
|
|
|
|
private TRId openTRIdAfterServerUpdate;
|
2014-03-06 12:42:54 +01:00
|
|
|
|
2013-09-16 11:43:07 +02:00
|
|
|
public TabularDataController() {
|
2013-05-14 14:24:27 +02:00
|
|
|
eventBus = new SimpleEventBus();
|
2014-02-27 10:03:58 +01:00
|
|
|
callHello();
|
2014-04-08 18:55:08 +02:00
|
|
|
checkSession();
|
2015-01-23 17:01:44 +01:00
|
|
|
pendingTasksRetrieve();
|
2013-05-14 14:24:27 +02:00
|
|
|
bindToEvents();
|
|
|
|
}
|
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void checkSession() {
|
2014-04-17 12:28:04 +02:00
|
|
|
// if you do not need to something when the session expire
|
2014-04-08 18:55:08 +02:00
|
|
|
CheckSession.getInstance().startPolling();
|
|
|
|
}
|
2014-05-20 14:36:38 +02:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void sessionExpiredShow() {
|
2014-05-16 12:04:48 +02:00
|
|
|
CheckSession.showLogoutDialog();
|
|
|
|
}
|
2014-04-17 12:28:04 +02:00
|
|
|
|
2013-05-14 14:24:27 +02:00
|
|
|
/**
|
|
|
|
* @return the eventBus
|
|
|
|
*/
|
|
|
|
public EventBus getEventBus() {
|
|
|
|
return eventBus;
|
|
|
|
}
|
2013-09-27 17:35:58 +02:00
|
|
|
|
2014-10-15 18:45:45 +02:00
|
|
|
/*
|
|
|
|
* public void setTabularData(TabularDataX tabularData) { this.tabularData =
|
|
|
|
* tabularData; }
|
|
|
|
*/
|
2013-09-27 17:35:58 +02:00
|
|
|
|
2013-12-11 14:28:10 +01:00
|
|
|
public ContentPanel getToolBoxPanel() {
|
|
|
|
return toolBoxPanel;
|
2013-09-27 17:35:58 +02:00
|
|
|
}
|
|
|
|
|
2013-12-11 14:28:10 +01:00
|
|
|
public void setToolBoxPanel(ContentPanel toolBoxPanel) {
|
|
|
|
this.toolBoxPanel = toolBoxPanel;
|
2013-09-27 17:35:58 +02:00
|
|
|
}
|
|
|
|
|
2013-12-20 15:51:58 +01:00
|
|
|
public BorderLayoutData getWestData() {
|
|
|
|
return westData;
|
2013-09-27 17:35:58 +02:00
|
|
|
}
|
|
|
|
|
2013-12-20 15:51:58 +01:00
|
|
|
public void setWestData(BorderLayoutData westData) {
|
|
|
|
this.westData = westData;
|
2013-09-27 17:35:58 +02:00
|
|
|
}
|
2014-03-06 12:42:54 +01:00
|
|
|
|
2014-10-15 18:45:45 +02:00
|
|
|
public void setMainBoxPanel(MainBoxPanel mainBoxPanel) {
|
|
|
|
this.mainBoxPanel = mainBoxPanel;
|
2014-02-27 10:03:58 +01:00
|
|
|
|
2014-10-15 18:45:45 +02:00
|
|
|
}
|
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void callHello() {
|
2014-10-15 18:45:45 +02:00
|
|
|
TDGWTServiceAsync.INSTANCE.hello(new AsyncCallback<UserInfo>() {
|
2014-10-13 11:58:16 +02:00
|
|
|
|
2014-02-27 10:03:58 +01:00
|
|
|
@Override
|
|
|
|
public void onFailure(Throwable caught) {
|
2014-03-06 12:42:54 +01:00
|
|
|
Log.info("No valid user found: " + caught.getMessage());
|
2014-05-20 14:36:38 +02:00
|
|
|
if (caught instanceof TDGWTSessionExpiredException) {
|
2014-10-24 17:52:26 +02:00
|
|
|
UtilsGXT3.alert("Error", "Expired Session");
|
2014-05-20 14:36:38 +02:00
|
|
|
sessionExpiredShowDelayed();
|
2014-05-16 12:04:48 +02:00
|
|
|
} else {
|
|
|
|
UtilsGXT3.alert("Error", "No user found");
|
|
|
|
}
|
2014-02-27 10:03:58 +01:00
|
|
|
}
|
2014-02-26 18:12:07 +01:00
|
|
|
|
2014-02-27 10:03:58 +01:00
|
|
|
@Override
|
2014-10-15 18:45:45 +02:00
|
|
|
public void onSuccess(UserInfo result) {
|
|
|
|
userInfo = result;
|
|
|
|
Log.info("Hello: " + result.getUsername());
|
2014-03-06 12:42:54 +01:00
|
|
|
|
2014-02-27 10:03:58 +01:00
|
|
|
}
|
2014-03-06 12:42:54 +01:00
|
|
|
|
2014-02-27 10:03:58 +01:00
|
|
|
});
|
2014-03-06 12:42:54 +01:00
|
|
|
|
2014-02-27 10:03:58 +01:00
|
|
|
}
|
2015-01-23 17:01:44 +01:00
|
|
|
|
|
|
|
private void pendingTasksRetrieve() {
|
|
|
|
TDGWTServiceAsync.INSTANCE.pendingTasksRetrieve(new AsyncCallback<Integer>() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onFailure(Throwable caught) {
|
|
|
|
Log.info("No valid user found: " + caught.getMessage());
|
|
|
|
if (caught instanceof TDGWTSessionExpiredException) {
|
|
|
|
UtilsGXT3.alert("Error", "Expired Session");
|
|
|
|
sessionExpiredShowDelayed();
|
|
|
|
} else {
|
|
|
|
UtilsGXT3.alert("Error", caught.getLocalizedMessage());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onSuccess(Integer pending) {
|
|
|
|
Log.info("Pending Tasks Retrieved: "+pending);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-03-06 12:42:54 +01:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void sessionExpiredShowDelayed() {
|
2014-05-20 14:36:38 +02:00
|
|
|
Timer timeoutTimer = new Timer() {
|
|
|
|
public void run() {
|
|
|
|
sessionExpiredShow();
|
|
|
|
|
|
|
|
}
|
|
|
|
};
|
2014-10-24 17:52:26 +02:00
|
|
|
int TIMEOUT = 3; // 3 second timeout
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2014-05-20 14:36:38 +02:00
|
|
|
timeoutTimer.schedule(TIMEOUT * 1000); // timeout is in milliseconds
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2014-05-20 14:36:38 +02:00
|
|
|
}
|
|
|
|
|
2014-02-26 18:12:07 +01:00
|
|
|
// Bind Controller to events on bus
|
2015-01-16 18:19:38 +01:00
|
|
|
private void bindToEvents() {
|
2014-05-20 14:36:38 +02:00
|
|
|
eventBus.addHandler(SessionExpiredEvent.TYPE,
|
2014-05-16 12:04:48 +02:00
|
|
|
new SessionExpiredEvent.SessionExpiredEventHandler() {
|
2014-05-20 14:36:38 +02:00
|
|
|
|
2014-05-16 12:04:48 +02:00
|
|
|
@Override
|
|
|
|
public void onSessionExpired(SessionExpiredEvent event) {
|
|
|
|
Log.debug("Catch Event SessionExpiredEvent");
|
|
|
|
doSessionExpiredCommand(event);
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
2014-05-20 14:36:38 +02:00
|
|
|
|
2014-10-15 18:45:45 +02:00
|
|
|
eventBus.addHandler(DataViewActiveEvent.TYPE,
|
|
|
|
new DataViewActiveEvent.DataViewActiveEventHandler() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onDataViewActive(DataViewActiveEvent event) {
|
|
|
|
Log.debug("Catch Event DataViewActiveEvent");
|
|
|
|
doDataViewActiveCommand(event);
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2013-12-17 17:22:23 +01:00
|
|
|
eventBus.addHandler(
|
2013-12-16 10:57:07 +01:00
|
|
|
GridHeaderColumnMenuItemEvent.TYPE,
|
|
|
|
new GridHeaderColumnMenuItemEvent.GridHeaderColumnMenuItemEventHandler() {
|
|
|
|
|
|
|
|
public void onGridHeaderColumnMenuItemEvent(
|
|
|
|
GridHeaderColumnMenuItemEvent event) {
|
2014-09-11 18:39:50 +02:00
|
|
|
Log.debug("Catch Event GridHeaderColumnMenuItemEvent");
|
2013-12-17 17:22:23 +01:00
|
|
|
doGridHeaderColumnMenuCommand(event);
|
2013-12-16 10:57:07 +01:00
|
|
|
|
|
|
|
}
|
|
|
|
});
|
2014-02-05 10:25:26 +01:00
|
|
|
|
2014-03-06 12:42:54 +01:00
|
|
|
eventBus.addHandler(GridContextMenuItemEvent.TYPE,
|
|
|
|
new GridContextMenuItemEvent.GridContextMenuItemEventHandler() {
|
|
|
|
|
|
|
|
public void onGridContextMenuItemEvent(
|
|
|
|
GridContextMenuItemEvent event) {
|
|
|
|
Log.debug("Catch Event ContextMenuItemEvent");
|
|
|
|
doGridContextMenuCommand(event);
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2014-02-07 09:33:33 +01:00
|
|
|
eventBus.addHandler(ChangeTableRequestEvent.TYPE,
|
|
|
|
new ChangeTableRequestEvent.ChangeTableRequestEventHandler() {
|
|
|
|
|
|
|
|
public void onChangeTableRequestEvent(
|
|
|
|
ChangeTableRequestEvent event) {
|
|
|
|
Log.debug("Catch Event ChangeTableRequestEvent");
|
|
|
|
doChangeTableRequestEventCommand(event);
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2013-12-02 20:04:19 +01:00
|
|
|
eventBus.addHandler(RibbonEvent.TYPE,
|
|
|
|
new RibbonEvent.RibbonEventHandler() {
|
2013-12-03 11:05:53 +01:00
|
|
|
|
2013-12-02 20:04:19 +01:00
|
|
|
public void onRibbon(RibbonEvent event) {
|
2014-09-11 18:39:50 +02:00
|
|
|
Log.debug("Catch Event RibbonEvent");
|
2013-12-02 20:04:19 +01:00
|
|
|
doRibbonCommand(event);
|
2013-12-03 11:05:53 +01:00
|
|
|
|
2013-09-27 17:35:58 +02:00
|
|
|
}
|
|
|
|
});
|
2013-12-03 11:05:53 +01:00
|
|
|
|
2014-02-05 10:25:26 +01:00
|
|
|
eventBus.addHandler(TasksMonitorEvent.TYPE,
|
2014-01-28 16:28:43 +01:00
|
|
|
new TasksMonitorEvent.TasksMonitorEventHandler() {
|
|
|
|
|
2014-02-05 10:25:26 +01:00
|
|
|
public void onTasksMonitorEvent(TasksMonitorEvent event) {
|
2014-09-11 18:39:50 +02:00
|
|
|
Log.debug("Catch Event TasksMonitorEvent");
|
2014-01-28 16:28:43 +01:00
|
|
|
doTasksMonitorCommand(event);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2014-05-20 18:54:56 +02:00
|
|
|
eventBus.addHandler(WidgetRequestEvent.TYPE,
|
|
|
|
new WidgetRequestEvent.WidgetRequestEventHandler() {
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2014-05-20 18:54:56 +02:00
|
|
|
@Override
|
|
|
|
public void onWidgetRequest(WidgetRequestEvent event) {
|
2014-09-11 18:39:50 +02:00
|
|
|
Log.debug("Catch Event WidgetRequestEvent");
|
2014-05-20 18:54:56 +02:00
|
|
|
doWidgetRequestCommand(event);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2014-09-11 18:39:50 +02:00
|
|
|
eventBus.addHandler(BackgroundRequestEvent.TYPE,
|
|
|
|
new BackgroundRequestEvent.BackgroundRequestEventHandler() {
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2014-09-11 18:39:50 +02:00
|
|
|
@Override
|
|
|
|
public void onBackgroundRequest(BackgroundRequestEvent event) {
|
|
|
|
Log.debug("Catch Event BackgroundRequestEvent");
|
|
|
|
doBackgroundRequestCommand(event);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
2014-02-05 10:25:26 +01:00
|
|
|
|
2013-10-25 17:05:30 +02:00
|
|
|
eventBus.fireEvent(new UIStateEvent(UIStateType.START));
|
2013-09-30 19:30:47 +02:00
|
|
|
|
2013-09-16 11:43:07 +02:00
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
|
|
|
//
|
|
|
|
public void restoreUISession() {
|
2014-10-16 18:44:25 +02:00
|
|
|
TDGWTServiceAsync.INSTANCE.restoreUISession(new AsyncCallback<TRId>() {
|
2014-10-02 19:07:33 +02:00
|
|
|
|
|
|
|
public void onFailure(Throwable caught) {
|
2014-10-23 18:42:45 +02:00
|
|
|
|
2014-10-02 19:07:33 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public void onSuccess(TRId trId) {
|
2014-10-15 18:45:45 +02:00
|
|
|
if (trId != null) {
|
|
|
|
if (trId.getId() != null && !trId.getId().isEmpty()) {
|
2014-10-02 19:07:33 +02:00
|
|
|
openTable(trId);
|
|
|
|
}
|
|
|
|
}
|
2014-10-15 18:45:45 +02:00
|
|
|
|
2014-10-02 19:07:33 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2014-10-23 18:42:45 +02:00
|
|
|
// TODO
|
2015-01-16 18:19:38 +01:00
|
|
|
private void putInBackgroundUIState() {
|
2014-09-11 18:39:50 +02:00
|
|
|
try {
|
2014-10-15 18:45:45 +02:00
|
|
|
requestCloseCurrent();
|
2014-10-23 18:42:45 +02:00
|
|
|
// closeAllTabularResource();
|
|
|
|
// openBackgroundMonitor();
|
|
|
|
// openTabularResource(true);
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2014-09-11 18:39:50 +02:00
|
|
|
} catch (Exception e) {
|
|
|
|
Log.debug("Put In Background :" + e.getLocalizedMessage());
|
|
|
|
}
|
|
|
|
}
|
2014-02-26 18:12:07 +01:00
|
|
|
|
|
|
|
// Resume state of user interface
|
2015-01-16 18:19:38 +01:00
|
|
|
private void resumeUIState() {
|
2013-12-20 11:34:15 +01:00
|
|
|
try {
|
2014-04-17 12:28:04 +02:00
|
|
|
UIStateEvent uiStateEvent;
|
|
|
|
switch (uiState) {
|
|
|
|
case START:
|
|
|
|
eventBus.fireEvent(new UIStateEvent(UIStateType.START));
|
|
|
|
break;
|
|
|
|
case TABLECURATION:
|
|
|
|
uiStateEvent = new UIStateEvent(UIStateType.TABLECURATION);
|
2013-12-20 11:34:15 +01:00
|
|
|
uiStateEvent.setTrId(trId);
|
2014-11-20 15:52:28 +01:00
|
|
|
Log.debug("ResumeUIState Fire: " + uiStateEvent);
|
2013-12-20 11:34:15 +01:00
|
|
|
eventBus.fireEvent(uiStateEvent);
|
2014-04-17 12:28:04 +02:00
|
|
|
break;
|
|
|
|
case TABLEUPDATE:
|
|
|
|
uiStateEvent = new UIStateEvent(UIStateType.TABLEUPDATE);
|
|
|
|
uiStateEvent.setTrId(trId);
|
2014-11-20 15:52:28 +01:00
|
|
|
Log.debug("ResumeUIState Fire: " + uiStateEvent);
|
2014-04-17 12:28:04 +02:00
|
|
|
eventBus.fireEvent(uiStateEvent);
|
|
|
|
break;
|
|
|
|
case TR_CLOSE:
|
2014-10-08 18:58:48 +02:00
|
|
|
uiStateEvent = new UIStateEvent(UIStateType.TR_CLOSE);
|
|
|
|
uiStateEvent.setTrId(trId);
|
|
|
|
eventBus.fireEvent(uiStateEvent);
|
2014-04-17 12:28:04 +02:00
|
|
|
break;
|
|
|
|
case TR_OPEN:
|
|
|
|
uiStateEvent = new UIStateEvent(UIStateType.TR_OPEN);
|
|
|
|
uiStateEvent.setTrId(trId);
|
2014-11-20 15:52:28 +01:00
|
|
|
Log.debug("ResumeUIState Fire: " + uiStateEvent);
|
2014-04-17 12:28:04 +02:00
|
|
|
eventBus.fireEvent(uiStateEvent);
|
|
|
|
break;
|
|
|
|
case TR_READONLY:
|
|
|
|
uiStateEvent = new UIStateEvent(UIStateType.TR_READONLY);
|
|
|
|
uiStateEvent.setTrId(trId);
|
|
|
|
eventBus.fireEvent(uiStateEvent);
|
|
|
|
break;
|
|
|
|
case WIZARD_OPEN:
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
2013-12-20 11:34:15 +01:00
|
|
|
|
|
|
|
}
|
2014-04-17 12:28:04 +02:00
|
|
|
|
2013-12-20 11:34:15 +01:00
|
|
|
} catch (Exception e) {
|
|
|
|
Log.debug("Resume :" + e.getLocalizedMessage());
|
2013-10-25 17:05:30 +02:00
|
|
|
}
|
|
|
|
}
|
2014-02-26 18:12:07 +01:00
|
|
|
|
|
|
|
// Open Table
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openTable(TRId tabularResourceId) {
|
2014-04-17 12:28:04 +02:00
|
|
|
Log.debug("openTable: " + tabularResourceId);
|
2013-10-25 17:05:30 +02:00
|
|
|
trId = tabularResourceId;
|
2014-10-23 18:42:45 +02:00
|
|
|
// tableOpening = new TableId(Constants.TDX_DATASOURCE_FACTORY_ID,
|
|
|
|
// trId.getTableId());
|
2014-10-15 18:45:45 +02:00
|
|
|
// tabularData.openTable(tableOpening);
|
2013-10-25 17:05:30 +02:00
|
|
|
uiState = UIStateType.TR_OPEN;
|
2013-12-16 10:57:07 +01:00
|
|
|
UIStateEvent uiStateEvent = new UIStateEvent(UIStateType.TR_OPEN);
|
2013-12-05 16:26:43 +01:00
|
|
|
uiStateEvent.setTrId(tabularResourceId);
|
|
|
|
eventBus.fireEvent(uiStateEvent);
|
2013-12-04 20:07:40 +01:00
|
|
|
}
|
2014-02-05 10:25:26 +01:00
|
|
|
|
2014-04-17 12:28:04 +02:00
|
|
|
// Update Table
|
2015-01-16 18:19:38 +01:00
|
|
|
private void updateTable(TRId tabularResourceId) {
|
2014-04-17 12:28:04 +02:00
|
|
|
Log.debug("updateTable: " + tabularResourceId);
|
|
|
|
trId = tabularResourceId;
|
2014-10-23 18:42:45 +02:00
|
|
|
// tableOpening = new TableId(Constants.TDX_DATASOURCE_FACTORY_ID,
|
|
|
|
// trId.getTableId());
|
2014-10-15 18:45:45 +02:00
|
|
|
// tabularData.openTable(tableOpening);
|
2014-04-17 12:28:04 +02:00
|
|
|
uiState = UIStateType.TABLEUPDATE;
|
|
|
|
UIStateEvent uiStateEvent = new UIStateEvent(UIStateType.TABLEUPDATE);
|
|
|
|
uiStateEvent.setTrId(tabularResourceId);
|
2014-11-20 15:52:28 +01:00
|
|
|
Log.debug("UpdateTable Fire: " + uiStateEvent);
|
2014-04-17 12:28:04 +02:00
|
|
|
eventBus.fireEvent(uiStateEvent);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Update Table For Curation
|
2015-01-16 18:19:38 +01:00
|
|
|
private void updateTableForCuration(TRId tabularResourceId) {
|
2014-04-17 12:28:04 +02:00
|
|
|
Log.debug("updateTableForCuration: " + tabularResourceId);
|
|
|
|
trId = tabularResourceId;
|
2014-10-23 18:42:45 +02:00
|
|
|
// tableOpening = new TableId(Constants.TDX_DATASOURCE_FACTORY_ID,
|
|
|
|
// trId.getTableId());
|
2014-10-15 18:45:45 +02:00
|
|
|
// tabularData.openTable(tableOpening);
|
2014-04-17 12:28:04 +02:00
|
|
|
uiState = UIStateType.TABLECURATION;
|
|
|
|
UIStateEvent uiStateEvent = new UIStateEvent(UIStateType.TABLECURATION);
|
|
|
|
uiStateEvent.setTrId(tabularResourceId);
|
2014-11-20 15:52:28 +01:00
|
|
|
Log.debug("UpdateTableForCuration Fire: " + uiStateEvent);
|
2014-04-17 12:28:04 +02:00
|
|
|
eventBus.fireEvent(uiStateEvent);
|
|
|
|
}
|
|
|
|
|
2014-02-26 18:12:07 +01:00
|
|
|
// Close Tabular Resource
|
2015-01-16 18:19:38 +01:00
|
|
|
private void closeAllTabularResource() {
|
2014-05-16 12:04:48 +02:00
|
|
|
switch (uiState) {
|
2014-04-17 17:41:41 +02:00
|
|
|
case START:
|
|
|
|
break;
|
|
|
|
case TABLECURATION:
|
|
|
|
case TABLEUPDATE:
|
2014-05-16 12:04:48 +02:00
|
|
|
case TR_OPEN:
|
2014-04-17 17:41:41 +02:00
|
|
|
case TR_READONLY:
|
2014-07-30 15:18:51 +02:00
|
|
|
case WIZARD_OPEN:
|
2014-06-03 15:21:02 +02:00
|
|
|
Log.debug("CloseTabularResource");
|
2014-10-15 18:45:45 +02:00
|
|
|
// tabularData.closeTable();
|
2014-10-08 18:58:48 +02:00
|
|
|
UIStateEvent uiStateEvent = new UIStateEvent(UIStateType.TR_CLOSE);
|
|
|
|
uiStateEvent.setTrId(trId);
|
2014-02-04 18:53:38 +01:00
|
|
|
trId = null;
|
2014-10-23 18:42:45 +02:00
|
|
|
// tableOpening = null;
|
2013-10-25 19:29:08 +02:00
|
|
|
uiState = UIStateType.TR_CLOSE;
|
2014-01-27 20:02:57 +01:00
|
|
|
Log.debug("fireEvent TR_CLOSE");
|
|
|
|
try {
|
|
|
|
eventBus.fireEvent(new UIStateEvent(UIStateType.TR_CLOSE));
|
|
|
|
} catch (Exception e) {
|
2014-02-05 10:25:26 +01:00
|
|
|
Log.debug("Bus Error: " + e.getMessage());
|
2014-01-27 20:02:57 +01:00
|
|
|
}
|
2014-10-15 18:45:45 +02:00
|
|
|
closeAllTabularResourceOnServer();
|
2014-04-17 17:41:41 +02:00
|
|
|
break;
|
|
|
|
case TR_CLOSE:
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
2014-05-16 12:04:48 +02:00
|
|
|
|
2013-10-25 19:29:08 +02:00
|
|
|
}
|
2014-05-16 12:04:48 +02:00
|
|
|
|
2013-10-25 19:29:08 +02:00
|
|
|
}
|
2013-12-03 11:05:53 +01:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void closeAllTabularResourceOnServer() {
|
2014-10-02 19:07:33 +02:00
|
|
|
TDGWTServiceAsync.INSTANCE
|
2014-10-15 18:45:45 +02:00
|
|
|
.closeAllTabularResources(new AsyncCallback<Void>() {
|
2014-10-02 19:07:33 +02:00
|
|
|
|
|
|
|
public void onFailure(Throwable caught) {
|
2014-10-15 18:45:45 +02:00
|
|
|
UtilsGXT3.alert("Error closing all tabular resources",
|
2014-10-02 19:07:33 +02:00
|
|
|
caught.getLocalizedMessage());
|
|
|
|
}
|
|
|
|
|
|
|
|
public void onSuccess(Void result) {
|
2014-10-15 18:45:45 +02:00
|
|
|
|
2014-10-02 19:07:33 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2014-10-15 18:45:45 +02:00
|
|
|
// TODO
|
2015-01-16 18:19:38 +01:00
|
|
|
private void doActiveAfterClose(DataViewActiveEvent event) {
|
2014-10-15 18:45:45 +02:00
|
|
|
Log.debug("doActiveAfterClose: " + event);
|
|
|
|
|
|
|
|
DataView dataView = event.getDataView();
|
|
|
|
if (dataView instanceof TabularResourceDataView) {
|
|
|
|
TabularResourceDataView tabularResourceDataView = (TabularResourceDataView) dataView;
|
|
|
|
Log.debug("New TabularResourceDataView:" + tabularResourceDataView);
|
|
|
|
openTRIdAfterServerUpdate = tabularResourceDataView.getTrId();
|
|
|
|
DataView olderDataView = event.getOldDataView();
|
|
|
|
if (olderDataView instanceof TabularResourceDataView) {
|
|
|
|
TabularResourceDataView olderTabularResourceDataView = (TabularResourceDataView) olderDataView;
|
|
|
|
Log.debug("New TabularResourceDataView:"
|
|
|
|
+ olderTabularResourceDataView);
|
|
|
|
TDGWTServiceAsync.INSTANCE.closeTabularResourceAndOpen(
|
|
|
|
openTRIdAfterServerUpdate,
|
|
|
|
olderTabularResourceDataView.getTrId(),
|
|
|
|
|
|
|
|
new AsyncCallback<Void>() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onFailure(Throwable caught) {
|
|
|
|
|
|
|
|
if (caught instanceof TDGWTSessionExpiredException) {
|
|
|
|
eventBus.fireEvent(new SessionExpiredEvent(
|
|
|
|
SessionExpiredType.EXPIREDONSERVER));
|
|
|
|
} else {
|
|
|
|
Log.error("Error in Close and Open TR "
|
|
|
|
+ caught.getLocalizedMessage());
|
|
|
|
caught.printStackTrace();
|
|
|
|
UtilsGXT3
|
|
|
|
.alert("Error",
|
|
|
|
"Error in close TR: "
|
|
|
|
+ caught.getLocalizedMessage());
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onSuccess(Void result) {
|
|
|
|
doOpenTRIdAfterServerUpdate();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
} else {
|
2014-10-23 18:42:45 +02:00
|
|
|
|
2014-10-15 18:45:45 +02:00
|
|
|
}
|
|
|
|
} else {
|
2014-10-23 18:42:45 +02:00
|
|
|
|
2014-10-15 18:45:45 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void doOpenTRIdAfterServerUpdate() {
|
2014-11-20 15:52:28 +01:00
|
|
|
if (trId != null
|
|
|
|
&& trId.getId().compareTo(openTRIdAfterServerUpdate.getId()) == 0
|
|
|
|
&& trId.getTableId().compareTo(trId.getTableId()) == 0) {
|
2014-10-30 10:17:32 +01:00
|
|
|
Log.debug("Open Table Break table just open");
|
2014-10-29 18:57:37 +01:00
|
|
|
} else {
|
2014-10-30 10:17:32 +01:00
|
|
|
Log.debug("Open Table new Table for TR");
|
2014-10-29 18:57:37 +01:00
|
|
|
openTable(openTRIdAfterServerUpdate);
|
|
|
|
}
|
2014-10-15 18:45:45 +02:00
|
|
|
}
|
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void doNewActive(DataViewActiveEvent event) {
|
2014-10-15 18:45:45 +02:00
|
|
|
Log.debug("doNewActive: " + event);
|
|
|
|
DataView dataView = event.getDataView();
|
|
|
|
if (dataView instanceof TabularResourceDataView) {
|
|
|
|
TabularResourceDataView tabularResourceDataView = (TabularResourceDataView) dataView;
|
|
|
|
Log.debug("TabularResourceDataView:" + tabularResourceDataView);
|
|
|
|
openTRIdAfterServerUpdate = tabularResourceDataView.getTrId();
|
|
|
|
TDGWTServiceAsync.INSTANCE.setActiveTabularResource(
|
2014-11-03 18:21:54 +01:00
|
|
|
openTRIdAfterServerUpdate, new AsyncCallback<TRId>() {
|
2014-10-15 18:45:45 +02:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onFailure(Throwable caught) {
|
|
|
|
|
|
|
|
if (caught instanceof TDGWTSessionExpiredException) {
|
|
|
|
eventBus.fireEvent(new SessionExpiredEvent(
|
|
|
|
SessionExpiredType.EXPIREDONSERVER));
|
|
|
|
} else {
|
2014-10-30 12:03:06 +01:00
|
|
|
Log.error("Error in set Active TR: "
|
2014-10-15 18:45:45 +02:00
|
|
|
+ caught.getLocalizedMessage());
|
|
|
|
caught.printStackTrace();
|
|
|
|
UtilsGXT3.alert(
|
|
|
|
"Error",
|
|
|
|
"Error in set Active TR: "
|
|
|
|
+ caught.getLocalizedMessage());
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2014-11-03 18:21:54 +01:00
|
|
|
public void onSuccess(TRId result) {
|
2014-11-20 15:52:28 +01:00
|
|
|
openTRIdAfterServerUpdate = result;
|
2014-10-15 18:45:45 +02:00
|
|
|
doOpenTRIdAfterServerUpdate();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
2014-10-23 18:42:45 +02:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void doDataViewClose(DataViewActiveEvent event) {
|
2014-10-15 18:45:45 +02:00
|
|
|
Log.debug("doDataViewClose: " + event);
|
|
|
|
DataView oldDataView = event.getOldDataView();
|
|
|
|
if (oldDataView instanceof TabularResourceDataView) {
|
|
|
|
closeAllTabularResource();
|
2014-10-23 18:42:45 +02:00
|
|
|
/*
|
|
|
|
* TabularResourceDataView tabularResourceDataView =
|
|
|
|
* (TabularResourceDataView) oldDataView;
|
|
|
|
* Log.debug("TabularResourceDataView:" + tabularResourceDataView);
|
|
|
|
* TDGWTServiceAsync.INSTANCE.closeTabularResource(
|
|
|
|
* tabularResourceDataView.getTrId(), new AsyncCallback<Void>() {
|
|
|
|
*
|
|
|
|
* @Override public void onFailure(Throwable caught) {
|
|
|
|
*
|
|
|
|
* if (caught instanceof TDGWTSessionExpiredException) {
|
|
|
|
* eventBus.fireEvent(new SessionExpiredEvent(
|
|
|
|
* SessionExpiredType.EXPIREDONSERVER)); } else {
|
|
|
|
* Log.error("Error in set Active TR " +
|
|
|
|
* caught.getLocalizedMessage()); caught.printStackTrace();
|
|
|
|
* UtilsGXT3.alert( "Error", "Error in set Active TR: " +
|
|
|
|
* caught.getLocalizedMessage()); }
|
|
|
|
*
|
|
|
|
* }
|
|
|
|
*
|
|
|
|
* @Override public void onSuccess(Void result) {
|
|
|
|
* Log.debug("Close Taular Resource");
|
|
|
|
*
|
|
|
|
* } }
|
|
|
|
*
|
|
|
|
* );
|
|
|
|
*/
|
2014-10-15 18:45:45 +02:00
|
|
|
|
|
|
|
} else {
|
2014-10-23 18:42:45 +02:00
|
|
|
|
2014-10-15 18:45:45 +02:00
|
|
|
}
|
|
|
|
}
|
2014-10-23 18:42:45 +02:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void requestCloseCurrent() {
|
2014-10-23 18:42:45 +02:00
|
|
|
DataViewRequestEvent dataViewRequestEvent = new DataViewRequestEvent();
|
2014-10-15 18:45:45 +02:00
|
|
|
dataViewRequestEvent.setDataViewRequestType(DataViewRequestType.CLOSE);
|
|
|
|
dataViewRequestEvent.setDataView(new TabularResourceDataView(trId));
|
|
|
|
eventBus.fireEvent(dataViewRequestEvent);
|
|
|
|
}
|
|
|
|
|
2014-10-23 18:42:45 +02:00
|
|
|
// TODO
|
2015-01-16 18:19:38 +01:00
|
|
|
private void deleteTabularResource() {
|
2013-12-17 17:22:23 +01:00
|
|
|
|
2014-02-07 09:33:33 +01:00
|
|
|
final ConfirmMessageBox mb = new ConfirmMessageBox("Confirm",
|
2015-01-26 10:57:40 +01:00
|
|
|
"Are you sure you want to delete the tabular resource?");
|
2015-01-22 16:22:48 +01:00
|
|
|
|
2014-11-27 18:30:11 +01:00
|
|
|
|
|
|
|
mb.addDialogHideHandler(new DialogHideHandler() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onDialogHide(DialogHideEvent event) {
|
|
|
|
switch (event.getHideButton()) {
|
|
|
|
case NO:
|
|
|
|
mb.hide();
|
|
|
|
break;
|
|
|
|
case YES:
|
2014-02-05 19:58:52 +01:00
|
|
|
Log.debug("Remove TR:" + trId);
|
|
|
|
TDGWTServiceAsync.INSTANCE.removeTabularResource(trId,
|
|
|
|
new AsyncCallback<Void>() {
|
|
|
|
|
|
|
|
public void onFailure(Throwable caught) {
|
2014-04-17 12:28:04 +02:00
|
|
|
UtilsGXT3.alert("Error on Delete",
|
2014-04-03 15:32:50 +02:00
|
|
|
caught.getLocalizedMessage());
|
2014-02-05 19:58:52 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public void onSuccess(Void result) {
|
2014-10-15 18:45:45 +02:00
|
|
|
requestCloseCurrent();
|
2014-02-05 19:58:52 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
mb.hide();
|
2014-11-27 18:30:11 +01:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
|
2014-02-05 19:58:52 +01:00
|
|
|
}
|
2014-11-27 18:30:11 +01:00
|
|
|
|
2014-02-05 19:58:52 +01:00
|
|
|
}
|
|
|
|
});
|
2014-11-27 18:30:11 +01:00
|
|
|
|
2015-01-22 16:22:48 +01:00
|
|
|
|
2014-02-05 19:58:52 +01:00
|
|
|
mb.setWidth(300);
|
|
|
|
mb.show();
|
2013-12-03 11:05:53 +01:00
|
|
|
|
2013-10-25 17:05:30 +02:00
|
|
|
}
|
2013-12-03 11:05:53 +01:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openWizard() {
|
2013-12-02 20:04:19 +01:00
|
|
|
eventBus.fireEvent(new UIStateEvent(UIStateType.WIZARD_OPEN));
|
|
|
|
}
|
2013-12-03 11:05:53 +01:00
|
|
|
|
|
|
|
public void doRibbonCommand(RibbonEvent event) {
|
|
|
|
RibbonType type = event.getRibbonType();
|
2013-12-02 20:04:19 +01:00
|
|
|
Log.trace("doRibbonEvent ribbonType: " + type);
|
2013-09-16 11:43:07 +02:00
|
|
|
try {
|
2014-02-05 10:25:26 +01:00
|
|
|
switch (type) {
|
2013-12-02 20:04:19 +01:00
|
|
|
case OPEN:
|
2014-09-11 18:39:50 +02:00
|
|
|
openTabularResource(false);
|
2013-09-16 11:43:07 +02:00
|
|
|
break;
|
2014-03-07 15:45:39 +01:00
|
|
|
case CLONE:
|
|
|
|
cloneTabularResource();
|
2014-04-17 12:28:04 +02:00
|
|
|
break;
|
2013-12-02 20:04:19 +01:00
|
|
|
case CLOSE:
|
2014-10-15 18:45:45 +02:00
|
|
|
closeAllTabularResource();
|
2013-09-16 11:43:07 +02:00
|
|
|
break;
|
2013-12-02 20:04:19 +01:00
|
|
|
case DELETE:
|
|
|
|
deleteTabularResource();
|
|
|
|
break;
|
|
|
|
case PROPERTIES:
|
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case IMPORT_SDMX:
|
2013-12-02 20:04:19 +01:00
|
|
|
openSDMXImportWizard();
|
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case IMPORT_CSV:
|
2013-09-16 11:43:07 +02:00
|
|
|
openCSVImportWizard();
|
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case IMPORT_JSON:
|
2013-09-16 11:43:07 +02:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case EXPORT_SDMX:
|
2013-09-25 17:44:07 +02:00
|
|
|
openSDMXExportWizard();
|
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case EXPORT_CSV:
|
2013-11-18 16:08:28 +01:00
|
|
|
openCSVExportWizard();
|
2013-09-25 17:44:07 +02:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case EXPORT_JSON:
|
2014-10-02 16:22:19 +02:00
|
|
|
openJSONExportWizard();
|
2013-09-25 17:44:07 +02:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case TEMPLATE_OPEN:
|
2014-02-10 19:20:43 +01:00
|
|
|
openTemplateOpen();
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case TEMPLATE_NEW:
|
2014-02-10 19:20:43 +01:00
|
|
|
openTemplateNew();
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case TEMPLATE_DELETE:
|
2014-03-25 11:16:58 +01:00
|
|
|
openTemplateDelete();
|
2014-04-17 12:28:04 +02:00
|
|
|
break;
|
2014-02-04 17:51:02 +01:00
|
|
|
case SHARE:
|
2014-03-10 15:21:30 +01:00
|
|
|
openShareWindow();
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2014-01-29 19:51:28 +01:00
|
|
|
case TIMELINE:
|
2013-12-16 19:36:41 +01:00
|
|
|
openTasksManagerWizard();
|
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case BACKGROUND_TASKS:
|
2014-09-11 18:39:50 +02:00
|
|
|
openBackgroundMonitor();
|
|
|
|
break;
|
2014-02-04 17:51:02 +01:00
|
|
|
case HISTORY:
|
|
|
|
break;
|
2014-04-17 12:49:08 +02:00
|
|
|
case UNDO:
|
2014-04-16 19:10:47 +02:00
|
|
|
callDiscard();
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case DISCARD_ALL:
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
|
|
|
case HELP:
|
|
|
|
break;
|
2014-08-05 18:33:49 +02:00
|
|
|
case LOGS:
|
|
|
|
openLogsWindow();
|
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case RULE_NEW:
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case RULE_MANAGE:
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case DUPLICATE_DETECTION:
|
2014-03-07 18:15:23 +01:00
|
|
|
openDuplicatesRows();
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case TEMPLATE_APPLY:
|
2014-03-21 14:23:47 +01:00
|
|
|
openTemplateApply();
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case TABLE_TYPE:
|
2014-02-25 19:32:59 +01:00
|
|
|
openTableType();
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case COLUMN_LABEL:
|
2014-02-11 17:09:49 +01:00
|
|
|
openColumnLabel();
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case COLUMN_TYPE:
|
2015-01-09 18:15:29 +01:00
|
|
|
openChangeColumnType();
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case COLUMN_ADD:
|
2014-05-30 19:19:12 +02:00
|
|
|
openColumnAdd();
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case COLUMN_DELETE:
|
2014-02-11 10:57:21 +01:00
|
|
|
openColumnDelete();
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case COLUMN_SPLIT:
|
2014-06-05 17:51:06 +02:00
|
|
|
openColumnSplit();
|
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case COLUMN_MERGE:
|
2014-06-05 17:51:06 +02:00
|
|
|
openColumnMerge();
|
|
|
|
break;
|
2014-02-04 17:51:02 +01:00
|
|
|
case DENORMALIZE:
|
2014-07-03 18:15:45 +02:00
|
|
|
openDenormalize();
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
|
|
|
case NORMALIZE:
|
2014-07-03 12:07:09 +02:00
|
|
|
openNormalize();
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case EXTRACT_CODELIST:
|
2014-05-27 18:21:39 +02:00
|
|
|
openExtractCodelistWizard();
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case CODELIST_MAPPING:
|
2014-06-03 17:35:01 +02:00
|
|
|
openCodelistMappingWizard();
|
2014-10-02 19:07:33 +02:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case GENERATE_SUMMARY:
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case TABLE_FILTER:
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case TABLE_UNION:
|
2014-07-18 20:03:12 +02:00
|
|
|
openTableUnionWizard();
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case TABLE_GROUPBY:
|
2014-06-24 11:57:45 +02:00
|
|
|
openGroupBy();
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case TABLE_TIME_AGGREGATE:
|
2014-10-28 18:08:15 +01:00
|
|
|
openTimeAggregate();
|
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case TABLE_AGGREAGETE:
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case TABLE_REPLACE_BY_EXTERNAL_COL:
|
2015-01-09 18:15:29 +01:00
|
|
|
openReplaceByExternalColWizard();
|
2014-11-20 15:52:28 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case ROW_ADD:
|
2014-05-16 12:04:48 +02:00
|
|
|
doRowAdd();
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case ROW_DELETE:
|
2014-03-11 20:12:45 +01:00
|
|
|
doRowsDelete();
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case DUPLICATE_DELETE:
|
2014-03-07 17:29:57 +01:00
|
|
|
openDuplicatesRows();
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case GEOSPATIAL_CSQUARE:
|
|
|
|
openGeospatialCSquare();
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case GEOSPATIAL_OCEAN_AREA:
|
|
|
|
openGeospatialOceanArea();
|
|
|
|
break;
|
|
|
|
case ANNOTATION_ADD:
|
|
|
|
break;
|
|
|
|
case COLUMN_FILTER:
|
2014-02-19 13:06:34 +01:00
|
|
|
openMultiColumnFilter();
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case COLUMN_BATCH_REPLACE:
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case ANALYSE_TABLE_FILTER:
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case ANALYSE_TABLE_UNION:
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case ANALYSE_TABLE_GROUPBY:
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case ANALYSE_TABLE_AGGREAGETE:
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case ANALYSE_ROW_ADD:
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case ANALYSE_ROW_DELETE:
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case ANALYSE_DUPLICATE_DELETE:
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case ANALYSE_ANNOTATION_ADD:
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case ANALYSE_COLUMN_FILTER:
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case ANALYSE_COLUMN_EDIT:
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case CHART_CREATE:
|
2014-11-10 18:59:21 +01:00
|
|
|
openCreateChart();
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case R_STUDIO:
|
2015-01-22 12:23:09 +01:00
|
|
|
openRStudio();
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
|
|
|
case STATISTICAL:
|
2014-10-22 18:48:08 +02:00
|
|
|
openStatistical();
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
|
|
|
case SPREAD:
|
|
|
|
break;
|
2015-02-09 17:36:13 +01:00
|
|
|
case CREATE_GIS_MAP:
|
2014-10-13 11:58:16 +02:00
|
|
|
openCreateMapWizard();
|
2014-02-04 17:51:02 +01:00
|
|
|
break;
|
2013-09-25 17:44:07 +02:00
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
2014-06-24 12:43:31 +02:00
|
|
|
} catch (Throwable e) {
|
|
|
|
Log.error("doRibbonCommand Error : " + e.getLocalizedMessage());
|
|
|
|
e.printStackTrace();
|
2013-09-25 17:44:07 +02:00
|
|
|
}
|
|
|
|
}
|
2013-12-03 11:05:53 +01:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void doTasksMonitorCommand(TasksMonitorEvent event) {
|
2014-02-05 10:25:26 +01:00
|
|
|
TaskType taskType = event.getTaskType();
|
|
|
|
Log.debug("Received TaskMonitorEvent: " + taskType);
|
2014-01-28 16:28:43 +01:00
|
|
|
switch (taskType) {
|
|
|
|
case OPENTABLE:
|
2014-02-05 10:25:26 +01:00
|
|
|
// openTable(event.getTrId());
|
2014-01-28 16:28:43 +01:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
|
|
|
// TODO
|
2015-01-16 18:19:38 +01:00
|
|
|
private void doWidgetRequestCommand(WidgetRequestEvent event) {
|
2014-10-02 19:07:33 +02:00
|
|
|
WidgetRequestType widgetRequestType = event.getWidgetRequestType();
|
|
|
|
switch (widgetRequestType) {
|
2014-05-20 18:54:56 +02:00
|
|
|
case CHANGECOLUMNTYPEPANEL:
|
|
|
|
break;
|
|
|
|
case CHANGETABLETYPEPANEL:
|
|
|
|
break;
|
|
|
|
case CURATIONBYREPLACEBATCHDIALOG:
|
2014-10-02 19:07:33 +02:00
|
|
|
openBatchReplace(event.getTrId(), event.getRequestProperties());
|
2014-05-20 18:54:56 +02:00
|
|
|
break;
|
|
|
|
case DELETECOLUMNPANEL:
|
|
|
|
break;
|
|
|
|
case DUPLICATESROWSPANEL:
|
|
|
|
break;
|
|
|
|
case LABELCOLUNPANEL:
|
|
|
|
break;
|
|
|
|
case VALIDATIONSTASKSPANEL:
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2014-05-20 18:54:56 +02:00
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2014-09-11 18:39:50 +02:00
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
|
|
|
// TODO
|
2014-09-11 18:39:50 +02:00
|
|
|
public void doBackgroundRequestCommand(BackgroundRequestEvent event) {
|
|
|
|
BackgroundRequestType type = event.getBackgroundRequestType();
|
|
|
|
Log.trace("doBackgroundRequestEvent BackgroundRequestType: " + type);
|
|
|
|
try {
|
|
|
|
switch (type) {
|
|
|
|
case BACKGROUND:
|
|
|
|
putInBackgroundUIState();
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
} catch (Throwable e) {
|
2014-10-02 19:07:33 +02:00
|
|
|
Log.error("doBackgroundRequestCommand Error : "
|
|
|
|
+ e.getLocalizedMessage());
|
2014-09-11 18:39:50 +02:00
|
|
|
e.printStackTrace();
|
|
|
|
}
|
2014-05-20 18:54:56 +02:00
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openLogsWindow() {
|
2014-08-05 18:33:49 +02:00
|
|
|
Log.debug("Request Open Logs Window");
|
2014-10-02 19:07:33 +02:00
|
|
|
TDMLogs tdmLogs = new TDMLogs(eventBus);
|
2014-08-05 18:33:49 +02:00
|
|
|
tdmLogs.show();
|
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openBatchReplace(TRId trId,
|
2014-10-02 19:07:33 +02:00
|
|
|
RequestProperties requestProperties) {
|
|
|
|
Log.debug("Request Open Batch Replace Dialog: " + trId + " "
|
|
|
|
+ requestProperties);
|
2014-05-20 18:54:56 +02:00
|
|
|
if (trId != null) {
|
|
|
|
ReplaceBatchDialog dialog = new ReplaceBatchDialog(trId,
|
|
|
|
requestProperties, eventBus);
|
|
|
|
dialog.show();
|
|
|
|
} else {
|
|
|
|
Log.error("TRId is null");
|
|
|
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
|
|
|
}
|
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openSDMXImportWizard() {
|
2013-05-14 15:41:50 +02:00
|
|
|
GWT.runAsync(new RunAsyncCallback() {
|
2013-12-17 17:22:23 +01:00
|
|
|
|
2013-05-14 15:41:50 +02:00
|
|
|
public void onSuccess() {
|
2013-10-25 17:05:30 +02:00
|
|
|
openWizard();
|
2013-09-30 19:30:47 +02:00
|
|
|
SDMXImportWizardTD importWizard = new SDMXImportWizardTD(
|
2014-05-20 14:36:38 +02:00
|
|
|
"SDMX Import", eventBus);
|
2013-12-03 11:05:53 +01:00
|
|
|
importWizard.addListener(new WizardListener() {
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2014-09-11 18:39:50 +02:00
|
|
|
@Override
|
2013-12-03 11:05:53 +01:00
|
|
|
public void completed(TRId tabularResourceId) {
|
|
|
|
openTable(tabularResourceId);
|
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2014-09-11 18:39:50 +02:00
|
|
|
@Override
|
|
|
|
public void putInBackground() {
|
|
|
|
Log.debug("PutInBakground");
|
2015-01-22 16:22:48 +01:00
|
|
|
resumeUIState();
|
2014-09-11 18:39:50 +02:00
|
|
|
}
|
2013-05-14 15:41:50 +02:00
|
|
|
|
2014-09-11 18:39:50 +02:00
|
|
|
@Override
|
2013-12-03 11:05:53 +01:00
|
|
|
public void aborted() {
|
|
|
|
resumeUIState();
|
|
|
|
}
|
2013-09-16 11:43:07 +02:00
|
|
|
|
2014-09-11 18:39:50 +02:00
|
|
|
@Override
|
2014-09-26 18:22:36 +02:00
|
|
|
public void failed(String title, String message,
|
2014-12-04 18:12:46 +01:00
|
|
|
String details, Throwable throwable) {
|
2015-01-09 18:15:29 +01:00
|
|
|
UtilsGXT3.alert(title, message + " " + details);
|
2013-12-03 11:05:53 +01:00
|
|
|
resumeUIState();
|
|
|
|
}
|
2013-09-30 19:30:47 +02:00
|
|
|
|
2013-12-03 11:05:53 +01:00
|
|
|
});
|
2013-09-16 11:43:07 +02:00
|
|
|
|
2013-05-14 15:41:50 +02:00
|
|
|
importWizard.show();
|
|
|
|
}
|
2013-09-16 11:43:07 +02:00
|
|
|
|
2013-05-14 15:41:50 +02:00
|
|
|
public void onFailure(Throwable reason) {
|
2013-05-22 17:48:27 +02:00
|
|
|
asyncCodeLoadingFailed(reason);
|
2013-05-14 15:41:50 +02:00
|
|
|
}
|
|
|
|
});
|
2013-09-30 19:30:47 +02:00
|
|
|
|
2013-05-14 14:24:27 +02:00
|
|
|
}
|
2013-09-16 11:43:07 +02:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openCSVExportWizard() {
|
2013-11-18 16:08:28 +01:00
|
|
|
GWT.runAsync(new RunAsyncCallback() {
|
|
|
|
|
|
|
|
public void onSuccess() {
|
|
|
|
openWizard();
|
|
|
|
CSVExportWizardTD exportWizard = new CSVExportWizardTD(
|
2014-05-20 14:36:38 +02:00
|
|
|
"CSV Export", eventBus);
|
2013-11-18 16:08:28 +01:00
|
|
|
|
2013-12-03 11:05:53 +01:00
|
|
|
exportWizard.addListener(new WizardListener() {
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2014-09-11 18:39:50 +02:00
|
|
|
@Override
|
2013-12-03 11:05:53 +01:00
|
|
|
public void completed(TRId id) {
|
|
|
|
resumeUIState();
|
2013-11-18 16:08:28 +01:00
|
|
|
|
2013-12-03 11:05:53 +01:00
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2014-09-11 18:39:50 +02:00
|
|
|
@Override
|
|
|
|
public void putInBackground() {
|
|
|
|
Log.debug("PutInBakground");
|
2015-01-22 16:22:48 +01:00
|
|
|
resumeUIState();
|
2014-09-11 18:39:50 +02:00
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2014-09-11 18:39:50 +02:00
|
|
|
@Override
|
2013-12-03 11:05:53 +01:00
|
|
|
public void aborted() {
|
|
|
|
resumeUIState();
|
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2014-09-11 18:39:50 +02:00
|
|
|
@Override
|
2014-09-26 18:22:36 +02:00
|
|
|
public void failed(String title, String message,
|
2014-12-04 18:12:46 +01:00
|
|
|
String details, Throwable throwable) {
|
2015-01-09 18:15:29 +01:00
|
|
|
UtilsGXT3.alert(title, message + " " + details);
|
2014-09-11 18:39:50 +02:00
|
|
|
resumeUIState();
|
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2013-12-03 11:05:53 +01:00
|
|
|
});
|
2013-11-18 16:08:28 +01:00
|
|
|
|
|
|
|
exportWizard.show();
|
|
|
|
}
|
|
|
|
|
|
|
|
public void onFailure(Throwable reason) {
|
|
|
|
asyncCodeLoadingFailed(reason);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openJSONExportWizard() {
|
2014-10-02 16:22:19 +02:00
|
|
|
GWT.runAsync(new RunAsyncCallback() {
|
|
|
|
|
|
|
|
public void onSuccess() {
|
|
|
|
openWizard();
|
|
|
|
JSONExportWidgetTD exportWizard = new JSONExportWidgetTD(
|
|
|
|
"JSON Export", eventBus);
|
|
|
|
|
|
|
|
exportWizard.addListener(new WizardListener() {
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2014-10-02 16:22:19 +02:00
|
|
|
@Override
|
|
|
|
public void completed(TRId id) {
|
|
|
|
resumeUIState();
|
|
|
|
|
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2014-10-02 16:22:19 +02:00
|
|
|
@Override
|
|
|
|
public void putInBackground() {
|
|
|
|
Log.debug("PutInBakground");
|
2015-01-22 16:22:48 +01:00
|
|
|
resumeUIState();
|
2014-10-02 16:22:19 +02:00
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2014-10-02 16:22:19 +02:00
|
|
|
@Override
|
|
|
|
public void aborted() {
|
|
|
|
resumeUIState();
|
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2014-10-02 16:22:19 +02:00
|
|
|
@Override
|
|
|
|
public void failed(String title, String message,
|
2014-12-04 18:12:46 +01:00
|
|
|
String details, Throwable throwable) {
|
2015-01-09 18:15:29 +01:00
|
|
|
UtilsGXT3.alert(title, message + " " + details);
|
2014-10-02 16:22:19 +02:00
|
|
|
resumeUIState();
|
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2014-10-02 16:22:19 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
exportWizard.show();
|
|
|
|
}
|
|
|
|
|
|
|
|
public void onFailure(Throwable reason) {
|
|
|
|
asyncCodeLoadingFailed(reason);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
2014-05-27 18:21:39 +02:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openSDMXExportWizard() {
|
2013-12-04 14:32:36 +01:00
|
|
|
GWT.runAsync(new RunAsyncCallback() {
|
|
|
|
|
|
|
|
public void onSuccess() {
|
|
|
|
openWizard();
|
|
|
|
SDMXExportWizardTD exportWizard = new SDMXExportWizardTD(
|
2014-05-20 14:36:38 +02:00
|
|
|
"SDMX Export", eventBus);
|
2013-12-04 14:32:36 +01:00
|
|
|
|
|
|
|
exportWizard.addListener(new WizardListener() {
|
2014-09-26 18:22:36 +02:00
|
|
|
public void failed(String title, String message,
|
2014-12-04 18:12:46 +01:00
|
|
|
String details, Throwable throwable) {
|
2015-01-09 18:15:29 +01:00
|
|
|
UtilsGXT3.alert(title, message + " " + details);
|
2013-12-04 14:32:36 +01:00
|
|
|
resumeUIState();
|
|
|
|
}
|
|
|
|
|
|
|
|
public void completed(TRId id) {
|
|
|
|
resumeUIState();
|
|
|
|
|
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2014-09-11 18:39:50 +02:00
|
|
|
@Override
|
|
|
|
public void putInBackground() {
|
|
|
|
Log.debug("PutInBakground");
|
2015-01-22 16:22:48 +01:00
|
|
|
resumeUIState();
|
2014-09-11 18:39:50 +02:00
|
|
|
}
|
2013-12-04 14:32:36 +01:00
|
|
|
|
|
|
|
public void aborted() {
|
|
|
|
resumeUIState();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
exportWizard.show();
|
|
|
|
}
|
|
|
|
|
|
|
|
public void onFailure(Throwable reason) {
|
|
|
|
asyncCodeLoadingFailed(reason);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2013-09-25 17:44:07 +02:00
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openExtractCodelistWizard() {
|
2014-05-27 18:21:39 +02:00
|
|
|
GWT.runAsync(new RunAsyncCallback() {
|
|
|
|
|
|
|
|
public void onSuccess() {
|
|
|
|
openWizard();
|
|
|
|
ExtractCodelistWizardTD extractCodelistWizard = new ExtractCodelistWizardTD(
|
2014-10-02 19:07:33 +02:00
|
|
|
trId, "Extract Codelist", eventBus);
|
2014-05-27 18:21:39 +02:00
|
|
|
|
|
|
|
extractCodelistWizard.addListener(new WizardListener() {
|
2014-09-26 18:22:36 +02:00
|
|
|
public void failed(String title, String message,
|
2014-12-04 18:12:46 +01:00
|
|
|
String details, Throwable throwable) {
|
2015-01-09 18:15:29 +01:00
|
|
|
UtilsGXT3.alert(title, message + " " + details);
|
2014-05-27 18:21:39 +02:00
|
|
|
resumeUIState();
|
|
|
|
}
|
|
|
|
|
|
|
|
public void completed(TRId id) {
|
|
|
|
openTable(id);
|
2013-09-30 19:30:47 +02:00
|
|
|
|
2014-05-27 18:21:39 +02:00
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2014-09-11 18:39:50 +02:00
|
|
|
@Override
|
|
|
|
public void putInBackground() {
|
|
|
|
Log.debug("PutInBakground");
|
2015-01-22 16:22:48 +01:00
|
|
|
resumeUIState();
|
2014-09-11 18:39:50 +02:00
|
|
|
}
|
2014-05-27 18:21:39 +02:00
|
|
|
|
|
|
|
public void aborted() {
|
|
|
|
resumeUIState();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
extractCodelistWizard.show();
|
|
|
|
}
|
|
|
|
|
|
|
|
public void onFailure(Throwable reason) {
|
|
|
|
asyncCodeLoadingFailed(reason);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openCodelistMappingWizard() {
|
2014-06-03 17:35:01 +02:00
|
|
|
GWT.runAsync(new RunAsyncCallback() {
|
|
|
|
|
|
|
|
public void onSuccess() {
|
|
|
|
openWizard();
|
|
|
|
CodelistMappingImportWizardTD codelistMappingWizard = new CodelistMappingImportWizardTD(
|
2014-10-02 19:07:33 +02:00
|
|
|
trId, "Codelist Mapping Import", eventBus);
|
2014-06-03 17:35:01 +02:00
|
|
|
|
|
|
|
codelistMappingWizard.addListener(new WizardListener() {
|
2014-09-26 18:22:36 +02:00
|
|
|
public void failed(String title, String message,
|
2014-12-04 18:12:46 +01:00
|
|
|
String details, Throwable throwable) {
|
2015-01-09 18:15:29 +01:00
|
|
|
UtilsGXT3.alert(title, message + " " + details);
|
2014-06-03 17:35:01 +02:00
|
|
|
resumeUIState();
|
|
|
|
}
|
|
|
|
|
|
|
|
public void completed(TRId id) {
|
|
|
|
openTable(id);
|
|
|
|
|
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2014-09-11 18:39:50 +02:00
|
|
|
@Override
|
|
|
|
public void putInBackground() {
|
|
|
|
Log.debug("PutInBakground");
|
2015-01-22 16:22:48 +01:00
|
|
|
resumeUIState();
|
2014-09-11 18:39:50 +02:00
|
|
|
}
|
2014-06-03 17:35:01 +02:00
|
|
|
|
|
|
|
public void aborted() {
|
|
|
|
resumeUIState();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
codelistMappingWizard.show();
|
|
|
|
}
|
|
|
|
|
|
|
|
public void onFailure(Throwable reason) {
|
|
|
|
asyncCodeLoadingFailed(reason);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openTableUnionWizard() {
|
2014-07-18 20:03:12 +02:00
|
|
|
GWT.runAsync(new RunAsyncCallback() {
|
|
|
|
|
|
|
|
public void onSuccess() {
|
|
|
|
openWizard();
|
2014-10-02 19:07:33 +02:00
|
|
|
UnionWizardTD unionWizard = new UnionWizardTD(trId, "Union",
|
|
|
|
eventBus);
|
2014-07-18 20:03:12 +02:00
|
|
|
|
|
|
|
unionWizard.addListener(new WizardListener() {
|
2014-09-26 18:22:36 +02:00
|
|
|
public void failed(String title, String message,
|
2014-12-04 18:12:46 +01:00
|
|
|
String details, Throwable throwable) {
|
2015-01-09 18:15:29 +01:00
|
|
|
UtilsGXT3.alert(title, message + " " + details);
|
2014-07-18 20:03:12 +02:00
|
|
|
resumeUIState();
|
|
|
|
}
|
|
|
|
|
|
|
|
public void completed(TRId id) {
|
|
|
|
openTable(id);
|
|
|
|
|
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2014-09-11 18:39:50 +02:00
|
|
|
@Override
|
|
|
|
public void putInBackground() {
|
|
|
|
Log.debug("PutInBakground");
|
2015-01-22 16:22:48 +01:00
|
|
|
resumeUIState();
|
2014-09-11 18:39:50 +02:00
|
|
|
}
|
2014-07-18 20:03:12 +02:00
|
|
|
|
|
|
|
public void aborted() {
|
|
|
|
resumeUIState();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
unionWizard.show();
|
|
|
|
}
|
|
|
|
|
|
|
|
public void onFailure(Throwable reason) {
|
|
|
|
asyncCodeLoadingFailed(reason);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
2014-11-20 15:52:28 +01:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openReplaceByExternalColWizard() {
|
2015-01-09 18:15:29 +01:00
|
|
|
openReplaceByExternalColWizard(null, null);
|
|
|
|
}
|
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openReplaceByExternalColWizard(final String columnLocalId,
|
2015-01-09 18:15:29 +01:00
|
|
|
final String columnname) {
|
2014-11-07 19:02:46 +01:00
|
|
|
GWT.runAsync(new RunAsyncCallback() {
|
|
|
|
|
|
|
|
public void onSuccess() {
|
|
|
|
openWizard();
|
2014-11-27 18:30:11 +01:00
|
|
|
|
2014-11-20 15:52:28 +01:00
|
|
|
ReplaceByExternalTD replaceByExternalColWizard;
|
2015-01-09 18:15:29 +01:00
|
|
|
if (columnname == null || columnname.isEmpty()) {
|
2014-11-27 18:30:11 +01:00
|
|
|
|
|
|
|
replaceByExternalColWizard = new ReplaceByExternalTD(trId,
|
|
|
|
"Replace By External Columns", eventBus);
|
2014-11-20 15:52:28 +01:00
|
|
|
} else {
|
2014-11-27 18:30:11 +01:00
|
|
|
replaceByExternalColWizard = new ReplaceByExternalTD(trId,
|
2015-01-09 18:15:29 +01:00
|
|
|
columnname, "Replace By External Columns", eventBus);
|
2014-11-20 15:52:28 +01:00
|
|
|
}
|
2014-11-27 18:30:11 +01:00
|
|
|
|
2014-11-07 19:02:46 +01:00
|
|
|
replaceByExternalColWizard.addListener(new WizardListener() {
|
|
|
|
public void failed(String title, String message,
|
2014-12-04 18:12:46 +01:00
|
|
|
String details, Throwable throwable) {
|
2015-01-09 18:15:29 +01:00
|
|
|
UtilsGXT3.alert(title, message + " " + details);
|
2014-11-07 19:02:46 +01:00
|
|
|
resumeUIState();
|
|
|
|
}
|
|
|
|
|
|
|
|
public void completed(TRId id) {
|
|
|
|
openTable(id);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void putInBackground() {
|
|
|
|
Log.debug("PutInBakground");
|
2015-01-22 16:22:48 +01:00
|
|
|
resumeUIState();
|
2014-11-07 19:02:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public void aborted() {
|
|
|
|
resumeUIState();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
replaceByExternalColWizard.show();
|
|
|
|
}
|
|
|
|
|
|
|
|
public void onFailure(Throwable reason) {
|
|
|
|
asyncCodeLoadingFailed(reason);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openCreateChart() {
|
2014-11-10 18:59:21 +01:00
|
|
|
GWT.runAsync(new RunAsyncCallback() {
|
|
|
|
|
|
|
|
public void onSuccess() {
|
|
|
|
openWizard();
|
2014-11-10 19:05:30 +01:00
|
|
|
ChartsWidgetTD chartWizard = new ChartsWidgetTD(trId, userInfo,
|
2014-11-10 18:59:21 +01:00
|
|
|
"Charts Creation", eventBus);
|
|
|
|
|
2014-11-10 19:05:30 +01:00
|
|
|
chartWizard.addListener(new WizardListener() {
|
2014-11-10 18:59:21 +01:00
|
|
|
public void failed(String title, String message,
|
2014-12-04 18:12:46 +01:00
|
|
|
String details, Throwable throwable) {
|
2015-01-09 18:15:29 +01:00
|
|
|
UtilsGXT3.alert(title, message + " " + details);
|
2014-11-10 18:59:21 +01:00
|
|
|
resumeUIState();
|
|
|
|
}
|
|
|
|
|
|
|
|
public void completed(TRId id) {
|
|
|
|
openTable(id);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void putInBackground() {
|
|
|
|
Log.debug("PutInBakground");
|
2015-01-22 16:22:48 +01:00
|
|
|
resumeUIState();
|
2014-11-10 18:59:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public void aborted() {
|
|
|
|
resumeUIState();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public void onFailure(Throwable reason) {
|
|
|
|
asyncCodeLoadingFailed(reason);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
2014-11-20 15:52:28 +01:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openCreateMapWizard() {
|
2014-10-13 11:58:16 +02:00
|
|
|
GWT.runAsync(new RunAsyncCallback() {
|
|
|
|
|
|
|
|
public void onSuccess() {
|
|
|
|
openWizard();
|
2014-10-15 18:45:45 +02:00
|
|
|
MapWidgetTD mapWizard = new MapWidgetTD(trId, userInfo,
|
|
|
|
"Map Creation", eventBus);
|
2014-10-13 11:58:16 +02:00
|
|
|
|
|
|
|
mapWizard.addListener(new WizardListener() {
|
|
|
|
public void failed(String title, String message,
|
2014-12-04 18:12:46 +01:00
|
|
|
String details, Throwable throwable) {
|
2015-01-09 18:15:29 +01:00
|
|
|
UtilsGXT3.alert(title, message + " " + details);
|
2014-10-13 11:58:16 +02:00
|
|
|
resumeUIState();
|
|
|
|
}
|
|
|
|
|
|
|
|
public void completed(TRId id) {
|
|
|
|
openTable(id);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void putInBackground() {
|
|
|
|
Log.debug("PutInBakground");
|
2015-01-22 16:22:48 +01:00
|
|
|
resumeUIState();
|
2014-10-13 11:58:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public void aborted() {
|
|
|
|
resumeUIState();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public void onFailure(Throwable reason) {
|
|
|
|
asyncCodeLoadingFailed(reason);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
2014-10-15 18:45:45 +02:00
|
|
|
|
2013-09-19 19:11:45 +02:00
|
|
|
/**
|
2014-10-02 19:07:33 +02:00
|
|
|
* @param switchState
|
2013-09-19 19:11:45 +02:00
|
|
|
*
|
|
|
|
*/
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openTabularResource(final boolean switchState) {
|
2013-09-19 19:11:45 +02:00
|
|
|
Log.info("Open Tabular Resources");
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2013-09-16 11:43:07 +02:00
|
|
|
GWT.runAsync(new RunAsyncCallback() {
|
|
|
|
|
|
|
|
public void onSuccess() {
|
2013-10-25 17:05:30 +02:00
|
|
|
openWizard();
|
2014-09-11 18:39:50 +02:00
|
|
|
String title;
|
2014-10-02 19:07:33 +02:00
|
|
|
if (switchState) {
|
|
|
|
title = "Switches Tabular Resource";
|
2014-09-11 18:39:50 +02:00
|
|
|
} else {
|
2014-10-02 19:07:33 +02:00
|
|
|
title = "Open Tabular Resource";
|
2014-09-11 18:39:50 +02:00
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
TDOpen tdOpen = new TDOpen(trId, title, eventBus);
|
2013-12-06 12:24:21 +01:00
|
|
|
tdOpen.addListener(new WizardListener() {
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2014-09-11 18:39:50 +02:00
|
|
|
@Override
|
|
|
|
public void putInBackground() {
|
|
|
|
Log.debug("PutInBakground");
|
2015-01-22 16:22:48 +01:00
|
|
|
resumeUIState();
|
2014-09-11 18:39:50 +02:00
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2013-09-19 19:11:45 +02:00
|
|
|
public void aborted() {
|
2013-10-25 17:05:30 +02:00
|
|
|
resumeUIState();
|
2013-05-22 17:48:27 +02:00
|
|
|
}
|
2013-09-16 11:43:07 +02:00
|
|
|
|
2014-09-26 18:22:36 +02:00
|
|
|
public void failed(String title, String message,
|
2014-12-04 18:12:46 +01:00
|
|
|
String details, Throwable throwable) {
|
2015-01-09 18:15:29 +01:00
|
|
|
UtilsGXT3.alert(title, message + " " + details);
|
2013-10-25 17:05:30 +02:00
|
|
|
resumeUIState();
|
2013-05-22 17:48:27 +02:00
|
|
|
}
|
2013-09-16 11:43:07 +02:00
|
|
|
|
2013-09-30 19:30:47 +02:00
|
|
|
public void completed(TRId tabularResourceId) {
|
2013-10-25 17:05:30 +02:00
|
|
|
openTable(tabularResourceId);
|
2013-12-03 11:05:53 +01:00
|
|
|
|
2013-05-22 17:48:27 +02:00
|
|
|
}
|
2013-09-25 17:44:07 +02:00
|
|
|
|
2013-05-22 17:48:27 +02:00
|
|
|
});
|
2013-09-19 19:11:45 +02:00
|
|
|
Log.info("TDOpen add Listener");
|
2013-09-16 11:43:07 +02:00
|
|
|
tdOpen.show();
|
|
|
|
}
|
2013-05-22 17:48:27 +02:00
|
|
|
|
|
|
|
public void onFailure(Throwable reason) {
|
|
|
|
asyncCodeLoadingFailed(reason);
|
|
|
|
}
|
2013-09-16 11:43:07 +02:00
|
|
|
});
|
2013-09-30 19:30:47 +02:00
|
|
|
|
2013-09-16 11:43:07 +02:00
|
|
|
}
|
2013-09-30 19:30:47 +02:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openCSVImportWizard() {
|
2013-10-18 18:43:31 +02:00
|
|
|
GWT.runAsync(new RunAsyncCallback() {
|
|
|
|
|
|
|
|
public void onSuccess() {
|
2013-10-25 17:05:30 +02:00
|
|
|
openWizard();
|
2013-10-18 18:43:31 +02:00
|
|
|
CSVImportWizardTD importWizard = new CSVImportWizardTD(
|
2014-05-20 14:36:38 +02:00
|
|
|
"CSV Import", eventBus);
|
2013-10-18 18:43:31 +02:00
|
|
|
|
2013-12-03 11:05:53 +01:00
|
|
|
importWizard.addListener(new WizardListener() {
|
2013-10-18 18:43:31 +02:00
|
|
|
|
2014-09-26 18:22:36 +02:00
|
|
|
public void failed(String title, String message,
|
2014-12-04 18:12:46 +01:00
|
|
|
String details, Throwable throwable) {
|
2015-01-09 18:15:29 +01:00
|
|
|
UtilsGXT3.alert(title, message + " " + details);
|
2013-12-03 11:05:53 +01:00
|
|
|
resumeUIState();
|
|
|
|
}
|
2013-10-18 18:43:31 +02:00
|
|
|
|
2013-12-03 11:05:53 +01:00
|
|
|
public void completed(TRId id) {
|
|
|
|
openTable(id);
|
2013-10-18 18:43:31 +02:00
|
|
|
|
2013-12-03 11:05:53 +01:00
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2014-09-11 18:39:50 +02:00
|
|
|
@Override
|
|
|
|
public void putInBackground() {
|
|
|
|
Log.debug("PutInBakground");
|
2015-01-22 16:22:48 +01:00
|
|
|
resumeUIState();
|
2014-09-11 18:39:50 +02:00
|
|
|
}
|
2013-10-18 18:43:31 +02:00
|
|
|
|
2013-12-03 11:05:53 +01:00
|
|
|
public void aborted() {
|
|
|
|
resumeUIState();
|
|
|
|
}
|
|
|
|
});
|
2013-10-18 18:43:31 +02:00
|
|
|
|
|
|
|
importWizard.show();
|
|
|
|
}
|
|
|
|
|
|
|
|
public void onFailure(Throwable reason) {
|
|
|
|
asyncCodeLoadingFailed(reason);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private com.extjs.gxt.ui.client.widget.Window tdTaskMainWindow;
|
2013-12-18 11:14:26 +01:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openTasksManagerWizard() {
|
2014-10-23 18:42:45 +02:00
|
|
|
GWT.runAsync(new RunAsyncCallback() {
|
|
|
|
|
|
|
|
public void onSuccess() {
|
|
|
|
initTaskManager();
|
|
|
|
tdTaskMainWindow.setPosition(
|
|
|
|
(Window.getClientWidth() / 2) - 200,
|
|
|
|
(Window.getClientHeight() / 2) - 300);
|
|
|
|
tdTaskController.updateTasks(true);
|
|
|
|
tdTaskMainWindow.show();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public void onFailure(Throwable reason) {
|
|
|
|
asyncCodeLoadingFailed(reason);
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
2013-12-16 19:36:41 +01:00
|
|
|
}
|
2014-02-26 18:12:07 +01:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void initTaskManager() {
|
2014-02-26 18:12:07 +01:00
|
|
|
if (!taskManagerInit) {
|
|
|
|
taskManagerInit = true;
|
|
|
|
tdTaskController = TdTaskController.getInstance();
|
|
|
|
TdTaskController.bindCommonBus(eventBus);
|
|
|
|
tdTaskMainWindow = tdTaskController.getWindowTaskMonitor();
|
|
|
|
} else {
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openTemplateNew() {
|
2014-10-23 18:42:45 +02:00
|
|
|
GWT.runAsync(new RunAsyncCallback() {
|
|
|
|
public void onSuccess() {
|
|
|
|
TdTemplateController tdTemplateController = new TdTemplateController();
|
|
|
|
TdTemplateController.bindCommonBus(eventBus);
|
|
|
|
tdTemplateController.getWindowTemplatePanel().show();
|
|
|
|
}
|
2014-02-26 18:12:07 +01:00
|
|
|
|
2014-10-23 18:42:45 +02:00
|
|
|
public void onFailure(Throwable reason) {
|
|
|
|
asyncCodeLoadingFailed(reason);
|
|
|
|
}
|
|
|
|
});
|
2014-02-10 19:20:43 +01:00
|
|
|
}
|
2014-04-17 12:28:04 +02:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openTemplateDelete() {
|
2014-10-23 18:42:45 +02:00
|
|
|
GWT.runAsync(new RunAsyncCallback() {
|
|
|
|
public void onSuccess() {
|
|
|
|
TemplateDeleteDialog tdDialog = new TemplateDeleteDialog(
|
|
|
|
eventBus);
|
|
|
|
tdDialog.show();
|
|
|
|
}
|
|
|
|
|
|
|
|
public void onFailure(Throwable reason) {
|
|
|
|
asyncCodeLoadingFailed(reason);
|
|
|
|
}
|
|
|
|
});
|
2014-04-17 12:28:04 +02:00
|
|
|
|
2014-03-25 11:16:58 +01:00
|
|
|
}
|
2014-02-26 18:12:07 +01:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openTemplateOpen() {
|
2014-10-23 18:42:45 +02:00
|
|
|
GWT.runAsync(new RunAsyncCallback() {
|
|
|
|
public void onSuccess() {
|
|
|
|
Log.debug("Template Open call");
|
|
|
|
TemplateOpenDialog tdDialog = new TemplateOpenDialog(eventBus);
|
|
|
|
tdDialog.show();
|
|
|
|
}
|
|
|
|
|
|
|
|
public void onFailure(Throwable reason) {
|
|
|
|
asyncCodeLoadingFailed(reason);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
2014-11-20 15:52:28 +01:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openTemplateApply() {
|
2014-10-23 18:42:45 +02:00
|
|
|
GWT.runAsync(new RunAsyncCallback() {
|
|
|
|
public void onSuccess() {
|
|
|
|
Log.debug("Template Apply call");
|
|
|
|
if (trId != null) {
|
|
|
|
TemplateApplyDialog taDialog = new TemplateApplyDialog(
|
|
|
|
trId, eventBus);
|
|
|
|
taDialog.show();
|
|
|
|
} else {
|
|
|
|
Log.error("TRId is null");
|
|
|
|
UtilsGXT3.alert("Error",
|
|
|
|
"No current tabular resource present");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public void onFailure(Throwable reason) {
|
|
|
|
asyncCodeLoadingFailed(reason);
|
|
|
|
}
|
|
|
|
});
|
2014-04-17 12:28:04 +02:00
|
|
|
|
2014-02-10 19:20:43 +01:00
|
|
|
}
|
2014-02-26 18:12:07 +01:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openShareWindow() {
|
2014-10-23 18:42:45 +02:00
|
|
|
GWT.runAsync(new RunAsyncCallback() {
|
|
|
|
public void onSuccess() {
|
|
|
|
Log.debug("Open Share Window");
|
|
|
|
@SuppressWarnings("unused")
|
|
|
|
TRShare trShare = new TRShare(trId, eventBus);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void onFailure(Throwable reason) {
|
|
|
|
asyncCodeLoadingFailed(reason);
|
|
|
|
}
|
|
|
|
});
|
2014-03-10 15:21:30 +01:00
|
|
|
}
|
2014-04-17 12:28:04 +02:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void callDiscard() {
|
2014-04-17 12:28:04 +02:00
|
|
|
HistoryDiscard historyDiscard = new HistoryDiscard(eventBus);
|
2014-04-16 19:10:47 +02:00
|
|
|
historyDiscard.discard();
|
|
|
|
}
|
2015-01-22 12:23:09 +01:00
|
|
|
|
|
|
|
private void openRStudio() {
|
|
|
|
Log.debug("Request Open RStudio");
|
|
|
|
if (trId != null) {
|
|
|
|
@SuppressWarnings("unused")
|
|
|
|
RStudio rStudio=new RStudio(trId, eventBus);
|
|
|
|
} else {
|
|
|
|
Log.error("TRId is null");
|
|
|
|
UtilsGXT3.alert("Error", "No current tabular resource present");
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-10-23 18:42:45 +02:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openStatistical() {
|
2014-10-23 18:42:45 +02:00
|
|
|
GWT.runAsync(new RunAsyncCallback() {
|
|
|
|
public void onSuccess() {
|
|
|
|
@SuppressWarnings("unused")
|
|
|
|
StatisticalWidget statisticalWidget = new StatisticalWidget(
|
|
|
|
trId, eventBus);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void onFailure(Throwable reason) {
|
|
|
|
asyncCodeLoadingFailed(reason);
|
|
|
|
}
|
|
|
|
});
|
2014-04-17 12:28:04 +02:00
|
|
|
|
2014-03-21 14:23:47 +01:00
|
|
|
}
|
2014-04-17 12:28:04 +02:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openMultiColumnFilter() {
|
2014-02-19 13:06:34 +01:00
|
|
|
Log.debug("Request Open Multi Column Filter Dialog");
|
|
|
|
if (trId != null) {
|
2014-02-26 18:12:07 +01:00
|
|
|
MultiColumnFilterDialog mcfDialog = new MultiColumnFilterDialog(
|
|
|
|
trId, eventBus);
|
2014-02-19 13:06:34 +01:00
|
|
|
mcfDialog.show();
|
2014-03-18 16:13:44 +01:00
|
|
|
} else {
|
|
|
|
Log.error("TRId is null");
|
2014-04-17 12:28:04 +02:00
|
|
|
UtilsGXT3.alert("Error", "No current tabular resource present");
|
2014-02-19 13:06:34 +01:00
|
|
|
}
|
|
|
|
}
|
2014-02-26 18:12:07 +01:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openColumnFilter(String columnLocalId, String columnName) {
|
2014-02-18 18:40:45 +01:00
|
|
|
Log.debug("Request Open Column Filter Dialog");
|
|
|
|
if (trId != null) {
|
2014-02-26 18:12:07 +01:00
|
|
|
ColumnFilterDialog cfDialog = new ColumnFilterDialog(trId,
|
|
|
|
columnName, eventBus);
|
2014-02-18 18:40:45 +01:00
|
|
|
cfDialog.show();
|
2014-03-18 16:13:44 +01:00
|
|
|
} else {
|
|
|
|
Log.error("TRId is null");
|
2014-04-17 12:28:04 +02:00
|
|
|
UtilsGXT3.alert("Error", "No current tabular resource present");
|
2014-02-18 18:40:45 +01:00
|
|
|
}
|
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openReplaceColumnByExpression(String columnLocalId,
|
2015-01-09 18:15:29 +01:00
|
|
|
String columnName) {
|
2014-09-12 18:55:09 +02:00
|
|
|
Log.debug("Request Open Replace Column By Expression Dialog");
|
|
|
|
if (trId != null) {
|
2014-10-02 19:07:33 +02:00
|
|
|
ReplaceColumnByExpressionDialog rceDialog = new ReplaceColumnByExpressionDialog(
|
|
|
|
trId, columnName, eventBus);
|
2014-09-12 18:55:09 +02:00
|
|
|
rceDialog.show();
|
|
|
|
} else {
|
|
|
|
Log.error("TRId is null");
|
|
|
|
UtilsGXT3.alert("Error", "No current tabular resource present");
|
|
|
|
}
|
|
|
|
}
|
2014-02-26 18:12:07 +01:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openChangeColumnType() {
|
2015-01-09 18:15:29 +01:00
|
|
|
openChangeColumnType(null, null);
|
2014-02-05 12:35:11 +01:00
|
|
|
}
|
2014-02-05 19:58:52 +01:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openChangeColumnType(String columnLocalId, String columnName) {
|
2015-01-09 18:15:29 +01:00
|
|
|
Log.debug("Request Change Column Type Tab");
|
2014-02-05 10:25:26 +01:00
|
|
|
if (trId != null) {
|
|
|
|
WidgetRequestEvent e = new WidgetRequestEvent(
|
|
|
|
WidgetRequestType.CHANGECOLUMNTYPEPANEL);
|
2014-02-04 18:53:38 +01:00
|
|
|
e.setTrId(trId);
|
2015-01-09 18:15:29 +01:00
|
|
|
e.setColumnLocalId(columnLocalId);
|
2014-02-05 12:35:11 +01:00
|
|
|
e.setColumnName(columnName);
|
2014-02-04 18:53:38 +01:00
|
|
|
eventBus.fireEvent(e);
|
2014-03-18 16:13:44 +01:00
|
|
|
} else {
|
|
|
|
Log.error("TRId is null");
|
2014-04-17 12:28:04 +02:00
|
|
|
UtilsGXT3.alert("Error", "No current tabular resource present");
|
2014-02-04 18:53:38 +01:00
|
|
|
}
|
|
|
|
}
|
2014-02-26 18:12:07 +01:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openNormalize() {
|
2014-07-03 12:07:09 +02:00
|
|
|
openNormalize(null);
|
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openNormalize(String columnName) {
|
2014-07-03 12:07:09 +02:00
|
|
|
Log.debug("Request Open Normalize Tab");
|
|
|
|
if (trId != null) {
|
|
|
|
WidgetRequestEvent e = new WidgetRequestEvent(
|
2014-07-03 18:15:45 +02:00
|
|
|
WidgetRequestType.NORMALIZEPANEL);
|
|
|
|
e.setTrId(trId);
|
|
|
|
e.setColumnName(columnName);
|
|
|
|
eventBus.fireEvent(e);
|
|
|
|
} else {
|
|
|
|
Log.error("TRId is null");
|
|
|
|
UtilsGXT3.alert("Error", "No current tabular resource present");
|
|
|
|
}
|
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openDenormalize() {
|
2014-07-03 18:15:45 +02:00
|
|
|
openDenormalize(null);
|
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openDenormalize(String columnName) {
|
2014-07-03 18:15:45 +02:00
|
|
|
Log.debug("Request Open Denormalize Tab");
|
|
|
|
if (trId != null) {
|
|
|
|
WidgetRequestEvent e = new WidgetRequestEvent(
|
|
|
|
WidgetRequestType.DENORMALIZEPANEL);
|
2014-07-03 12:07:09 +02:00
|
|
|
e.setTrId(trId);
|
|
|
|
e.setColumnName(columnName);
|
|
|
|
eventBus.fireEvent(e);
|
|
|
|
} else {
|
|
|
|
Log.error("TRId is null");
|
|
|
|
UtilsGXT3.alert("Error", "No current tabular resource present");
|
|
|
|
}
|
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void cloneTabularResource() {
|
2014-04-17 12:28:04 +02:00
|
|
|
CloneTabularResource cloneTR = new CloneTabularResource(trId, eventBus);
|
2014-03-07 15:45:39 +01:00
|
|
|
cloneTR.cloneTR();
|
|
|
|
}
|
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
@SuppressWarnings("unused")
|
|
|
|
private void openColumnBatchReplace() {
|
2015-01-09 18:15:29 +01:00
|
|
|
openColumnBatchReplace(null, null);
|
2014-03-18 16:13:44 +01:00
|
|
|
}
|
2014-04-17 12:28:04 +02:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openColumnBatchReplace(String columnLocalId,
|
2015-01-09 18:15:29 +01:00
|
|
|
String columnName) {
|
2014-03-18 16:13:44 +01:00
|
|
|
Log.debug("Request Open Batch Replace Dialog");
|
|
|
|
if (trId != null) {
|
2014-04-17 12:28:04 +02:00
|
|
|
ReplaceBatchDialog dialog = new ReplaceBatchDialog(trId,
|
|
|
|
columnName, eventBus);
|
2014-03-18 16:13:44 +01:00
|
|
|
dialog.show();
|
|
|
|
} else {
|
|
|
|
Log.error("TRId is null");
|
2014-04-17 12:28:04 +02:00
|
|
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
2014-03-18 16:13:44 +01:00
|
|
|
}
|
|
|
|
};
|
2014-02-11 10:57:21 +01:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openColumnAdd() {
|
2015-01-09 18:15:29 +01:00
|
|
|
openColumnAdd(null, null);
|
2014-05-30 19:19:12 +02:00
|
|
|
}
|
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openColumnAdd(String columnLocalId, String columnName) {
|
2014-05-30 19:19:12 +02:00
|
|
|
Log.debug("Request Add Column Tab");
|
|
|
|
if (trId != null) {
|
|
|
|
WidgetRequestEvent e = new WidgetRequestEvent(
|
|
|
|
WidgetRequestType.ADDCOLUMNPANEL);
|
|
|
|
e.setTrId(trId);
|
|
|
|
eventBus.fireEvent(e);
|
|
|
|
} else {
|
|
|
|
Log.error("TRId is null");
|
|
|
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
|
|
|
}
|
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openColumnDelete() {
|
2015-01-09 18:15:29 +01:00
|
|
|
openColumnDelete(null, null);
|
2014-03-18 16:13:44 +01:00
|
|
|
}
|
2014-04-17 12:28:04 +02:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openColumnDelete(String columnLocalId, String columnName) {
|
2014-02-11 10:57:21 +01:00
|
|
|
Log.debug("Request Delete Column Tab");
|
|
|
|
if (trId != null) {
|
|
|
|
WidgetRequestEvent e = new WidgetRequestEvent(
|
|
|
|
WidgetRequestType.DELETECOLUMNPANEL);
|
|
|
|
e.setTrId(trId);
|
2015-01-09 18:15:29 +01:00
|
|
|
e.setColumnLocalId(columnLocalId);
|
2014-02-11 10:57:21 +01:00
|
|
|
e.setColumnName(columnName);
|
|
|
|
eventBus.fireEvent(e);
|
2014-03-18 16:13:44 +01:00
|
|
|
} else {
|
|
|
|
Log.error("TRId is null");
|
2014-04-17 12:28:04 +02:00
|
|
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
2014-02-11 10:57:21 +01:00
|
|
|
}
|
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openColumnSplit() {
|
2015-01-09 18:15:29 +01:00
|
|
|
openColumnSplit(null, null);
|
2014-06-05 17:51:06 +02:00
|
|
|
}
|
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openColumnSplit(String columnLocalId, String columnName) {
|
2014-06-05 17:51:06 +02:00
|
|
|
Log.debug("Request Split Column Tab");
|
|
|
|
if (trId != null) {
|
|
|
|
WidgetRequestEvent e = new WidgetRequestEvent(
|
|
|
|
WidgetRequestType.SPLITCOLUMNPANEL);
|
|
|
|
e.setTrId(trId);
|
2015-01-09 18:15:29 +01:00
|
|
|
e.setColumnLocalId(columnLocalId);
|
2014-06-05 17:51:06 +02:00
|
|
|
e.setColumnName(columnName);
|
|
|
|
eventBus.fireEvent(e);
|
|
|
|
} else {
|
|
|
|
Log.error("TRId is null");
|
|
|
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
|
|
|
}
|
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openColumnMerge() {
|
2015-01-09 18:15:29 +01:00
|
|
|
openColumnMerge(null, null);
|
2014-06-05 17:51:06 +02:00
|
|
|
}
|
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openColumnMerge(String columnLocalId, String columnName) {
|
2014-06-05 17:51:06 +02:00
|
|
|
Log.debug("Request Merge Column Tab");
|
|
|
|
if (trId != null) {
|
|
|
|
WidgetRequestEvent e = new WidgetRequestEvent(
|
|
|
|
WidgetRequestType.MERGECOLUMNPANEL);
|
|
|
|
e.setTrId(trId);
|
2015-01-09 18:15:29 +01:00
|
|
|
e.setColumnLocalId(columnLocalId);
|
2014-06-05 17:51:06 +02:00
|
|
|
e.setColumnName(columnName);
|
|
|
|
eventBus.fireEvent(e);
|
|
|
|
} else {
|
|
|
|
Log.error("TRId is null");
|
|
|
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
2014-06-24 11:57:45 +02:00
|
|
|
}
|
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openGroupBy() {
|
2014-06-24 11:57:45 +02:00
|
|
|
openGroupBy(null);
|
|
|
|
}
|
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openGroupBy(String columnName) {
|
2014-06-24 11:57:45 +02:00
|
|
|
Log.debug("Request Group By Tab");
|
|
|
|
if (trId != null) {
|
|
|
|
WidgetRequestEvent e = new WidgetRequestEvent(
|
|
|
|
WidgetRequestType.GROUPBYPANEL);
|
|
|
|
e.setTrId(trId);
|
|
|
|
e.setColumnName(columnName);
|
|
|
|
eventBus.fireEvent(e);
|
|
|
|
} else {
|
|
|
|
Log.error("TRId is null");
|
|
|
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
2014-06-05 17:51:06 +02:00
|
|
|
}
|
|
|
|
}
|
2014-11-20 15:52:28 +01:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openTimeAggregate() {
|
2014-10-28 18:08:15 +01:00
|
|
|
openTimeAggregate(null);
|
|
|
|
}
|
2014-11-20 15:52:28 +01:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openTimeAggregate(String columnName) {
|
2014-10-28 18:08:15 +01:00
|
|
|
Log.debug("Request Time Aggregate Tab");
|
|
|
|
if (trId != null) {
|
|
|
|
WidgetRequestEvent e = new WidgetRequestEvent(
|
|
|
|
WidgetRequestType.TIMEAGGREGATIONPANEL);
|
|
|
|
e.setTrId(trId);
|
|
|
|
e.setColumnName(columnName);
|
|
|
|
eventBus.fireEvent(e);
|
|
|
|
} else {
|
|
|
|
Log.error("TRId is null");
|
|
|
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
|
|
|
}
|
|
|
|
}
|
2014-02-26 18:12:07 +01:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openColumnLabel() {
|
2015-01-09 18:15:29 +01:00
|
|
|
openColumnLabel(null, null);
|
2014-02-11 17:09:49 +01:00
|
|
|
}
|
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openColumnLabel(String columnLocalId, String columnName) {
|
2014-02-11 17:09:49 +01:00
|
|
|
Log.debug("Request Column Label Tab");
|
|
|
|
if (trId != null) {
|
|
|
|
WidgetRequestEvent e = new WidgetRequestEvent(
|
|
|
|
WidgetRequestType.LABELCOLUNPANEL);
|
|
|
|
e.setTrId(trId);
|
2015-01-09 18:15:29 +01:00
|
|
|
e.setColumnLocalId(columnLocalId);
|
2014-02-11 17:09:49 +01:00
|
|
|
e.setColumnName(columnName);
|
|
|
|
eventBus.fireEvent(e);
|
2014-03-18 16:13:44 +01:00
|
|
|
} else {
|
|
|
|
Log.error("TRId is null");
|
2014-04-17 12:28:04 +02:00
|
|
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
2014-02-11 17:09:49 +01:00
|
|
|
}
|
|
|
|
}
|
2014-02-05 10:25:26 +01:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openTableType() {
|
2014-02-25 19:32:59 +01:00
|
|
|
Log.debug("Request Change Table Type Tab");
|
|
|
|
if (trId != null) {
|
|
|
|
WidgetRequestEvent e = new WidgetRequestEvent(
|
|
|
|
WidgetRequestType.CHANGETABLETYPEPANEL);
|
|
|
|
e.setTrId(trId);
|
|
|
|
eventBus.fireEvent(e);
|
2014-03-18 16:13:44 +01:00
|
|
|
} else {
|
|
|
|
Log.error("TRId is null");
|
2014-04-17 12:28:04 +02:00
|
|
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
2014-02-25 19:32:59 +01:00
|
|
|
}
|
|
|
|
}
|
2014-04-17 12:28:04 +02:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openDuplicatesRows() {
|
2014-03-07 17:29:57 +01:00
|
|
|
Log.debug("Request Duplicates Rows Tab");
|
2014-03-06 19:48:23 +01:00
|
|
|
if (trId != null) {
|
|
|
|
WidgetRequestEvent e = new WidgetRequestEvent(
|
2014-03-07 17:29:57 +01:00
|
|
|
WidgetRequestType.DUPLICATESROWSPANEL);
|
2014-03-06 19:48:23 +01:00
|
|
|
e.setTrId(trId);
|
|
|
|
eventBus.fireEvent(e);
|
2014-03-18 16:13:44 +01:00
|
|
|
} else {
|
|
|
|
Log.error("TRId is null");
|
2014-04-17 12:28:04 +02:00
|
|
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
2014-03-06 19:48:23 +01:00
|
|
|
}
|
|
|
|
}
|
2015-02-09 17:36:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
private void openGeospatialCSquare() {
|
|
|
|
Log.debug("Request Geospatial Create C-Square Coordiantes Tab");
|
|
|
|
if (trId != null) {
|
|
|
|
WidgetRequestEvent e = new WidgetRequestEvent(
|
|
|
|
WidgetRequestType.GEOSPATIALCREATECOORDINATESPANEL);
|
|
|
|
e.setTrId(trId);
|
|
|
|
HashMap<RequestPropertiesParameterType, Object> map=new HashMap<RequestPropertiesParameterType, Object>();
|
|
|
|
map.put(RequestPropertiesParameterType.Coordinates, GeospatialCoordinatesType.C_SQUARE);
|
|
|
|
RequestProperties requestProperties= new RequestProperties(map);
|
|
|
|
e.setRequestProperties(requestProperties);
|
|
|
|
eventBus.fireEvent(e);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
Log.error("TRId is null");
|
|
|
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
private void openGeospatialOceanArea() {
|
|
|
|
Log.debug("Request Geospatial Create Ocean Area Coordiantes Tab");
|
|
|
|
if (trId != null) {
|
|
|
|
WidgetRequestEvent e = new WidgetRequestEvent(
|
|
|
|
WidgetRequestType.GEOSPATIALCREATECOORDINATESPANEL);
|
|
|
|
e.setTrId(trId);
|
|
|
|
HashMap<RequestPropertiesParameterType, Object> map=new HashMap<RequestPropertiesParameterType, Object>();
|
|
|
|
map.put(RequestPropertiesParameterType.Coordinates, GeospatialCoordinatesType.OCEAN_AREA);
|
|
|
|
RequestProperties requestProperties= new RequestProperties(map);
|
|
|
|
e.setRequestProperties(requestProperties);
|
|
|
|
eventBus.fireEvent(e);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
Log.error("TRId is null");
|
|
|
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2015-02-09 17:36:13 +01:00
|
|
|
|
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void openBackgroundMonitor() {
|
2014-09-11 18:39:50 +02:00
|
|
|
Log.debug("Request Open Monitor Background Tab");
|
|
|
|
WidgetRequestEvent e = new WidgetRequestEvent(
|
2014-10-02 19:07:33 +02:00
|
|
|
WidgetRequestType.MONITORBACKGROUNDPANEL);
|
2014-09-11 18:39:50 +02:00
|
|
|
eventBus.fireEvent(e);
|
|
|
|
}
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void doChangeTableRequestEventCommand(
|
2014-02-26 18:12:07 +01:00
|
|
|
ChangeTableRequestEvent event) {
|
2014-04-17 13:01:03 +02:00
|
|
|
Log.debug("Change Table Request: " + event);
|
2014-04-17 12:28:04 +02:00
|
|
|
switch (event.getWhy()) {
|
|
|
|
case TABLECURATION:
|
|
|
|
updateTableForCuration(event.getTrId());
|
|
|
|
break;
|
|
|
|
case TABLEUPDATED:
|
|
|
|
updateTable(event.getTrId());
|
|
|
|
break;
|
2015-01-16 18:19:38 +01:00
|
|
|
case TABLECLONED:
|
|
|
|
addActiveTabularResourceAndOpen(event.getTrId());
|
|
|
|
break;
|
2014-04-17 12:28:04 +02:00
|
|
|
default:
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2014-02-07 09:33:33 +01:00
|
|
|
};
|
2015-01-16 18:19:38 +01:00
|
|
|
|
|
|
|
|
|
|
|
private void addActiveTabularResourceAndOpen(final TRId trId){
|
|
|
|
Log.debug("Add Active TabResource Search: "+trId);
|
|
|
|
TDGWTServiceAsync.INSTANCE.getTabResourceInformation(trId,
|
|
|
|
new AsyncCallback<TabResource>() {
|
|
|
|
public void onFailure(Throwable caught) {
|
|
|
|
if (caught instanceof TDGWTSessionExpiredException) {
|
|
|
|
getEventBus()
|
|
|
|
.fireEvent(
|
|
|
|
new SessionExpiredEvent(
|
|
|
|
SessionExpiredType.EXPIREDONSERVER));
|
|
|
|
} else {
|
|
|
|
if (caught instanceof TDGWTIsLockedException) {
|
|
|
|
Log.error(caught.getLocalizedMessage());
|
|
|
|
UtilsGXT3.alert("Error Locked",
|
|
|
|
caught.getLocalizedMessage());
|
|
|
|
|
|
|
|
} else {
|
|
|
|
Log.error("Error on set TabResource: "
|
|
|
|
+ caught.getLocalizedMessage());
|
|
|
|
UtilsGXT3.alert(
|
|
|
|
"Error",
|
|
|
|
"Error on set TabResource: "
|
|
|
|
+ caught.getLocalizedMessage());
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public void onSuccess(TabResource result) {
|
|
|
|
addActiveTabularResourceAndOpen(result);
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
private void addActiveTabularResourceAndOpen(final TabResource tabResource) {
|
|
|
|
Log.debug("Add Active TabResource: "+tabResource);
|
|
|
|
TDGWTServiceAsync.INSTANCE.setTabResource(tabResource
|
|
|
|
,
|
|
|
|
new AsyncCallback<Void>() {
|
|
|
|
public void onFailure(Throwable caught) {
|
|
|
|
if (caught instanceof TDGWTSessionExpiredException) {
|
|
|
|
getEventBus()
|
|
|
|
.fireEvent(
|
|
|
|
new SessionExpiredEvent(
|
|
|
|
SessionExpiredType.EXPIREDONSERVER));
|
|
|
|
} else {
|
|
|
|
if (caught instanceof TDGWTIsLockedException) {
|
|
|
|
Log.error(caught.getLocalizedMessage());
|
|
|
|
UtilsGXT3.alert("Error Locked",
|
|
|
|
caught.getLocalizedMessage());
|
|
|
|
|
|
|
|
} else {
|
|
|
|
Log.error("Error on set TabResource: "
|
|
|
|
+ caught.getLocalizedMessage());
|
|
|
|
UtilsGXT3.alert(
|
|
|
|
"Error",
|
|
|
|
"Error on set TabResource: "
|
|
|
|
+ caught.getLocalizedMessage());
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public void onSuccess(Void result) {
|
|
|
|
openTable(tabResource.getTrId());
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-17 12:28:04 +02:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void doRowAdd() {
|
2014-05-16 12:04:48 +02:00
|
|
|
onRowAdd();
|
2014-03-11 20:12:45 +01:00
|
|
|
}
|
2014-04-17 12:28:04 +02:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void doRowsDelete() {
|
2014-10-15 18:45:45 +02:00
|
|
|
// ArrayList<String> rows =
|
|
|
|
// tabularData.getGridPanel().getSelectedRowsId();
|
|
|
|
ArrayList<String> rows = mainBoxPanel.getSelectedRowsId();
|
|
|
|
|
2014-03-11 20:12:45 +01:00
|
|
|
onRowsDelete(rows);
|
|
|
|
}
|
2014-04-17 12:28:04 +02:00
|
|
|
|
2014-05-16 12:04:48 +02:00
|
|
|
/**
|
|
|
|
* Delete Rows
|
|
|
|
*
|
|
|
|
* @param rows
|
|
|
|
*/
|
2014-04-17 12:28:04 +02:00
|
|
|
private void onRowsDelete(ArrayList<String> rows) {
|
|
|
|
if (rows == null || rows.size() == 0) {
|
2014-03-18 16:13:44 +01:00
|
|
|
UtilsGXT3.alert("No rows selected", "No rows selected");
|
2014-03-26 19:09:14 +01:00
|
|
|
} else {
|
2014-04-17 12:28:04 +02:00
|
|
|
DeleteRows deleteRows = new DeleteRows(trId, rows, eventBus);
|
2014-03-26 19:09:14 +01:00
|
|
|
deleteRows.delete();
|
|
|
|
}
|
|
|
|
}
|
2014-04-17 12:28:04 +02:00
|
|
|
|
2014-05-16 12:04:48 +02:00
|
|
|
/**
|
|
|
|
* Replace Row
|
|
|
|
*
|
|
|
|
* @param cellData
|
|
|
|
*/
|
2014-04-17 12:28:04 +02:00
|
|
|
private void onReplace(CellData cellData) {
|
|
|
|
if (cellData == null) {
|
2014-03-26 19:09:14 +01:00
|
|
|
UtilsGXT3.alert("No cell selected", "No cell selected");
|
|
|
|
} else {
|
2014-04-17 12:28:04 +02:00
|
|
|
ReplaceDialog replaceDialog = new ReplaceDialog(cellData, trId,
|
|
|
|
eventBus);
|
2014-03-26 19:09:14 +01:00
|
|
|
replaceDialog.show();
|
2014-03-11 20:12:45 +01:00
|
|
|
}
|
|
|
|
}
|
2014-03-26 19:09:14 +01:00
|
|
|
|
2014-05-16 12:04:48 +02:00
|
|
|
/**
|
|
|
|
* Edit Row
|
|
|
|
*
|
2015-01-09 18:15:29 +01:00
|
|
|
* @param rowsRaw
|
2014-05-16 12:04:48 +02:00
|
|
|
*/
|
2015-01-09 18:15:29 +01:00
|
|
|
private void onRowEdit(ArrayList<RowRaw> rowsRaw) {
|
|
|
|
if (rowsRaw == null||rowsRaw.isEmpty()) {
|
2014-05-13 18:09:57 +02:00
|
|
|
UtilsGXT3.alert("No rows selected", "No rows selected");
|
|
|
|
} else {
|
2015-01-09 18:15:29 +01:00
|
|
|
EditRowDialog editRowDialog = new EditRowDialog(trId, rowsRaw,
|
2014-05-16 12:04:48 +02:00
|
|
|
eventBus);
|
|
|
|
editRowDialog.show();
|
2014-05-13 18:09:57 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-05-16 12:04:48 +02:00
|
|
|
/**
|
|
|
|
* Add Row
|
|
|
|
*/
|
|
|
|
private void onRowAdd() {
|
|
|
|
EditRowDialog editRowDialog = new EditRowDialog(trId, eventBus);
|
|
|
|
editRowDialog.show();
|
|
|
|
|
2014-03-11 20:12:45 +01:00
|
|
|
}
|
2014-02-26 18:12:07 +01:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void doGridContextMenuCommand(GridContextMenuItemEvent event) {
|
2014-03-06 12:42:54 +01:00
|
|
|
Log.debug("GridContextMenu Fire Event",
|
|
|
|
"OperationId: " + event.getGridOperationId());
|
|
|
|
GridOperationId gridOperationId = event.getGridOperationId();
|
|
|
|
ArrayList<String> rows = event.getRows();
|
2015-01-09 18:15:29 +01:00
|
|
|
ArrayList<RowRaw> rowsRaw = event.getRowsRaw();
|
2014-04-17 12:28:04 +02:00
|
|
|
CellData cellData = event.getCellData();
|
|
|
|
|
2014-03-06 12:42:54 +01:00
|
|
|
switch (gridOperationId) {
|
|
|
|
case ROWADD:
|
2014-05-16 12:04:48 +02:00
|
|
|
onRowAdd();
|
2014-03-06 12:42:54 +01:00
|
|
|
break;
|
|
|
|
case ROWEDIT:
|
2015-01-09 18:15:29 +01:00
|
|
|
onRowEdit(rowsRaw);
|
2014-03-06 12:42:54 +01:00
|
|
|
break;
|
|
|
|
case ROWDELETE:
|
2014-03-11 20:12:45 +01:00
|
|
|
onRowsDelete(rows);
|
2014-03-06 12:42:54 +01:00
|
|
|
break;
|
2014-03-26 19:09:14 +01:00
|
|
|
case REPLACE:
|
|
|
|
onReplace(cellData);
|
2014-03-06 12:42:54 +01:00
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2014-05-20 14:36:38 +02:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void doSessionExpiredCommand(SessionExpiredEvent event) {
|
2014-05-20 14:36:38 +02:00
|
|
|
Log.debug("Session Expired Event: " + event.getSessionExpiredType());
|
2014-05-16 12:04:48 +02:00
|
|
|
sessionExpiredShow();
|
2014-05-20 14:36:38 +02:00
|
|
|
|
2014-05-16 12:04:48 +02:00
|
|
|
}
|
2014-05-20 14:36:38 +02:00
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void doDataViewActiveCommand(DataViewActiveEvent event) {
|
2014-10-15 18:45:45 +02:00
|
|
|
Log.debug("DataViewActive Event: " + event);
|
|
|
|
switch (event.getDataViewActiveType()) {
|
|
|
|
case ACTIVEAFTERCLOSE:
|
|
|
|
doActiveAfterClose(event);
|
|
|
|
break;
|
|
|
|
case NEWACTIVE:
|
|
|
|
doNewActive(event);
|
|
|
|
break;
|
|
|
|
case CLOSE:
|
|
|
|
doDataViewClose(event);
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void doGridHeaderColumnMenuCommand(
|
2013-12-17 17:22:23 +01:00
|
|
|
GridHeaderColumnMenuItemEvent event) {
|
|
|
|
Log.debug("GridHeaderColumnMenu Fire Event",
|
|
|
|
"OperationId: " + event.getOperationId() + " Column: \n"
|
|
|
|
+ event.getColumnSelected());
|
|
|
|
String opId = event.getOperationId();
|
2015-01-09 18:15:29 +01:00
|
|
|
String columnLocalId = mainBoxPanel.getColumnLocalId(event
|
|
|
|
.getColumnSelected());
|
2014-10-15 18:45:45 +02:00
|
|
|
String columnName = mainBoxPanel.getColumnName(event
|
|
|
|
.getColumnSelected());
|
2015-01-09 18:15:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
Log.debug("Selected column[ColumnLocalId: " + columnLocalId
|
|
|
|
+ ", ColumnName: " + columnName + "]");
|
2014-02-26 18:12:07 +01:00
|
|
|
|
2014-02-05 10:25:26 +01:00
|
|
|
if (opId.compareTo(GridHeaderOperationId.COLUMNLABEL.toString()) == 0) {
|
2015-01-09 18:15:29 +01:00
|
|
|
openColumnLabel(columnLocalId, columnName);
|
2013-12-17 17:22:23 +01:00
|
|
|
} else {
|
2014-02-05 10:25:26 +01:00
|
|
|
if (opId.compareTo(GridHeaderOperationId.COLUMNADD.toString()) == 0) {
|
2015-01-09 18:15:29 +01:00
|
|
|
openColumnAdd(columnLocalId, columnName);
|
2013-12-17 17:22:23 +01:00
|
|
|
} else {
|
2014-04-17 12:28:04 +02:00
|
|
|
if (opId.compareTo(GridHeaderOperationId.COLUMNBATCHREPLACE
|
|
|
|
.toString()) == 0) {
|
2015-01-09 18:15:29 +01:00
|
|
|
openColumnBatchReplace(columnLocalId, columnName);
|
2013-12-17 17:22:23 +01:00
|
|
|
} else {
|
2014-02-05 10:25:26 +01:00
|
|
|
if (opId.compareTo(GridHeaderOperationId.COLUMNDELETE
|
2013-12-17 17:22:23 +01:00
|
|
|
.toString()) == 0) {
|
2015-01-09 18:15:29 +01:00
|
|
|
openColumnDelete(columnLocalId, columnName);
|
2013-12-17 17:22:23 +01:00
|
|
|
} else {
|
2014-02-05 10:25:26 +01:00
|
|
|
if (opId.compareTo(GridHeaderOperationId.COLUMNTYPE
|
2013-12-17 17:22:23 +01:00
|
|
|
.toString()) == 0) {
|
2015-01-09 18:15:29 +01:00
|
|
|
openChangeColumnType(columnLocalId, columnName);
|
2013-12-17 17:22:23 +01:00
|
|
|
} else {
|
2014-02-05 10:25:26 +01:00
|
|
|
if (opId.compareTo(GridHeaderOperationId.COLUMNFILTER
|
2013-12-17 17:22:23 +01:00
|
|
|
.toString()) == 0) {
|
2015-01-09 18:15:29 +01:00
|
|
|
openColumnFilter(columnLocalId, columnName);
|
2013-12-17 17:22:23 +01:00
|
|
|
} else {
|
2014-02-05 10:25:26 +01:00
|
|
|
if (opId.compareTo(GridHeaderOperationId.ANNOTATIONADD
|
2013-12-17 17:22:23 +01:00
|
|
|
.toString()) == 0) {
|
|
|
|
|
|
|
|
} else {
|
2014-02-05 10:25:26 +01:00
|
|
|
if (opId.compareTo(GridHeaderOperationId.DUPLICATEDETECTION
|
2013-12-17 17:22:23 +01:00
|
|
|
.toString()) == 0) {
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2013-12-17 17:22:23 +01:00
|
|
|
} else {
|
2014-06-06 18:11:22 +02:00
|
|
|
if (opId.compareTo(GridHeaderOperationId.COLUMNSPLIT
|
|
|
|
.toString()) == 0) {
|
2015-01-09 18:15:29 +01:00
|
|
|
openColumnSplit(columnLocalId,
|
|
|
|
columnName);
|
2014-06-06 18:11:22 +02:00
|
|
|
} else {
|
|
|
|
if (opId.compareTo(GridHeaderOperationId.COLUMNMERGE
|
|
|
|
.toString()) == 0) {
|
2015-01-09 18:15:29 +01:00
|
|
|
openColumnMerge(columnLocalId,
|
|
|
|
columnName);
|
2014-06-06 18:11:22 +02:00
|
|
|
} else {
|
2014-09-12 18:55:09 +02:00
|
|
|
if (opId.compareTo(GridHeaderOperationId.COLUMNREPLACEBYEXPRESSION
|
|
|
|
.toString()) == 0) {
|
2014-11-20 15:52:28 +01:00
|
|
|
|
2015-01-09 18:15:29 +01:00
|
|
|
openReplaceColumnByExpression(
|
|
|
|
columnLocalId,
|
|
|
|
columnName);
|
2014-09-12 18:55:09 +02:00
|
|
|
} else {
|
2014-11-20 15:52:28 +01:00
|
|
|
if (opId.compareTo(GridHeaderOperationId.COLUMNREPLACEBYEXTERNAL
|
|
|
|
.toString()) == 0) {
|
2014-11-27 18:30:11 +01:00
|
|
|
|
2015-01-09 18:15:29 +01:00
|
|
|
openReplaceByExternalColWizard(
|
|
|
|
columnLocalId,
|
|
|
|
columnName);
|
2014-11-20 15:52:28 +01:00
|
|
|
} else {
|
|
|
|
|
|
|
|
}
|
2014-06-06 18:11:22 +02:00
|
|
|
|
2014-09-12 18:55:09 +02:00
|
|
|
}
|
2014-06-06 18:11:22 +02:00
|
|
|
}
|
|
|
|
}
|
2013-12-17 17:22:23 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2015-01-16 18:19:38 +01:00
|
|
|
private void asyncCodeLoadingFailed(Throwable reason) {
|
2013-05-22 17:48:27 +02:00
|
|
|
Log.error("Async code loading failed", reason);
|
2014-08-05 18:33:49 +02:00
|
|
|
eventBus.fireEvent(new SessionExpiredEvent(
|
|
|
|
SessionExpiredType.EXPIREDONSERVER));
|
2014-10-02 19:07:33 +02:00
|
|
|
|
2013-09-16 11:43:07 +02:00
|
|
|
}
|
|
|
|
|
2013-05-14 14:24:27 +02:00
|
|
|
}
|