Class KettleDatabaseRepositoryJobDelegate

    • Constructor Detail

      • KettleDatabaseRepositoryJobDelegate

        public KettleDatabaseRepositoryJobDelegate​(KettleDatabaseRepository repository)
    • Method Detail

      • getJob

        public org.pentaho.di.core.RowMetaAndData getJob​(org.pentaho.di.repository.ObjectId id_job)
                                                  throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getJobHop

        public org.pentaho.di.core.RowMetaAndData getJobHop​(org.pentaho.di.repository.ObjectId id_job_hop)
                                                     throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getJobHopID

        public org.pentaho.di.repository.ObjectId getJobHopID​(org.pentaho.di.repository.ObjectId id_job,
                                                              org.pentaho.di.repository.ObjectId id_jobentry_copy_from,
                                                              org.pentaho.di.repository.ObjectId id_jobentry_copy_to)
                                                       throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • saveJob

        public void saveJob​(JobMeta jobMeta,
                            String versionComment,
                            org.pentaho.di.core.ProgressMonitorListener monitor,
                            boolean overwrite)
                     throws org.pentaho.di.core.exception.KettleException
        Stored a job in the repository
        Parameters:
        jobMeta - The job to store
        monitor - the (optional) UI progress monitor
        overwrite - Overwrite existing object(s)?
        Throws:
        org.pentaho.di.core.exception.KettleException - in case some IO error occurs.
      • existsJobMeta

        public boolean existsJobMeta​(String name,
                                     org.pentaho.di.repository.RepositoryDirectoryInterface repositoryDirectory,
                                     org.pentaho.di.repository.RepositoryObjectType objectType)
                              throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • loadJobMeta

        public JobMeta loadJobMeta​(String jobname,
                                   org.pentaho.di.repository.RepositoryDirectoryInterface repdir)
                            throws org.pentaho.di.core.exception.KettleException
        Load a job from the repository
        Parameters:
        jobname - The name of the job
        repdir - The directory in which the job resides.
        Throws:
        org.pentaho.di.core.exception.KettleException
      • loadJobMeta

        public JobMeta loadJobMeta​(String jobname,
                                   org.pentaho.di.repository.RepositoryDirectoryInterface repdir,
                                   org.pentaho.di.core.ProgressMonitorListener monitor)
                            throws org.pentaho.di.core.exception.KettleException
        Load a job in a directory
        Parameters:
        log - the logging channel
        rep - The Repository
        jobname - The name of the job
        repdir - The directory in which the job resides.
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getJobParameterKey

        public String getJobParameterKey​(org.pentaho.di.repository.ObjectId id_job,
                                         int nr)
                                  throws org.pentaho.di.core.exception.KettleException
        Get a job parameter key. You can count the number of parameters up front.
        Parameters:
        id_job - job id
        nr - number of the parameter
        Returns:
        they key/name of specified parameter
        Throws:
        org.pentaho.di.core.exception.KettleException - Upon any error.
      • getJobParameterDefault

        public String getJobParameterDefault​(org.pentaho.di.repository.ObjectId id_job,
                                             int nr)
                                      throws org.pentaho.di.core.exception.KettleException
        Get a job parameter default. You can count the number of parameters up front.
        Parameters:
        id_job - job id
        nr - number of the parameter
        Returns:
        the default value of the parameter
        Throws:
        org.pentaho.di.core.exception.KettleException - Upon any error.
      • getJobParameterDescription

        public String getJobParameterDescription​(org.pentaho.di.repository.ObjectId id_job,
                                                 int nr)
                                          throws org.pentaho.di.core.exception.KettleException
        Get a job parameter description. You can count the number of parameters up front.
        Parameters:
        id_job - job id
        nr - number of the parameter
        Returns:
        the description of the parameter
        Throws:
        org.pentaho.di.core.exception.KettleException - Upon any error.
      • insertJobParameter

        public void insertJobParameter​(org.pentaho.di.repository.ObjectId id_job,
                                       long nr,
                                       String key,
                                       String defValue,
                                       String description)
                                throws org.pentaho.di.core.exception.KettleException
        Insert a parameter for a job in the repository.
        Parameters:
        id_job - job id
        nr - number of the parameter to insert
        key - key to insert
        defValue - default value for key
        description - description to insert
        Throws:
        org.pentaho.di.core.exception.KettleException - Upon any error.
      • countJobParameter

        public int countJobParameter​(org.pentaho.di.repository.ObjectId id_job)
                              throws org.pentaho.di.core.exception.KettleException
        Count the number of parameters of a job.
        Parameters:
        id_job - job id
        Returns:
        the number of of parameters of the job
        Throws:
        org.pentaho.di.core.exception.KettleException - Upon any error.
      • loadJobHopMeta

        public JobHopMeta loadJobHopMeta​(org.pentaho.di.repository.ObjectId id_job_hop,
                                         List<JobEntryCopy> jobcopies)
                                  throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • saveJobHopMeta

        public void saveJobHopMeta​(JobHopMeta hop,
                                   org.pentaho.di.repository.ObjectId id_job)
                            throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • readDatabases

        public void readDatabases​(JobMeta jobMeta)
                           throws org.pentaho.di.core.exception.KettleException
        Read the database connections in the repository and add them to this job if they are not yet present.
        Parameters:
        jobMeta - the job to put the database connections in
        Throws:
        org.pentaho.di.core.exception.KettleException
      • readDatabases

        public void readDatabases​(JobMeta jobMeta,
                                  boolean overWriteShared)
                           throws org.pentaho.di.core.exception.KettleException
        Read the database connections in the repository and add them to this job if they are not yet present.
        Parameters:
        jobMeta - the job to put the database connections in
        overWriteShared - set to true if you want to overwrite shared connections while loading.
        Throws:
        org.pentaho.di.core.exception.KettleException
      • readSlaves

        public void readSlaves​(JobMeta jobMeta,
                               boolean overWriteShared)
                        throws org.pentaho.di.core.exception.KettleException
        Read the slave servers in the repository and add them to this transformation if they are not yet present.
        Parameters:
        jobMeta - The job to put the slave servers in
        overWriteShared - if an object with the same name exists, overwrite
        Throws:
        org.pentaho.di.core.exception.KettleException
      • readSharedObjects

        public SharedObjects readSharedObjects​(JobMeta jobMeta)
                                        throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getJobID

        public org.pentaho.di.repository.ObjectId getJobID​(String name,
                                                           org.pentaho.di.repository.ObjectId id_directory)
                                                    throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getNrJobs

        public int getNrJobs()
                      throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getNrJobs

        public int getNrJobs​(org.pentaho.di.repository.ObjectId id_directory)
                      throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getNrJobHops

        public int getNrJobHops​(org.pentaho.di.repository.ObjectId id_job)
                         throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getJobsWithIDList

        public String[] getJobsWithIDList​(List<Object[]> list,
                                          org.pentaho.di.core.row.RowMetaInterface rowMeta)
                                   throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getJobsWithIDList

        public String[] getJobsWithIDList​(org.pentaho.di.repository.ObjectId[] ids)
                                   throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • insertJobHop

        public org.pentaho.di.repository.ObjectId insertJobHop​(org.pentaho.di.repository.ObjectId id_job,
                                                               org.pentaho.di.repository.ObjectId id_jobentry_copy_from,
                                                               org.pentaho.di.repository.ObjectId id_jobentry_copy_to,
                                                               boolean enabled,
                                                               boolean evaluation,
                                                               boolean unconditional)
                                                        throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getJobAttributeString

        public String getJobAttributeString​(org.pentaho.di.repository.ObjectId id_job,
                                            int nr,
                                            String code)
                                     throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getJobAttributeInteger

        public long getJobAttributeInteger​(org.pentaho.di.repository.ObjectId id_job,
                                           int nr,
                                           String code)
                                    throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getJobAttributeBoolean

        public boolean getJobAttributeBoolean​(org.pentaho.di.repository.ObjectId id_job,
                                              int nr,
                                              String code)
                                       throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • moveJob

        public void moveJob​(String jobname,
                            org.pentaho.di.repository.ObjectId id_directory_from,
                            org.pentaho.di.repository.ObjectId id_directory_to)
                     throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • renameJob

        public void renameJob​(org.pentaho.di.repository.ObjectId id_job,
                              org.pentaho.di.repository.RepositoryDirectoryInterface newParentDir,
                              String newname)
                       throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException