Search in sources :

Example 6 with InvalidFileProviderException

use of org.pentaho.di.plugins.fileopensave.api.providers.exception.InvalidFileProviderException in project pentaho-kettle by pentaho.

the class FileOpenSaveExtensionPoint method callExtensionPoint.

@Override
public void callExtensionPoint(LogChannelInterface logChannelInterface, Object o) throws KettleException {
    FileDialogOperation fileDialogOperation = (FileDialogOperation) o;
    final FileOpenSaveDialog fileOpenSaveDialog = new FileOpenSaveDialog(spoonSupplier.get().getShell(), WIDTH, HEIGHT, logChannelInterface);
    resolveProvider(fileDialogOperation);
    fileOpenSaveDialog.open(fileDialogOperation);
    fileDialogOperation.setPath(null);
    fileDialogOperation.setFilename(null);
    fileDialogOperation.setConnection(null);
    if (!Utils.isEmpty(fileOpenSaveDialog.getProvider())) {
        try {
            FileProvider fileProvider = providerService.get(fileOpenSaveDialog.getProvider());
            fileProvider.setFileProperties(fileOpenSaveDialog, fileDialogOperation);
        } catch (InvalidFileProviderException e) {
            throw new KettleException(e);
        }
    }
}
Also used : KettleException(org.pentaho.di.core.exception.KettleException) FileProvider(org.pentaho.di.plugins.fileopensave.api.providers.FileProvider) RepositoryFileProvider(org.pentaho.di.plugins.fileopensave.providers.repository.RepositoryFileProvider) LocalFileProvider(org.pentaho.di.plugins.fileopensave.providers.local.LocalFileProvider) VFSFileProvider(org.pentaho.di.plugins.fileopensave.providers.vfs.VFSFileProvider) FileOpenSaveDialog(org.pentaho.di.plugins.fileopensave.dialog.FileOpenSaveDialog) InvalidFileProviderException(org.pentaho.di.plugins.fileopensave.api.providers.exception.InvalidFileProviderException) FileDialogOperation(org.pentaho.di.ui.core.FileDialogOperation)

Aggregations

InvalidFileProviderException (org.pentaho.di.plugins.fileopensave.api.providers.exception.InvalidFileProviderException)6 File (org.pentaho.di.plugins.fileopensave.api.providers.File)5 FileException (org.pentaho.di.plugins.fileopensave.api.providers.exception.FileException)5 FileProvider (org.pentaho.di.plugins.fileopensave.api.providers.FileProvider)3 KettleException (org.pentaho.di.core.exception.KettleException)1 FileExistsException (org.pentaho.di.plugins.fileopensave.api.providers.exception.FileExistsException)1 FileOpenSaveDialog (org.pentaho.di.plugins.fileopensave.dialog.FileOpenSaveDialog)1 LocalFileProvider (org.pentaho.di.plugins.fileopensave.providers.local.LocalFileProvider)1 RepositoryFileProvider (org.pentaho.di.plugins.fileopensave.providers.repository.RepositoryFileProvider)1 VFSFileProvider (org.pentaho.di.plugins.fileopensave.providers.vfs.VFSFileProvider)1 FileDialogOperation (org.pentaho.di.ui.core.FileDialogOperation)1