org.pentaho.di.job.entry
Class JobEntryBase

java.lang.Object
  extended by org.pentaho.di.job.entry.JobEntryBase
All Implemented Interfaces:
Cloneable, org.pentaho.di.core.CheckResultSourceInterface, org.pentaho.di.core.logging.LoggingObjectInterface, org.pentaho.di.core.variables.VariableSpace, ResourceHolderInterface
Direct Known Subclasses:
JobEntryAbort, JobEntryAddResultFilenames, JobEntryCheckDbConnections, JobEntryCheckFilesLocked, JobEntryColumnsExist, JobEntryConnectedToRepository, JobEntryCopyFiles, JobEntryCopyMoveResultFilenames, JobEntryCreateFile, JobEntryCreateFolder, JobEntryDelay, JobEntryDeleteFile, JobEntryDeleteFiles, JobEntryDeleteFolders, JobEntryDeleteResultFilenames, JobEntryDosToUnix, JobEntryDTDValidator, JobEntryEmpty, JobEntryEval, JobEntryEvalFilesMetrics, JobEntryEvalTableContent, JobEntryExportRepository, JobEntryFileCompare, JobEntryFileExists, JobEntryFilesExist, JobEntryFolderIsEmpty, JobEntryFoldersCompare, JobEntryFTP, JobEntryFTPDelete, JobEntryFTPPUT, JobEntryFTPSGet, JobEntryFTPSPUT, JobEntryGetPOP, JobEntryHTTP, JobEntryJob, JobEntryMail, JobEntryMailValidator, JobEntryMoveFiles, JobEntryMSAccessBulkLoad, JobEntryMsgBoxInfo, JobEntryMssqlBulkLoad, JobEntryMysqlBulkFile, JobEntryMysqlBulkLoad, JobEntryPGPDecryptFiles, JobEntryPGPEncryptFiles, JobEntryPGPVerify, JobEntryPing, JobEntrySetVariables, JobEntrySFTP, JobEntrySFTPPUT, JobEntryShell, JobEntrySimpleEval, JobEntrySNMPTrap, JobEntrySpecial, JobEntrySQL, JobEntrySSH2GET, JobEntrySSH2PUT, JobEntrySuccess, JobEntrySyslog, JobEntryTableExists, JobEntryTalendJobExec, JobEntryTrans, JobEntryTruncateTables, JobEntryUnZip, JobEntryWaitForFile, JobEntryWaitForSQL, JobEntryWebServiceAvailable, JobEntryWriteToFile, JobEntryWriteToLog, JobEntryXMLWellFormed, JobEntryXSDValidator, JobEntryXSLT, JobEntryZipFile

public class JobEntryBase
extends Object
implements Cloneable, org.pentaho.di.core.variables.VariableSpace, org.pentaho.di.core.CheckResultSourceInterface, ResourceHolderInterface, org.pentaho.di.core.logging.LoggingObjectInterface

Base class for the different types of job-entries...

Author:
Matt Created on 18-jun-04

Constructor Summary
JobEntryBase()
           
