Package org.pentaho.di.pan
Class PanCommandExecutor
java.lang.Object
org.pentaho.di.base.AbstractBaseCommandExecutor
org.pentaho.di.pan.PanCommandExecutor
EnhancedPanCommandExecutor that uses the PanTransformationDelegate
for centralized execution logic.
-
Field Summary
Fields inherited from class org.pentaho.di.base.AbstractBaseCommandExecutor
YES -
Constructor Summary
ConstructorsConstructorDescriptionPanCommandExecutor(Class<?> pkgClazz, org.pentaho.di.core.logging.LogChannelInterface log) -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidconfigureParameters(Trans trans, org.pentaho.di.core.parameters.NamedParams optionParams, TransMeta transMeta) Configures the transformation with the given parameters and their valuesprotected TransExecutionConfigurationCreate execution configuration from command-line parameters.org.pentaho.di.core.Resultprotected voidexecuteRepositoryBasedCommand(Repository repository, String dirName, String listTrans, String listDirs, String exportRepo) org.pentaho.di.core.ResultexecuteWithDelegate(Trans trans, Params params, String[] arguments) Execute transformation using the delegate pattern.protected org.pentaho.di.core.ResultexitWithStatus(int exitStatus, Trans trans) Get the repository instance.voidinitializeRepository(Params params) Initialize repository connection based on parameters.protected TransloadTransformation(Params params) Load transformation from repository or filesystem based on parameters.loadTransFromFilesystem(String initialDir, String filename, String jarFilename, Serializable base64Zip) loadTransFromRepository(Repository repository, String dirName, String transName) protected voidprintRepositories(RepositoriesMeta repositoriesMeta) protected voidprintRepositoryStoredTransformations(Repository repository, org.pentaho.di.repository.RepositoryDirectoryInterface directory) protected voidintvoidsetTransformationDelegate(PanTransformationDelegate transformationDelegate) Methods inherited from class org.pentaho.di.base.AbstractBaseCommandExecutor
calculateAndPrintElapsedTime, convert, decodeBase64ToZipFile, decodeBase64ToZipFile, establishRepositoryConnection, exitWithStatus, getBowl, getDateFormat, getLog, getMetaStore, getPkgClazz, getResult, isEnabled, loadRepositoryConnection, loadRepositoryDirectory, loadRepositoryInfo, logDebug, logDebug, printParameter, printRepositoryDirectories, printVersion, setBowl, setDateFormat, setLog, setMetaStore, setPkgClazz, setResult, validateAndSetPluginContext
-
Constructor Details
-
PanCommandExecutor
-
-
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.KettleExceptionIOException
-
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
Create execution configuration from command-line parameters. -
getTransformationDelegate
-
setTransformationDelegate
-
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:
IOExceptionorg.pentaho.di.core.exception.KettleMissingPluginsExceptionorg.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 objectoptionParams- the list of parameters to set for the transformationtransMeta- 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
-
exitWithStatus
-