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, JobEntryCopyFiles, JobEntryCopyMoveResultFilenames, JobEntryCreateFile, JobEntryCreateFolder, JobEntryDelay, JobEntryDeleteFile, JobEntryDeleteFiles, JobEntryDeleteFolders, JobEntryDeleteResultFilenames, JobEntryDosToUnix, JobEntryEmpty, JobEntryEval, JobEntryEvalFilesMetrics, JobEntryEvalTableContent, JobEntryFileCompare, JobEntryFileExists, JobEntryFilesExist, JobEntryFolderIsEmpty, JobEntryFoldersCompare, JobEntryHTTP, JobEntryJob, JobEntryMoveFiles, JobEntryMssqlBulkLoad, JobEntryMysqlBulkFile, JobEntryMysqlBulkLoad, JobEntryPGPDecryptFiles, JobEntryPGPEncryptFiles, JobEntryPGPVerify, JobEntryPing, JobEntrySendNagiosPassiveCheck, JobEntrySetVariables, 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 the execute() method.
Author:
Matt Created on 18-jun-04
  • Field Details

    • 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
    • attributesMap

      protected Map<String,Map<String,String>> attributesMap
    • extensionDataMap

      protected Map<String,Object> extensionDataMap
    • parentJobMeta

      protected JobMeta parentJobMeta
  • Constructor Details

    • JobEntryBase

      public JobEntryBase()
      Instantiates a new job entry base object.
    • JobEntryBase

      public JobEntryBase(String name, String description)
      Instantiates a new job entry base object with the given name and description.
      Parameters:
      name - the name of the job entry
      description - the description of the job entry
  • Method Details

    • equals

      public boolean equals(Object obj)
      Checks if the JobEntry object is equal to the specified object
      Overrides:
      equals in class Object
      Returns:
      true if the two objects are equal, false otherwise
      See Also:
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class 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:
      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 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:
      getName in interface org.pentaho.di.core.CheckResultSourceInterface
      Specified by:
      getName in interface ResourceHolderInterface
      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:
      getDescription in interface org.pentaho.di.core.CheckResultSourceInterface
      Specified by:
      getDescription in interface ResourceHolderInterface
      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

      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 node
      databases - the list of databases
      slaveServers - 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
      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
      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 object
      id_jobentry - the id of the job entry
      databases - the list of databases
      slaveServers - 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
      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 object
      id_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.
      Overrides:
      clone in class Object
      Returns:
      a clone of the object
    • toString

      public String toString()
      Returns a string representation of the object. For JobEntryBase, this method returns the name
      Overrides:
      toString in class Object
      See Also:
    • 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
      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
      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 object
      space - 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 object
      space - 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:
      getFilename in interface org.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:
      copyVariablesFrom in interface org.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:
      environmentSubstitute in interface org.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:
      environmentSubstitute in interface org.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:
      fieldSubstitute in interface org.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:
      getParentVariableSpace in interface org.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:
      setParentVariableSpace in interface org.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:
      getVariable in interface org.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:
      getVariable in interface org.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:
      getBooleanValueOfVariable in interface org.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:
      initializeVariablesFrom in interface org.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:
      listVariables in interface org.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:
      setVariable in interface org.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:
      shareVariablesWith in interface org.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:
      injectVariables in interface org.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)
      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 entry
      jobMeta - 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 status
      jobMeta - the metadata object for the job entry
      space - the variable space to resolve string expressions with variables with
      repository - the repository to load Kettle objects from
      metaStore - 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:
    • 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
      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 content
      namingInterface - The resource naming interface allows the object to be named appropriately
      repository - 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 content
      namingInterface - The resource naming interface allows the object to be named appropriately
      repository - The repository to load resources from
      metaStore - 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.
      Gets the plugin id.
      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

      @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
      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:
      getHolderType in interface ResourceHolderInterface
      Returns:
      the holder type for the job entry
      See Also:
    • 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 message
      arguments - 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 message
      arguments - 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 message
      arguments - 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 message
      arguments - 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 message
      arguments - 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 message
      e - the e
    • logError

      public void logError(String message, Object... arguments)
      Logs the specified string and arguments at the error level.
      Parameters:
      message - the message
      arguments - 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:
      getLogChannelId in interface org.pentaho.di.core.logging.LoggingObjectInterface
      Returns:
      the log channel id
      See Also:
      • LoggingObjectInterface.getLogChannelId()
    • getObjectName

      public String getObjectName()
      Gets the object name
      Specified by:
      getObjectName in interface org.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:
      getObjectCopy in interface org.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:
      getObjectRevision in interface org.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:
      getObjectType in interface org.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:
      getParent in interface org.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:
      getRepositoryDirectory in interface org.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:
      getLogLevel in interface org.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:
      getContainerObjectId in interface org.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:
      getRegistrationDate in interface org.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
      Load the referenced object
      Parameters:
      index - the referenced object index to load (in case there are multiple references)
      rep - the repository
      space - 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 repository
      metaStore - the metaStore to load from
      space - the variable space to use
      Returns:
      the referenced object once loaded
      Throws:
      org.pentaho.di.core.exception.KettleException
    • isGatheringMetrics

      public boolean isGatheringMetrics()
      Specified by:
      isGatheringMetrics in interface org.pentaho.di.core.logging.LoggingObjectInterface
    • setGatheringMetrics

      public void setGatheringMetrics(boolean gatheringMetrics)
      Specified by:
      setGatheringMetrics in interface org.pentaho.di.core.logging.LoggingObjectInterface
    • isForcingSeparateLogging

      public boolean isForcingSeparateLogging()
      Specified by:
      isForcingSeparateLogging in interface org.pentaho.di.core.logging.LoggingObjectInterface
    • setForcingSeparateLogging

      public void setForcingSeparateLogging(boolean forcingSeparateLogging)
      Specified by:
      setForcingSeparateLogging in interface org.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:
      setAttributesMap in interface org.pentaho.di.core.AttributesInterface
    • getAttributesMap

      public Map<String,Map<String,String>> getAttributesMap()
      Specified by:
      getAttributesMap in interface org.pentaho.di.core.AttributesInterface
    • setAttribute

      public void setAttribute(String groupName, String key, String value)
      Specified by:
      setAttribute in interface org.pentaho.di.core.AttributesInterface
    • setAttributes

      public void setAttributes(String groupName, Map<String,String> attributes)
      Specified by:
      setAttributes in interface org.pentaho.di.core.AttributesInterface
    • getAttributes

      public Map<String,String> getAttributes(String groupName)
      Specified by:
      getAttributes in interface org.pentaho.di.core.AttributesInterface
    • getAttribute

      public String getAttribute(String groupName, String key)
      Specified by:
      getAttribute in interface org.pentaho.di.core.AttributesInterface
    • getExtensionDataMap

      public Map<String,Object> getExtensionDataMap()
      Specified by:
      getExtensionDataMap in interface org.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 added
      datePattern - the pattern to be used for the date
      addTime - if the time is to be added
      timePattern - the pattern to be used for the time
      specifyFormat - if the datetime is to be added
      datetimeFormat - the pattern to be used for the datetime
      Returns:
      the resulting filename after adding the specified suffixes to the given filename