JobEntryBase(String name, String description)
           
 
Method Summary
 void check(List<org.pentaho.di.core.CheckResultInterface> remarks, JobMeta jobMeta)
          Support for overrides not having to put in a check method
 void clear()
           
 Object clone()
           
 void copyVariablesFrom(org.pentaho.di.core.variables.VariableSpace space)
           
 String environmentSubstitute(String aString)
           
 String[] environmentSubstitute(String[] aString)
           
 boolean equals(Object obj)
           
 boolean evaluates()
          check whether or not this job entry evaluates.
 String exportResources(org.pentaho.di.core.variables.VariableSpace space, Map<String,ResourceDefinition> definitions, ResourceNamingInterface namingInterface, Repository repository)
           
 boolean getBooleanValueOfVariable(String variableName, boolean defaultValue)
           
 String getContainerObjectId()
           
 String getDescription()
           
 String getDialogClassName()
          This returns the expected name for the dialog that edits a job entry.
 String getFilename()
           
 String getHolderType()
          Gets the high-level type of resource holder.
 org.pentaho.di.core.logging.LogChannelInterface getLogChannel()
           
 String getLogChannelId()
           
 org.pentaho.di.core.logging.LogLevel getLogLevel()
           
 String getName()
           
 String getObjectCopy()
           
 org.pentaho.di.repository.ObjectId getObjectId()
           
 String getObjectName()
           
 org.pentaho.di.repository.ObjectRevision getObjectRevision()
           
 org.pentaho.di.core.logging.LoggingObjectType getObjectType()
           
 org.pentaho.di.core.logging.LoggingObjectInterface getParent()
           
 Job getParentJob()
           
 org.pentaho.di.core.variables.VariableSpace getParentVariableSpace()
           
 String getPluginId()
           
 String getRealFilename()
           
 Date getRegistrationDate()
          Stub
 Repository getRepository()
           
 org.pentaho.di.repository.RepositoryDirectory getRepositoryDirectory()
           
 List<ResourceReference> getResourceDependencies(JobMeta jobMeta)
          Get a list of all the resource dependencies that the step is depending on.
 List<org.pentaho.di.core.SQLStatement> getSQLStatements(Repository repository)
           
 List<org.pentaho.di.core.SQLStatement> getSQLStatements(Repository repository, org.pentaho.di.core.variables.VariableSpace space)
           
 String getTypeDesc()
           
 String getTypeId()
          Deprecated. in favor of getPluginId()
 org.pentaho.di.core.database.DatabaseMeta[] getUsedDatabaseConnections()
          This method returns all the database connections that are used by the job entry.
 String getVariable(String variableName)
           
 String getVariable(String variableName, String defaultValue)
           
 String getXML()
           
 boolean hasChanged()
           
 boolean hasRepositoryReferences()
           
 void initializeVariablesFrom(org.pentaho.di.core.variables.VariableSpace parent)
           
 void injectVariables(Map<String,String> prop)
           
 boolean isBasic()
           
 boolean isDebug()
           
 boolean isDetailed()
           
 boolean isDummy()
           
 boolean isEvaluation()
           
 boolean isFTP()
           
 boolean isHTTP()
           
 boolean isJob()
           
 boolean isMail()
           
 boolean isRowlevel()
           
 boolean isSFTP()
           
 boolean isShell()
           
 boolean isSpecial()
           
 boolean isStart()
           
 boolean isTransformation()
           
 boolean isUnconditional()
           
 String[] listVariables()
           
 void loadRep(Repository rep, org.pentaho.di.repository.ObjectId id_jobentry, List<org.pentaho.di.core.database.DatabaseMeta> databases, List<SlaveServer> slaveServers)
           
 void loadXML(Node entrynode, List<org.pentaho.di.core.database.DatabaseMeta> databases, List<SlaveServer> slaveServers)
           
 void logBasic(String message)
           
 void logBasic(String message, Object... arguments)
           
 void logDebug(String message)
           
 void logDebug(String message, Object... arguments)
           
 void logDetailed(String message)
           
 void logDetailed(String message, Object... arguments)
           
 void logError(String message)
           
 void logError(String message, Object... arguments)
           
 void logError(String message, Throwable e)
           
 void logMinimal(String message)
           
 void logMinimal(String message, Object... arguments)
           
 void logRowlevel(String message)
           
 void logRowlevel(String message, Object... arguments)
           
 void lookupRepositoryReferences(Repository repository)
          Look up the references after import
 void parseRepositoryObjects(Repository rep)
           
 boolean resetErrorsBeforeExecution()
           
 void saveRep(Repository rep, org.pentaho.di.repository.ObjectId id_job)
           
 void setChanged()
           
 void setChanged(boolean ch)
           
 void setContainerObjectId(String containerObjectId)
           
 void setDescription(String Description)
           
 void setID(long id)
           
 void setLogLevel(org.pentaho.di.core.logging.LogLevel logLevel)
           
 void setName(String name)
           
 void setObjectId(org.pentaho.di.repository.ObjectId id)
           
 void setParentJob(Job parentJob)
           
 void setParentVariableSpace(org.pentaho.di.core.variables.VariableSpace parent)
           
 void setPluginId(String configId)
           
 void setRepository(Repository repository)
           
 void setTypeId(String typeId)
          Deprecated. in favor of setPluginId()
 void setVariable(String variableName, String variableValue)
           
 void shareVariablesWith(org.pentaho.di.core.variables.VariableSpace space)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JobEntryBase

