Search in sources :

Example 1 with MetadataDatasourceServiceGwtImpl

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

the class GwtDatasourceEditorEntryPoint method showMetadataImportDialog.

private void showMetadataImportDialog(final JavaScriptObject callback) {
    final DialogListener<MetadataImportDialogModel> listener = new DialogListener<MetadataImportDialogModel>() {

        public void onDialogCancel() {
        }

        public void onDialogAccept(final MetadataImportDialogModel importDialogModel) {
            MetadataDatasourceServiceGwtImpl service = new MetadataDatasourceServiceGwtImpl();
            service.importMetadataDatasource(importDialogModel.getDomainId(), importDialogModel.getUploadedFile(), importDialogModel.getLocalizedBundleEntries(), 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
        }
    };
    showMetadataImportDialog(listener);
}
Also used : MetadataDatasourceServiceGwtImpl(org.pentaho.platform.dataaccess.datasource.wizard.service.impl.MetadataDatasourceServiceGwtImpl) DialogListener(org.pentaho.ui.xul.util.DialogController.DialogListener) MetadataImportDialogModel(org.pentaho.platform.dataaccess.datasource.ui.importing.MetadataImportDialogModel)

Aggregations

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