Search in sources :

Example 1 with AnalysisDatasourceServiceGwtImpl

use of org.pentaho.platform.dataaccess.datasource.wizard.service.impl.AnalysisDatasourceServiceGwtImpl in project data-access by pentaho.

the class GwtDatasourceEditorEntryPoint method showAnalysisImportDialog.

private void showAnalysisImportDialog(final JavaScriptObject callback) {
    final DialogListener<AnalysisImportDialogModel> listener = new DialogListener<AnalysisImportDialogModel>() {

        public void onDialogCancel() {
        }

        public void onDialogAccept(final AnalysisImportDialogModel importDialogModel) {
            AnalysisDatasourceServiceGwtImpl service = new AnalysisDatasourceServiceGwtImpl();
            service.importAnalysisDatasource(importDialogModel.getUploadedFile(), importDialogModel.getConnection().getName(), importDialogModel.getParameters(), new XulServiceCallback<String>() {

                @Override
                public void success(String retVal) {
                    notifyDialogCallbackSuccess(callback, retVal);
                }

                @Override
                public void error(String message, Throwable error) {
                    notifyDialogCallbackError(callback, message);
                }
            });
        }

        public void onDialogReady() {
        }

        @Override
        public void onDialogError(String errorMessage) {
        // TODO Auto-generated method stub
        }
    };
    showAnalysisImportDialog(listener);
}
Also used : AnalysisDatasourceServiceGwtImpl(org.pentaho.platform.dataaccess.datasource.wizard.service.impl.AnalysisDatasourceServiceGwtImpl) DialogListener(org.pentaho.ui.xul.util.DialogController.DialogListener) AnalysisImportDialogModel(org.pentaho.platform.dataaccess.datasource.ui.importing.AnalysisImportDialogModel)

Aggregations

AnalysisImportDialogModel (org.pentaho.platform.dataaccess.datasource.ui.importing.AnalysisImportDialogModel)1 AnalysisDatasourceServiceGwtImpl (org.pentaho.platform.dataaccess.datasource.wizard.service.impl.AnalysisDatasourceServiceGwtImpl)1 DialogListener (org.pentaho.ui.xul.util.DialogController.DialogListener)1