Package org.pentaho.di.job.entry
Class JobEntryBase
- java.lang.Object
-
- org.pentaho.di.job.entry.JobEntryBase
-
- All Implemented Interfaces:
Cloneable,org.pentaho.di.core.AttributesInterface,org.pentaho.di.core.CheckResultSourceInterface,org.pentaho.di.core.ExtensionDataInterface,org.pentaho.di.core.logging.LoggingObjectInterface,org.pentaho.di.core.logging.LoggingObjectLifecycleInterface,org.pentaho.di.core.variables.VariableSpace,ResourceHolderInterface
- Direct Known Subclasses:
JobEntryCheckFilesLocked,JobEntryColumnsExist,JobEntryConnectedToRepository,JobEntryCopyFiles,JobEntryCopyMoveResultFilenames,JobEntryCreateFile,JobEntryCreateFolder,JobEntryDelay,JobEntryDeleteFile,JobEntryDeleteFiles,JobEntryDeleteFolders,JobEntryDeleteResultFilenames,JobEntryDosToUnix,JobEntryEmpty,JobEntryEval,JobEntryEvalFilesMetrics,JobEntryEvalTableContent,JobEntryExportRepository,JobEntryFileCompare,JobEntryFileExists,JobEntryFilesExist,JobEntryFolderIsEmpty,JobEntryFoldersCompare,JobEntryFTP,JobEntryFTPDelete,JobEntryFTPPUT,JobEntryFTPSGet,JobEntryFTPSPUT,JobEntryGetPOP,JobEntryHTTP,JobEntryJob,JobEntryMail,JobEntryMailValidator,JobEntryMoveFiles,JobEntryMsgBoxInfo,JobEntryMssqlBulkLoad,JobEntryMysqlBulkFile,JobEntryMysqlBulkLoad,JobEntryPGPDecryptFiles,JobEntryPGPEncryptFiles,JobEntryPGPVerify,JobEntryPing,JobEntrySendNagiosPassiveCheck,JobEntrySetVariables,JobEntrySFTP,JobEntrySFTPPUT,JobEntryShell,JobEntrySimpleEval,JobEntrySNMPTrap,JobEntrySpecial,JobEntrySQL,JobEntrySuccess,JobEntrySyslog,JobEntryTableExists,JobEntryTalendJobExec,JobEntryTelnet,JobEntryTrans,JobEntryTruncateTables,JobEntryUnZip,JobEntryWaitForFile,JobEntryWaitForSQL,JobEntryWebServiceAvailable,JobEntryWriteToFile,JobEntryWriteToLog,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, org.pentaho.di.core.AttributesInterface, org.pentaho.di.core.ExtensionDataInterface
Base class for the different types of job-entries. Job entries can extend this base class to get access to common member variables and default method behavior. However, JobEntryBase does not implement JobEntryInterface (although it implements most of the same methods), so individual job entry classes must implement JobEntryInterface and specifically theexecute()method.- Author:
- Matt Created on 18-jun-04
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,Map<String,String>>attributesMapprotected StringcontainerObjectIdThe container object idprotected Map<String,String>entryStepSetVariablesMapThe map for setVariablesStep bindings for the job entryprotected Map<String,Object>extensionDataMapprotected org.pentaho.di.core.logging.LogChannelInterfacelogThe log channel interface object, used for loggingprotected org.pentaho.metastore.api.IMetaStoremetaStoreprotected JobparentJobThe parent jobprotected JobMetaparentJobMetaprotected RepositoryrepThe repositoryprotected org.pentaho.di.core.variables.VariableSpacevariablesThe variable bindings for the job entry
-
Constructor Summary
Constructors Constructor Description JobEntryBase()Instantiates a new job entry base object.JobEntryBase(String name, String description)Instantiates a new job entry base object with the given name and description.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected StringaddDatetimeToFilename(String filename, boolean addDate, String datePattern, boolean addTime, String timePattern, boolean specifyFormat, String datetimeFormat)Appends the date, time and/or datetime to the given filename (before the extension if it exists), using the provided patterns.voidcheck(List<org.pentaho.di.core.CheckResultInterface> remarks, JobMeta jobMeta)Deprecated.voidcheck(List<org.pentaho.di.core.CheckResultInterface> remarks, JobMeta jobMeta, org.pentaho.di.core.variables.VariableSpace space, Repository repository, org.pentaho.metastore.api.IMetaStore metaStore)Allows JobEntry objects to check themselves for consistencyvoidclear()Clears all variable valuesObjectclone()This method is called when a job entry is duplicated in Spoon.voidcopyVariablesFrom(org.pentaho.di.core.variables.VariableSpace space)Copies variables from a given variable space to this job entryStringenvironmentSubstitute(String aString)Substitutes any variable values into the given string, and returns the resolved stringString[]environmentSubstitute(String[] aString)Substitutes any variable values into each of the given strings, and returns an array containing the resolved string(s)booleanequals(Object obj)Checks if the JobEntry object is equal to the specified objectbooleanevaluates()This method must return true if the job entry supports the true/false outgoing hops.StringexportResources(org.pentaho.di.core.variables.VariableSpace space, Map<String,ResourceDefinition> definitions, ResourceNamingInterface namingInterface, Repository repository)StringexportResources(org.pentaho.di.core.variables.VariableSpace space, Map<String,ResourceDefinition> definitions, ResourceNamingInterface namingInterface, Repository repository, org.pentaho.metastore.api.IMetaStore metaStore)Exports the object to a flat-file system, adding content with filename keys to a set of definitions.StringfieldSubstitute(String aString, org.pentaho.di.core.row.RowMetaInterface rowMeta, Object[] rowData)StringgetAttribute(String groupName, String key)Map<String,String>getAttributes(String groupName)Map<String,Map<String,String>>getAttributesMap()booleangetBooleanValueOfVariable(String variableName, boolean defaultValue)Returns a boolean representation of the specified variable after performing any necessary substitution.StringgetContainerObjectId()Gets the container object idStringgetDescription()Gets the description of the job entryStringgetDialogClassName()Deprecated.As of release 8.1, use annotated-based dialog instead {@see org.pentaho.di.core.annotations.PluginDialog}StringgetEntryStepSetVariable(String variableName)Gets the value of the specified EntryStepSetVariableprotected Map<String,String>getEntryStepSetVariablesMap()Gets a Map of variables set in EntryStepSetVariablesMap<String,Object>getExtensionDataMap()StringgetFilename()Gets the filename of the job entry.StringgetHolderType()Returns the holder type for the job entryorg.pentaho.di.core.logging.LogChannelInterfacegetLogChannel()Gets the log channel.StringgetLogChannelId()Gets the logging channel idorg.pentaho.di.core.logging.LogLevelgetLogLevel()Gets the logging level for the job entryorg.pentaho.metastore.api.IMetaStoregetMetaStore()StringgetName()Gets the name of the job entryStringgetObjectCopy()Gets a string identifying a copy in a series of stepsorg.pentaho.di.repository.ObjectIdgetObjectId()Gets the object idStringgetObjectName()Gets the object nameorg.pentaho.di.repository.ObjectRevisiongetObjectRevision()Gets the revision of the object with respect to a repositoryorg.pentaho.di.core.logging.LoggingObjectTypegetObjectType()Gets the logging object typeorg.pentaho.di.core.logging.LoggingObjectInterfacegetParent()Gets the logging object interface's parentJobgetParentJob()Gets the parent job.JobMetagetParentJobMeta()org.pentaho.di.core.variables.VariableSpacegetParentVariableSpace()Gets the parent variable spaceStringgetPluginId()Gets the plugin id.StringgetRealFilename()Gets the real filename of the job entry, by substituting any environment variables present in the filename.String[]getReferencedObjectDescriptions()DategetRegistrationDate()Returns the registration date for the job entry.RepositorygetRepository()Gets the repository for the job entry.org.pentaho.di.repository.RepositoryDirectorygetRepositoryDirectory()Gets the directory of the job entry in the repository.List<ResourceReference>getResourceDependencies(JobMeta jobMeta)Gets a list of all the resource dependencies that the step is depending on.List<org.pentaho.di.core.SQLStatement>getSQLStatements(Repository repository)Deprecated.List<org.pentaho.di.core.SQLStatement>getSQLStatements(Repository repository, org.pentaho.di.core.variables.VariableSpace space)Deprecated.List<org.pentaho.di.core.SQLStatement>getSQLStatements(Repository repository, org.pentaho.metastore.api.IMetaStore metaStore, org.pentaho.di.core.variables.VariableSpace space)Gets the SQL statements needed by this job entry to execute successfully, given a set of variables.StringgetTypeDesc()Gets the plug-in type descriptionStringgetTypeId()Deprecated.usegetPluginId()org.pentaho.di.core.database.DatabaseMeta[]getUsedDatabaseConnections()Gets all the database connections that are used by the job entry.StringgetVariable(String variableName)Gets the value of the specified variable, or returns a default value if no such variable existsStringgetVariable(String variableName, String defaultValue)Gets the value of the specified variable, or returns a default value if no such variable existsprotected org.pentaho.di.core.variables.VariableSpacegetVariables()Gets the variable bindings for the job entry.StringgetXML()This method is called by PDI whenever a job entry needs to serialize its settings to XML.booleanhasChanged()Checks whether the job entry has changedinthashCode()booleanhasRepositoryReferences()Checks whether the job entry has repository references.voidinitializeVariablesFrom(org.pentaho.di.core.variables.VariableSpace parent)Sets the values of the job entry's variables to the values from the parent variablesvoidinjectVariables(Map<String,String> prop)Injects variables using the given Map.booleanisBasic()Checks if the logging level is basic.booleanisDebug()Checks if the logging level is debug.booleanisDetailed()Checks if the logging level is detailed.booleanisDummy()Checks if the job entry is a dummy entrybooleanisEvaluation()Checks if the job entry is an evaluation.booleanisForcingSeparateLogging()booleanisFTP()Checks if this job entry performs an FTP operationbooleanisGatheringMetrics()booleanisHTTP()Checks if this job entry performs an HTTP operationbooleanisJob()Checks if the job entry executes a jobbooleanisMail()Checks if the job entry sends emailboolean[]isReferencedObjectEnabled()booleanisRowlevel()Checks if the logging level is rowlevel.booleanisSFTP()Checks if this job entry performs an SFTP operationbooleanisShell()Checks if the job entry executes a shell programbooleanisSpecial()Checks if the job entry is of a special type (Start, Dummy, etc.)booleanisStart()Checks if the job entry has startedbooleanisTransformation()Checks if this job entry executes a transformationbooleanisUnconditional()This method must return true if the job entry supports the unconditional outgoing hop.String[]listVariables()Gets a list of variable names for the job entryObjectloadReferencedObject(int index, Repository rep, org.pentaho.di.core.variables.VariableSpace space)Deprecated.ObjectloadReferencedObject(int index, Repository rep, org.pentaho.metastore.api.IMetaStore metaStore, org.pentaho.di.core.variables.VariableSpace space)Load the referenced objectvoidloadRep(Repository rep, org.pentaho.di.repository.ObjectId id_jobentry, List<org.pentaho.di.core.database.DatabaseMeta> databases, List<SlaveServer> slaveServers)Deprecated.voidloadRep(Repository rep, org.pentaho.metastore.api.IMetaStore metaStore, org.pentaho.di.repository.ObjectId id_jobentry, List<org.pentaho.di.core.database.DatabaseMeta> databases, List<SlaveServer> slaveServers)voidloadXML(Node entrynode, List<org.pentaho.di.core.database.DatabaseMeta> databases, List<SlaveServer> slaveServers)This method is called by PDI whenever a job entry needs to read its settings from XML.voidloadXML(Node entrynode, List<org.pentaho.di.core.database.DatabaseMeta> databases, List<SlaveServer> slaveServers, Repository repository)Deprecated.voidloadXML(Node entrynode, List<org.pentaho.di.core.database.DatabaseMeta> databases, List<SlaveServer> slaveServers, Repository rep, org.pentaho.metastore.api.IMetaStore metaStore)voidlogBasic(String message)Logs the specified string at the basic level.voidlogBasic(String message, Object... arguments)Logs the specified string and arguments at the basic level.voidlogDebug(String message)Logs the specified string at the debug level.voidlogDebug(String message, Object... arguments)Logs the specified string and arguments at the debug level.voidlogDetailed(String message)Logs the specified string at the detailed level.voidlogDetailed(String message, Object... arguments)Logs the specified string and arguments at the detailed level.voidlogError(String message)Logs the specified string at the error level.voidlogError(String message, Object... arguments)Logs the specified string and arguments at the error level.voidlogError(String message, Throwable e)Logs the specified string and Throwable object at the error level.voidlogMinimal(String message)Logs the specified string at the minimal level.voidlogMinimal(String message, Object... arguments)Logs the specified string and arguments at the minimal level.voidlogRowlevel(String message)Logs the specified string at the row level.voidlogRowlevel(String message, Object... arguments)Logs the specified string and arguments at the row level.voidlookupRepositoryReferences(Repository repository)Looks up the references after importvoidparseRepositoryObjects(Repository rep)Parses the repository objects.booleanresetErrorsBeforeExecution()Checks whether a reset of the number of errors is required before execution.voidsaveRep(Repository rep, org.pentaho.di.repository.ObjectId id_job)Deprecated.voidsaveRep(Repository rep, org.pentaho.metastore.api.IMetaStore metaStore, org.pentaho.di.repository.ObjectId id_job)voidsetAttribute(String groupName, String key, String value)voidsetAttributes(String groupName, Map<String,String> attributes)voidsetAttributesMap(Map<String,Map<String,String>> attributesMap)voidsetChanged()Sets that the job entry has changed (i.e.voidsetChanged(boolean ch)Sets whether the job entry has changedvoidsetContainerObjectId(String containerObjectId)Sets the container object idvoidsetDescription(String Description)Sets the description for the job entry.voidsetEntryStepSetVariable(String variableName, String variableValue)Sets the value of the specified EntryStepSetVariablevoidsetForcingSeparateLogging(boolean forcingSeparateLogging)voidsetGatheringMetrics(boolean gatheringMetrics)voidsetID(long id)Sets the id for the job entryvoidsetLogLevel(org.pentaho.di.core.logging.LogLevel logLevel)Sets the logging level for the job entryvoidsetMetaStore(org.pentaho.metastore.api.IMetaStore metaStore)voidsetName(String name)Sets the name of the job entryvoidsetObjectId(org.pentaho.di.repository.ObjectId id)Sets the object id.voidsetParentJob(Job parentJob)Sets the parent job.voidsetParentJobMeta(JobMeta parentJobMeta)At save and run time, the system will attempt to set the jobMeta so that it can be accessed by the jobEntries if necessary.voidsetParentVariableSpace(org.pentaho.di.core.variables.VariableSpace parent)Sets the parent variable spacevoidsetPluginId(String configId)Sets the plugin id.voidsetRepository(Repository repository)Sets the repository for the job entry.voidsetTypeId(String typeId)Deprecated.voidsetVariable(String variableName, String variableValue)Sets the value of the specified variable to the specified valuevoidshareVariablesWith(org.pentaho.di.core.variables.VariableSpace space)Shares a variable space from another variable space.StringtoString()Returns a string representation of the object.-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
variables
protected org.pentaho.di.core.variables.VariableSpace variables
The variable bindings for the job entry
-
entryStepSetVariablesMap
protected Map<String,String> entryStepSetVariablesMap
The map for setVariablesStep bindings for the job entry
-
rep
protected Repository rep
The repository
-
parentJob
protected Job parentJob
The parent job
-
log
protected org.pentaho.di.core.logging.LogChannelInterface log
The log channel interface object, used for logging
-
containerObjectId
protected String containerObjectId
The container object id
-
metaStore
protected org.pentaho.metastore.api.IMetaStore metaStore
-
parentJobMeta
protected JobMeta parentJobMeta
-
-
Method Detail
-
equals
public boolean equals(Object obj)
Checks if the JobEntry object is equal to the specified object- Overrides:
equalsin classObject- Returns:
- true if the two objects are equal, false otherwise
- See Also:
Object.equals(java.lang.Object)
-
clear
public void clear()
Clears all variable values
-
setObjectId
public void setObjectId(org.pentaho.di.repository.ObjectId id)
Sets the object id.- Parameters:
id- the new object id
-
setID
public void setID(long id)
Sets the id for the job entry- Parameters:
id- the new id
-
getObjectId
public org.pentaho.di.repository.ObjectId getObjectId()
Gets the object id- Specified by:
getObjectIdin interfaceorg.pentaho.di.core.CheckResultSourceInterface- Specified by:
getObjectIdin interfaceorg.pentaho.di.core.logging.LoggingObjectInterface- Specified by:
getObjectIdin interfaceResourceHolderInterface- Returns:
- the object id
- See Also:
CheckResultSourceInterface.getObjectId()
-
getTypeDesc
public String getTypeDesc()
Gets the plug-in type description- Returns:
- the plug-in type description
-
setName
public void setName(String name)
Sets the name of the job entry- Parameters:
name- the new name
-
getName
public String getName()
Gets the name of the job entry- Specified by:
getNamein interfaceorg.pentaho.di.core.CheckResultSourceInterface- Specified by:
getNamein interfaceResourceHolderInterface- Returns:
- the name of the job entry
- See Also:
CheckResultSourceInterface.getName()
-
setDescription
public void setDescription(String Description)
Sets the description for the job entry.- Parameters:
Description- the new description
-
getDescription
public String getDescription()
Gets the description of the job entry- Specified by:
getDescriptionin interfaceorg.pentaho.di.core.CheckResultSourceInterface- Specified by:
getDescriptionin interfaceResourceHolderInterface- Returns:
- the description of the job entry
- See Also:
CheckResultSourceInterface.getDescription()
-
setChanged
public void setChanged()
Sets that the job entry has changed (i.e. a call to setChanged(true))- See Also:
setChanged(boolean)
-
setChanged
public void setChanged(boolean ch)
Sets whether the job entry has changed- Parameters:
ch- true if the job entry has changed, false otherwise
-
hasChanged
public boolean hasChanged()
Checks whether the job entry has changed- Returns:
- true if the job entry has changed, false otherwise
-
isStart
public boolean isStart()
Checks if the job entry has started- Returns:
- true if the job entry has started, false otherwise
-
isDummy
public boolean isDummy()
Checks if the job entry is a dummy entry- Returns:
- true if the job entry is a dummy entry, false otherwise
-
isEvaluation
public boolean isEvaluation()
Checks if the job entry is an evaluation.- Returns:
- true if the job entry is an evaluation, false otherwise
-
isJob
public boolean isJob()
Checks if the job entry executes a job- Returns:
- true if the job entry executes a job, false otherwise
-
isMail
public boolean isMail()
Checks if the job entry sends email- Returns:
- true if the job entry sends email, false otherwise
-
isShell
public boolean isShell()
Checks if the job entry executes a shell program- Returns:
- true if the job entry executes a shell program, false otherwise
-
isSpecial
public boolean isSpecial()
Checks if the job entry is of a special type (Start, Dummy, etc.)- Returns:
- true if the job entry is of a special type, false otherwise
-
isTransformation
public boolean isTransformation()
Checks if this job entry executes a transformation- Returns:
- true if this job entry executes a transformation, false otherwise
-
isFTP
public boolean isFTP()
Checks if this job entry performs an FTP operation- Returns:
- true if this job entry performs an FTP operation, false otherwise
-
isSFTP
public boolean isSFTP()
Checks if this job entry performs an SFTP operation- Returns:
- true if this job entry performs an SFTP operation, false otherwise
-
isHTTP
public boolean isHTTP()
Checks if this job entry performs an HTTP operation- Returns:
- true if this job entry performs an HTTP operation, false otherwise
-
getXML
public String getXML()
This method is called by PDI whenever a job entry needs to serialize its settings to XML. It is called when saving a job in Spoon. The method returns an XML string, containing the serialized settings. The string contains a series of XML tags, typically one tag per setting. The helper class org.pentaho.di.core.xml.XMLHandler is typically used to construct the XML string.- Returns:
- the xml representation of the job entry
-
loadXML
public void loadXML(Node entrynode, List<org.pentaho.di.core.database.DatabaseMeta> databases, List<SlaveServer> slaveServers) throws org.pentaho.di.core.exception.KettleXMLException
This method is called by PDI whenever a job entry needs to read its settings from XML. The XML node containing the job entry's settings is passed in as an argument. Again, the helper class org.pentaho.di.core.xml.XMLHandler is typically used to conveniently read the settings from the XML node.- Parameters:
entrynode- the top-level XML nodedatabases- the list of databasesslaveServers- the list of slave servers- Throws:
org.pentaho.di.core.exception.KettleXMLException- if any errors occur during the loading of the XML
-
loadXML
@Deprecated public void loadXML(Node entrynode, List<org.pentaho.di.core.database.DatabaseMeta> databases, List<SlaveServer> slaveServers, Repository repository) throws org.pentaho.di.core.exception.KettleXMLException
Deprecated.- Parameters:
entrynode-databases-slaveServers-repository-- Throws:
org.pentaho.di.core.exception.KettleXMLException
-
loadXML
public void loadXML(Node entrynode, List<org.pentaho.di.core.database.DatabaseMeta> databases, List<SlaveServer> slaveServers, Repository rep, org.pentaho.metastore.api.IMetaStore metaStore) 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
Parses the repository objects. For JobEntryBase, this is a stub (empty) method- Parameters:
rep- the repository- Throws:
org.pentaho.di.core.exception.KettleException- if any errors occur during parsing
-
loadRep
@Deprecated 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
Deprecated.This method is called by PDI whenever a job entry needs to read its configuration from a PDI repository. For JobEntryBase, this method performs no operations.- Parameters:
rep- the repository objectid_jobentry- the id of the job entrydatabases- the list of databasesslaveServers- the list of slave servers- Throws:
org.pentaho.di.core.exception.KettleException- if any errors occur during the load
-
loadRep
public void loadRep(Repository rep, org.pentaho.metastore.api.IMetaStore metaStore, 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
@Deprecated public void saveRep(Repository rep, org.pentaho.di.repository.ObjectId id_job) throws org.pentaho.di.core.exception.KettleException
Deprecated.This method is called by PDI whenever a job entry needs to save its settings to a PDI repository. For JobEntryBase, this method performs no operations.- Parameters:
rep- the repository objectid_job- the id_job- Throws:
org.pentaho.di.core.exception.KettleException- if any errors occur during the save
-
saveRep
public void saveRep(Repository rep, org.pentaho.metastore.api.IMetaStore metaStore, org.pentaho.di.repository.ObjectId id_job) throws org.pentaho.di.core.exception.KettleException
- Parameters:
rep-metaStore-id_job-- Throws:
org.pentaho.di.core.exception.KettleException
-
clone
public Object clone()
This method is called when a job entry is duplicated in Spoon. It needs to return a deep copy of this job entry object. It is essential that the implementing class creates proper deep copies if the job entry configuration is stored in modifiable objects, such as lists or custom helper objects.
-
toString
public String toString()
Returns a string representation of the object. For JobEntryBase, this method returns the name- Overrides:
toStringin classObject- See Also:
Object.toString()
-
resetErrorsBeforeExecution
public boolean resetErrorsBeforeExecution()
Checks whether a reset of the number of errors is required before execution.- Returns:
- true if a reset of the number of errors is required before execution, false otherwise
-
evaluates
public boolean evaluates()
This method must return true if the job entry supports the true/false outgoing hops. For JobEntryBase, this method always returns false- Returns:
- false
-
isUnconditional
public boolean isUnconditional()
This method must return true if the job entry supports the unconditional outgoing hop. For JobEntryBase, this method always returns true- Returns:
- true
-
getSQLStatements
@Deprecated public List<org.pentaho.di.core.SQLStatement> getSQLStatements(Repository repository) throws org.pentaho.di.core.exception.KettleException
Deprecated.Gets the SQL statements needed by this job entry to execute successfully.- Parameters:
repository- the repository- Returns:
- a list of SQL statements
- Throws:
org.pentaho.di.core.exception.KettleException- if any errors occur during the generation of SQL statements
-
getSQLStatements
@Deprecated public List<org.pentaho.di.core.SQLStatement> getSQLStatements(Repository repository, org.pentaho.di.core.variables.VariableSpace space) throws org.pentaho.di.core.exception.KettleException
Deprecated.Gets the SQL statements needed by this job entry to execute successfully, given a set of variables. For JobEntryBase, this method returns an empty list.- Parameters:
repository- the repository objectspace- a variable space object containing variable bindings- Returns:
- an empty list
- Throws:
org.pentaho.di.core.exception.KettleException- if any errors occur during the generation of SQL statements
-
getSQLStatements
public List<org.pentaho.di.core.SQLStatement> getSQLStatements(Repository repository, org.pentaho.metastore.api.IMetaStore metaStore, org.pentaho.di.core.variables.VariableSpace space) throws org.pentaho.di.core.exception.KettleException
Gets the SQL statements needed by this job entry to execute successfully, given a set of variables. For JobEntryBase, this method returns an empty list.- Parameters:
repository- the repository objectspace- a variable space object containing variable bindings- Returns:
- an empty list
- Throws:
org.pentaho.di.core.exception.KettleException- if any errors occur during the generation of SQL statements
-
getFilename
public String getFilename()
Gets the filename of the job entry. For JobEntryBase, this method always returns null- Specified by:
getFilenamein interfaceorg.pentaho.di.core.logging.LoggingObjectInterface- Returns:
- null
- See Also:
LoggingObjectInterface.getFilename()
-
getRealFilename
public String getRealFilename()
Gets the real filename of the job entry, by substituting any environment variables present in the filename. For JobEntryBase, this method always returns null- Returns:
- null
-
getUsedDatabaseConnections
public org.pentaho.di.core.database.DatabaseMeta[] getUsedDatabaseConnections()
Gets all the database connections that are used by the job entry. For JobEntryBase, this method returns an empty (non-null) array- Returns:
- an empty (non-null) array
-
copyVariablesFrom
public void copyVariablesFrom(org.pentaho.di.core.variables.VariableSpace space)
Copies variables from a given variable space to this job entry- Specified by:
copyVariablesFromin interfaceorg.pentaho.di.core.variables.VariableSpace- See Also:
VariableSpace.copyVariablesFrom(org.pentaho.di.core.variables.VariableSpace)
-
environmentSubstitute
public String environmentSubstitute(String aString)
Substitutes any variable values into the given string, and returns the resolved string- Specified by:
environmentSubstitutein interfaceorg.pentaho.di.core.variables.VariableSpace- Returns:
- the string with any environment variables resolved and substituted
- See Also:
VariableSpace.environmentSubstitute(java.lang.String)
-
environmentSubstitute
public String[] environmentSubstitute(String[] aString)
Substitutes any variable values into each of the given strings, and returns an array containing the resolved string(s)- Specified by:
environmentSubstitutein interfaceorg.pentaho.di.core.variables.VariableSpace- See Also:
VariableSpace.environmentSubstitute(java.lang.String[])
-
fieldSubstitute
public String fieldSubstitute(String aString, org.pentaho.di.core.row.RowMetaInterface rowMeta, Object[] rowData) throws org.pentaho.di.core.exception.KettleValueException
- Specified by:
fieldSubstitutein interfaceorg.pentaho.di.core.variables.VariableSpace- Throws:
org.pentaho.di.core.exception.KettleValueException
-
getParentVariableSpace
public org.pentaho.di.core.variables.VariableSpace getParentVariableSpace()
Gets the parent variable space- Specified by:
getParentVariableSpacein interfaceorg.pentaho.di.core.variables.VariableSpace- Returns:
- the parent variable space
- See Also:
VariableSpace.getParentVariableSpace()
-
setParentVariableSpace
public void setParentVariableSpace(org.pentaho.di.core.variables.VariableSpace parent)
Sets the parent variable space- Specified by:
setParentVariableSpacein interfaceorg.pentaho.di.core.variables.VariableSpace- See Also:
VariableSpace.setParentVariableSpace( org.pentaho.di.core.variables.VariableSpace)
-
getVariable
public String getVariable(String variableName, String defaultValue)
Gets the value of the specified variable, or returns a default value if no such variable exists- Specified by:
getVariablein interfaceorg.pentaho.di.core.variables.VariableSpace- Returns:
- the value of the specified variable, or returns a default value if no such variable exists
- See Also:
VariableSpace.getVariable(java.lang.String, java.lang.String)
-
getVariable
public String getVariable(String variableName)
Gets the value of the specified variable, or returns a default value if no such variable exists- Specified by:
getVariablein interfaceorg.pentaho.di.core.variables.VariableSpace- Returns:
- the value of the specified variable, or returns a default value if no such variable exists
- See Also:
VariableSpace.getVariable(java.lang.String)
-
getBooleanValueOfVariable
public boolean getBooleanValueOfVariable(String variableName, boolean defaultValue)
Returns a boolean representation of the specified variable after performing any necessary substitution. Truth values include case-insensitive versions of "Y", "YES", "TRUE" or "1".- Specified by:
getBooleanValueOfVariablein interfaceorg.pentaho.di.core.variables.VariableSpace- Parameters:
variableName- the name of the variable to interrogate- Returns:
- a boolean representation of the specified variable after performing any necessary substitution
- See Also:
VariableSpace.getBooleanValueOfVariable(java.lang.String, boolean)
-
initializeVariablesFrom
public void initializeVariablesFrom(org.pentaho.di.core.variables.VariableSpace parent)
Sets the values of the job entry's variables to the values from the parent variables- Specified by:
initializeVariablesFromin interfaceorg.pentaho.di.core.variables.VariableSpace- See Also:
VariableSpace.initializeVariablesFrom( org.pentaho.di.core.variables.VariableSpace)
-
listVariables
public String[] listVariables()
Gets a list of variable names for the job entry- Specified by:
listVariablesin interfaceorg.pentaho.di.core.variables.VariableSpace- Returns:
- a list of variable names
- See Also:
VariableSpace.listVariables()
-
setVariable
public void setVariable(String variableName, String variableValue)
Sets the value of the specified variable to the specified value- Specified by:
setVariablein interfaceorg.pentaho.di.core.variables.VariableSpace- See Also:
VariableSpace.setVariable(java.lang.String, java.lang.String)
-
shareVariablesWith
public void shareVariablesWith(org.pentaho.di.core.variables.VariableSpace space)
Shares a variable space from another variable space. This means that the object should take over the space used as argument.- Specified by:
shareVariablesWithin interfaceorg.pentaho.di.core.variables.VariableSpace- See Also:
VariableSpace.shareVariablesWith(org.pentaho.di.core.variables.VariableSpace)
-
injectVariables
public void injectVariables(Map<String,String> prop)
Injects variables using the given Map. The behavior should be that the properties object will be stored and at the time the VariableSpace is initialized (or upon calling this method if the space is already initialized). After injecting the link of the properties object should be removed.- Specified by:
injectVariablesin interfaceorg.pentaho.di.core.variables.VariableSpace- See Also:
VariableSpace.injectVariables(java.util.Map)
-
check
@Deprecated public void check(List<org.pentaho.di.core.CheckResultInterface> remarks, JobMeta jobMeta)
Deprecated.Support for overrides not having to put in a check method. For JobEntryBase, this method performs no operations.- Parameters:
remarks- CheckResults from checking the job entryjobMeta- JobMeta information letting threading back to the JobMeta possible
-
check
public void check(List<org.pentaho.di.core.CheckResultInterface> remarks, JobMeta jobMeta, org.pentaho.di.core.variables.VariableSpace space, Repository repository, org.pentaho.metastore.api.IMetaStore metaStore)
Allows JobEntry objects to check themselves for consistency- Parameters:
remarks- List of CheckResult objects indicating consistency statusjobMeta- the metadata object for the job entryspace- the variable space to resolve string expressions with variables withrepository- the repository to load Kettle objects frommetaStore- the MetaStore to load common elements from
-
getResourceDependencies
public List<ResourceReference> getResourceDependencies(JobMeta jobMeta)
Gets a list of all the resource dependencies that the step is depending on. In JobEntryBase, this method returns an empty resource dependency list.- Returns:
- an empty list of ResourceReferences
- See Also:
ResourceReference
-
exportResources
@Deprecated 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
Deprecated.Exports the object to a flat-file system, adding content with filename keys to a set of definitions. For JobEntryBase, this method simply returns null- Parameters:
space- The variable space to resolve (environment) variables with.definitions- The map containing the filenames and contentnamingInterface- The resource naming interface allows the object to be named appropriatelyrepository- The repository to load resources from- Returns:
- The filename for this object. (also contained in the definitions map)
- Throws:
org.pentaho.di.core.exception.KettleException- in case something goes wrong during the export
-
exportResources
public String exportResources(org.pentaho.di.core.variables.VariableSpace space, Map<String,ResourceDefinition> definitions, ResourceNamingInterface namingInterface, Repository repository, org.pentaho.metastore.api.IMetaStore metaStore) throws org.pentaho.di.core.exception.KettleException
Exports the object to a flat-file system, adding content with filename keys to a set of definitions. The supplied resource naming interface allows the object to name appropriately without worrying about those parts of the implementation specific details.- Parameters:
space- The variable space to resolve (environment) variables with.definitions- The map containing the filenames and contentnamingInterface- The resource naming interface allows the object to be named appropriatelyrepository- The repository to load resources frommetaStore- the metaStore to load external metadata from- Returns:
- The filename for this object. (also contained in the definitions map)
- Throws:
org.pentaho.di.core.exception.KettleException- in case something goes wrong during the export
-
getPluginId
public String getPluginId()
Gets the plugin id.- Returns:
- the plugin id
-
setPluginId
public void setPluginId(String configId)
Sets the plugin id.- Parameters:
configId- the new plugin id
-
getTypeId
@Deprecated public String getTypeId()
Deprecated.usegetPluginId()Gets the plugin id.- Specified by:
getTypeIdin interfaceorg.pentaho.di.core.CheckResultSourceInterface- Specified by:
getTypeIdin interfaceResourceHolderInterface- Returns:
- The Type ID of the resource holder. The Type ID is the system-defined type identifier (like TRANS or SORT).
-
setTypeId
@Deprecated public void setTypeId(String typeId)
Deprecated.Sets the plugin id.
-
getDialogClassName
@Deprecated public String getDialogClassName()
Deprecated.As of release 8.1, use annotated-based dialog instead {@see org.pentaho.di.core.annotations.PluginDialog}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()
Returns the holder type for the job entry- Specified by:
getHolderTypein interfaceResourceHolderInterface- Returns:
- the holder type for the job entry
- See Also:
ResourceHolderInterface.getHolderType()
-
getVariables
protected org.pentaho.di.core.variables.VariableSpace getVariables()
Gets the variable bindings for the job entry.- Returns:
- the variable bindings for the job entry.
-
setRepository
public void setRepository(Repository repository)
Sets the repository for the job entry.- Parameters:
repository- the repository
-
getRepository
public Repository getRepository()
Gets the repository for the job entry.- Returns:
- the repository
-
setParentJob
public void setParentJob(Job parentJob)
Sets the parent job.- Parameters:
parentJob- the new parent job
-
getParentJob
public Job getParentJob()
Gets the parent job.- Returns:
- the parent job
-
isBasic
public boolean isBasic()
Checks if the logging level is basic.- Returns:
- true if the logging level is basic, false otherwise
-
isDetailed
public boolean isDetailed()
Checks if the logging level is detailed.- Returns:
- true if the logging level is detailed, false otherwise
-
isDebug
public boolean isDebug()
Checks if the logging level is debug.- Returns:
- true if the logging level is debug, false otherwise
-
isRowlevel
public boolean isRowlevel()
Checks if the logging level is rowlevel.- Returns:
- true if the logging level is rowlevel, false otherwise
-
logMinimal
public void logMinimal(String message)
Logs the specified string at the minimal level.- Parameters:
message- the message
-
logMinimal
public void logMinimal(String message, Object... arguments)
Logs the specified string and arguments at the minimal level.- Parameters:
message- the messagearguments- the arguments
-
logBasic
public void logBasic(String message)
Logs the specified string at the basic level.- Parameters:
message- the message
-
logBasic
public void logBasic(String message, Object... arguments)
Logs the specified string and arguments at the basic level.- Parameters:
message- the messagearguments- the arguments
-
logDetailed
public void logDetailed(String message)
Logs the specified string at the detailed level.- Parameters:
message- the message
-
logDetailed
public void logDetailed(String message, Object... arguments)
Logs the specified string and arguments at the detailed level.- Parameters:
message- the messagearguments- the arguments
-
logDebug
public void logDebug(String message)
Logs the specified string at the debug level.- Parameters:
message- the message
-
logDebug
public void logDebug(String message, Object... arguments)
Logs the specified string and arguments at the debug level.- Parameters:
message- the messagearguments- the arguments
-
logRowlevel
public void logRowlevel(String message)
Logs the specified string at the row level.- Parameters:
message- the message
-
logRowlevel
public void logRowlevel(String message, Object... arguments)
Logs the specified string and arguments at the row level.- Parameters:
message- the messagearguments- the arguments
-
logError
public void logError(String message)
Logs the specified string at the error level.- Parameters:
message- the message
-
logError
public void logError(String message, Throwable e)
Logs the specified string and Throwable object at the error level.- Parameters:
message- the messagee- the e
-
logError
public void logError(String message, Object... arguments)
Logs the specified string and arguments at the error level.- Parameters:
message- the messagearguments- the arguments
-
getLogChannel
public org.pentaho.di.core.logging.LogChannelInterface getLogChannel()
Gets the log channel.- Returns:
- the log channel
-
getLogChannelId
public String getLogChannelId()
Gets the logging channel id- Specified by:
getLogChannelIdin interfaceorg.pentaho.di.core.logging.LoggingObjectInterface- Returns:
- the log channel id
- See Also:
LoggingObjectInterface.getLogChannelId()
-
getObjectName
public String getObjectName()
Gets the object name- Specified by:
getObjectNamein interfaceorg.pentaho.di.core.logging.LoggingObjectInterface- Returns:
- the object name
- See Also:
LoggingObjectInterface.getObjectName()
-
getObjectCopy
public String getObjectCopy()
Gets a string identifying a copy in a series of steps- Specified by:
getObjectCopyin interfaceorg.pentaho.di.core.logging.LoggingObjectInterface- Returns:
- a string identifying a copy in a series of steps
- See Also:
LoggingObjectInterface.getObjectCopy()
-
getObjectRevision
public org.pentaho.di.repository.ObjectRevision getObjectRevision()
Gets the revision of the object with respect to a repository- Specified by:
getObjectRevisionin interfaceorg.pentaho.di.core.logging.LoggingObjectInterface- See Also:
LoggingObjectInterface.getObjectRevision()
-
getObjectType
public org.pentaho.di.core.logging.LoggingObjectType getObjectType()
Gets the logging object type- Specified by:
getObjectTypein interfaceorg.pentaho.di.core.logging.LoggingObjectInterface- Returns:
- the logging object type
- See Also:
LoggingObjectInterface.getObjectType()
-
getParent
public org.pentaho.di.core.logging.LoggingObjectInterface getParent()
Gets the logging object interface's parent- Specified by:
getParentin interfaceorg.pentaho.di.core.logging.LoggingObjectInterface- Returns:
- the logging object interface's parent
- See Also:
LoggingObjectInterface.getParent()
-
getRepositoryDirectory
public org.pentaho.di.repository.RepositoryDirectory getRepositoryDirectory()
Gets the directory of the job entry in the repository. For JobEntryBase, this returns null- Specified by:
getRepositoryDirectoryin interfaceorg.pentaho.di.core.logging.LoggingObjectInterface- Returns:
- null
- See Also:
LoggingObjectInterface.getRepositoryDirectory()
-
getLogLevel
public org.pentaho.di.core.logging.LogLevel getLogLevel()
Gets the logging level for the job entry- Specified by:
getLogLevelin interfaceorg.pentaho.di.core.logging.LoggingObjectInterface- See Also:
LoggingObjectInterface.getLogLevel()
-
setLogLevel
public void setLogLevel(org.pentaho.di.core.logging.LogLevel logLevel)
Sets the logging level for the job entry- Parameters:
logLevel- the new log level
-
getContainerObjectId
public String getContainerObjectId()
Gets the container object id- Specified by:
getContainerObjectIdin interfaceorg.pentaho.di.core.logging.LoggingObjectInterface- Returns:
- the container object id
-
setContainerObjectId
public void setContainerObjectId(String containerObjectId)
Sets the container object id- Parameters:
containerObjectId- the container object id to set
-
getRegistrationDate
public Date getRegistrationDate()
Returns the registration date for the job entry. For JobEntryBase, this method always returns null- Specified by:
getRegistrationDatein interfaceorg.pentaho.di.core.logging.LoggingObjectInterface- Returns:
- null
-
hasRepositoryReferences
public boolean hasRepositoryReferences()
Checks whether the job entry has repository references. For JobEntryBase, this method always returns false- Returns:
- false
-
lookupRepositoryReferences
public void lookupRepositoryReferences(Repository repository) throws org.pentaho.di.core.exception.KettleException
Looks up the references after import- Parameters:
repository- the repository to reference.- Throws:
org.pentaho.di.core.exception.KettleException- if any errors occur during the lookup
-
getReferencedObjectDescriptions
public String[] getReferencedObjectDescriptions()
- Returns:
- The objects referenced in the step, like a a transformation, a job, a mapper, a reducer, a combiner, ...
-
isReferencedObjectEnabled
public boolean[] isReferencedObjectEnabled()
- Returns:
- true for each referenced object that is enabled or has a valid reference definition.
-
loadReferencedObject
@Deprecated public Object loadReferencedObject(int index, Repository rep, org.pentaho.di.core.variables.VariableSpace space) throws org.pentaho.di.core.exception.KettleException
Deprecated.Load the referenced object- Parameters:
index- the referenced object index to load (in case there are multiple references)rep- the repositoryspace- the variable space to use- Returns:
- the referenced object once loaded
- Throws:
org.pentaho.di.core.exception.KettleException
-
loadReferencedObject
public Object loadReferencedObject(int index, Repository rep, org.pentaho.metastore.api.IMetaStore metaStore, org.pentaho.di.core.variables.VariableSpace space) throws org.pentaho.di.core.exception.KettleException
Load the referenced object- Parameters:
index- the referenced object index to load (in case there are multiple references)rep- the repositorymetaStore- the metaStore to load fromspace- the variable space to use- Returns:
- the referenced object once loaded
- Throws:
org.pentaho.di.core.exception.KettleException
-
isGatheringMetrics
public boolean isGatheringMetrics()
- Specified by:
isGatheringMetricsin interfaceorg.pentaho.di.core.logging.LoggingObjectInterface
-
setGatheringMetrics
public void setGatheringMetrics(boolean gatheringMetrics)
- Specified by:
setGatheringMetricsin interfaceorg.pentaho.di.core.logging.LoggingObjectInterface
-
isForcingSeparateLogging
public boolean isForcingSeparateLogging()
- Specified by:
isForcingSeparateLoggingin interfaceorg.pentaho.di.core.logging.LoggingObjectInterface
-
setForcingSeparateLogging
public void setForcingSeparateLogging(boolean forcingSeparateLogging)
- Specified by:
setForcingSeparateLoggingin interfaceorg.pentaho.di.core.logging.LoggingObjectInterface
-
getMetaStore
public org.pentaho.metastore.api.IMetaStore getMetaStore()
-
setMetaStore
public void setMetaStore(org.pentaho.metastore.api.IMetaStore metaStore)
-
setAttributesMap
public void setAttributesMap(Map<String,Map<String,String>> attributesMap)
- Specified by:
setAttributesMapin interfaceorg.pentaho.di.core.AttributesInterface
-
getAttributesMap
public Map<String,Map<String,String>> getAttributesMap()
- Specified by:
getAttributesMapin interfaceorg.pentaho.di.core.AttributesInterface
-
setAttribute
public void setAttribute(String groupName, String key, String value)
- Specified by:
setAttributein interfaceorg.pentaho.di.core.AttributesInterface
-
setAttributes
public void setAttributes(String groupName, Map<String,String> attributes)
- Specified by:
setAttributesin interfaceorg.pentaho.di.core.AttributesInterface
-
getAttributes
public Map<String,String> getAttributes(String groupName)
- Specified by:
getAttributesin interfaceorg.pentaho.di.core.AttributesInterface
-
getAttribute
public String getAttribute(String groupName, String key)
- Specified by:
getAttributein interfaceorg.pentaho.di.core.AttributesInterface
-
getExtensionDataMap
public Map<String,Object> getExtensionDataMap()
- Specified by:
getExtensionDataMapin interfaceorg.pentaho.di.core.ExtensionDataInterface
-
getParentJobMeta
public JobMeta getParentJobMeta()
- Returns:
- The parent jobMeta at save and during execution.
-
setParentJobMeta
public void setParentJobMeta(JobMeta parentJobMeta)
At save and run time, the system will attempt to set the jobMeta so that it can be accessed by the jobEntries if necessary.- Parameters:
parentJobMeta- the JobMeta to which this JobEntryInterface belongs
-
getEntryStepSetVariablesMap
protected Map<String,String> getEntryStepSetVariablesMap()
Gets a Map of variables set in EntryStepSetVariables- Returns:
- a map of variable names and values
-
setEntryStepSetVariable
public void setEntryStepSetVariable(String variableName, String variableValue)
Sets the value of the specified EntryStepSetVariable
-
getEntryStepSetVariable
public String getEntryStepSetVariable(String variableName)
Gets the value of the specified EntryStepSetVariable
-
addDatetimeToFilename
protected String addDatetimeToFilename(String filename, boolean addDate, String datePattern, boolean addTime, String timePattern, boolean specifyFormat, String datetimeFormat)
Appends the date, time and/or datetime to the given filename (before the extension if it exists), using the provided patterns.
- Parameters:
filename- the original filename (can have path and variables)addDate- if the date is to be addeddatePattern- the pattern to be used for the dateaddTime- if the time is to be addedtimePattern- the pattern to be used for the timespecifyFormat- if the datetime is to be addeddatetimeFormat- the pattern to be used for the datetime- Returns:
- the resulting filename after adding the specified suffixes to the given filename
-
-