Class KettleDatabaseRepository

  • All Implemented Interfaces:
    Repository

    public class KettleDatabaseRepository
    extends KettleDatabaseRepositoryBase
    This class handles interactions with a Kettle repository.
    Author:
    Matt Created on 31-mrt-2004
    • Constructor Detail

      • KettleDatabaseRepository

        public KettleDatabaseRepository()
    • Method Detail

      • init

        public void init​(RepositoryMeta repositoryMeta)
        Initialize the repository with the repository metadata and user information.
      • createRepositoryMeta

        public RepositoryMeta createRepositoryMeta()
        Returns:
        A new repository meta object
      • connect

        public void connect​(String username,
                            String password)
                     throws org.pentaho.di.core.exception.KettleException
        Connect to the repository.
        Parameters:
        username - the username of the user connecting to the repository.
        password - the password of the user connecting to the repository.
        Throws:
        org.pentaho.di.core.exception.KettleException - in case there is a general unexpected error or if we're already connected
      • connect

        public void connect​(String username,
                            String password,
                            boolean upgrade)
                     throws org.pentaho.di.core.exception.KettleException
        Connect to the repository.
        Throws:
        org.pentaho.di.core.exception.KettleException - in case there is a general unexpected error or if we're already connected
      • commit

        public void commit()
                    throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • rollback

        public void rollback()
      • getUserInfo

        public IUser getUserInfo()
        Returns:
        the currently logged on user. (also available through the repository security provider)
      • getMajorVersion

        public int getMajorVersion()
        Return the major repository version.
        Returns:
        the major repository version.
      • getMinorVersion

        public int getMinorVersion()
        Return the minor repository version.
        Returns:
        the minor repository version.
      • getVersion

        public String getVersion()
        Get the repository version.
        Returns:
        The repository version as major version + "." + minor version
      • loadTransformation

        public TransMeta loadTransformation​(String transname,
                                            org.pentaho.di.repository.RepositoryDirectoryInterface repdir,
                                            org.pentaho.di.core.ProgressMonitorListener monitor,
                                            boolean setInternalVariables,
                                            String versionName)
                                     throws org.pentaho.di.core.exception.KettleException
        Description copied from interface: Repository
        Load a transformation with a name from a folder in the repository
        Parameters:
        transname - the name of the transformation to load
        monitor - the progress monitor to use (UI feedback)
        setInternalVariables - set to true if you want to automatically set the internal variables of the loaded transformation. (true is the default with very few exceptions!)
        versionName - the revision to load. Specify null to load the last version.
        Throws:
        org.pentaho.di.core.exception.KettleException
      • readTransSharedObjects

        public SharedObjects readTransSharedObjects​(TransMeta transMeta)
                                             throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • renameTransformation

        public org.pentaho.di.repository.ObjectId renameTransformation​(org.pentaho.di.repository.ObjectId id_transformation,
                                                                       org.pentaho.di.repository.RepositoryDirectoryInterface newDir,
                                                                       String newName)
                                                                throws org.pentaho.di.core.exception.KettleException
        Description copied from interface: Repository
        Move / rename a transformation
        Parameters:
        id_transformation - The ObjectId of the transformation to move
        newDir - The RepositoryDirectoryInterface that will be the new parent of the transformation (May be null if a move is not desired)
        newName - The new name of the transformation (May be null if a rename is not desired)
        Returns:
        The ObjectId of the transformation that was moved
        Throws:
        org.pentaho.di.core.exception.KettleException
      • renameTransformation

        public org.pentaho.di.repository.ObjectId renameTransformation​(org.pentaho.di.repository.ObjectId id_transformation,
                                                                       String versionComment,
                                                                       org.pentaho.di.repository.RepositoryDirectoryInterface newDir,
                                                                       String newName)
                                                                throws org.pentaho.di.core.exception.KettleException
        Description copied from interface: Repository
        Move / rename a transformation
        Parameters:
        id_transformation - The ObjectId of the transformation to move
        versionComment - Version comment for rename
        newDir - The RepositoryDirectoryInterface that will be the new parent of the transformation (May be null if a move is not desired)
        newName - The new name of the transformation (May be null if a rename is not desired)
        Returns:
        The ObjectId of the transformation that was moved
        Throws:
        org.pentaho.di.core.exception.KettleException
      • loadJob

        public JobMeta loadJob​(String jobname,
                               org.pentaho.di.repository.RepositoryDirectoryInterface repdir,
                               org.pentaho.di.core.ProgressMonitorListener monitor,
                               String versionName)
                        throws org.pentaho.di.core.exception.KettleException
        Load a job in a directory
        Parameters:
        jobname - The name of the job
        repdir - The directory in which the job resides.
        the - monitor to use as feedback in a UI (or null if not used)
        Throws:
        org.pentaho.di.core.exception.KettleException
      • readJobMetaSharedObjects

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

        public org.pentaho.di.repository.ObjectId renameJob​(org.pentaho.di.repository.ObjectId id_job,
                                                            org.pentaho.di.repository.RepositoryDirectoryInterface dir,
                                                            String newname)
                                                     throws org.pentaho.di.core.exception.KettleException
        Description copied from interface: Repository
        Move / rename a job
        Parameters:
        id_job - The ObjectId of the job to move
        dir - The RepositoryDirectoryInterface that will be the new parent of the job (May be null if a move is not desired)
        newname - The new name of the job (May be null if a rename is not desired)
        Returns:
        The ObjectId of the job that was moved
        Throws:
        org.pentaho.di.core.exception.KettleException
      • renameJob

        public org.pentaho.di.repository.ObjectId renameJob​(org.pentaho.di.repository.ObjectId id_job,
                                                            String versionComment,
                                                            org.pentaho.di.repository.RepositoryDirectoryInterface dir,
                                                            String newname)
                                                     throws org.pentaho.di.core.exception.KettleException
        Description copied from interface: Repository
        Move / rename a job
        Parameters:
        id_job - The ObjectId of the job to move
        versionComment - Version comment for rename
        dir - The RepositoryDirectoryInterface that will be the new parent of the job (May be null if a move is not desired)
        newname - The new name of the job (May be null if a rename is not desired)
        Returns:
        The ObjectId of the job that was moved
        Throws:
        org.pentaho.di.core.exception.KettleException
      • exists

        public boolean exists​(String name,
                              org.pentaho.di.repository.RepositoryDirectoryInterface repositoryDirectory,
                              org.pentaho.di.repository.RepositoryObjectType objectType)
                       throws org.pentaho.di.core.exception.KettleException
        Description copied from interface: Repository
        See if a repository object exists in the repository
        Parameters:
        name - the name of the object
        repositoryDirectory - the directory in which it should reside
        objectType - the type of repository object
        Returns:
        true if the job exists
        Throws:
        org.pentaho.di.core.exception.KettleException - in case something goes wrong.
      • save

        public void save​(org.pentaho.di.repository.RepositoryElementInterface repositoryElement,
                         String versionComment)
                  throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • save

        public void save​(org.pentaho.di.repository.RepositoryElementInterface repositoryElement,
                         String versionComment,
                         org.pentaho.di.core.ProgressMonitorListener monitor,
                         boolean overwrite)
                  throws org.pentaho.di.core.exception.KettleException
        Description copied from interface: Repository
        Save an object to the repository optionally overwriting any associated objects.
        Parameters:
        repositoryElement - Object to save
        versionComment - Version comment for update
        monitor - Progress Monitor to report feedback to
        overwrite - Overwrite any existing objects involved in saving repositoryElement, e.g. repositoryElement, database connections, slave servers
        Throws:
        org.pentaho.di.core.exception.KettleException - Error saving the object to the repository
      • save

        public void save​(org.pentaho.di.repository.RepositoryElementInterface repositoryElement,
                         String versionComment,
                         org.pentaho.di.core.ProgressMonitorListener monitor,
                         org.pentaho.di.repository.ObjectId parentId,
                         boolean used,
                         boolean overwrite)
                  throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • save

        public void save​(org.pentaho.di.repository.RepositoryElementInterface repositoryElement,
                         String versionComment,
                         Calendar versionDate,
                         org.pentaho.di.core.ProgressMonitorListener monitor,
                         boolean overwrite)
                  throws org.pentaho.di.core.exception.KettleException
        Description copied from interface: Repository
        Save the object to the repository with version comments as well as version dates. This form exists largely to support the importing of revisions, preserving their revision date.
        Throws:
        org.pentaho.di.core.exception.KettleException
      • loadCondition

        public org.pentaho.di.core.Condition loadCondition​(org.pentaho.di.repository.ObjectId id_condition)
                                                    throws org.pentaho.di.core.exception.KettleException
        Read a condition from the repository.
        Parameters:
        id_condition - The condition id
        Throws:
        org.pentaho.di.core.exception.KettleException - if something goes wrong.
      • saveCondition

        public org.pentaho.di.repository.ObjectId saveCondition​(org.pentaho.di.core.Condition condition)
                                                         throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • saveCondition

        public org.pentaho.di.repository.ObjectId saveCondition​(org.pentaho.di.core.Condition condition,
                                                                org.pentaho.di.repository.ObjectId id_condition_parent)
                                                         throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • loadDatabaseMeta

        public org.pentaho.di.core.database.DatabaseMeta loadDatabaseMeta​(org.pentaho.di.repository.ObjectId id_database,
                                                                          String versionName)
                                                                   throws org.pentaho.di.core.exception.KettleException
        Load the Database connection Metadata from the repository
        Parameters:
        id_database - the id of the database connection to load
        versionName - the revision to load. Specify null to load the last version.
        Throws:
        org.pentaho.di.core.exception.KettleException - in case something goes wrong with database, connection, etc.
      • deleteDatabaseMeta

        public void deleteDatabaseMeta​(String databaseName)
                                throws org.pentaho.di.core.exception.KettleException
        Remove a database connection from the repository
        Parameters:
        databaseName - The name of the connection to remove
        Throws:
        org.pentaho.di.core.exception.KettleException - In case something went wrong: database error, insufficient permissions, depending objects, etc.
      • loadClusterSchema

        public ClusterSchema loadClusterSchema​(org.pentaho.di.repository.ObjectId idClusterSchema,
                                               List<SlaveServer> slaveServers,
                                               String versionLabel)
                                        throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • loadSlaveServer

        public SlaveServer loadSlaveServer​(org.pentaho.di.repository.ObjectId id_slave_server,
                                           String versionName)
                                    throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • loadPartitionSchema

        public PartitionSchema loadPartitionSchema​(org.pentaho.di.repository.ObjectId id_partition_schema,
                                                   String versionName)
                                            throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • loadValueMetaAndData

        public org.pentaho.di.core.row.ValueMetaAndData loadValueMetaAndData​(org.pentaho.di.repository.ObjectId id_value)
                                                                      throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • loadNotePadMeta

        public NotePadMeta loadNotePadMeta​(org.pentaho.di.repository.ObjectId id_note)
                                    throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • saveNotePadMeta

        public void saveNotePadMeta​(NotePadMeta note,
                                    org.pentaho.di.repository.ObjectId id_transformation)
                             throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • loadRepositoryDirectoryTree

        public org.pentaho.di.repository.RepositoryDirectoryInterface loadRepositoryDirectoryTree()
                                                                                           throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • loadRepositoryDirectoryTree

        public org.pentaho.di.repository.RepositoryDirectoryInterface loadRepositoryDirectoryTree​(org.pentaho.di.repository.RepositoryDirectoryInterface root)
                                                                                           throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • findDirectory

        public org.pentaho.di.repository.RepositoryDirectoryInterface findDirectory​(String directory)
                                                                             throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • findDirectory

        public org.pentaho.di.repository.RepositoryDirectoryInterface findDirectory​(org.pentaho.di.repository.ObjectId directory)
                                                                             throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • saveRepositoryDirectory

        public void saveRepositoryDirectory​(org.pentaho.di.repository.RepositoryDirectoryInterface dir)
                                     throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • deleteRepositoryDirectory

        public void deleteRepositoryDirectory​(org.pentaho.di.repository.RepositoryDirectoryInterface dir)
                                       throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • renameRepositoryDirectory

        public org.pentaho.di.repository.ObjectId renameRepositoryDirectory​(org.pentaho.di.repository.ObjectId id,
                                                                            org.pentaho.di.repository.RepositoryDirectoryInterface newParentDir,
                                                                            String newName)
                                                                     throws org.pentaho.di.core.exception.KettleException
        Description copied from interface: Repository
        Move / rename a repository directory
        Parameters:
        id - The ObjectId of the repository directory to move
        newParentDir - The RepositoryDirectoryInterface that will be the new parent of the repository directory (May be null if a move is not desired)
        newName - The new name of the repository directory (May be null if a rename is not desired)
        Returns:
        The ObjectId of the repository directory that was moved
        Throws:
        org.pentaho.di.core.exception.KettleException
      • createRepositoryDirectory

        public org.pentaho.di.repository.RepositoryDirectoryInterface createRepositoryDirectory​(org.pentaho.di.repository.RepositoryDirectoryInterface parentDirectory,
                                                                                                String directoryPath)
                                                                                         throws org.pentaho.di.core.exception.KettleException
        Create a new directory, possibly by creating several sub-directies of / at the same time.
        Parameters:
        parentDirectory - the parent directory
        directoryPath - The path to the new Repository Directory, to be created.
        Returns:
        The created sub-directory
        Throws:
        org.pentaho.di.core.exception.KettleException - In case something goes wrong
      • getRootDirectoryID

        public org.pentaho.di.repository.ObjectId getRootDirectoryID()
                                                              throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getNrSubDirectories

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

        public org.pentaho.di.repository.ObjectId[] getSubDirectoryIDs​(org.pentaho.di.repository.ObjectId id_directory)
                                                                throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • insertLogEntry

        public org.pentaho.di.repository.ObjectId insertLogEntry​(String description)
                                                          throws org.pentaho.di.core.exception.KettleException
        Description copied from interface: Repository
        Insert an entry in the audit trail of the repository. This is an optional operation and depends on the capabilities of the underlying repository.
        Throws:
        org.pentaho.di.core.exception.KettleException
      • insertTransNote

        public void insertTransNote​(org.pentaho.di.repository.ObjectId id_transformation,
                                    org.pentaho.di.repository.ObjectId id_note)
                             throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • insertJobNote

        public void insertJobNote​(org.pentaho.di.repository.ObjectId id_job,
                                  org.pentaho.di.repository.ObjectId id_note)
                           throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • insertStepDatabase

        public void insertStepDatabase​(org.pentaho.di.repository.ObjectId id_transformation,
                                       org.pentaho.di.repository.ObjectId id_step,
                                       org.pentaho.di.repository.ObjectId id_database)
                                throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • insertJobEntryDatabase

        public void insertJobEntryDatabase​(org.pentaho.di.repository.ObjectId id_job,
                                           org.pentaho.di.repository.ObjectId id_jobentry,
                                           org.pentaho.di.repository.ObjectId id_database)
                                    throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • insertTransformationPartitionSchema

        public org.pentaho.di.repository.ObjectId insertTransformationPartitionSchema​(org.pentaho.di.repository.ObjectId id_transformation,
                                                                                      org.pentaho.di.repository.ObjectId id_partition_schema)
                                                                               throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • insertClusterSlave

        public org.pentaho.di.repository.ObjectId insertClusterSlave​(ClusterSchema clusterSchema,
                                                                     SlaveServer slaveServer)
                                                              throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • insertTransformationCluster

        public org.pentaho.di.repository.ObjectId insertTransformationCluster​(org.pentaho.di.repository.ObjectId id_transformation,
                                                                              org.pentaho.di.repository.ObjectId id_cluster)
                                                                       throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • insertTransformationSlave

        public org.pentaho.di.repository.ObjectId insertTransformationSlave​(org.pentaho.di.repository.ObjectId id_transformation,
                                                                            org.pentaho.di.repository.ObjectId id_slave)
                                                                     throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • insertTransStepCondition

        public void insertTransStepCondition​(org.pentaho.di.repository.ObjectId id_transformation,
                                             org.pentaho.di.repository.ObjectId id_step,
                                             org.pentaho.di.repository.ObjectId id_condition)
                                      throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getTransformationNames

        public String[] getTransformationNames​(org.pentaho.di.repository.ObjectId id_directory,
                                               boolean includeDeleted)
                                        throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getJobObjects

        public List<org.pentaho.di.repository.RepositoryElementMetaInterface> getJobObjects​(org.pentaho.di.repository.ObjectId id_directory,
                                                                                            boolean includeDeleted)
                                                                                     throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getTransformationObjects

        public List<org.pentaho.di.repository.RepositoryElementMetaInterface> getTransformationObjects​(org.pentaho.di.repository.ObjectId id_directory,
                                                                                                       boolean includeDeleted)
                                                                                                throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getJobNames

        public String[] getJobNames​(org.pentaho.di.repository.ObjectId id_directory,
                                    boolean includeDeleted)
                             throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getDirectoryNames

        public String[] getDirectoryNames​(org.pentaho.di.repository.ObjectId id_directory)
                                   throws org.pentaho.di.core.exception.KettleException
        Description copied from interface: Repository
        Returns the child directory names of a parent directory
        Parameters:
        id_directory - parent directory id
        Returns:
        array of child names
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getJobNames

        public String[] getJobNames()
                             throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getSubConditionIDs

        public org.pentaho.di.repository.ObjectId[] getSubConditionIDs​(org.pentaho.di.repository.ObjectId id_condition)
                                                                throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getTransNoteIDs

        public org.pentaho.di.repository.ObjectId[] getTransNoteIDs​(org.pentaho.di.repository.ObjectId id_transformation)
                                                             throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getTransformationConditionIDs

        public org.pentaho.di.repository.ObjectId[] getTransformationConditionIDs​(org.pentaho.di.repository.ObjectId id_transformation)
                                                                           throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getTransformationDatabaseIDs

        public org.pentaho.di.repository.ObjectId[] getTransformationDatabaseIDs​(org.pentaho.di.repository.ObjectId id_transformation)
                                                                          throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getJobNoteIDs

        public org.pentaho.di.repository.ObjectId[] getJobNoteIDs​(org.pentaho.di.repository.ObjectId id_job)
                                                           throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getDatabaseIDs

        public org.pentaho.di.repository.ObjectId[] getDatabaseIDs​(boolean includeDeleted)
                                                            throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getDatabaseAttributeIDs

        public org.pentaho.di.repository.ObjectId[] getDatabaseAttributeIDs​(org.pentaho.di.repository.ObjectId id_database)
                                                                     throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getPartitionSchemaIDs

        public org.pentaho.di.repository.ObjectId[] getPartitionSchemaIDs​(boolean includeDeleted)
                                                                   throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getPartitionIDs

        public org.pentaho.di.repository.ObjectId[] getPartitionIDs​(org.pentaho.di.repository.ObjectId id_partition_schema)
                                                             throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getTransformationPartitionSchemaIDs

        public org.pentaho.di.repository.ObjectId[] getTransformationPartitionSchemaIDs​(org.pentaho.di.repository.ObjectId id_transformation)
                                                                                 throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getTransformationClusterSchemaIDs

        public org.pentaho.di.repository.ObjectId[] getTransformationClusterSchemaIDs​(org.pentaho.di.repository.ObjectId id_transformation)
                                                                               throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getClusterIDs

        public org.pentaho.di.repository.ObjectId[] getClusterIDs​(boolean includeDeleted)
                                                           throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getSlaveIDs

        public org.pentaho.di.repository.ObjectId[] getSlaveIDs​(boolean includeDeleted)
                                                         throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getClusterSlaveIDs

        public org.pentaho.di.repository.ObjectId[] getClusterSlaveIDs​(org.pentaho.di.repository.ObjectId id_cluster_schema)
                                                                throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getDatabaseNames

        public String[] getDatabaseNames​(boolean includeDeleted)
                                  throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getPartitionSchemaNames

        public String[] getPartitionSchemaNames​(boolean includeDeleted)
                                         throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getSlaveNames

        public String[] getSlaveNames​(boolean includeDeleted)
                               throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getClusterNames

        public String[] getClusterNames​(boolean includeDeleted)
                                 throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getStepIDs

        public org.pentaho.di.repository.ObjectId[] getStepIDs​(org.pentaho.di.repository.ObjectId id_transformation)
                                                        throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getTransformationsUsingDatabase

        public String[] getTransformationsUsingDatabase​(org.pentaho.di.repository.ObjectId id_database)
                                                 throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getJobsUsingDatabase

        public String[] getJobsUsingDatabase​(org.pentaho.di.repository.ObjectId id_database)
                                      throws org.pentaho.di.core.exception.KettleException
        Description copied from interface: Repository
        Get the repository version.
        Returns:
        The repository version as a string
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getClustersUsingSlave

        public String[] getClustersUsingSlave​(org.pentaho.di.repository.ObjectId id_slave)
                                       throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getTransformationsUsingSlave

        public String[] getTransformationsUsingSlave​(org.pentaho.di.repository.ObjectId id_slave)
                                              throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getTransformationsUsingPartitionSchema

        public String[] getTransformationsUsingPartitionSchema​(org.pentaho.di.repository.ObjectId id_partition_schema)
                                                        throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getTransformationsUsingCluster

        public String[] getTransformationsUsingCluster​(org.pentaho.di.repository.ObjectId id_cluster)
                                                throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getJobHopIDs

        public org.pentaho.di.repository.ObjectId[] getJobHopIDs​(org.pentaho.di.repository.ObjectId id_job)
                                                          throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getTransDependencyIDs

        public org.pentaho.di.repository.ObjectId[] getTransDependencyIDs​(org.pentaho.di.repository.ObjectId id_transformation)
                                                                   throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getJobEntryIDs

        public org.pentaho.di.repository.ObjectId[] getJobEntryIDs​(org.pentaho.di.repository.ObjectId id_job)
                                                            throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getJobEntryCopyIDs

        public org.pentaho.di.repository.ObjectId[] getJobEntryCopyIDs​(org.pentaho.di.repository.ObjectId id_job)
                                                                throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getJobEntryCopyIDs

        public org.pentaho.di.repository.ObjectId[] getJobEntryCopyIDs​(org.pentaho.di.repository.ObjectId id_job,
                                                                       org.pentaho.di.repository.ObjectId id_jobentry)
                                                                throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • byteArrayToString

        public static final String byteArrayToString​(byte[] val)
                                              throws IOException
        GZips and then base64 encodes an array of bytes to a String
        Parameters:
        val - the array of bytes to convert to a string
        Returns:
        the base64 encoded string
        Throws:
        IOException - in the case there is a Base64 or GZip encoding problem
      • delSteps

        public void delSteps​(org.pentaho.di.repository.ObjectId id_transformation)
                      throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • deleteCondition

        public void deleteCondition​(org.pentaho.di.repository.ObjectId id_condition)
                             throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • delStepConditions

        public void delStepConditions​(org.pentaho.di.repository.ObjectId id_transformation)
                               throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • delStepDatabases

        public void delStepDatabases​(org.pentaho.di.repository.ObjectId id_transformation)
                              throws org.pentaho.di.core.exception.KettleException
        Delete the relationships between the transformation/steps and the databases.
        Parameters:
        id_transformation - the transformation for which we want to delete the databases.
        Throws:
        org.pentaho.di.core.exception.KettleException - in case something unexpected happens.
      • delJobEntryDatabases

        public void delJobEntryDatabases​(org.pentaho.di.repository.ObjectId id_job)
                                  throws org.pentaho.di.core.exception.KettleException
        Delete the relationships between the job/job entries and the databases.
        Parameters:
        id_job - the job for which we want to delete the databases.
        Throws:
        org.pentaho.di.core.exception.KettleDatabaseException - in case something unexpected happens.
        org.pentaho.di.core.exception.KettleException
      • delJobEntries

        public void delJobEntries​(org.pentaho.di.repository.ObjectId id_job)
                           throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • delJobEntryCopies

        public void delJobEntryCopies​(org.pentaho.di.repository.ObjectId id_job)
                               throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • delDependencies

        public void delDependencies​(org.pentaho.di.repository.ObjectId id_transformation)
                             throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • delStepAttributes

        public void delStepAttributes​(org.pentaho.di.repository.ObjectId id_transformation)
                               throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • delTransAttributes

        public void delTransAttributes​(org.pentaho.di.repository.ObjectId id_transformation)
                                throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • delJobAttributes

        public void delJobAttributes​(org.pentaho.di.repository.ObjectId id_job)
                              throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • delPartitionSchemas

        public void delPartitionSchemas​(org.pentaho.di.repository.ObjectId id_transformation)
                                 throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • delPartitions

        public void delPartitions​(org.pentaho.di.repository.ObjectId id_partition_schema)
                           throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • delClusterSlaves

        public void delClusterSlaves​(org.pentaho.di.repository.ObjectId id_cluster)
                              throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • delTransformationClusters

        public void delTransformationClusters​(org.pentaho.di.repository.ObjectId id_transformation)
                                       throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • delTransformationSlaves

        public void delTransformationSlaves​(org.pentaho.di.repository.ObjectId id_transformation)
                                     throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • delJobEntryAttributes

        public void delJobEntryAttributes​(org.pentaho.di.repository.ObjectId id_job)
                                   throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • delTransHops

        public void delTransHops​(org.pentaho.di.repository.ObjectId id_transformation)
                          throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • delJobHops

        public void delJobHops​(org.pentaho.di.repository.ObjectId id_job)
                        throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • delTransNotes

        public void delTransNotes​(org.pentaho.di.repository.ObjectId id_transformation)
                           throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • delJobNotes

        public void delJobNotes​(org.pentaho.di.repository.ObjectId id_job)
                         throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • delTrans

        public void delTrans​(org.pentaho.di.repository.ObjectId id_transformation)
                      throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • delJob

        public void delJob​(org.pentaho.di.repository.ObjectId id_job)
                    throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • delTransStepCondition

        public void delTransStepCondition​(org.pentaho.di.repository.ObjectId id_transformation)
                                   throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • delValue

        public void delValue​(org.pentaho.di.repository.ObjectId id_value)
                      throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • deleteSlave

        public void deleteSlave​(org.pentaho.di.repository.ObjectId id_slave)
                         throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • deletePartitionSchema

        public void deletePartitionSchema​(org.pentaho.di.repository.ObjectId id_partition_schema)
                                   throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • deleteClusterSchema

        public void deleteClusterSchema​(org.pentaho.di.repository.ObjectId id_cluster)
                                 throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • deleteTransformation

        public void deleteTransformation​(org.pentaho.di.repository.ObjectId id_transformation)
                                  throws org.pentaho.di.core.exception.KettleException
        Description copied from interface: Repository
        Delete everything related to a transformation from the repository. This does not included shared objects : databases, slave servers, cluster and partition schema.
        Parameters:
        id_transformation - the transformation id to delete
        Throws:
        org.pentaho.di.core.exception.KettleException
      • deleteJob

        public void deleteJob​(org.pentaho.di.repository.ObjectId id_job)
                       throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • dropRepositorySchema

        public boolean dropRepositorySchema()
                                     throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • updateStepTypes

        public void updateStepTypes()
                             throws org.pentaho.di.core.exception.KettleException
        Update the list in R_STEP_TYPE using the StepLoader StepPlugin entries
        Throws:
        org.pentaho.di.core.exception.KettleException - if the update didn't go as planned.
      • updateDatabaseTypes

        public void updateDatabaseTypes()
                                 throws org.pentaho.di.core.exception.KettleException
        Update the list in R_DATABASE_TYPE using the plugin registry
        Throws:
        org.pentaho.di.core.exception.KettleException - if the update didn't go as planned.
      • updateJobEntryTypes

        public void updateJobEntryTypes()
                                 throws org.pentaho.di.core.exception.KettleException
        Update the list in R_JOBENTRY_TYPE
        Throws:
        org.pentaho.di.core.exception.KettleException - if something went wrong during the update.
      • clearSharedObjectCache

        public void clearSharedObjectCache()
        Clear the shared object cache, if applicable.
      • getDatabase

        public org.pentaho.di.core.database.Database getDatabase()
        Returns:
        Returns the database.
      • setDatabase

        public void setDatabase​(org.pentaho.di.core.database.Database database)
        Parameters:
        database - The database to set.
      • lockRepository

        public void lockRepository()
                            throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • unlockRepository

        public void unlockRepository()
                              throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getDatabases

        public List<org.pentaho.di.core.database.DatabaseMeta> getDatabases()
                                                                     throws org.pentaho.di.core.exception.KettleException
        Returns:
        a list of all the databases in the repository.
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getSlaveServers

        public List<SlaveServer> getSlaveServers()
                                          throws org.pentaho.di.core.exception.KettleException
        Returns:
        a list of all the slave servers in the repository.
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getDatabaseMeta

        public org.pentaho.di.core.database.DatabaseMeta getDatabaseMeta()
        Returns:
        the databaseMeta
      • readDatabases

        public List<org.pentaho.di.core.database.DatabaseMeta> readDatabases()
                                                                      throws org.pentaho.di.core.exception.KettleException
        Read all the databases defined in the repository
        Returns:
        a list of all the databases defined in the repository
        Throws:
        org.pentaho.di.core.exception.KettleException
      • isUseBatchProcessing

        public boolean isUseBatchProcessing()
        Returns:
        the useBatchProcessing
      • setImportBaseDirectory

        public void setImportBaseDirectory​(org.pentaho.di.repository.RepositoryDirectory importBaseDirectory)
        Set this directory during import to signal that job entries like Trans and Job need to point to job entries relative to this directory.
        Parameters:
        importBaseDirectory - the base import directory, selected by the user
      • getImportBaseDirectory

        public org.pentaho.di.repository.RepositoryDirectory getImportBaseDirectory()
        The directory set during import to signal that job entries like Trans and Job need to point to job entries relative to this directory
        Returns:
        the base import directory, selected by the user
      • createRepositorySchema

        public void createRepositorySchema​(org.pentaho.di.core.ProgressMonitorListener monitor,
                                           boolean upgrade,
                                           List<String> statements,
                                           boolean dryRun)
                                    throws org.pentaho.di.core.exception.KettleException
        Create or upgrade repository tables & fields, populate lookup tables, ...
        Parameters:
        monitor - The progress monitor to use, or null if no monitor is present.
        upgrade - True if you want to upgrade the repository, false if you want to create it.
        statements - the list of statements to populate
        dryrun - true if we don't actually execute the statements
        Throws:
        org.pentaho.di.core.exception.KettleException - in case something goes wrong!
      • countNrStepAttributes

        public int countNrStepAttributes​(org.pentaho.di.repository.ObjectId id_step,
                                         String code)
                                  throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • countNrJobEntryAttributes

        public int countNrJobEntryAttributes​(org.pentaho.di.repository.ObjectId id_jobentry,
                                             String code)
                                      throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • disconnect

        public void disconnect()
        Description copied from interface: Repository
        Disconnect from the repository.
      • getJobEntryAttributeInteger

        public long getJobEntryAttributeInteger​(org.pentaho.di.repository.ObjectId id_jobentry,
                                                int nr,
                                                String code)
                                         throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getJobEntryAttributeString

        public String getJobEntryAttributeString​(org.pentaho.di.repository.ObjectId id_jobentry,
                                                 int nr,
                                                 String code)
                                          throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getJobEntryAttributeBoolean

        public boolean getJobEntryAttributeBoolean​(org.pentaho.di.repository.ObjectId id_jobentry,
                                                   int nr,
                                                   String code,
                                                   boolean def)
                                            throws org.pentaho.di.core.exception.KettleException
        Specified by:
        getJobEntryAttributeBoolean in class AbstractRepository
        Throws:
        org.pentaho.di.core.exception.KettleException
      • saveJobEntryAttribute

        public void saveJobEntryAttribute​(org.pentaho.di.repository.ObjectId id_job,
                                          org.pentaho.di.repository.ObjectId id_jobentry,
                                          int nr,
                                          String code,
                                          String value)
                                   throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • saveJobEntryAttribute

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

        public void saveJobEntryAttribute​(org.pentaho.di.repository.ObjectId id_job,
                                          org.pentaho.di.repository.ObjectId id_jobentry,
                                          int nr,
                                          String code,
                                          long value)
                                   throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getStepAttributeBoolean

        public boolean getStepAttributeBoolean​(org.pentaho.di.repository.ObjectId id_step,
                                               int nr,
                                               String code,
                                               boolean def)
                                        throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getStepAttributeInteger

        public long getStepAttributeInteger​(org.pentaho.di.repository.ObjectId id_step,
                                            int nr,
                                            String code)
                                     throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getStepAttributeString

        public String getStepAttributeString​(org.pentaho.di.repository.ObjectId id_step,
                                             int nr,
                                             String code)
                                      throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • saveStepAttribute

        public void saveStepAttribute​(org.pentaho.di.repository.ObjectId id_transformation,
                                      org.pentaho.di.repository.ObjectId id_step,
                                      int nr,
                                      String code,
                                      String value)
                               throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • saveStepAttribute

        public void saveStepAttribute​(org.pentaho.di.repository.ObjectId id_transformation,
                                      org.pentaho.di.repository.ObjectId id_step,
                                      int nr,
                                      String code,
                                      boolean value)
                               throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • saveStepAttribute

        public void saveStepAttribute​(org.pentaho.di.repository.ObjectId id_transformation,
                                      org.pentaho.di.repository.ObjectId id_step,
                                      int nr,
                                      String code,
                                      long value)
                               throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • saveStepAttribute

        public void saveStepAttribute​(org.pentaho.di.repository.ObjectId id_transformation,
                                      org.pentaho.di.repository.ObjectId id_step,
                                      int nr,
                                      String code,
                                      double value)
                               throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • findStepAttributeID

        public org.pentaho.di.repository.ObjectId findStepAttributeID​(org.pentaho.di.repository.ObjectId id_step,
                                                                      int nr,
                                                                      String code)
                                                               throws org.pentaho.di.core.exception.KettleException
        This method is only used to check backward compatibility with the 2.x series.
        Parameters:
        id_step -
        nr -
        code -
        Returns:
        Throws:
        org.pentaho.di.core.exception.KettleException
      • execStatement

        public void execStatement​(String sql)
                           throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • loadJobEntry

        public void loadJobEntry​(JobEntryBase jobEntryBase,
                                 org.pentaho.di.repository.ObjectId id_jobentry,
                                 List<org.pentaho.di.core.database.DatabaseMeta> databases,
                                 List<SlaveServer> slaveServers)
                          throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getClusterID

        public org.pentaho.di.repository.ObjectId getClusterID​(String name)
                                                        throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getDatabaseID

        public org.pentaho.di.repository.ObjectId getDatabaseID​(String name)
                                                         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.RepositoryDirectoryInterface repositoryDirectory)
                                                    throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getPartitionSchemaID

        public org.pentaho.di.repository.ObjectId getPartitionSchemaID​(String name)
                                                                throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getSlaveID

        public org.pentaho.di.repository.ObjectId getSlaveID​(String name)
                                                      throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getTransformationID

        public org.pentaho.di.repository.ObjectId getTransformationID​(String name,
                                                                      org.pentaho.di.repository.RepositoryDirectoryInterface repositoryDirectory)
                                                               throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • insertJobEntry

        public org.pentaho.di.repository.ObjectId insertJobEntry​(org.pentaho.di.repository.ObjectId id_job,
                                                                 JobEntryBase jobEntryBase)
                                                          throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • loadDatabaseMetaFromStepAttribute

        public org.pentaho.di.core.database.DatabaseMeta loadDatabaseMetaFromStepAttribute​(org.pentaho.di.repository.ObjectId idStep,
                                                                                           String code,
                                                                                           List<org.pentaho.di.core.database.DatabaseMeta> databases)
                                                                                    throws org.pentaho.di.core.exception.KettleException
        Description copied from interface: Repository
        This method is introduced to avoid having to go over an integer/string/whatever in the interface and the step code.
        Returns:
        Throws:
        org.pentaho.di.core.exception.KettleException
      • saveDatabaseMetaStepAttribute

        public void saveDatabaseMetaStepAttribute​(org.pentaho.di.repository.ObjectId id_transformation,
                                                  org.pentaho.di.repository.ObjectId id_step,
                                                  String code,
                                                  org.pentaho.di.core.database.DatabaseMeta database)
                                           throws org.pentaho.di.core.exception.KettleException
        This method saves the object ID of the database object (if not null) in the step attributes
        Parameters:
        id_transformation -
        id_step -
        string -
        database -
        Throws:
        org.pentaho.di.core.exception.KettleException
      • loadDatabaseMetaFromJobEntryAttribute

        public org.pentaho.di.core.database.DatabaseMeta loadDatabaseMetaFromJobEntryAttribute​(org.pentaho.di.repository.ObjectId id_jobentry,
                                                                                               String nameCode,
                                                                                               int nr,
                                                                                               String idCode,
                                                                                               List<org.pentaho.di.core.database.DatabaseMeta> databases)
                                                                                        throws org.pentaho.di.core.exception.KettleException
        Description copied from interface: Repository
        This method is introduced to avoid having to go over an integer/string/whatever in the interface and the job entry code.
        Returns:
        Throws:
        org.pentaho.di.core.exception.KettleException
      • saveDatabaseMetaJobEntryAttribute

        public void saveDatabaseMetaJobEntryAttribute​(org.pentaho.di.repository.ObjectId id_job,
                                                      org.pentaho.di.repository.ObjectId id_jobentry,
                                                      int nr,
                                                      String nameCode,
                                                      String idCode,
                                                      org.pentaho.di.core.database.DatabaseMeta database)
                                               throws org.pentaho.di.core.exception.KettleException
        This method saves the object ID of the database object (if not null) in the step attributes
        Parameters:
        id_job -
        nr -
        id_jobentry -
        nameCode -
        nameCode -
        idCode -
        database -
        Throws:
        org.pentaho.di.core.exception.KettleException
      • loadConditionFromStepAttribute

        public org.pentaho.di.core.Condition loadConditionFromStepAttribute​(org.pentaho.di.repository.ObjectId id_step,
                                                                            String code)
                                                                     throws org.pentaho.di.core.exception.KettleException
        Load a condition from the repository with the Object ID stored in a step attribute.
        Parameters:
        id_step -
        code -
        Returns:
        Throws:
        org.pentaho.di.core.exception.KettleException
      • saveConditionStepAttribute

        public void saveConditionStepAttribute​(org.pentaho.di.repository.ObjectId id_transformation,
                                               org.pentaho.di.repository.ObjectId id_step,
                                               String code,
                                               org.pentaho.di.core.Condition condition)
                                        throws org.pentaho.di.core.exception.KettleException
        This method saves the object ID of the condition object (if not null) in the step attributes
        Parameters:
        id_step -
        code -
        condition -
        Throws:
        org.pentaho.di.core.exception.KettleException
      • undeleteObject

        public void undeleteObject​(org.pentaho.di.repository.RepositoryElementMetaInterface element)
                            throws org.pentaho.di.core.exception.KettleException
        Description copied from interface: Repository
        Removes he deleted flag from a repository element in the repository. If it wasn't deleted, it remains untouched.
        Throws:
        org.pentaho.di.core.exception.KettleException - get throws in case something goes horribly wrong.
      • getJobAndTransformationObjects

        public List<org.pentaho.di.repository.RepositoryElementMetaInterface> getJobAndTransformationObjects​(org.pentaho.di.repository.ObjectId id_directory,
                                                                                                             boolean includeDeleted)
                                                                                                      throws org.pentaho.di.core.exception.KettleException
        Description copied from interface: Repository
        Gets all job and transformation objects in the given directory. (Combines Repository.getJobObjects(ObjectId, boolean) and Repository.getTransformationObjects(ObjectId, boolean) into one operation.
        Parameters:
        id_directory - directory
        includeDeleted - true to return deleted objects
        Returns:
        list of repository objects
        Throws:
        org.pentaho.di.core.exception.KettleException - In case something goes wrong
      • getService

        public IRepositoryService getService​(Class<? extends IRepositoryService> clazz)
                                      throws org.pentaho.di.core.exception.KettleException
        Description copied from interface: Repository
        Retrieves a given repository service
        Returns:
        repository service
        Throws:
        org.pentaho.di.core.exception.KettleException - in case something goes horribly wrong.
      • getServiceInterfaces

        public List<Class<? extends IRepositoryService>> getServiceInterfaces()
                                                                       throws org.pentaho.di.core.exception.KettleException
        Description copied from interface: Repository
        Retrieves the current list of of IRepository Services.
        Returns:
        List of repository services
        Throws:
        org.pentaho.di.core.exception.KettleException - in case something goes horribly wrong.
      • hasService

        public boolean hasService​(Class<? extends IRepositoryService> clazz)
                           throws org.pentaho.di.core.exception.KettleException
        Description copied from interface: Repository
        Checks whether a given repository service is available or not
        Throws:
        org.pentaho.di.core.exception.KettleException - in case something goes horribly wrong.
      • getDefaultSaveDirectory

        public org.pentaho.di.repository.RepositoryDirectory getDefaultSaveDirectory​(org.pentaho.di.repository.RepositoryElementInterface repositoryElement)
                                                                              throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getUserHomeDirectory

        public org.pentaho.di.repository.RepositoryDirectory getUserHomeDirectory()
                                                                           throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getObjectInformation

        public RepositoryObject getObjectInformation​(org.pentaho.di.repository.ObjectId objectId,
                                                     org.pentaho.di.repository.RepositoryObjectType objectType)
                                              throws org.pentaho.di.core.exception.KettleException
        Description copied from interface: Repository
        Get more information about a certain object ID in the form of the RepositoryObject
        Parameters:
        objectId - The ID of the object to get more information about.
        objectType - The type of object to investigate.
        Returns:
        The repository object or null if nothing could be found.
        Throws:
        org.pentaho.di.core.exception.KettleException - In case there was a loading problem.
      • loadJob

        public JobMeta loadJob​(org.pentaho.di.repository.ObjectId idJob,
                               String versionLabel)
                        throws org.pentaho.di.core.exception.KettleException
        Description copied from interface: Repository
        Load a job from the repository by id
        Parameters:
        idJob - the id of the job
        versionLabel - version to load. Specify null to load the last version.
        Throws:
        org.pentaho.di.core.exception.KettleException
      • loadTransformation

        public TransMeta loadTransformation​(org.pentaho.di.repository.ObjectId idTransformation,
                                            String versionLabel)
                                     throws org.pentaho.di.core.exception.KettleException
        Description copied from interface: Repository
        Load a transformation by id
        Parameters:
        idTransformation - the id of the transformation to load
        versionLabel - version to load. Specify null to load the last version.
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getConnectMessage

        public String getConnectMessage()
        Description copied from interface: Repository
        This is an informational message that a repository can display on connecting within Spoon. If a null is returned, no message is displayed to the end user.
        Returns:
        message
      • getExporter

        public IRepositoryExporter getExporter()
        Returns:
        the exporter that will handle exports from this repository
      • getImporter

        public IRepositoryImporter getImporter()
        Returns:
        the importer that will handle imports into this repository
      • getMetaStore

        public KettleDatabaseRepositoryMetaStore getMetaStore()
        Returns:
        the Metastore that is implemented in this Repository. Return null if this repository doesn't implement a Metastore.