Class AbstractBaseCommandExecutor

    • Constructor Detail

      • AbstractBaseCommandExecutor

        public AbstractBaseCommandExecutor()
    • Method Detail

      • exitWithStatus

        protected org.pentaho.di.core.Result exitWithStatus​(int exitStatus)
      • createDefaultMetastore

        public org.pentaho.metastore.stores.delegate.DelegatingMetaStore createDefaultMetastore()
                                                                                         throws org.pentaho.metastore.api.exceptions.MetaStoreException
        Throws:
        org.pentaho.metastore.api.exceptions.MetaStoreException
      • logDebug

        protected void logDebug​(String messageKey)
      • logDebug

        protected void logDebug​(String messageKey,
                                String... messageTokens)
      • calculateAndPrintElapsedTime

        protected int calculateAndPrintElapsedTime​(Date start,
                                                   Date stop,
                                                   String startStopMsgTkn,
                                                   String processingEndAfterMsgTkn,
                                                   String processingEndAfterLongMsgTkn,
                                                   String processingEndAfterLongerMsgTkn,
                                                   String processingEndAfterLongestMsgTkn)
      • printVersion

        protected void printVersion​(String kettleVersionMsgTkn)
      • loadRepositoryConnection

        public RepositoryMeta loadRepositoryConnection​(String repoName,
                                                       String loadingAvailableRepMsgTkn,
                                                       String noRepsDefinedMsgTkn,
                                                       String findingRepMsgTkn)
                                                throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • loadRepositoryInfo

        public RepositoriesMeta loadRepositoryInfo​(String loadingAvailableRepMsgTkn,
                                                   String noRepsDefinedMsgTkn)
                                            throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • loadRepositoryDirectory

        public org.pentaho.di.repository.RepositoryDirectoryInterface loadRepositoryDirectory​(Repository repository,
                                                                                              String dirName,
                                                                                              String noRepoProvidedMsgTkn,
                                                                                              String allocateAndConnectRepoMsgTkn,
                                                                                              String cannotFindDirMsgTkn)
                                                                                       throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • establishRepositoryConnection

        public Repository establishRepositoryConnection​(RepositoryMeta repositoryMeta,
                                                        String username,
                                                        String password,
                                                        RepositoryOperation... operations)
                                                 throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • printRepositoryDirectories

        public void printRepositoryDirectories​(Repository repository,
                                               org.pentaho.di.repository.RepositoryDirectoryInterface directory)
                                        throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • printParameter

        protected void printParameter​(String name,
                                      String value,
                                      String defaultValue,
                                      String description)
      • isEnabled

        public boolean isEnabled​(String value)
      • decodeBase64ToZipFile

        public File decodeBase64ToZipFile​(Serializable base64Zip,
                                          boolean deleteOnJvmExit)
                                   throws IOException
        Decodes the provided base64String into a default path. Resulting zip file is UUID-named for concurrency sake.
        Parameters:
        base64Zip - BASE64 representation of a file
        deleteOnJvmExit - true if we want this newly generated file to be marked for deletion on JVM termination, false otherwise
        Returns:
        File the newly created File
        Throws:
        IOException
      • decodeBase64ToZipFile

        public File decodeBase64ToZipFile​(Serializable base64Zip,
                                          String filePath)
                                   throws IOException
        Decodes the provided base64String into the specified filePath. Parent directories must already exist.
        Parameters:
        base64Zip - BASE64 representation of a file
        filePath - String The path to which the base64String is to be decoded
        Returns:
        File the newly created File
        Throws:
        IOException
      • getLog

        public org.pentaho.di.core.logging.LogChannelInterface getLog()
      • setLog

        public void setLog​(org.pentaho.di.core.logging.LogChannelInterface log)
      • getPkgClazz

        public Class<?> getPkgClazz()
      • setPkgClazz

        public void setPkgClazz​(Class<?> pkgClazz)
      • getMetaStore

        public org.pentaho.metastore.stores.delegate.DelegatingMetaStore getMetaStore()
      • setMetaStore

        public void setMetaStore​(org.pentaho.metastore.stores.delegate.DelegatingMetaStore metaStore)
      • getResult

        public org.pentaho.di.core.Result getResult()
      • setResult

        public void setResult​(org.pentaho.di.core.Result result)