public JobEntryBase()

JobEntryBase

public JobEntryBase(String name,
                    String description)
Method Detail

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

clear

public void clear()

setObjectId

public void setObjectId(org.pentaho.di.repository.ObjectId id)

setID

public void setID(long id)

getObjectId

public org.pentaho.di.repository.ObjectId getObjectId()
Specified by:
getObjectId in interface org.pentaho.di.core.CheckResultSourceInterface
Specified by:
getObjectId in interface org.pentaho.di.core.logging.LoggingObjectInterface
Specified by:
getObjectId in interface ResourceHolderInterface
Returns:
The ID of the holder of the resource

getTypeDesc

public String getTypeDesc()

setName

public void setName(String name)

getName

public String getName()
Specified by:
getName in interface org.pentaho.di.core.CheckResultSourceInterface
Specified by:
getName in interface ResourceHolderInterface
Returns:
The name of the holder of the resource

setDescription

public void setDescription(String Description)

getDescription

public String getDescription()
Specified by:
getDescription in interface org.pentaho.di.core.CheckResultSourceInterface
Specified by:
getDescription in interface ResourceHolderInterface
Returns:
The description of the holder of the resource

setChanged

public void setChanged()

setChanged

public void setChanged(boolean ch)

hasChanged

public boolean hasChanged()

isStart

public boolean isStart()

isDummy

public boolean isDummy()

isEvaluation

public boolean isEvaluation()

isJob

public boolean isJob()

isMail

public boolean isMail()

isShell

public boolean isShell()

isSpecial

public boolean isSpecial()

isTransformation

public boolean isTransformation()

isFTP

public boolean isFTP()

isSFTP

public boolean isSFTP()

isHTTP

public boolean isHTTP()

getXML

public String getXML()

loadXML

public void loadXML(Node entrynode,
                    List<org.pentaho.di.core.database.DatabaseMeta> databases,
                    List<SlaveServer> slaveServers)
             throws org.pentaho.di.core.exception.KettleXMLException
Throws:
org.pentaho.di.core.exception.KettleXMLException

parseRepositoryObjects

public void parseRepositoryObjects(Repository rep)
                            throws org.pentaho.di.core.exception.KettleException
Throws:
org.pentaho.di.core.exception.KettleException

loadRep

public void loadRep(Repository rep,
                    org.pentaho.di.repository.ObjectId id_jobentry,
                    List<org.pentaho.di.core.database.DatabaseMeta> databases,
                    List<SlaveServer> slaveServers)
             throws org.pentaho.di.core.exception.KettleException
Throws:
org.pentaho.di.core.exception.KettleException

saveRep

public void saveRep(Repository rep,
                    org.pentaho.di.repository.ObjectId id_job)
             throws org.pentaho.di.core.exception.KettleException
Throws:
org.pentaho.di.core.exception.KettleException

clone

public Object clone()
Overrides:
clone in class Object

toString

public String toString()
Overrides:
toString in class Object

resetErrorsBeforeExecution

public boolean resetErrorsBeforeExecution()
Returns:
true if a reset of the number of errors is required before execution.

evaluates

public boolean evaluates()
check whether or not this job entry evaluates.

Returns:
true if the job entry evaluates

isUnconditional

public boolean isUnconditional()

getSQLStatements

public List<org.pentaho.di.core.SQLStatement> getSQLStatements(Repository repository)
                                                        throws org.pentaho.di.core.exception.KettleException
Throws:
org.pentaho.di.core.exception.KettleException

getSQLStatements

public List<org.pentaho.di.core.SQLStatement> getSQLStatements(Repository repository,
                                                               org.pentaho.di.core.variables.VariableSpace space)
                                                        throws org.pentaho.di.core.exception.KettleException
Throws:
org.pentaho.di.core.exception.KettleException

getFilename

public String getFilename()
Specified by:
getFilename in interface org.pentaho.di.core.logging.LoggingObjectInterface

