Search in sources :

Example 16 with KettleJobException

use of org.pentaho.di.core.exception.KettleJobException in project pentaho-kettle by pentaho.

the class RepositoryBrowserController method isFileOpenedInFolder.

private void isFileOpenedInFolder(String path) throws KettleException {
    List<TransMeta> openedTransFiles = getSpoon().delegates.trans.getTransformationList();
    for (TransMeta t : openedTransFiles) {
        if (t.getRepositoryDirectory().getPath() != null && (t.getRepositoryDirectory().getPath() + "/").startsWith(path + "/")) {
            throw new KettleTransException();
        }
    }
    List<JobMeta> openedJobFiles = getSpoon().delegates.jobs.getJobList();
    for (JobMeta j : openedJobFiles) {
        if (j.getRepositoryDirectory().getPath() != null && (j.getRepositoryDirectory().getPath() + "/").startsWith(path + "/")) {
            throw new KettleJobException();
        }
    }
}
Also used : JobMeta(org.pentaho.di.job.JobMeta) TransMeta(org.pentaho.di.trans.TransMeta) KettleTransException(org.pentaho.di.core.exception.KettleTransException) KettleJobException(org.pentaho.di.core.exception.KettleJobException)

Aggregations

KettleJobException (org.pentaho.di.core.exception.KettleJobException)16 SftpException (com.jcraft.jsch.SftpException)4 KettleDatabaseException (org.pentaho.di.core.exception.KettleDatabaseException)4 KettleException (org.pentaho.di.core.exception.KettleException)4 JSchException (com.jcraft.jsch.JSchException)3 IOException (java.io.IOException)3 FileObject (org.apache.commons.vfs2.FileObject)3 Result (org.pentaho.di.core.Result)3 KettleTransException (org.pentaho.di.core.exception.KettleTransException)3 InputStream (java.io.InputStream)2 Date (java.util.Date)2 Database (org.pentaho.di.core.database.Database)2 DatabaseMeta (org.pentaho.di.core.database.DatabaseMeta)2 KettleFileException (org.pentaho.di.core.exception.KettleFileException)2 KettleObjectExistsException (org.pentaho.di.core.exception.KettleObjectExistsException)2 KettleValueException (org.pentaho.di.core.exception.KettleValueException)2 JobLogTable (org.pentaho.di.core.logging.JobLogTable)2 DuplicateParamException (org.pentaho.di.core.parameters.DuplicateParamException)2 UnknownParamException (org.pentaho.di.core.parameters.UnknownParamException)2 ValueMetaString (org.pentaho.di.core.row.value.ValueMetaString)2