Package org.pentaho.di.base
Class AbstractBaseCommandExecutor
- java.lang.Object
-
- org.pentaho.di.base.AbstractBaseCommandExecutor
-
- Direct Known Subclasses:
KitchenCommandExecutor,PanCommandExecutor
public abstract class AbstractBaseCommandExecutor extends Object
-
-
Constructor Summary
Constructors Constructor Description AbstractBaseCommandExecutor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intcalculateAndPrintElapsedTime(Date start, Date stop, String startStopMsgTkn, String processingEndAfterMsgTkn, String processingEndAfterLongMsgTkn, String processingEndAfterLongerMsgTkn, String processingEndAfterLongestMsgTkn)protected String[]convert(Map<String,String> map)org.pentaho.metastore.stores.delegate.DelegatingMetaStorecreateDefaultMetastore()FiledecodeBase64ToZipFile(Serializable base64Zip, boolean deleteOnJvmExit)Decodes the provided base64String into a default path.FiledecodeBase64ToZipFile(Serializable base64Zip, String filePath)Decodes the provided base64String into the specified filePath.RepositoryestablishRepositoryConnection(RepositoryMeta repositoryMeta, String username, String password, RepositoryOperation... operations)protected org.pentaho.di.core.ResultexitWithStatus(int exitStatus)SimpleDateFormatgetDateFormat()org.pentaho.di.core.logging.LogChannelInterfacegetLog()org.pentaho.metastore.stores.delegate.DelegatingMetaStoregetMetaStore()Class<?>getPkgClazz()org.pentaho.di.core.ResultgetResult()booleanisEnabled(String value)RepositoryMetaloadRepositoryConnection(String repoName, String loadingAvailableRepMsgTkn, String noRepsDefinedMsgTkn, String findingRepMsgTkn)org.pentaho.di.repository.RepositoryDirectoryInterfaceloadRepositoryDirectory(Repository repository, String dirName, String noRepoProvidedMsgTkn, String allocateAndConnectRepoMsgTkn, String cannotFindDirMsgTkn)RepositoriesMetaloadRepositoryInfo(String loadingAvailableRepMsgTkn, String noRepsDefinedMsgTkn)protected voidlogDebug(String messageKey)protected voidlogDebug(String messageKey, String... messageTokens)protected voidprintParameter(String name, String value, String defaultValue, String description)voidprintRepositoryDirectories(Repository repository, org.pentaho.di.repository.RepositoryDirectoryInterface directory)protected voidprintVersion(String kettleVersionMsgTkn)voidsetDateFormat(SimpleDateFormat dateFormat)voidsetLog(org.pentaho.di.core.logging.LogChannelInterface log)voidsetMetaStore(org.pentaho.metastore.stores.delegate.DelegatingMetaStore metaStore)voidsetPkgClazz(Class<?> pkgClazz)voidsetResult(org.pentaho.di.core.Result result)
-
-
-
Field Detail
-
YES
public static final String YES
- See Also:
- Constant Field Values
-
-
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)
-
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 filedeleteOnJvmExit- 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 filefilePath- 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)
-
getDateFormat
public SimpleDateFormat getDateFormat()
-
setDateFormat
public void setDateFormat(SimpleDateFormat dateFormat)
-
getResult
public org.pentaho.di.core.Result getResult()
-
setResult
public void setResult(org.pentaho.di.core.Result result)
-
-