getRealFilename

public String getRealFilename()

getUsedDatabaseConnections

public org.pentaho.di.core.database.DatabaseMeta[] getUsedDatabaseConnections()
This method returns all the database connections that are used by the job entry.

Returns:
an array of database connections meta-data. Return an empty array if no connections are used.

copyVariablesFrom

public void copyVariablesFrom(org.pentaho.di.core.variables.VariableSpace space)
Specified by:
copyVariablesFrom in interface org.pentaho.di.core.variables.VariableSpace

environmentSubstitute

public String environmentSubstitute(String aString)
Specified by:
environmentSubstitute in interface org.pentaho.di.core.variables.VariableSpace

environmentSubstitute

public String[] environmentSubstitute(String[] aString)
Specified by:
environmentSubstitute in interface org.pentaho.di.core.variables.VariableSpace

getParentVariableSpace

public org.pentaho.di.core.variables.VariableSpace getParentVariableSpace()
Specified by:
getParentVariableSpace in interface org.pentaho.di.core.variables.VariableSpace

setParentVariableSpace

public void setParentVariableSpace(org.pentaho.di.core.variables.VariableSpace parent)
Specified by:
setParentVariableSpace in interface org.pentaho.di.core.variables.VariableSpace

getVariable

public String getVariable(String variableName,
                          String defaultValue)
Specified by:
getVariable in interface org.pentaho.di.core.variables.VariableSpace

getVariable

public String getVariable(String variableName)
Specified by:
getVariable in interface org.pentaho.di.core.variables.VariableSpace

getBooleanValueOfVariable

public boolean getBooleanValueOfVariable(String variableName,
                                         boolean defaultValue)
Specified by:
getBooleanValueOfVariable in interface org.pentaho.di.core.variables.VariableSpace

initializeVariablesFrom

public void initializeVariablesFrom(org.pentaho.di.core.variables.VariableSpace parent)
Specified by:
initializeVariablesFrom in interface org.pentaho.di.core.variables.VariableSpace

listVariables

public String[] listVariables()
Specified by:
listVariables in interface org.pentaho.di.core.variables.VariableSpace

setVariable

public void setVariable(String variableName,
                        String variableValue)
Specified by:
setVariable in interface org.pentaho.di.core.variables.VariableSpace

shareVariablesWith

public void shareVariablesWith(org.pentaho.di.core.variables.VariableSpace space)
Specified by:
shareVariablesWith in interface org.pentaho.di.core.variables.VariableSpace

injectVariables

public void injectVariables(Map<String,String> prop)
Specified by:
injectVariables in interface org.pentaho.di.core.variables.VariableSpace

check

public void check(List<org.pentaho.di.core.CheckResultInterface> remarks,
                  JobMeta jobMeta)
Support for overrides not having to put in a check method

Parameters:
remarks - CheckResults from checking the job entry
jobMeta - JobMeta information letting threading back to the JobMeta possible

getResourceDependencies

public List<ResourceReference> getResourceDependencies(JobMeta jobMeta)
Get a list of all the resource dependencies that the step is depending on.

Returns:
a list of all the resource dependencies that the step is depending on

exportResources

public String exportResources(org.pentaho.di.core.variables.VariableSpace space,
                              Map<String,ResourceDefinition> definitions,
                              ResourceNamingInterface namingInterface,
                              Repository repository)
                       throws org.pentaho.di.core.exception.KettleException
Throws:
org.pentaho.di.core.exception.KettleException

getPluginId

public String getPluginId()

setPluginId

public void setPluginId(String configId)

getTypeId

public String getTypeId()
Deprecated. in favor of getPluginId()

Specified by:
getTypeId in interface org.pentaho.di.core.CheckResultSourceInterface
Specified by:
getTypeId in interface ResourceHolderInterface
Returns:
The Type ID of the resource holder. The Type ID is the system-defined type identifier (like TRANS or SORT).

setTypeId

public void setTypeId(String typeId)
Deprecated. in favor of setPluginId()


getDialogClassName

