Search in sources :

Example 1 with IDatasourceSummary

use of org.pentaho.platform.dataaccess.datasource.wizard.IDatasourceSummary in project data-access by pentaho.

the class MultiTableDatasource method onFinish.

@Override
public void onFinish(final XulServiceCallback<IDatasourceSummary> callback) {
    if (this.validator.allTablesJoined()) {
        String dsName = this.wizardModel.getDatasourceName();
        MultiTableDatasourceDTO dto = this.joinGuiModel.createMultiTableDatasourceDTO(dsName);
        dto.setSelectedConnection(this.connection);
        joinSelectionServiceGwtImpl.serializeJoins(dto, this.connection, new XulServiceCallback<IDatasourceSummary>() {

            public void success(IDatasourceSummary retVal) {
                callback.success(retVal);
            }

            public void error(String message, Throwable error) {
                MessageHandler.getInstance().closeWaitingDialog();
                MessageHandler.getInstance().showErrorDetailsDialog(MessageHandler.getString("ERROR"), MessageHandler.getString("multitable.ERROR_SAVING_MODEL"), error.getLocalizedMessage());
            }
        });
    } else {
        MessageHandler.getInstance().closeWaitingDialog();
        XulDialog wizardDialog = (XulDialog) document.getElementById("main_wizard_window");
        wizardDialog.show();
        this.displayErrors(this.validator.getError());
    }
}
Also used : MultiTableDatasourceDTO(org.pentaho.platform.dataaccess.datasource.wizard.service.impl.MultiTableDatasourceDTO) IDatasourceSummary(org.pentaho.platform.dataaccess.datasource.wizard.IDatasourceSummary) XulDialog(org.pentaho.ui.xul.containers.XulDialog)

Aggregations

IDatasourceSummary (org.pentaho.platform.dataaccess.datasource.wizard.IDatasourceSummary)1 MultiTableDatasourceDTO (org.pentaho.platform.dataaccess.datasource.wizard.service.impl.MultiTableDatasourceDTO)1 XulDialog (org.pentaho.ui.xul.containers.XulDialog)1