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,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 Summary
FieldsModifier and TypeFieldDescriptionprotected StringThe container object idThe map for setVariablesStep bindings for the job entryprotected org.pentaho.di.core.logging.LogChannelInterfaceThe log channel interface object, used for loggingprotected org.pentaho.metastore.api.IMetaStoreprotected JobThe parent jobprotected JobMetaprotected RepositoryThe repositoryprotected org.pentaho.di.core.variables.VariableSpaceThe variable bindings for the job entry -
Constructor Summary
ConstructorsConstructorDescriptionInstantiates 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
Modifier and TypeMethodDescriptionprotected 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.voidDeprecated.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 valuesclone()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 entryenvironmentSubstitute(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)booleanChecks if the JobEntry object is equal to the specified objectbooleanThis method must return true if the job entry supports the true/false outgoing hops.exportResources(org.pentaho.di.core.variables.VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface namingInterface, Repository repository) exportResources(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.fieldSubstitute(String aString, org.pentaho.di.core.row.RowMetaInterface rowMeta, Object[] rowData) getAttribute(String groupName, String key) getAttributes(String groupName) booleangetBooleanValueOfVariable(String variableName, boolean defaultValue) Returns a boolean representation of the specified variable after performing any necessary substitution.Gets the container object idGets the description of the job entryDeprecated.As of release 8.1, use annotated-based dialog insteadgetEntryStepSetVariable(String variableName) Gets the value of the specified EntryStepSetVariableGets a Map of variables set in EntryStepSetVariablesGets the filename of the job entry.Returns the holder type for the job entryorg.pentaho.di.core.logging.LogChannelInterfaceGets the log channel.Gets the logging channel idorg.pentaho.di.core.logging.LogLevelGets the logging level for the job entryorg.pentaho.metastore.api.IMetaStoregetName()Gets the name of the job entryGets a string identifying a copy in a series of stepsorg.pentaho.di.repository.ObjectIdGets the object idGets the object nameorg.pentaho.di.repository.ObjectRevisionGets the revision of the object with respect to a repositoryorg.pentaho.di.core.logging.LoggingObjectTypeGets the logging object typeorg.pentaho.di.core.logging.LoggingObjectInterfaceGets the logging object interface's parentGets the parent job.org.pentaho.di.core.variables.VariableSpaceGets the parent variable spaceGets the plugin id.Gets the real filename of the job entry, by substituting any environment variables present in the filename.String[]Returns the registration date for the job entry.Gets the repository for the job entry.org.pentaho.di.repository.RepositoryDirectoryGets the directory of the job entry in the repository.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.Gets the plug-in type descriptionDeprecated.usegetPluginId()org.pentaho.di.core.database.DatabaseMeta[]Gets all the database connections that are used by the job entry.getVariable(String variableName) Gets the value of the specified variable, or returns a default value if no such variable existsgetVariable(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.VariableSpaceGets the variable bindings for the job entry.getXML()This method is called by PDI whenever a job entry needs to serialize its settings to XML.booleanChecks whether the job entry has changedinthashCode()booleanChecks 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.booleanChecks if the logging level is detailed.booleanisDummy()Checks if the job entry is a dummy entrybooleanChecks if the job entry is an evaluation.booleanbooleanisFTP()Checks if this job entry performs an FTP operationbooleanbooleanisHTTP()Checks if this job entry performs an HTTP operationbooleanisJob()Checks if the job entry executes a jobbooleanisMail()Checks if the job entry sends emailboolean[]booleanChecks if the logging level is rowlevel.booleanisSFTP()Checks if this job entry performs an SFTP operationbooleanisShell()Checks if the job entry executes a shell programbooleanChecks if the job entry is of a special type (Start, Dummy, etc.)booleanisStart()Checks if the job entry has startedbooleanChecks if this job entry executes a transformationbooleanThis method must return true if the job entry supports the unconditional outgoing hop.String[]Gets a list of variable names for the job entryloadReferencedObject(int index, Repository rep, org.pentaho.di.core.variables.VariableSpace space) Deprecated.loadReferencedObject(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) voidLogs the specified string at the basic level.voidLogs the specified string and arguments at the basic level.voidLogs the specified string at the debug level.voidLogs 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.voidLogs the specified string at the error level.voidLogs the specified string and arguments at the error level.voidLogs 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 importvoidParses the repository objects.booleanChecks 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) voidvoidSets 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) voidSets 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.voidDeprecated.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.toString()Returns a string representation of the object.Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.pentaho.di.core.logging.LoggingObjectLifecycleInterface
callAfterLog, callBeforeLogMethods inherited from interface org.pentaho.di.core.variables.VariableSpace
environmentSubstitute
-
Field Details
-
variables
protected org.pentaho.di.core.variables.VariableSpace variablesThe variable bindings for the job entry -
entryStepSetVariablesMap
The map for setVariablesStep bindings for the job entry -
rep
The repository -
parentJob
The parent job -
log
protected org.pentaho.di.core.logging.LogChannelInterface logThe log channel interface object, used for logging -
containerObjectId
The container object id -
metaStore
protected org.pentaho.metastore.api.IMetaStore metaStore -
attributesMap
-
extensionDataMap
-
parentJobMeta
-
-
Constructor Details
-
JobEntryBase
public JobEntryBase()Instantiates a new job entry base object. -
JobEntryBase
Instantiates a new job entry base object with the given name and description.- Parameters:
name- the name of the job entrydescription- the description of the job entry
-
-
Method Details
-
equals
Checks if the JobEntry object is equal to the specified object -
hashCode
public int hashCode() -
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
Gets the plug-in type description- Returns:
- the plug-in type description
-
setName
Sets the name of the job entry- Parameters:
name- the new name
-
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
Sets the description for the job entry.- Parameters:
Description- the new description
-
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
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
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
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
Returns a string representation of the object. For JobEntryBase, this method returns the name -
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
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
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
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
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
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
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
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
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
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)
-
injectVariables
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
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.KettleExceptionDeprecated.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.KettleExceptionExports 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
Gets the plugin id.- Returns:
- the plugin id
-
setPluginId
Sets the plugin id.- Parameters:
configId- the new plugin id
-
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.Sets the plugin id. -
getDialogClassName
Deprecated.As of release 8.1, use annotated-based dialog insteadThis 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
Returns the holder type for the job entry- Specified by:
getHolderTypein interfaceResourceHolderInterface- 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
Sets the repository for the job entry.- Parameters:
repository- the repository
-
getRepository
Gets the repository for the job entry.- Returns:
- the repository
-
setParentJob
Sets the parent job.- Parameters:
parentJob- the new parent 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
Logs the specified string at the minimal level.- Parameters:
message- the message
-
logMinimal
Logs the specified string and arguments at the minimal level.- Parameters:
message- the messagearguments- the arguments
-
logBasic
Logs the specified string at the basic level.- Parameters:
message- the message
-
logBasic
Logs the specified string and arguments at the basic level.- Parameters:
message- the messagearguments- the arguments
-
logDetailed
Logs the specified string at the detailed level.- Parameters:
message- the message
-
logDetailed
Logs the specified string and arguments at the detailed level.- Parameters:
message- the messagearguments- the arguments
-
logDebug
Logs the specified string at the debug level.- Parameters:
message- the message
-
logDebug
Logs the specified string and arguments at the debug level.- Parameters:
message- the messagearguments- the arguments
-
logRowlevel
Logs the specified string at the row level.- Parameters:
message- the message
-
logRowlevel
Logs the specified string and arguments at the row level.- Parameters:
message- the messagearguments- the arguments
-
logError
Logs the specified string at the error level.- Parameters:
message- the message
-
logError
Logs the specified string and Throwable object at the error level.- Parameters:
message- the messagee- the e
-
logError
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
Gets the logging channel id- Specified by:
getLogChannelIdin interfaceorg.pentaho.di.core.logging.LoggingObjectInterface- Returns:
- the log channel id
- See Also:
-
LoggingObjectInterface.getLogChannelId()
-
getObjectName
Gets the object name- Specified by:
getObjectNamein interfaceorg.pentaho.di.core.logging.LoggingObjectInterface- Returns:
- the object name
- See Also:
-
LoggingObjectInterface.getObjectName()
-
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
Gets the container object id- Specified by:
getContainerObjectIdin interfaceorg.pentaho.di.core.logging.LoggingObjectInterface- Returns:
- the container object id
-
setContainerObjectId
Sets the container object id- Parameters:
containerObjectId- the container object id to set
-
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
- 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
- Specified by:
setAttributesMapin interfaceorg.pentaho.di.core.AttributesInterface
-
getAttributesMap
- Specified by:
getAttributesMapin interfaceorg.pentaho.di.core.AttributesInterface
-
setAttribute
- Specified by:
setAttributein interfaceorg.pentaho.di.core.AttributesInterface
-
setAttributes
- Specified by:
setAttributesin interfaceorg.pentaho.di.core.AttributesInterface
-
getAttributes
- Specified by:
getAttributesin interfaceorg.pentaho.di.core.AttributesInterface
-
getAttribute
- Specified by:
getAttributein interfaceorg.pentaho.di.core.AttributesInterface
-
getExtensionDataMap
- Specified by:
getExtensionDataMapin interfaceorg.pentaho.di.core.ExtensionDataInterface
-
getParentJobMeta
- Returns:
- The parent jobMeta at save and during execution.
-
setParentJobMeta
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
Gets a Map of variables set in EntryStepSetVariables- Returns:
- a map of variable names and values
-
setEntryStepSetVariable
Sets the value of the specified EntryStepSetVariable -
getEntryStepSetVariable
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
-
check(List, JobMeta, VariableSpace, Repository, IMetaStore)