public String getDialogClassName()
This returns the expected name for the dialog that edits a job entry. The expected name is in the org.pentaho.di.ui tree and has a class name that is the name of the job entry with 'Dialog' added to the end. e.g. if the job entry is org.pentaho.di.job.entries.zipfile.JobEntryZipFile the dialog would be org.pentaho.di.ui.job.entries.zipfile.JobEntryZipFileDialog If the dialog class for a job entry does not match this pattern it should override this method and return the appropriate class name

Returns:
full class name of the dialog

getHolderType

public String getHolderType()
Description copied from interface: ResourceHolderInterface
Gets the high-level type of resource holder.

Specified by:
getHolderType in interface ResourceHolderInterface
Returns:
JOBENTRY, STEP, etc.

setRepository

public void setRepository(Repository repository)

getRepository

public Repository getRepository()

setParentJob

public void setParentJob(Job parentJob)

getParentJob

public Job getParentJob()

isBasic

public boolean isBasic()

isDetailed

public boolean isDetailed()

isDebug

public boolean isDebug()

isRowlevel

public boolean isRowlevel()

logMinimal

public void logMinimal(String message)

logMinimal

public void logMinimal(String message,
                       Object... arguments)

logBasic

public void logBasic(String message)

logBasic

public void logBasic(String message,
                     Object... arguments)

logDetailed

public void logDetailed(String message)

logDetailed

public void logDetailed(String message,
                        Object... arguments)

logDebug

public void logDebug(String message)

logDebug

public void logDebug(String message,
                     Object... arguments)

logRowlevel

public void logRowlevel(String message)

logRowlevel

public void logRowlevel(String message,
                        Object... arguments)

logError

public void logError(String message)

logError

public void logError(String message,
                     Throwable e)

logError

public void logError(String message,
                     Object... arguments)

getLogChannel

public org.pentaho.di.core.logging.LogChannelInterface getLogChannel()

getLogChannelId

public String getLogChannelId()
Specified by:
getLogChannelId in interface org.pentaho.di.core.logging.LoggingObjectInterface

getObjectName

public String getObjectName()
Specified by:
getObjectName in interface org.pentaho.di.core.logging.LoggingObjectInterface

getObjectCopy

public String getObjectCopy()
Specified by:
getObjectCopy in interface org.pentaho.di.core.logging.LoggingObjectInterface

getObjectRevision

public org.pentaho.di.repository.ObjectRevision getObjectRevision()
Specified by:
getObjectRevision in interface org.pentaho.di.core.logging.LoggingObjectInterface

getObjectType

public org.pentaho.di.core.logging.LoggingObjectType getObjectType()
Specified by:
getObjectType in interface org.pentaho.di.core.logging.LoggingObjectInterface

getParent

public org.pentaho.di.core.logging.LoggingObjectInterface getParent()
Specified by:
getParent in interface org.pentaho.di.core.logging.LoggingObjectInterface

getRepositoryDirectory

public org.pentaho.di.repository.RepositoryDirectory getRepositoryDirectory()
Specified by:
getRepositoryDirectory in interface org.pentaho.di.core.logging.LoggingObjectInterface

getLogLevel

public org.pentaho.di.core.logging.LogLevel getLogLevel()
Specified by:
getLogLevel in interface org.pentaho.di.core.logging.LoggingObjectInterface

setLogLevel

public void setLogLevel(org.pentaho.di.core.logging.LogLevel logLevel)

getContainerObjectId

public String getContainerObjectId()
Specified by:
getContainerObjectId in interface org.pentaho.di.core.logging.LoggingObjectInterface
Returns:
the carteObjectId

setContainerObjectId

public void setContainerObjectId(String containerObjectId)
Parameters:
containerObjectId - the carteObjectId to set

getRegistrationDate

public Date getRegistrationDate()
Stub

Specified by:
getRegistrationDate in interface org.pentaho.di.core.logging.LoggingObjectInterface

hasRepositoryReferences

public boolean hasRepositoryReferences()

lookupRepositoryReferences

public void lookupRepositoryReferences(Repository repository)
                                throws org.pentaho.di.core.exception.KettleException
Look up the references after import

Parameters:
repository - the repository to reference.
Throws:
org.pentaho.di.core.exception.KettleException