Class PanCommandExecutor


public class PanCommandExecutor extends AbstractBaseCommandExecutor
EnhancedPanCommandExecutor that uses the PanTransformationDelegate for centralized execution logic.
  • Constructor Details

    • PanCommandExecutor

      public PanCommandExecutor(Class<?> pkgClazz, org.pentaho.di.core.logging.LogChannelInterface log)
  • Method Details

    • execute

      public org.pentaho.di.core.Result execute(Params params, String[] arguments) throws org.pentaho.di.core.exception.KettleException
      Throws:
      org.pentaho.di.core.exception.KettleException
    • loadTransformation

      protected Trans loadTransformation(Params params) throws org.pentaho.di.core.exception.KettleException, IOException
      Load transformation from repository or filesystem based on parameters.
      Throws:
      org.pentaho.di.core.exception.KettleException
      IOException
    • executeWithDelegate

      public org.pentaho.di.core.Result executeWithDelegate(Trans trans, Params params, String[] arguments)
      Execute transformation using the delegate pattern. This method shows how to integrate the PanTransformationDelegate into the existing command executor framework.
    • createExecutionConfigurationFromParams

      protected TransExecutionConfiguration createExecutionConfigurationFromParams(Params params)
      Create execution configuration from command-line parameters.
    • getTransformationDelegate

      public PanTransformationDelegate getTransformationDelegate()
    • setTransformationDelegate

      public void setTransformationDelegate(PanTransformationDelegate transformationDelegate)
    • getRepository

      public Repository getRepository()
      Get the repository instance. If not already initialized, it will be null. Call initializeRepository() first to set up the repository connection.
    • initializeRepository

      public void initializeRepository(Params params) throws org.pentaho.di.core.exception.KettleException
      Initialize repository connection based on parameters. This method extracts the repository initialization logic from PanCommandExecutor.
      Throws:
      org.pentaho.di.core.exception.KettleException
    • printVersion

      public int printVersion()
    • executeRepositoryBasedCommand

      protected void executeRepositoryBasedCommand(Repository repository, String dirName, String listTrans, String listDirs, String exportRepo) throws org.pentaho.di.core.exception.KettleException
      Throws:
      org.pentaho.di.core.exception.KettleException
    • loadTransFromRepository

      public Trans loadTransFromRepository(Repository repository, String dirName, String transName) throws org.pentaho.di.core.exception.KettleException
      Throws:
      org.pentaho.di.core.exception.KettleException
    • loadTransFromFilesystem

      public Trans loadTransFromFilesystem(String initialDir, String filename, String jarFilename, Serializable base64Zip) throws IOException, org.pentaho.di.core.exception.KettleMissingPluginsException, org.pentaho.di.core.exception.KettleXMLException
      Throws:
      IOException
      org.pentaho.di.core.exception.KettleMissingPluginsException
      org.pentaho.di.core.exception.KettleXMLException
    • configureParameters

      protected static void configureParameters(Trans trans, org.pentaho.di.core.parameters.NamedParams optionParams, TransMeta transMeta) throws org.pentaho.di.core.parameters.UnknownParamException
      Configures the transformation with the given parameters and their values
      Parameters:
      trans - the executable transformation object
      optionParams - the list of parameters to set for the transformation
      transMeta - the transformation metadata
      Throws:
      org.pentaho.di.core.parameters.UnknownParamException
    • printTransformationParameters

      protected void printTransformationParameters(Trans trans) throws org.pentaho.di.core.parameters.UnknownParamException
      Throws:
      org.pentaho.di.core.parameters.UnknownParamException
    • printRepositoryStoredTransformations

      protected void printRepositoryStoredTransformations(Repository repository, org.pentaho.di.repository.RepositoryDirectoryInterface directory) throws org.pentaho.di.core.exception.KettleException
      Throws:
      org.pentaho.di.core.exception.KettleException
    • printRepositories

      protected void printRepositories(RepositoriesMeta repositoriesMeta)
    • exitWithStatus

      protected org.pentaho.di.core.Result exitWithStatus(int exitStatus, Trans trans)