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 int
calculateAndPrintElapsedTime(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.DelegatingMetaStore
createDefaultMetastore()
File
decodeBase64ToZipFile(Serializable base64Zip, boolean deleteOnJvmExit)
Decodes the provided base64String into a default path.File
decodeBase64ToZipFile(Serializable base64Zip, String filePath)
Decodes the provided base64String into the specified filePath.Repository
establishRepositoryConnection(RepositoryMeta repositoryMeta, String username, String password, RepositoryOperation... operations)
protected org.pentaho.di.core.Result
exitWithStatus(int exitStatus)
SimpleDateFormat
getDateFormat()
org.pentaho.di.core.logging.LogChannelInterface
getLog()
org.pentaho.metastore.stores.delegate.DelegatingMetaStore
getMetaStore()
Class<?>
getPkgClazz()
org.pentaho.di.core.Result
getResult()
boolean
isEnabled(String value)
RepositoryMeta
loadRepositoryConnection(String repoName, String loadingAvailableRepMsgTkn, String noRepsDefinedMsgTkn, String findingRepMsgTkn)
org.pentaho.di.repository.RepositoryDirectoryInterface
loadRepositoryDirectory(Repository repository, String dirName, String noRepoProvidedMsgTkn, String allocateAndConnectRepoMsgTkn, String cannotFindDirMsgTkn)
RepositoriesMeta
loadRepositoryInfo(String loadingAvailableRepMsgTkn, String noRepsDefinedMsgTkn)
protected void
logDebug(String messageKey)
protected void
logDebug(String messageKey, String... messageTokens)
protected void
printParameter(String name, String value, String defaultValue, String description)
void
printRepositoryDirectories(Repository repository, org.pentaho.di.repository.RepositoryDirectoryInterface directory)
protected void
printVersion(String kettleVersionMsgTkn)
void
setDateFormat(SimpleDateFormat dateFormat)
void
setLog(org.pentaho.di.core.logging.LogChannelInterface log)
void
setMetaStore(org.pentaho.metastore.stores.delegate.DelegatingMetaStore metaStore)
void
setPkgClazz(Class<?> pkgClazz)
void
setResult(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)
-
-