Package org.pentaho.di.job
Class JobMeta
java.lang.Object
org.pentaho.di.base.AbstractMeta
org.pentaho.di.job.JobMeta
- All Implemented Interfaces:
Cloneable
,Comparable<JobMeta>
,org.pentaho.di.core.AttributesInterface
,org.pentaho.di.core.bowl.HasBowlInterface
,ChangedFlagInterface
,EngineMetaInterface
,UndoInterface
,org.pentaho.di.core.logging.LoggingObjectInterface
,org.pentaho.di.core.logging.LoggingObjectLifecycleInterface
,org.pentaho.di.core.parameters.NamedParams
,org.pentaho.di.core.variables.VariableSpace
,org.pentaho.di.core.xml.XMLInterface
,HasRepositoryInterface
,org.pentaho.di.repository.RepositoryElementInterface
,org.pentaho.di.repository.RepositoryObjectInterface
,ResourceExportInterface
,HasDatabasesInterface
,HasSlaveServersInterface
public class JobMeta
extends AbstractMeta
implements Cloneable, Comparable<JobMeta>, org.pentaho.di.core.xml.XMLInterface, ResourceExportInterface, org.pentaho.di.repository.RepositoryElementInterface, org.pentaho.di.core.logging.LoggingObjectInterface
The definition of a PDI job is represented by a JobMeta object. It is typically loaded from a .kjb file, a PDI
repository, or it is generated dynamically. The declared parameters of the job definition are then queried using
listParameters() and assigned values using calls to setParameterValue(..). JobMeta provides methods to load, save,
verify, etc.
- Since:
- 11-08-2003
- Author:
- Matt
-
Field Summary
Modifier and TypeFieldDescriptionprotected String[]
protected boolean
protected boolean
protected boolean
protected boolean
protected List<LogTableInterface>
protected boolean
protected List<JobEntryCopy>
protected JobEntryLogTable
protected List<JobHopMeta>
protected JobLogTable
protected int
protected String
protected org.pentaho.di.core.logging.LogChannelInterface
The log channel interface.The loop cache.boolean[]
List of booleans indicating whether or not to remember the size and position of the different windows...static final org.pentaho.di.repository.RepositoryObjectType
A constant specifying the repository element type as a Job.protected String
static final String
Constant = "SPECIAL"static final String
Constant = "DUMMY"static final String
Constant = "ERROR"static final String
Constant = "OK"static final String
Constant = "START"static final String
protected static final String
protected static final String
Fields inherited from class org.pentaho.di.base.AbstractMeta
attributesMap, bowl, changedDatabases, changedFlag, changedNotes, channelLogTable, containerObjectId, contentChangedListeners, createdDate, createdUser, currentDirectoryChangedListeners, databases, description, directory, embeddedMetaStore, extendedDescription, filename, filenameChangedListeners, logLevel, max_undo, metaStore, metastoreLocatorOsgi, modifiedDate, modifiedUser, name, nameChangedListeners, namedClusterEmbedManager, namedClusterServiceOsgi, namedParams, notes, objectId, objectRevision, privateDatabases, repository, runOptions, sharedObjects, sharedObjectsFile, slaveServers, TYPE_UNDO_CHANGE, TYPE_UNDO_DELETE, TYPE_UNDO_NEW, TYPE_UNDO_POSITION, undo, undo_position, variables
-
Constructor Summary
ConstructorDescriptionJobMeta()
Instantiates a new job meta.JobMeta
(InputStream inputStream, Repository rep, org.pentaho.di.core.gui.OverwritePrompter prompter) Instantiates a new job meta.JobMeta
(String fname, Repository rep) Instantiates a new job meta.JobMeta
(String fname, Repository rep, org.pentaho.di.core.gui.OverwritePrompter prompter) Instantiates a new job meta.JobMeta
(org.pentaho.di.core.variables.VariableSpace parentSpace, String fname, Repository rep, org.pentaho.di.core.gui.OverwritePrompter prompter) Deprecated.JobMeta
(org.pentaho.di.core.variables.VariableSpace parentSpace, String fname, Repository rep, org.pentaho.metastore.api.IMetaStore metaStore, org.pentaho.di.core.gui.OverwritePrompter prompter) Load the job from the XML file specified.JobMeta
(Node jobnode, Repository rep, boolean ignoreRepositorySharedObjects, org.pentaho.di.core.gui.OverwritePrompter prompter) Create a new JobMeta object by loading it from a a DOM node.JobMeta
(Node jobnode, Repository rep, org.pentaho.di.core.gui.OverwritePrompter prompter) Create a new JobMeta object by loading it from a a DOM node. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the defaults.void
addJobEntry
(int p, JobEntryCopy si) Adds the job entry.void
Adds the job entry.void
addJobHop
(int p, JobHopMeta hi) Adds the job hop.void
addJobHop
(JobHopMeta hi) Adds the job hop.void
addMissingEntry
(MissingEntry missingEntry) boolean
void
checkJobEntries
(List<org.pentaho.di.core.CheckResultInterface> remarks, boolean only_selected, org.pentaho.di.core.ProgressMonitorListener monitor) Deprecated.void
checkJobEntries
(List<org.pentaho.di.core.CheckResultInterface> remarks, boolean only_selected, org.pentaho.di.core.ProgressMonitorListener monitor, org.pentaho.di.core.variables.VariableSpace space, Repository repository, org.pentaho.metastore.api.IMetaStore metaStore) Check all job entries within the job.void
clear()
Clears or reinitializes many of the JobMeta properties.void
Clears the different changed flags of the job.clone()
Clones the job meta-data object.int
Compares two job on name, filename, repository directory, etc.int
Compares this job's meta-data to the specified job's meta-data.Create a unique list of job entry interfacesboolean
containsJobCopy
(JobEntryCopy jobCopy) int
countEntries
(String name) Count entries.static final JobEntryCopy
Creates the dummy entry.static final JobEntryCopy
Creates the start entry.boolean
Checks whether this job's meta-data object is equal to the specified object.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.findJobEntry
(String full_name_nr) Find job entry.findJobEntry
(String name, int nr, boolean searchHiddenToo) Find an existing JobEntryCopy by it's name and numberstatic final JobEntryInterface
findJobEntry
(List<JobEntryInterface> jobentries, org.pentaho.di.repository.ObjectId id_jobentry) Find a jobentry with a certain ID in a list of job entries.static final JobEntryCopy
findJobEntryCopy
(List<JobEntryCopy> jobcopies, org.pentaho.di.repository.ObjectId id_jobentry_copy) Find a jobentrycopy with a certain ID in a list of job entry copies.findJobHop
(String name) Find job hop.findJobHop
(JobEntryCopy from, JobEntryCopy to) Find job hop.findJobHop
(JobEntryCopy from, JobEntryCopy to, boolean includeDisabled) Find job hop.Find job hop from.findJobHopTo
(JobEntryCopy jge) Find job hop to.int
Find max nr.findNextJobEntry
(JobEntryCopy from, int cnt) Find next job entry.int
Find nr next job entries.int
Find nr prev job entries.int
findNrPrevJobEntries
(JobEntryCopy to, boolean info) Find nr prev job entries.findPrevJobEntry
(JobEntryCopy to, int nr) Find prev job entry.findPrevJobEntry
(JobEntryCopy to, int nr, boolean info) Find prev job entry.Find start.int
findUnusedNr
(String name) Find unused nr.getAllJobGraphEntries
(String name) Gets the all job graph entries.getAllJobHopsUsing
(String name) Gets the all job hops using.getAlternativeJobentryName
(String entryname) Proposes an alternative job entry name when the original already exists...String[]
Deprecated.Moved to the Job classGets the default extension for a job.getDummy()
Gets the dummy.int[]
getEntryIndexes
(List<JobEntryCopy> entries) Gets the entry indexes.Gets the file type.String[]
Gets the job filter extensions.String[]
Gets the job filter names.Gets the job copies.getJobEntry
(int i) Gets the job entry.getJobEntryCopy
(int x, int y, int iconsize) Gets the job entry copy.Gets the job entry log table.getJobHop
(int i) Gets the job hop.Gets the jobhops.Gets the job log table.int
Gets the status of the job.Gets the version of the job.org.pentaho.di.core.logging.LogChannelInterface
Gets the log channel.Gets the log tables.org.pentaho.di.core.gui.Point
Gets the maximum.org.pentaho.di.core.gui.Point
Get the minimum point on the canvas of a joborg.pentaho.di.core.logging.LoggingObjectType
org.pentaho.di.repository.RepositoryObjectType
Gets the resource dependencies.Gets the selected entries.org.pentaho.di.core.gui.Point[]
Gets the selected locations.org.pentaho.di.core.gui.Point[]
Get all the selected note locationsList<org.pentaho.di.core.SQLStatement>
getSQLStatements
(Repository repository, org.pentaho.di.core.ProgressMonitorListener monitor) List<org.pentaho.di.core.SQLStatement>
getSQLStatements
(Repository repository, org.pentaho.metastore.api.IMetaStore metaStore, org.pentaho.di.core.ProgressMonitorListener monitor) Builds a list of all the SQL statements that this transformation needs in order to work properly.getStart()
Gets the start.getStringList
(boolean searchSteps, boolean searchDatabases, boolean searchNotes) Get a list of all the strings used in this job.Gets the used variables.getXML()
Gets the XML representation.boolean
boolean
hasLoop
(JobEntryCopy entry) Checks for loop.boolean
hasLoop
(JobEntryCopy entry, JobEntryCopy lookup) Checks for loop.boolean
hasLoop
(JobEntryCopy entry, JobEntryCopy lookup, boolean info) Deprecated.boolean
boolean
Checks whether the job has repository references.boolean
Have job entries changed.boolean
Have job hops changed.int
Index of job entry.int
Index of job hop.void
initializeVariablesFrom
(org.pentaho.di.core.variables.VariableSpace parent) boolean
Gets the boolean value of batch id passed.boolean
isDatabaseConnectionUsed
(org.pentaho.di.core.database.DatabaseMeta databaseMeta) This method asks all steps in the transformation whether or not the specified database connection is used.boolean
Checks if is entry used in hops.boolean
boolean
Checks if is file reference.static boolean
isFileReference
(String fileName, String transName) Checks if is file reference.boolean
boolean
Returns whether or not the job is gathering metrics.boolean
isPathExist
(JobEntryInterface from, JobEntryInterface to) boolean
Checks if is rep reference.static boolean
isRepReference
(String fileName, String transName) Checks if is rep reference.void
loadXML
(Node jobnode, String fname, Repository rep, boolean ignoreRepositorySharedObjects, org.pentaho.di.core.gui.OverwritePrompter prompter) Deprecated.void
loadXML
(Node jobnode, String fname, Repository rep, org.pentaho.di.core.gui.OverwritePrompter prompter) Load xml.void
loadXML
(Node jobnode, String fname, Repository rep, org.pentaho.metastore.api.IMetaStore metaStore, boolean ignoreRepositorySharedObjects, org.pentaho.di.core.gui.OverwritePrompter prompter) Load a block of XML from an DOM node.void
loadXML
(Node jobnode, Repository rep, boolean ignoreRepositorySharedObjects, org.pentaho.di.core.gui.OverwritePrompter prompter) Load a block of XML from an DOM node.void
loadXML
(Node jobnode, Repository rep, org.pentaho.di.core.gui.OverwritePrompter prompter) Load xml.void
lookupRepositoryReferences
(Repository repository) Look up the references after importint
Nr job entries.int
Nr job hops.realClone
(boolean doClear) Perform a real clone of the job meta-data object, including cloning all lists and copying all values.void
removeJobEntry
(int i) Removes the job entry.void
removeJobHop
(int i) Removes the job hop.void
removeJobHop
(JobHopMeta hop) Removes a hop from the transformation.void
removeMissingEntry
(MissingEntry missingEntry) void
See if the name of the supplied job entry copy doesn't collide with any other job entry copy in the job.void
Select all.void
setArguments
(String[] arguments) Deprecated.moved to the job classvoid
setBatchIdPassed
(boolean batchIdPassed) Sets the batch id passed.void
setExpandingRemoteJob
(boolean expandingRemoteJob) void
setExtraLogTables
(List<LogTableInterface> extraLogTables) void
setForcingSeparateLogging
(boolean forcingSeparateLogging) void
setGatheringMetrics
(boolean gatheringMetrics) Sets whether or not the job is gathering metrics.protected void
protected void
setInternalFilenameKettleVariables
(org.pentaho.di.core.variables.VariableSpace var) Sets the internal filename kettle variables.void
setInternalKettleVariables
(org.pentaho.di.core.variables.VariableSpace var) This method sets various internal kettle variables that can be used by the transformation.protected void
setInternalNameKettleVariable
(org.pentaho.di.core.variables.VariableSpace var) Sets the internal name kettle variable.void
setJobEntry
(int idx, JobEntryCopy jec) Sets the job entry.void
setJobEntryLogTable
(JobEntryLogTable jobEntryLogTable) Sets the job entry log table.void
setJobLogTable
(JobLogTable jobLogTable) Sets the job log table.void
setJobstatus
(int jobStatus) Set the status of the job.void
setJobversion
(String jobVersion) Set the version of the job.void
setStartCopyName
(String startCopyName) toString()
Gets a textual representation of the job.void
Unselect all.protected void
Methods inherited from class org.pentaho.di.base.AbstractMeta
activateParameters, addContentChangedListener, addCurrentDirectoryChangedListener, addDatabase, addDatabase, addDatabase, addFilenameChangedListener, addNameChangedListener, addNote, addNote, addObserver, addOrReplaceDatabase, addOrReplaceSlaveServer, addParameterDefinition, addUndo, canSave, clearChangedDatabases, clearCurrentDirectoryChangedListeners, clearNameChangedListeners, clearParameters, clearUndo, compare, copyParametersFrom, copyVariablesFrom, deleteObserver, disposeEmbeddedMetastoreProvider, environmentSubstitute, environmentSubstitute, eraseParameters, fieldSubstitute, findDatabase, findSlaveServer, fireContentChangedListeners, fireContentChangedListeners, fireCurrentDirectoryChanged, fireFilenameChangedListeners, fireNameChangedListeners, getAllSharedObjects, getAttribute, getAttributes, getAttributesMap, getBooleanValueOfVariable, getBowl, getChannelLogTable, getContainerObjectId, getContentChangedListeners, getCreatedDate, getCreatedUser, getDatabase, getDatabaseNames, getDatabases, getDescription, getEmbeddedMetaStore, getEmbeddedMetastoreProviderKey, getExtendedDescription, getFilename, getLogLevel, getMaxUndo, getMetaFileCache, getMetaStore, getMetastoreLocatorOsgi, getModifiedDate, getModifiedUser, getName, getNamedClusterServiceOsgi, getNote, getNote, getNoteIndexes, getNotes, getObjectCopy, getObjectId, getObjectName, getObjectRevision, getParameterDefault, getParameterDescription, getParameterValue, getParent, getParentVariableSpace, getPrivateDatabases, getRegistrationDate, getRepository, getRepositoryDirectory, getSelectedNotes, getSharedObjects, getSharedObjectsFile, getSlaveServerNames, getSlaveServers, getUndoSize, getVariable, getVariable, getVersioningEnabled, hashCode, haveConnectionsChanged, haveNotesChanged, importFromMetaStore, indexOfDatabase, indexOfNote, injectVariables, isAlwaysShowRunOptions, isClearingLog, isSafeModeEnabled, isShowDialog, listParameters, listVariables, loadSharedObject, lowerNote, mergeParametersWith, nameFromFilename, nextUndo, notifyObservers, nrDatabases, nrNotes, previousUndo, raiseNote, readSharedObjects, removeContentChangedListener, removeCurrentDirectoryChangedListener, removeDatabase, removeFilenameChangedListener, removeNameChangedListener, removeNote, saveMetaStoreObjects, saveSharedObjects, setAlwaysShowRunOptions, setAttribute, setAttributes, setAttributesMap, setBowl, setCarteObjectId, setChanged, setChanged, setChannelLogTable, setClearingLog, setCreatedDate, setCreatedUser, setDatabases, setDescription, setExtendedDescription, setFilename, setInternalKettleVariables, setLogLevel, setMaxUndo, setMetaFileCache, setMetaStore, setMetastoreLocatorOsgi, setModifiedDate, setModifiedUser, setName, setNamedClusterServiceOsgi, setObjectId, setObjectRevision, setParameterValue, setParentVariableSpace, setPrivateDatabases, setRepository, setRepositoryDirectory, setSafeModeEnabled, setSharedObjects, setSharedObjectsFile, setShowDialog, setSlaveServers, setVariable, setVersioningEnabled, shareVariablesWith, shouldOverwrite, viewNextUndo, viewPreviousUndo, viewThisUndo
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.pentaho.di.core.logging.LoggingObjectInterface
getContainerObjectId, getFilename, getLogLevel, getObjectCopy, getObjectId, getObjectName, getObjectRevision, getParent, getRegistrationDate, getRepositoryDirectory
Methods inherited from interface org.pentaho.di.core.logging.LoggingObjectLifecycleInterface
callAfterLog, callBeforeLog
Methods inherited from interface org.pentaho.di.repository.RepositoryElementInterface
getDescription, getObjectId, getObjectRevision, setDescription, setName, setObjectRevision, setRepositoryDirectory
Methods inherited from interface org.pentaho.di.core.variables.VariableSpace
environmentSubstitute
-
Field Details
-
XML_TAG
- See Also:
-
XML_TAG_SLAVESERVERS
- See Also:
-
REPOSITORY_ELEMENT_TYPE
public static final org.pentaho.di.repository.RepositoryObjectType REPOSITORY_ELEMENT_TYPEA constant specifying the repository element type as a Job. -
jobVersion
-
jobStatus
protected int jobStatus -
jobcopies
-
jobhops
-
arguments
-
changedEntries
protected boolean changedEntries -
changedHops
protected boolean changedHops -
jobLogTable
-
jobEntryLogTable
-
extraLogTables
-
startCopyName
-
expandingRemoteJob
protected boolean expandingRemoteJob -
gatheringMetrics
protected boolean gatheringMetrics -
log
protected org.pentaho.di.core.logging.LogChannelInterface logThe log channel interface. -
STRING_SPECIAL
Constant = "SPECIAL"- See Also:
-
STRING_SPECIAL_START
Constant = "START"- See Also:
-
STRING_SPECIAL_DUMMY
Constant = "DUMMY"- See Also:
-
STRING_SPECIAL_OK
Constant = "OK"- See Also:
-
STRING_SPECIAL_ERROR
Constant = "ERROR"- See Also:
-
loopCache
The loop cache. -
max
public boolean[] maxList of booleans indicating whether or not to remember the size and position of the different windows... -
batchIdPassed
protected boolean batchIdPassed -
XML_TAG_PARAMETERS
- See Also:
-
-
Constructor Details
-
JobMeta
public JobMeta()Instantiates a new job meta. -
JobMeta
public JobMeta(String fname, Repository rep) throws org.pentaho.di.core.exception.KettleXMLException Instantiates a new job meta.- Parameters:
fname
- the fnamerep
- the rep- Throws:
org.pentaho.di.core.exception.KettleXMLException
- the kettle xml exception
-
JobMeta
public JobMeta(String fname, Repository rep, org.pentaho.di.core.gui.OverwritePrompter prompter) throws org.pentaho.di.core.exception.KettleXMLException Instantiates a new job meta.- Parameters:
fname
- the fnamerep
- the repprompter
- the prompter- Throws:
org.pentaho.di.core.exception.KettleXMLException
- the kettle xml exception
-
JobMeta
@Deprecated public JobMeta(org.pentaho.di.core.variables.VariableSpace parentSpace, String fname, Repository rep, org.pentaho.di.core.gui.OverwritePrompter prompter) throws org.pentaho.di.core.exception.KettleXMLException Deprecated.Load the job from the XML file specified.- Parameters:
fname
- The filename to load as a jobrep
- The repository to bind againt, null if there is no repository available.- Throws:
org.pentaho.di.core.exception.KettleXMLException
-
JobMeta
public JobMeta(org.pentaho.di.core.variables.VariableSpace parentSpace, String fname, Repository rep, org.pentaho.metastore.api.IMetaStore metaStore, org.pentaho.di.core.gui.OverwritePrompter prompter) throws org.pentaho.di.core.exception.KettleXMLException Load the job from the XML file specified.- Parameters:
fname
- The filename to load as a jobrep
- The repository to bind againt, null if there is no repository available.- Throws:
org.pentaho.di.core.exception.KettleXMLException
-
JobMeta
public JobMeta(InputStream inputStream, Repository rep, org.pentaho.di.core.gui.OverwritePrompter prompter) throws org.pentaho.di.core.exception.KettleXMLException Instantiates a new job meta.- Parameters:
inputStream
- the input streamrep
- the repprompter
- the prompter- Throws:
org.pentaho.di.core.exception.KettleXMLException
- the kettle xml exception
-
JobMeta
public JobMeta(Node jobnode, Repository rep, org.pentaho.di.core.gui.OverwritePrompter prompter) throws org.pentaho.di.core.exception.KettleXMLException Create a new JobMeta object by loading it from a a DOM node.- Parameters:
jobnode
- The node to load fromrep
- The reference to a repository to load additional information fromprompter
- The prompter to use in case a shared object gets overwritten- Throws:
org.pentaho.di.core.exception.KettleXMLException
-
JobMeta
public JobMeta(Node jobnode, Repository rep, boolean ignoreRepositorySharedObjects, org.pentaho.di.core.gui.OverwritePrompter prompter) throws org.pentaho.di.core.exception.KettleXMLException Create a new JobMeta object by loading it from a a DOM node.- Parameters:
jobnode
- The node to load fromrep
- The reference to a repository to load additional information fromignoreRepositorySharedObjects
- Do not load shared objects, handled separatelyprompter
- The prompter to use in case a shared object gets overwritten- Throws:
org.pentaho.di.core.exception.KettleXMLException
-
-
Method Details
-
clear
public void clear()Clears or reinitializes many of the JobMeta properties.- Overrides:
clear
in classAbstractMeta
-
addDefaults
public void addDefaults()Adds the defaults. -
createStartEntry
Creates the start entry.- Returns:
- the job entry copy
-
createDummyEntry
Creates the dummy entry.- Returns:
- the job entry copy
-
getStart
Gets the start.- Returns:
- the start
-
getDummy
Gets the dummy.- Returns:
- the dummy
-
compare
Compares two job on name, filename, repository directory, etc. The comparison algorithm is as follows:
- The first job's filename is checked first; if it has none, the job comes from a repository. If the second job does not come from a repository, -1 is returned.
- If the jobs are both from a repository, the jobs' names are compared. If the first job has no name and the second one does, a -1 is returned. If the opposite is true, a 1 is returned.
- If they both have names they are compared as strings. If the result is non-zero it is returned. Otherwise the repository directories are compared using the same technique of checking empty values and then performing a string comparison, returning any non-zero result.
- If the names and directories are equal, the object revision strings are compared using the same technique of checking empty values and then performing a string comparison, this time ultimately returning the result of the string compare.
- If the first job does not come from a repository and the second one does, a 1 is returned. Otherwise the job names and filenames are subsequently compared using the same technique of checking empty values and then performing a string comparison, ultimately returning the result of the filename string comparison.
- Parameters:
j1
- the first job to comparej2
- the second job to compare- Returns:
- 0 if the two jobs are equal, 1 or -1 depending on the values (see description above)
-
compareTo
Compares this job's meta-data to the specified job's meta-data. This method simply calls compare(this, o)- Specified by:
compareTo
in interfaceComparable<JobMeta>
- Parameters:
o
- the o- Returns:
- the int
- See Also:
-
equals
Checks whether this job's meta-data object is equal to the specified object. If the specified object is not an instance of JobMeta, false is returned. Otherwise the method returns whether a call to compare() indicates equality (i.e. compare(this, (JobMeta)obj)==0). -
clone
Clones the job meta-data object. -
realClone
Perform a real clone of the job meta-data object, including cloning all lists and copying all values. If the doClear parameter is true, the clone will be cleared of ALL values before the copy. If false, only the copied fields will be cleared.- Parameters:
doClear
- Whether to clear all of the clone's data before copying from the source object- Returns:
- a real clone of the calling object
-
getJobLogTable
Gets the job log table.- Returns:
- the job log table
-
setJobLogTable
Sets the job log table.- Parameters:
jobLogTable
- the new job log table
-
clearChanged
public void clearChanged()Clears the different changed flags of the job.- Specified by:
clearChanged
in interfaceChangedFlagInterface
- Specified by:
clearChanged
in interfaceEngineMetaInterface
- Overrides:
clearChanged
in classAbstractMeta
-
hasChanged
public boolean hasChanged()- Specified by:
hasChanged
in interfaceChangedFlagInterface
- Overrides:
hasChanged
in classAbstractMeta
-
isDatabaseConnectionUsed
public boolean isDatabaseConnectionUsed(org.pentaho.di.core.database.DatabaseMeta databaseMeta) This method asks all steps in the transformation whether or not the specified database connection is used. The connection is used in the transformation if any of the steps uses it or if it is being used to log to.- Parameters:
databaseMeta
- The connection to check- Returns:
- true if the connection is used in this transformation.
-
getFileType
Description copied from interface:EngineMetaInterface
Gets the file type.- Specified by:
getFileType
in interfaceEngineMetaInterface
- Returns:
- the file type
-
getFilterNames
Gets the job filter names.- Specified by:
getFilterNames
in interfaceEngineMetaInterface
- Returns:
- the filter names
- See Also:
-
getFilterExtensions
Gets the job filter extensions. For JobMeta, this method returns the value ofConst.STRING_JOB_FILTER_EXT
- Specified by:
getFilterExtensions
in interfaceEngineMetaInterface
- Returns:
- the filter extensions
- See Also:
-
getDefaultExtension
Gets the default extension for a job. For JobMeta, this method returns the value ofConst.STRING_JOB_DEFAULT_EXT
- Specified by:
getDefaultExtension
in interfaceEngineMetaInterface
- Returns:
- the default extension
- See Also:
-
getXML
Description copied from interface:EngineMetaInterface
Gets the XML representation.- Specified by:
getXML
in interfaceEngineMetaInterface
- Specified by:
getXML
in interfaceorg.pentaho.di.core.xml.XMLInterface
- Returns:
- the XML representation of this transformation
- See Also:
-
XMLInterface.getXML()
-
areOnlyUsedConnectionsSavedToXMLInServer
public boolean areOnlyUsedConnectionsSavedToXMLInServer() -
isRepReference
public boolean isRepReference()Checks if is rep reference.- Returns:
- true, if is rep reference
-
isFileReference
public boolean isFileReference()Checks if is file reference.- Returns:
- true, if is file reference
-
isRepReference
Checks if is rep reference.- Parameters:
fileName
- the file nametransName
- the trans name- Returns:
- true, if is rep reference
-
isFileReference
Checks if is file reference.- Parameters:
fileName
- the file nametransName
- the trans name- Returns:
- true, if is file reference
-
loadXML
public void loadXML(Node jobnode, Repository rep, org.pentaho.di.core.gui.OverwritePrompter prompter) throws org.pentaho.di.core.exception.KettleXMLException Load xml.- Parameters:
jobnode
- the jobnoderep
- the repprompter
- the prompter- Throws:
org.pentaho.di.core.exception.KettleXMLException
- the kettle xml exception
-
loadXML
public void loadXML(Node jobnode, String fname, Repository rep, org.pentaho.di.core.gui.OverwritePrompter prompter) throws org.pentaho.di.core.exception.KettleXMLException Load xml.- Parameters:
jobnode
- the jobnodefname
- The filenamerep
- the repprompter
- the prompter- Throws:
org.pentaho.di.core.exception.KettleXMLException
- the kettle xml exception
-
loadXML
public void loadXML(Node jobnode, Repository rep, boolean ignoreRepositorySharedObjects, org.pentaho.di.core.gui.OverwritePrompter prompter) throws org.pentaho.di.core.exception.KettleXMLException Load a block of XML from an DOM node.- Parameters:
jobnode
- The node to load fromrep
- The reference to a repository to load additional information fromignoreRepositorySharedObjects
- Do not load shared objects, handled separatelyprompter
- The prompter to use in case a shared object gets overwritten- Throws:
org.pentaho.di.core.exception.KettleXMLException
-
loadXML
@Deprecated public void loadXML(Node jobnode, String fname, Repository rep, boolean ignoreRepositorySharedObjects, org.pentaho.di.core.gui.OverwritePrompter prompter) throws org.pentaho.di.core.exception.KettleXMLException Deprecated.Load a block of XML from an DOM node.- Parameters:
jobnode
- The node to load fromfname
- The filenamerep
- The reference to a repository to load additional information fromignoreRepositorySharedObjects
- Do not load shared objects, handled separatelyprompter
- The prompter to use in case a shared object gets overwritten- Throws:
org.pentaho.di.core.exception.KettleXMLException
-
loadXML
public void loadXML(Node jobnode, String fname, Repository rep, org.pentaho.metastore.api.IMetaStore metaStore, boolean ignoreRepositorySharedObjects, org.pentaho.di.core.gui.OverwritePrompter prompter) throws org.pentaho.di.core.exception.KettleXMLException Load a block of XML from an DOM node.- Parameters:
jobnode
- The node to load fromfname
- The filenamerep
- The reference to a repository to load additional information frommetaStore
- the MetaStore to useignoreRepositorySharedObjects
- Do not load shared objects, handled separatelyprompter
- The prompter to use in case a shared object gets overwritten- Throws:
org.pentaho.di.core.exception.KettleXMLException
-
getJobEntryCopy
Gets the job entry copy.- Parameters:
x
- the xy
- the yiconsize
- the iconsize- Returns:
- the job entry copy
-
nrJobEntries
public int nrJobEntries()Nr job entries.- Returns:
- the int
-
nrJobHops
public int nrJobHops()Nr job hops.- Returns:
- the int
-
getJobHop
Gets the job hop.- Parameters:
i
- the i- Returns:
- the job hop
-
getJobEntry
Gets the job entry.- Parameters:
i
- the i- Returns:
- the job entry
-
addJobEntry
Adds the job entry.- Parameters:
je
- the je
-
addJobHop
Adds the job hop.- Parameters:
hi
- the hi
-
addJobEntry
Adds the job entry.- Parameters:
p
- the psi
- the si
-
addJobHop
Adds the job hop.- Parameters:
p
- the phi
- the hi
-
removeJobEntry
public void removeJobEntry(int i) Removes the job entry.- Parameters:
i
- the i
-
removeJobHop
public void removeJobHop(int i) Removes the job hop.- Parameters:
i
- the i
-
removeJobHop
Removes a hop from the transformation. Also marks that the transformation's hops have changed.- Parameters:
hop
- The hop to remove from the list of hops
-
indexOfJobHop
Index of job hop.- Parameters:
he
- the he- Returns:
- the int
-
indexOfJobEntry
Index of job entry.- Parameters:
ge
- the ge- Returns:
- the int
-
setJobEntry
Sets the job entry.- Parameters:
idx
- the idxjec
- the jec
-
findJobEntry
Find an existing JobEntryCopy by it's name and number- Parameters:
name
- The name of the job entry copynr
- The number of the job entry copy- Returns:
- The JobEntryCopy or null if nothing was found!
-
findJobEntry
Find job entry.- Parameters:
full_name_nr
- the full_name_nr- Returns:
- the job entry copy
-
findJobHop
Find job hop.- Parameters:
name
- the name- Returns:
- the job hop meta
-
findJobHopFrom
Find job hop from.- Parameters:
jge
- the jge- Returns:
- the job hop meta
-
findJobHop
Find job hop.- Parameters:
from
- the fromto
- the to- Returns:
- the job hop meta
-
findJobHop
Find job hop.- Parameters:
from
- the fromto
- the toincludeDisabled
- the include disabled- Returns:
- the job hop meta
-
findJobHopTo
Find job hop to.- Parameters:
jge
- the jge- Returns:
- the job hop meta
-
findNrPrevJobEntries
Find nr prev job entries.- Parameters:
from
- the from- Returns:
- the int
-
findPrevJobEntry
Find prev job entry.- Parameters:
to
- the tonr
- the nr- Returns:
- the job entry copy
-
findNrPrevJobEntries
Find nr prev job entries.- Parameters:
to
- the toinfo
- the info- Returns:
- the int
-
findPrevJobEntry
Find prev job entry.- Parameters:
to
- the tonr
- the nrinfo
- the info- Returns:
- the job entry copy
-
findNrNextJobEntries
Find nr next job entries.- Parameters:
from
- the from- Returns:
- the int
-
findNextJobEntry
Find next job entry.- Parameters:
from
- the fromcnt
- the cnt- Returns:
- the job entry copy
-
hasLoop
Checks for loop.- Parameters:
entry
- the entry- Returns:
- true, if successful
-
hasLoop
Deprecated. -
hasLoop
Checks for loop.- Parameters:
entry
- the entrylookup
- the lookup- Returns:
- true, if successful
-
isEntryUsedInHops
Checks if is entry used in hops.- Parameters:
jge
- the jge- Returns:
- true, if is entry used in hops
-
countEntries
Count entries.- Parameters:
name
- the name- Returns:
- the int
-
findUnusedNr
Find unused nr.- Parameters:
name
- the name- Returns:
- the int
-
findMaxNr
Find max nr.- Parameters:
name
- the name- Returns:
- the int
-
getAlternativeJobentryName
Proposes an alternative job entry name when the original already exists...- Parameters:
entryname
- The job entry name to find an alternative for..- Returns:
- The alternative stepname.
-
getAllJobGraphEntries
Gets the all job graph entries.- Parameters:
name
- the name- Returns:
- the all job graph entries
-
getAllJobHopsUsing
Gets the all job hops using.- Parameters:
name
- the name- Returns:
- the all job hops using
-
isPathExist
-
selectAll
public void selectAll()Select all. -
unselectAll
public void unselectAll()Unselect all. -
getMaximum
public org.pentaho.di.core.gui.Point getMaximum()Gets the maximum.- Returns:
- the maximum
-
getMinimum
public org.pentaho.di.core.gui.Point getMinimum()Get the minimum point on the canvas of a job- Returns:
- Minimum coordinate of a step in the job
-
getSelectedLocations
public org.pentaho.di.core.gui.Point[] getSelectedLocations()Gets the selected locations.- Returns:
- the selected locations
-
getSelectedNoteLocations
public org.pentaho.di.core.gui.Point[] getSelectedNoteLocations()Get all the selected note locations- Returns:
- The selected step and notes locations.
-
getSelectedEntries
Gets the selected entries.- Returns:
- the selected entries
-
getEntryIndexes
Gets the entry indexes.- Parameters:
entries
- the entries- Returns:
- the entry indexes
-
findStart
Find start.- Returns:
- the job entry copy
-
toString
Gets a textual representation of the job. If its name has been set, it will be returned, otherwise the classname is returned. -
isBatchIdPassed
public boolean isBatchIdPassed()Gets the boolean value of batch id passed.- Returns:
- Returns the batchIdPassed.
-
setBatchIdPassed
public void setBatchIdPassed(boolean batchIdPassed) Sets the batch id passed.- Parameters:
batchIdPassed
- The batchIdPassed to set.
-
getSQLStatements
public List<org.pentaho.di.core.SQLStatement> getSQLStatements(Repository repository, org.pentaho.di.core.ProgressMonitorListener monitor) throws org.pentaho.di.core.exception.KettleException - Throws:
org.pentaho.di.core.exception.KettleException
-
getSQLStatements
public List<org.pentaho.di.core.SQLStatement> getSQLStatements(Repository repository, org.pentaho.metastore.api.IMetaStore metaStore, org.pentaho.di.core.ProgressMonitorListener monitor) throws org.pentaho.di.core.exception.KettleException Builds a list of all the SQL statements that this transformation needs in order to work properly.- Returns:
- An ArrayList of SQLStatement objects.
- Throws:
org.pentaho.di.core.exception.KettleException
-
getArguments
Deprecated.Moved to the Job classGets the arguments used for this job.- Returns:
- Returns the arguments.
-
setArguments
Deprecated.moved to the job classSets the arguments.- Parameters:
arguments
- The arguments to set.
-
getStringList
public List<StringSearchResult> getStringList(boolean searchSteps, boolean searchDatabases, boolean searchNotes) Get a list of all the strings used in this job.- Returns:
- A list of StringSearchResult with strings used in the job
-
getUsedVariables
Gets the used variables.- Returns:
- the used variables
-
haveJobEntriesChanged
public boolean haveJobEntriesChanged()Have job entries changed.- Returns:
- true, if successful
-
haveJobHopsChanged
public boolean haveJobHopsChanged()Have job hops changed.- Returns:
- true, if successful
-
getJobversion
Gets the version of the job.- Returns:
- The version of the job
-
getJobstatus
public int getJobstatus()Gets the status of the job.- Returns:
- the status of the job
-
setJobversion
Set the version of the job.- Parameters:
jobVersion
- The new version description of the job
-
setJobstatus
public void setJobstatus(int jobStatus) Set the status of the job.- Parameters:
jobStatus
- The new status description of the job
-
findJobEntry
public static final JobEntryInterface findJobEntry(List<JobEntryInterface> jobentries, org.pentaho.di.repository.ObjectId id_jobentry) Find a jobentry with a certain ID in a list of job entries.- Parameters:
jobentries
- The List of jobentriesid_jobentry
- The id of the jobentry- Returns:
- The JobEntry object if one was found, null otherwise.
-
findJobEntryCopy
public static final JobEntryCopy findJobEntryCopy(List<JobEntryCopy> jobcopies, org.pentaho.di.repository.ObjectId id_jobentry_copy) Find a jobentrycopy with a certain ID in a list of job entry copies.- Parameters:
jobcopies
- The List of jobentry copiesid_jobentry_copy
- The id of the jobentry copy- Returns:
- The JobEntryCopy object if one was found, null otherwise.
-
initializeVariablesFrom
public void initializeVariablesFrom(org.pentaho.di.core.variables.VariableSpace parent) - Specified by:
initializeVariablesFrom
in interfaceorg.pentaho.di.core.variables.VariableSpace
- Overrides:
initializeVariablesFrom
in classAbstractMeta
-
setInternalKettleVariables
public void setInternalKettleVariables(org.pentaho.di.core.variables.VariableSpace var) This method sets various internal kettle variables that can be used by the transformation.- Specified by:
setInternalKettleVariables
in classAbstractMeta
-
updateCurrentDir
protected void updateCurrentDir() -
setInternalNameKettleVariable
protected void setInternalNameKettleVariable(org.pentaho.di.core.variables.VariableSpace var) Sets the internal name kettle variable.- Specified by:
setInternalNameKettleVariable
in classAbstractMeta
- Parameters:
var
- the new internal name kettle variable
-
setInternalFilenameKettleVariables
protected void setInternalFilenameKettleVariables(org.pentaho.di.core.variables.VariableSpace var) Sets the internal filename kettle variables.- Specified by:
setInternalFilenameKettleVariables
in classAbstractMeta
- Parameters:
var
- the new internal filename kettle variables
-
setInternalEntryCurrentDirectory
protected void setInternalEntryCurrentDirectory() -
checkJobEntries
@Deprecated public void checkJobEntries(List<org.pentaho.di.core.CheckResultInterface> remarks, boolean only_selected, org.pentaho.di.core.ProgressMonitorListener monitor) Deprecated. -
checkJobEntries
public void checkJobEntries(List<org.pentaho.di.core.CheckResultInterface> remarks, boolean only_selected, org.pentaho.di.core.ProgressMonitorListener monitor, org.pentaho.di.core.variables.VariableSpace space, Repository repository, org.pentaho.metastore.api.IMetaStore metaStore) Check all job entries within the job. Each Job Entry has the opportunity to check their own settings.- Parameters:
remarks
- List of CheckResult remarks inserted into by each JobEntryonly_selected
- true if you only want to check the selected jobsmonitor
- Progress monitor (not presently in use)
-
getResourceDependencies
Gets the resource dependencies.- Returns:
- the resource dependencies
-
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.KettleExceptionDescription copied from interface:ResourceExportInterface
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.- Specified by:
exportResources
in interfaceResourceExportInterface
- 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 name appropriatelyrepository
- the repository object to load frommetaStore
- the central metastore to load non-kettle specific 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
-
renameJobEntryIfNameCollides
See if the name of the supplied job entry copy doesn't collide with any other job entry copy in the job.- Parameters:
je
- The job entry copy to verify the name for.
-
getJobCopies
Gets the job copies.- Returns:
- the job copies
-
getJobhops
Gets the jobhops.- Returns:
- the jobhops
-
getRepositoryElementType
public org.pentaho.di.repository.RepositoryObjectType getRepositoryElementType()- Specified by:
getRepositoryElementType
in interfaceorg.pentaho.di.repository.RepositoryElementInterface
-
getLogChannel
public org.pentaho.di.core.logging.LogChannelInterface getLogChannel()Gets the log channel.- Returns:
- the log channel
-
composeJobEntryInterfaceList
Create a unique list of job entry interfaces- Returns:
-
getLogChannelId
- Specified by:
getLogChannelId
in interfaceorg.pentaho.di.core.logging.LoggingObjectInterface
-
getObjectType
public org.pentaho.di.core.logging.LoggingObjectType getObjectType()- Specified by:
getObjectType
in interfaceorg.pentaho.di.core.logging.LoggingObjectInterface
-
getJobEntryLogTable
Gets the job entry log table.- Returns:
- the jobEntryLogTable
-
setJobEntryLogTable
Sets the job entry log table.- Parameters:
jobEntryLogTable
- the jobEntryLogTable to set
-
getLogTables
Gets the log tables.- Returns:
- the log tables
-
hasRepositoryReferences
public boolean hasRepositoryReferences()Checks whether the job has repository references.- Returns:
- true if the job has repository references, false otherwise
-
lookupRepositoryReferences
public void lookupRepositoryReferences(Repository repository) throws org.pentaho.di.core.exception.KettleException Look up the references after import- Parameters:
repository
- the repository to reference.- Throws:
org.pentaho.di.core.exception.KettleException
-
isGatheringMetrics
public boolean isGatheringMetrics()Returns whether or not the job is gathering metrics. The job will not gather metrics per se, but can pass this information into executable transformations.- Specified by:
isGatheringMetrics
in interfaceorg.pentaho.di.core.logging.LoggingObjectInterface
- Returns:
- the gatheringMetrics state
-
setGatheringMetrics
public void setGatheringMetrics(boolean gatheringMetrics) Sets whether or not the job is gathering metrics.- Specified by:
setGatheringMetrics
in interfaceorg.pentaho.di.core.logging.LoggingObjectInterface
-
isForcingSeparateLogging
public boolean isForcingSeparateLogging()- Specified by:
isForcingSeparateLogging
in interfaceorg.pentaho.di.core.logging.LoggingObjectInterface
-
setForcingSeparateLogging
public void setForcingSeparateLogging(boolean forcingSeparateLogging) - Specified by:
setForcingSeparateLogging
in interfaceorg.pentaho.di.core.logging.LoggingObjectInterface
-
getExtraLogTables
-
setExtraLogTables
-
containsJobCopy
-
getMissingEntries
-
addMissingEntry
-
removeMissingEntry
-
hasMissingPlugins
public boolean hasMissingPlugins()- Overrides:
hasMissingPlugins
in classAbstractMeta
-
getNamedClusterEmbedManager
- Overrides:
getNamedClusterEmbedManager
in classAbstractMeta
-
getStartCopyName
-
setStartCopyName
-
isExpandingRemoteJob
public boolean isExpandingRemoteJob() -
setExpandingRemoteJob
public void setExpandingRemoteJob(boolean expandingRemoteJob)
-