org.pentaho.di.job
Class JobMeta

java.lang.Object
  extended by org.pentaho.di.core.changed.ChangedFlag
      extended by org.pentaho.di.job.JobMeta
All Implemented Interfaces:
Cloneable, Comparable<JobMeta>, ChangedFlagInterface, EngineMetaInterface, UndoInterface, LoggingObjectInterface, NamedParams, VariableSpace, XMLInterface, HasRepositoryInterface, RepositoryElementInterface, RepositoryObjectInterface, ResourceExportInterface, HasDatabasesInterface, HasSlaveServersInterface

public class JobMeta
extends ChangedFlag
implements Cloneable, Comparable<JobMeta>, XMLInterface, UndoInterface, HasDatabasesInterface, VariableSpace, EngineMetaInterface, ResourceExportInterface, HasSlaveServersInterface, NamedParams, RepositoryElementInterface, LoggingObjectInterface, HasRepositoryInterface

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
 boolean[] max
          List of booleans indicating whether or not to remember the size and position of the different windows...
static RepositoryObjectType REPOSITORY_ELEMENT_TYPE
          A constant specifying the repository element type as a Job.
static String STRING_SPECIAL
          Constant = "SPECIAL"
static String STRING_SPECIAL_DUMMY
          Constant = "DUMMY"
static String STRING_SPECIAL_ERROR
          Constant = "ERROR"
static String STRING_SPECIAL_OK
          Constant = "OK"
static String STRING_SPECIAL_START
          Constant = "START"
static int TYPE_UNDO_CHANGE
          Constant = 1
static int TYPE_UNDO_DELETE
          Constant = 3
static int TYPE_UNDO_NEW
          Constant = 2
static int TYPE_UNDO_POSITION
          Constant = 4
static String XML_TAG
           
 
Constructor Summary
JobMeta()
          Instantiates a new job meta.
JobMeta(InputStream inputStream, Repository rep, OverwritePrompter prompter)
          Instantiates a new job meta.
JobMeta(Node jobnode, Repository rep, boolean ignoreRepositorySharedObjects, OverwritePrompter prompter)
          Create a new JobMeta object by loading it from a a DOM node.
JobMeta(Node jobnode, Repository rep, OverwritePrompter prompter)
          Create a new JobMeta object by loading it from a a DOM node.
JobMeta(String fname, Repository rep)
          Instantiates a new job meta.
JobMeta(String fname, Repository rep, OverwritePrompter prompter)
          Instantiates a new job meta.
JobMeta(VariableSpace parentSpace, String fname, Repository rep, OverwritePrompter prompter)
          Load the job from the XML file specified.
 
Method Summary
 void activateParameters()
          Activate the currently set parameters
 void addDatabase(DatabaseMeta ci)
          Add a database connection to the transformation.
 void addDatabase(int p, DatabaseMeta ci)
          Add a database connection to the transformation on a certain location.
 void addDefaults()
          Adds the defaults.
 void addFilenameChangedListener(FilenameChangedListener listener)
          Adds the filename changed listener.
 void addJobEntry(int p, JobEntryCopy si)
          Adds the job entry.
 void addJobEntry(JobEntryCopy je)
          Adds the job entry.
 void addJobHop(int p, JobHopMeta hi)
          Adds the job hop.
 void addJobHop(JobHopMeta hi)
          Adds the job hop.
 void addNameChangedListener(NameChangedListener listener)
          Adds the name changed listener.
 void addNote(int p, NotePadMeta ni)
          Adds the note.
 void addNote(NotePadMeta ni)
          Adds the note.
 void addOrReplaceDatabase(DatabaseMeta databaseMeta)
          Add a database connection to the transformation if that connection didn't exists yet.
 void addOrReplaceSlaveServer(SlaveServer slaveServer)
          Add a new slave server to the transformation if that didn't exist yet.
 void addParameterDefinition(String key, String defValue, String description)
          Add a parameter definition to this set.
 void addUndo(Object[] from, Object[] to, int[] pos, Point[] prev, Point[] curr, int type_of_change, boolean nextAlso)
          Add an undo operation to the undo list
 boolean canSave()
          Checks whether the job can be saved.
 void checkJobEntries(List<CheckResultInterface> remarks, boolean only_selected, ProgressMonitorListener monitor)
          Check all job entries within the job.
 void clear()
          Clears or reinitializes many of the JobMeta properties.
 void clearChanged()
          Clears the different changed flags of the job.
 void clearParameters()
          Clear all parameters
 void clearUndo()
          Clear undo.
 Object clone()
          Clones the job meta-data object.
 int compare(JobMeta j1, JobMeta j2)
          Compares two transformation on name, filename
 int compareTo(JobMeta o)
          Compares this job's meta-data to the specified job's meta-data.
 List<JobEntryInterface> composeJobEntryInterfaceList()
          Create a unique list of job entry interfaces
 void copyParametersFrom(NamedParams params)
          Copy params to these named parameters (clearing out first).
 void copyVariablesFrom(VariableSpace space)
          Copy the variables from another space, without initializing with the defaults.
 int countEntries(String name)
          Count entries.
static JobEntryCopy createDummyEntry()
          Creates the dummy entry.
static JobEntryCopy createStartEntry()
          Creates the start entry.
 String environmentSubstitute(String aString)
          Substitute the string using the current variable space.
 String[] environmentSubstitute(String[] aString)
          Replaces environment variables in an array of strings.
 boolean equals(Object obj)
          Checks whether this job's meta-data object is equal to the specified object.
 void eraseParameters()
          Clear the values.
 String exportResources(VariableSpace space, Map<String,ResourceDefinition> definitions, ResourceNamingInterface namingInterface, Repository repository)
          Exports the object to a flat-file system, adding content with filename keys to a set of definitions.
 DatabaseMeta findDatabase(String name)
          Find a database connection by it's name
static JobEntryInterface findJobEntry(List<JobEntryInterface> jobentries, ObjectId id_jobentry)
          Find a jobentry with a certain ID in a list of job entries.
 JobEntryCopy findJobEntry(String full_name_nr)
          Find job entry.
 JobEntryCopy findJobEntry(String name, int nr, boolean searchHiddenToo)
          Find an existing JobEntryCopy by it's name and number
static JobEntryCopy findJobEntryCopy(List<JobEntryCopy> jobcopies, ObjectId id_jobentry_copy)
          Find a jobentrycopy with a certain ID in a list of job entry copies.
 JobHopMeta findJobHop(JobEntryCopy from, JobEntryCopy to)
          Find job hop.
 JobHopMeta findJobHop(JobEntryCopy from, JobEntryCopy to, boolean includeDisabled)
          Find job hop.
 JobHopMeta findJobHop(String name)
          Find job hop.
 JobHopMeta findJobHopFrom(JobEntryCopy jge)
          Find job hop from.
 JobHopMeta findJobHopTo(JobEntryCopy jge)
          Find job hop to.
 int findMaxNr(String name)
          Find max nr.
 JobEntryCopy findNextJobEntry(JobEntryCopy from, int cnt)
          Find next job entry.
 int findNrNextJobEntries(JobEntryCopy from)
          Find nr next job entries.
 int findNrPrevJobEntries(JobEntryCopy from)
          Find nr prev job entries.
 int findNrPrevJobEntries(JobEntryCopy to, boolean info)
          Find nr prev job entries.
 JobEntryCopy findPrevJobEntry(JobEntryCopy to, int nr)
          Find prev job entry.
 JobEntryCopy findPrevJobEntry(JobEntryCopy to, int nr, boolean info)
          Find prev job entry.
 SlaveServer findSlaveServer(String serverString)
          Find a slave server using the name
 JobEntryCopy findStart()
          Find start.
 int findUnusedNr(String name)
          Find unused nr.
 JobEntryCopy[] getAllJobGraphEntries(String name)
          Gets the all job graph entries.
 JobHopMeta[] getAllJobHopsUsing(String name)
          Gets the all job hops using.
 String getAlternativeJobentryName(String entryname)
          Proposes an alternative job entry name when the original already exists...
 String[] getArguments()
          Gets the arguments used for this job.
 boolean getBooleanValueOfVariable(String variableName, boolean defaultValue)
          This method returns a boolean for the new variable check boxes.
 ChannelLogTable getChannelLogTable()
          Gets the channel log table for the job.
 String getContainerObjectId()
          Gets the container object id.
 Date getCreatedDate()
          Gets the date the job was created.
 String getCreatedUser()
          Gets the user by whom the job was created.
 DatabaseMeta getDatabase(int i)
          Retrieves a database connection information a a certain location.
 String[] getDatabaseNames()
          Gets the database names.
 List<DatabaseMeta> getDatabases()
          Returns a list of the databases.
 String getDefaultExtension()
          Gets the default extension for a job.
 String getDescription()
          Gets the description of the job.
 JobEntryCopy getDummy()
          Gets the dummy.
 int[] getEntryIndexes(List<JobEntryCopy> entries)
          Gets the entry indexes.
 String getExtendedDescription()
          Gets the extended description of the job.
 String getFilename()
          Gets the filename.
 String getFileType()
          Gets the file type.
 String[] getFilterExtensions()
          Gets the job filter extensions.
 String[] getFilterNames()
          Gets the job filter names.
 List<JobEntryCopy> getJobCopies()
          Gets the job copies.
 JobEntryCopy getJobEntry(int i)
          Gets the job entry.
 JobEntryCopy getJobEntryCopy(int x, int y, int iconsize)
          Gets the job entry copy.
 JobEntryLogTable getJobEntryLogTable()
          Gets the job entry log table.
 JobHopMeta getJobHop(int i)
          Gets the job hop.
 List<JobHopMeta> getJobhops()
          Gets the jobhops.
 JobLogTable getJobLogTable()
          Gets the job log table.
 int getJobstatus()
          Gets the status of the job.
 String getJobversion()
          Gets the version of the job.
 String getLogChannelId()
          Gets the log channel id.
 LogLevel getLogLevel()
          Gets the logging level of the log channel of this logging object.
 List<LogTableInterface> getLogTables()
          Gets the log tables.
 Point getMaximum()
          Gets the maximum.
 int getMaxUndo()
          Get the maximum number of undo operations possible
 Point getMinimum()
          Get the minimum point on the canvas of a job
 Date getModifiedDate()
          Gets the date the job was last modified.
 String getModifiedUser()
          Gets the user who last modified the job.
 String getName()
          Gets the name.
 NotePadMeta getNote(int i)
          Gets the note.
 NotePadMeta getNote(int x, int y)
          Gets the note.
 int[] getNoteIndexes(List<NotePadMeta> notes)
          Get an array of the locations of an array of notes
 List<NotePadMeta> getNotes()
          Gets the notes.
 String getObjectCopy()
          Gets a string identifying a copy in a series of steps.
 ObjectId getObjectId()
          Get the database ID in the repository for this object.
 String getObjectName()
          Gets the object name.
 ObjectRevision getObjectRevision()
          Gets the object revision.
 LoggingObjectType getObjectType()
          Gets the object type.
 String getParameterDefault(String key)
          Get the default value of a parameter.
 String getParameterDescription(String key)
          Get the description of a parameter.
 String getParameterValue(String key)
          Get the value of a parameter.
 LoggingObjectInterface getParent()
          Gets the parent.
 VariableSpace getParentVariableSpace()
          Get the parent of the variable space.
 Date getRegistrationDate()
          Gets the registration date for the transformation.
 Repository getRepository()
          Gets the repository.
 RepositoryDirectoryInterface getRepositoryDirectory()
          Gets the directory.
 RepositoryObjectType getRepositoryElementType()
          Gets the repository element type.
 List<ResourceReference> getResourceDependencies()
          Gets the resource dependencies.
 List<JobEntryCopy> getSelectedEntries()
          Gets the selected entries.
 Point[] getSelectedLocations()
          Gets the selected locations.
 Point[] getSelectedNoteLocations()
          Get all the selected note locations
 List<NotePadMeta> getSelectedNotes()
          Gets a list of all selected notes.
 SharedObjects getSharedObjects()
          Gets the shared objects.
 String getSharedObjectsFile()
          Gets the shared objects file.
 String[] getSlaveServerNames()
          Gets an array of slave server names.
 List<SlaveServer> getSlaveServers()
          Gets a list of slave servers.
 List<SQLStatement> getSQLStatements(Repository repository, ProgressMonitorListener monitor)
          Builds a list of all the SQL statements that this transformation needs in order to work properly.
 JobEntryCopy getStart()
          Gets the start.
 List<StringSearchResult> getStringList(boolean searchSteps, boolean searchDatabases, boolean searchNotes)
          Get a list of all the strings used in this job.
 int getUndoSize()
          Gets the undo size.
 List<String> getUsedVariables()
          Gets the used variables.
 String getVariable(String variableName)
          Get the value of a variable.
 String getVariable(String variableName, String defaultValue)
          Get the value of a variable with a default in case the variable is not found.
 String getXML()
          Describes the Object implementing this interface as XML
 boolean hasChanged()
          Checks whether or not this has changed.
 boolean hasLoop(JobEntryCopy entry)
          Checks for loop.
 boolean hasLoop(JobEntryCopy entry, JobEntryCopy lookup)
          Checks for loop.
 boolean hasRepositoryReferences()
          Checks whether the job has repository references.
 boolean haveConnectionsChanged()
          Checks whether or not the connections have changed.
 boolean haveJobEntriesChanged()
          Have job entries changed.
 boolean haveJobHopsChanged()
          Have job hops changed.
 boolean haveNotesChanged()
          Have notes changed.
 int indexOfDatabase(DatabaseMeta di)
          Find the location of database
 int indexOfJobEntry(JobEntryCopy ge)
          Index of job entry.
 int indexOfJobHop(JobHopMeta he)
          Index of job hop.
 int indexOfNote(NotePadMeta ni)
          Index of note.
 void initializeVariablesFrom(VariableSpace parent)
          Initialize variable space using the defaults, copy over the variables from the parent (using copyVariablesFrom()), after this the "injected" variables should be inserted (injectVariables()).
 void injectVariables(Map<String,String> prop)
          Inject variables.
 boolean isBatchIdPassed()
          Gets the boolean value of batch id passed.
 boolean isDatabaseConnectionUsed(DatabaseMeta databaseMeta)
          This method asks all steps in the transformation whether or not the specified database connection is used.
 boolean isEntryUsedInHops(JobEntryCopy jge)
          Checks if is entry used in hops.
 boolean isFileReference()
          Checks if is file reference.
static boolean isFileReference(String fileName, String transName)
          Checks if is file reference.
 boolean isRepReference()
          Checks if is rep reference.
static boolean isRepReference(String fileName, String transName)
          Checks if is rep reference.
 String[] listParameters()
          List the parameters.
 String[] listVariables()
          List the variables (not the values) that are currently in the variable space.
 void loadXML(Node jobnode, Repository rep, boolean ignoreRepositorySharedObjects, OverwritePrompter prompter)
          Load a block of XML from an DOM node.
 void loadXML(Node jobnode, Repository rep, OverwritePrompter prompter)
          Load xml.
 void lookupRepositoryReferences(Repository repository)
          Look up the references after import
 void lowerNote(int p)
          Lower note.
 void nameFromFilename()
          Builds a name - if no name is set, yet - from the filename
 TransAction nextUndo()
          Get the next undo transaction on the list.
 int nrDatabases()
          Count the nr of databases in the transformation.
 int nrJobEntries()
          Nr job entries.
 int nrJobHops()
          Nr job hops.
 int nrNotes()
          Nr notes.
 TransAction previousUndo()
          Get the previous undo operation and change the undo pointer
 void raiseNote(int p)
          Raise note.
 SharedObjects readSharedObjects()
          Read shared objects.
 Object realClone(boolean doClear)
          Perform a real clone of the job meta-data object, including cloning all lists and copying all values.
 void removeDatabase(int i)
          Removes a database from the transformation on a certain location.
 void removeFilenameChangedListener(FilenameChangedListener listener)
          Removes the filename changed listener.
 void removeJobEntry(int i)
          Removes the job entry.
 void removeJobHop(int i)
          Removes the job hop.
 void removeNameChangedListener(NameChangedListener listener)
          Removes the name changed listener.
 void removeNote(int i)
          Removes the note.
 void renameJobEntryIfNameCollides(JobEntryCopy je)
          See if the name of the supplied job entry copy doesn't collide with any other job entry copy in the job.
 void saveSharedObjects()
          Saves shared objects, including databases, steps, partition schemas, slave servers, and cluster schemas, to a file.
 void selectAll()
          Select all.
 void setArguments(String[] arguments)
          Sets the arguments.
 void setBatchIdPassed(boolean batchIdPassed)
          Sets the batch id passed.
 void setCarteObjectId(String containerObjectId)
          Sets the carte object id.
 void setChanged(boolean ch)
          Sets whether or not this has changed.
 void setChannelLogTable(ChannelLogTable channelLogTable)
          Sets the channel log table for the job.
 void setCreatedDate(Date createdDate)
          Sets the date the transformation was created.
 void setCreatedUser(String createdUser)
          Sets the user by whom this was created.
 void setDatabases(List<DatabaseMeta> databases)
          Sets the databases.
 void setDescription(String description)
          Set the description of the job.
 void setExtendedDescription(String extendedDescription)
          Set the description of the job.
 void setFilename(String newFilename)
          Set the filename of the job
 void setInternalKettleVariables()
          Calls setInternalKettleVariables on the default object.
 void setInternalKettleVariables(VariableSpace var)
          This method sets various internal kettle variables that can be used by the transformation.
 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 setLogLevel(LogLevel logLevel)
          Sets the log level.
 void setMaxUndo(int mu)
          Sets the maximum number of undo operations that are allowed.
 void setModifiedDate(Date modifiedDate)
          Sets the date the job was modified.
 void setModifiedUser(String modifiedUser)
          Sets the user who last modified the job.
 void setName(String newName)
          Set the name of the job.
 void setObjectId(ObjectId objectId)
          Set the database ID for this in the repository.
 void setObjectRevision(ObjectRevision objectRevision)
          Sets the object revision.
 void setParameterValue(String key, String value)
          Set the value of a parameter.
 void setParentVariableSpace(VariableSpace parent)
          Set the parent variable space
 void setRepository(Repository repository)
          Sets the repository.
 void setRepositoryDirectory(RepositoryDirectoryInterface directory)
          Sets the directory.
 void setSharedObjects(SharedObjects sharedObjects)
          Sets the shared objects.
 void setSharedObjectsFile(String sharedObjectsFile)
          Sets the shared objects file.
 void setSlaveServers(List<SlaveServer> slaveServers)
          Sets the slave servers.
 void setVariable(String variableName, String variableValue)
          Sets a variable in the Kettle Variables list.
 void shareVariablesWith(VariableSpace space)
          Share a variable space from another variable space.
 String toString()
          Gets a textual representation of the job.
 void unselectAll()
          Unselect all.
 TransAction viewNextUndo()
          Get the next undo transaction on the list.
 TransAction viewPreviousUndo()
          View previous undo, don't change undo position
 TransAction viewThisUndo()
          View current undo, don't change undo position
 
Methods inherited from class org.pentaho.di.core.changed.ChangedFlag
addObserver, deleteObserver, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

XML_TAG

public static final String XML_TAG
See Also:
Constant Field Values

REPOSITORY_ELEMENT_TYPE

public static final RepositoryObjectType REPOSITORY_ELEMENT_TYPE
A constant specifying the repository element type as a Job.


TYPE_UNDO_CHANGE

public static final int TYPE_UNDO_CHANGE
Constant = 1

See Also:
Constant Field Values

TYPE_UNDO_NEW

public static final int TYPE_UNDO_NEW
Constant = 2

See Also:
Constant Field Values

TYPE_UNDO_DELETE

public static final int TYPE_UNDO_DELETE
Constant = 3

See Also:
Constant Field Values

TYPE_UNDO_POSITION

public static final int TYPE_UNDO_POSITION
Constant = 4

See Also:
Constant Field Values

STRING_SPECIAL

public static final String STRING_SPECIAL
Constant = "SPECIAL"

See Also:
Constant Field Values

STRING_SPECIAL_START

public static final String STRING_SPECIAL_START
Constant = "START"

See Also:
Constant Field Values

STRING_SPECIAL_DUMMY

public static final String STRING_SPECIAL_DUMMY
Constant = "DUMMY"

See Also:
Constant Field Values

STRING_SPECIAL_OK

public static final String STRING_SPECIAL_OK
Constant = "OK"

See Also:
Constant Field Values

STRING_SPECIAL_ERROR

public static final String STRING_SPECIAL_ERROR
Constant = "ERROR"

See Also:
Constant Field Values

max

public boolean[] max
List of booleans indicating whether or not to remember the size and position of the different windows...

Constructor Detail

JobMeta

public JobMeta()
Instantiates a new job meta.


JobMeta

public JobMeta(String fname,
               Repository rep)
        throws KettleXMLException
Instantiates a new job meta.

Parameters:
fname - the fname
rep - the rep
Throws:
KettleXMLException - the kettle xml exception

JobMeta

public JobMeta(String fname,
               Repository rep,
               OverwritePrompter prompter)
        throws KettleXMLException
Instantiates a new job meta.

Parameters:
fname - the fname
rep - the rep
prompter - the prompter
Throws:
KettleXMLException - the kettle xml exception

JobMeta

public JobMeta(VariableSpace parentSpace,
               String fname,
               Repository rep,
               OverwritePrompter prompter)
        throws KettleXMLException
Load the job from the XML file specified.

Parameters:
log - the logging channel
fname - The filename to load as a job
rep - The repository to bind againt, null if there is no repository available.
Throws:
KettleXMLException

JobMeta

public JobMeta(InputStream inputStream,
               Repository rep,
               OverwritePrompter prompter)
        throws KettleXMLException
Instantiates a new job meta.

Parameters:
inputStream - the input stream
rep - the rep
prompter - the prompter
Throws:
KettleXMLException - the kettle xml exception

JobMeta

public JobMeta(Node jobnode,
               Repository rep,
               OverwritePrompter prompter)
        throws KettleXMLException
Create a new JobMeta object by loading it from a a DOM node.

Parameters:
jobnode - The node to load from
rep - The reference to a repository to load additional information from
prompter - The prompter to use in case a shared object gets overwritten
Throws:
KettleXMLException

JobMeta

public JobMeta(Node jobnode,
               Repository rep,
               boolean ignoreRepositorySharedObjects,
               OverwritePrompter prompter)
        throws KettleXMLException
Create a new JobMeta object by loading it from a a DOM node.

Parameters:
jobnode - The node to load from
rep - The reference to a repository to load additional information from
ignoreRepositorySharedObjects - Do not load shared objects, handled separately
prompter - The prompter to use in case a shared object gets overwritten
Throws:
KettleXMLException
Method Detail

getObjectId

public ObjectId getObjectId()
Description copied from interface: RepositoryElementInterface
Get the database ID in the repository for this object.

Specified by:
getObjectId in interface LoggingObjectInterface
Specified by:
getObjectId in interface RepositoryElementInterface
Specified by:
getObjectId in interface RepositoryObjectInterface
Returns:
the database ID in the repository for this object

setObjectId

public void setObjectId(ObjectId objectId)
Description copied from interface: EngineMetaInterface
Set the database ID for this in the repository.

Specified by:
setObjectId in interface EngineMetaInterface
Specified by:
setObjectId in interface RepositoryElementInterface
Parameters:
objectId - the database ID for this in the repository

clear

public void clear()
Clears or reinitializes many of the JobMeta properties.


addDefaults

public void addDefaults()
Adds the defaults.


createStartEntry

public static final JobEntryCopy createStartEntry()
Creates the start entry.

Returns:
the job entry copy

createDummyEntry

public static final JobEntryCopy createDummyEntry()
Creates the dummy entry.

Returns:
the job entry copy

getStart

public JobEntryCopy getStart()
Gets the start.

Returns:
the start

getDummy

public JobEntryCopy getDummy()
Gets the dummy.

Returns:
the dummy

compare

public int compare(JobMeta j1,
                   JobMeta j2)
Compares two transformation on name, filename


compareTo

public int compareTo(JobMeta o)
Compares this job's meta-data to the specified job's meta-data. This method simply calls compare(this, o)

Specified by:
compareTo in interface Comparable<JobMeta>
Parameters:
o - the o
Returns:
the int
See Also:
compare(JobMeta, JobMeta), Comparable.compareTo(java.lang.Object)

equals

public boolean equals(Object obj)
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).

Overrides:
equals in class Object
Parameters:
obj - the obj
Returns:
true, if successful
See Also:
compare(JobMeta, JobMeta), Object.equals(java.lang.Object)

clone

public Object clone()
Clones the job meta-data object.

Overrides:
clone in class Object
Returns:
a clone of the job meta-data object
See Also:
Object.clone()

realClone

public Object realClone(boolean doClear)
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

getName

public String getName()
Description copied from interface: EngineMetaInterface
Gets the name.

Specified by:
getName in interface EngineMetaInterface
Specified by:
getName in interface RepositoryElementInterface
Specified by:
getName in interface RepositoryObjectInterface
Returns:
name

setName

public void setName(String newName)
Set the name of the job.

Specified by:
setName in interface RepositoryElementInterface
Parameters:
newName - The new name of the job

nameFromFilename

public void nameFromFilename()
Builds a name - if no name is set, yet - from the filename

Specified by:
nameFromFilename in interface EngineMetaInterface

getRepositoryDirectory

public RepositoryDirectoryInterface getRepositoryDirectory()
Gets the directory.

Specified by:
getRepositoryDirectory in interface EngineMetaInterface
Specified by:
getRepositoryDirectory in interface LoggingObjectInterface
Specified by:
getRepositoryDirectory in interface RepositoryElementInterface
Returns:
Returns the directory.

setRepositoryDirectory

public void setRepositoryDirectory(RepositoryDirectoryInterface directory)
Sets the directory.

Specified by:
setRepositoryDirectory in interface RepositoryElementInterface
Parameters:
directory - The directory to set.

getFilename

public String getFilename()
Gets the filename.

Specified by:
getFilename in interface EngineMetaInterface
Specified by:
getFilename in interface LoggingObjectInterface
Returns:
filename
See Also:
EngineMetaInterface.getFilename()

setFilename

public void setFilename(String newFilename)
Set the filename of the job

Specified by:
setFilename in interface EngineMetaInterface
Parameters:
newFilename - The new filename of the job

getJobLogTable

public JobLogTable getJobLogTable()
Gets the job log table.

Returns:
the job log table

setJobLogTable

public void setJobLogTable(JobLogTable jobLogTable)
Sets the job log table.

Parameters:
jobLogTable - the new job log table

getDatabases

public List<DatabaseMeta> getDatabases()
Returns a list of the databases.

Specified by:
getDatabases in interface HasDatabasesInterface
Returns:
Returns the databases.

getDatabaseNames

public String[] getDatabaseNames()
Gets the database names.

Returns:
the database names

setDatabases

public void setDatabases(List<DatabaseMeta> databases)
Sets the databases.

Specified by:
setDatabases in interface HasDatabasesInterface
Parameters:
databases - The databases to set.

setChanged

public void setChanged(boolean ch)
Description copied from class: ChangedFlag
Sets whether or not this has changed.

Specified by:
setChanged in interface ChangedFlagInterface
Overrides:
setChanged in class ChangedFlag

clearChanged

public void clearChanged()
Clears the different changed flags of the job.

Specified by:
clearChanged in interface ChangedFlagInterface
Specified by:
clearChanged in interface EngineMetaInterface
Overrides:
clearChanged in class ChangedFlag

hasChanged

public boolean hasChanged()
Description copied from class: ChangedFlag
Checks whether or not this has changed.

Specified by:
hasChanged in interface ChangedFlagInterface
Overrides:
hasChanged in class ChangedFlag
Returns:
true if the this has changed, false otherwise

isDatabaseConnectionUsed

public boolean isDatabaseConnectionUsed(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

public String getFileType()
Description copied from interface: EngineMetaInterface
Gets the file type.

Specified by:
getFileType in interface EngineMetaInterface
Returns:
the file type

getFilterNames

public String[] getFilterNames()
Gets the job filter names.

Specified by:
getFilterNames in interface EngineMetaInterface
Returns:
the filter names
See Also:
EngineMetaInterface.getFilterNames()

getFilterExtensions

public String[] getFilterExtensions()
Gets the job filter extensions. For JobMeta, this method returns the value of Const.STRING_JOB_FILTER_EXT

Specified by:
getFilterExtensions in interface EngineMetaInterface
Returns:
the filter extensions
See Also:
EngineMetaInterface.getFilterExtensions()

getDefaultExtension

public String getDefaultExtension()
Gets the default extension for a job. For JobMeta, this method returns the value of Const.STRING_JOB_DEFAULT_EXT

Specified by:
getDefaultExtension in interface EngineMetaInterface
Returns:
the default extension
See Also:
EngineMetaInterface.getDefaultExtension()

getXML

public String getXML()
Description copied from interface: XMLInterface
Describes the Object implementing this interface as XML

Specified by:
getXML in interface EngineMetaInterface
Specified by:
getXML in interface XMLInterface
Returns:
the XML string for this object
See Also:
XMLInterface.getXML()

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

public static boolean isRepReference(String fileName,
                                     String transName)
Checks if is rep reference.

Parameters:
fileName - the file name
transName - the trans name
Returns:
true, if is rep reference

isFileReference

public static boolean isFileReference(String fileName,
                                      String transName)
Checks if is file reference.

Parameters:
fileName - the file name
transName - the trans name
Returns:
true, if is file reference

loadXML

public void loadXML(Node jobnode,
                    Repository rep,
                    OverwritePrompter prompter)
             throws KettleXMLException
Load xml.

Parameters:
jobnode - the jobnode
rep - the rep
prompter - the prompter
Throws:
KettleXMLException - the kettle xml exception

loadXML

public void loadXML(Node jobnode,
                    Repository rep,
                    boolean ignoreRepositorySharedObjects,
                    OverwritePrompter prompter)
             throws KettleXMLException
Load a block of XML from an DOM node.

Parameters:
jobnode - The node to load from
rep - The reference to a repository to load additional information from
ignoreRepositorySharedObjects - Do not load shared objects, handled separately
prompter - The prompter to use in case a shared object gets overwritten
Throws:
KettleXMLException

readSharedObjects

public SharedObjects readSharedObjects()
                                throws KettleException
Read shared objects.

Returns:
the shared objects
Throws:
KettleException - the kettle exception

saveSharedObjects

public void saveSharedObjects()
                       throws KettleException
Description copied from interface: EngineMetaInterface
Saves shared objects, including databases, steps, partition schemas, slave servers, and cluster schemas, to a file.

Specified by:
saveSharedObjects in interface EngineMetaInterface
Throws:
KettleException

findDatabase

public DatabaseMeta findDatabase(String name)
Find a database connection by it's name

Specified by:
findDatabase in interface HasDatabasesInterface
Parameters:
name - The database name to look for
Returns:
The database connection or null if nothing was found.

getJobEntryCopy

public JobEntryCopy getJobEntryCopy(int x,
                                    int y,
                                    int iconsize)
Gets the job entry copy.

Parameters:
x - the x
y - the y
iconsize - 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

nrNotes

public int nrNotes()
Nr notes.

Returns:
the int

nrDatabases

public int nrDatabases()
Description copied from interface: HasDatabasesInterface
Count the nr of databases in the transformation.

Specified by:
nrDatabases in interface HasDatabasesInterface
Returns:
The nr of databases

getJobHop

public JobHopMeta getJobHop(int i)
Gets the job hop.

Parameters:
i - the i
Returns:
the job hop

getJobEntry

public JobEntryCopy getJobEntry(int i)
Gets the job entry.

Parameters:
i - the i
Returns:
the job entry

getNote

public NotePadMeta getNote(int i)
Gets the note.

Parameters:
i - the i
Returns:
the note

getDatabase

public DatabaseMeta getDatabase(int i)
Description copied from interface: HasDatabasesInterface
Retrieves a database connection information a a certain location.

Specified by:
getDatabase in interface HasDatabasesInterface
Parameters:
i - The database number.
Returns:
The database connection information.

addJobEntry

public void addJobEntry(JobEntryCopy je)
Adds the job entry.

Parameters:
je - the je

addJobHop

public void addJobHop(JobHopMeta hi)
Adds the job hop.

Parameters:
hi - the hi

addNote

public void addNote(NotePadMeta ni)
Adds the note.

Parameters:
ni - the ni

addDatabase

public void addDatabase(DatabaseMeta ci)
Description copied from interface: HasDatabasesInterface
Add a database connection to the transformation.

Specified by:
addDatabase in interface HasDatabasesInterface
Parameters:
ci - The database connection information.

addJobEntry

public void addJobEntry(int p,
                        JobEntryCopy si)
Adds the job entry.

Parameters:
p - the p
si - the si

addJobHop

public void addJobHop(int p,
                      JobHopMeta hi)
Adds the job hop.

Parameters:
p - the p
hi - the hi

addNote

public void addNote(int p,
                    NotePadMeta ni)
Adds the note.

Parameters:
p - the p
ni - the ni

addDatabase

public void addDatabase(int p,
                        DatabaseMeta ci)
Description copied from interface: HasDatabasesInterface
Add a database connection to the transformation on a certain location.

Specified by:
addDatabase in interface HasDatabasesInterface
Parameters:
p - The location
ci - The database connection information.

addOrReplaceDatabase

public void addOrReplaceDatabase(DatabaseMeta databaseMeta)
Description copied from interface: HasDatabasesInterface
Add a database connection to the transformation if that connection didn't exists yet. Otherwise, replace the connection in the transformation

Specified by:
addOrReplaceDatabase in interface HasDatabasesInterface
Parameters:
databaseMeta - The database connection information.

addOrReplaceSlaveServer

public void addOrReplaceSlaveServer(SlaveServer slaveServer)
Add a new slave server to the transformation if that didn't exist yet. Otherwise, replace it.

Parameters:
slaveServer - The slave server to be added.

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

removeNote

public void removeNote(int i)
Removes the note.

Parameters:
i - the i

raiseNote

public void raiseNote(int p)
Raise note.

Parameters:
p - the p

lowerNote

public void lowerNote(int p)
Lower note.

Parameters:
p - the p

removeDatabase

public void removeDatabase(int i)
Description copied from interface: HasDatabasesInterface
Removes a database from the transformation on a certain location.

Specified by:
removeDatabase in interface HasDatabasesInterface
Parameters:
i - The location

indexOfJobHop

public int indexOfJobHop(JobHopMeta he)
Index of job hop.

Parameters:
he - the he
Returns:
the int

indexOfNote

public int indexOfNote(NotePadMeta ni)
Index of note.

Parameters:
ni - the ni
Returns:
the int

indexOfJobEntry

public int indexOfJobEntry(JobEntryCopy ge)
Index of job entry.

Parameters:
ge - the ge
Returns:
the int

indexOfDatabase

public int indexOfDatabase(DatabaseMeta di)
Description copied from interface: HasDatabasesInterface
Find the location of database

Specified by:
indexOfDatabase in interface HasDatabasesInterface
Parameters:
di - The database queried
Returns:
The location of the database, -1 if nothing was found.

setJobEntry

public void setJobEntry(int idx,
                        JobEntryCopy jec)
Sets the job entry.

Parameters:
idx - the idx
jec - the jec

findJobEntry

public JobEntryCopy findJobEntry(String name,
                                 int nr,
                                 boolean searchHiddenToo)
Find an existing JobEntryCopy by it's name and number

Parameters:
name - The name of the job entry copy
nr - The number of the job entry copy
Returns:
The JobEntryCopy or null if nothing was found!

findJobEntry

public JobEntryCopy findJobEntry(String full_name_nr)
Find job entry.

Parameters:
full_name_nr - the full_name_nr
Returns:
the job entry copy

findJobHop

public JobHopMeta findJobHop(String name)
Find job hop.

Parameters:
name - the name
Returns:
the job hop meta

findJobHopFrom

public JobHopMeta findJobHopFrom(JobEntryCopy jge)
Find job hop from.

Parameters:
jge - the jge
Returns:
the job hop meta

findJobHop

public JobHopMeta findJobHop(JobEntryCopy from,
                             JobEntryCopy to)
Find job hop.

Parameters:
from - the from
to - the to
Returns:
the job hop meta

findJobHop

public JobHopMeta findJobHop(JobEntryCopy from,
                             JobEntryCopy to,
                             boolean includeDisabled)
Find job hop.

Parameters:
from - the from
to - the to
includeDisabled - the include disabled
Returns:
the job hop meta

findJobHopTo

public JobHopMeta findJobHopTo(JobEntryCopy jge)
Find job hop to.

Parameters:
jge - the jge
Returns:
the job hop meta

findNrPrevJobEntries

public int findNrPrevJobEntries(JobEntryCopy from)
Find nr prev job entries.

Parameters:
from - the from
Returns:
the int

findPrevJobEntry

public JobEntryCopy findPrevJobEntry(JobEntryCopy to,
                                     int nr)
Find prev job entry.

Parameters:
to - the to
nr - the nr
Returns:
the job entry copy

findNrPrevJobEntries

public int findNrPrevJobEntries(JobEntryCopy to,
                                boolean info)
Find nr prev job entries.

Parameters:
to - the to
info - the info
Returns:
the int

findPrevJobEntry

public JobEntryCopy findPrevJobEntry(JobEntryCopy to,
                                     int nr,
                                     boolean info)
Find prev job entry.

Parameters:
to - the to
nr - the nr
info - the info
Returns:
the job entry copy

findNrNextJobEntries

public int findNrNextJobEntries(JobEntryCopy from)
Find nr next job entries.

Parameters:
from - the from
Returns:
the int

findNextJobEntry

public JobEntryCopy findNextJobEntry(JobEntryCopy from,
                                     int cnt)
Find next job entry.

Parameters:
from - the from
cnt - the cnt
Returns:
the job entry copy

hasLoop

public boolean hasLoop(JobEntryCopy entry)
Checks for loop.

Parameters:
entry - the entry
Returns:
true, if successful

hasLoop

public boolean hasLoop(JobEntryCopy entry,
                       JobEntryCopy lookup)
Checks for loop.

Parameters:
entry - the entry
lookup - the lookup
Returns:
true, if successful

isEntryUsedInHops

public boolean isEntryUsedInHops(JobEntryCopy jge)
Checks if is entry used in hops.

Parameters:
jge - the jge
Returns:
true, if is entry used in hops

countEntries

public int countEntries(String name)
Count entries.

Parameters:
name - the name
Returns:
the int

findUnusedNr

public int findUnusedNr(String name)
Find unused nr.

Parameters:
name - the name
Returns:
the int

findMaxNr

public int findMaxNr(String name)
Find max nr.

Parameters:
name - the name
Returns:
the int

getAlternativeJobentryName

public String getAlternativeJobentryName(String entryname)
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

public JobEntryCopy[] getAllJobGraphEntries(String name)
Gets the all job graph entries.

Parameters:
name - the name
Returns:
the all job graph entries

getAllJobHopsUsing

public JobHopMeta[] getAllJobHopsUsing(String name)
Gets the all job hops using.

Parameters:
name - the name
Returns:
the all job hops using

getNote

public NotePadMeta getNote(int x,
                           int y)
Gets the note.

Parameters:
x - the x
y - the y
Returns:
the note

selectAll

public void selectAll()
Select all.


unselectAll

public void unselectAll()
Unselect all.


getMaxUndo

public int getMaxUndo()
Description copied from interface: UndoInterface
Get the maximum number of undo operations possible

Specified by:
getMaxUndo in interface UndoInterface
Returns:
The maximum number of undo operations that are allowed.

setMaxUndo

public void setMaxUndo(int mu)
Description copied from interface: UndoInterface
Sets the maximum number of undo operations that are allowed.

Specified by:
setMaxUndo in interface UndoInterface
Parameters:
mu - The maximum number of undo operations that are allowed.

getUndoSize

public int getUndoSize()
Gets the undo size.

Returns:
the undo size

clearUndo

public void clearUndo()
Clear undo.


addUndo

public void addUndo(Object[] from,
                    Object[] to,
                    int[] pos,
                    Point[] prev,
                    Point[] curr,
                    int type_of_change,
                    boolean nextAlso)
Description copied from interface: UndoInterface
Add an undo operation to the undo list

Specified by:
addUndo in interface UndoInterface
Parameters:
from - array of objects representing the old state
to - array of objectes representing the new state
pos - An array of object locations
prev - An array of points representing the old positions
curr - An array of points representing the new positions
type_of_change - The type of change that's being done to the transformation.
nextAlso - indicates that the next undo operation needs to follow this one.

previousUndo

public TransAction previousUndo()
Description copied from interface: UndoInterface
Get the previous undo operation and change the undo pointer

Specified by:
previousUndo in interface UndoInterface
Returns:
The undo transaction to be performed.

viewThisUndo

public TransAction viewThisUndo()
View current undo, don't change undo position

Specified by:
viewThisUndo in interface UndoInterface
Returns:
The current undo transaction

viewPreviousUndo

public TransAction viewPreviousUndo()
Description copied from interface: UndoInterface
View previous undo, don't change undo position

Specified by:
viewPreviousUndo in interface UndoInterface
Returns:
The previous undo transaction

nextUndo

public TransAction nextUndo()
Description copied from interface: UndoInterface
Get the next undo transaction on the list. Change the undo pointer.

Specified by:
nextUndo in interface UndoInterface
Returns:
The next undo transaction (for redo)

viewNextUndo

public TransAction viewNextUndo()
Description copied from interface: UndoInterface
Get the next undo transaction on the list.

Specified by:
viewNextUndo in interface UndoInterface
Returns:
The next undo transaction (for redo)

getMaximum

public Point getMaximum()
Gets the maximum.

Returns:
the maximum

getMinimum

public Point getMinimum()
Get the minimum point on the canvas of a job

Returns:
Minimum coordinate of a step in the job

getSelectedLocations

public Point[] getSelectedLocations()
Gets the selected locations.

Returns:
the selected locations

getSelectedNoteLocations

public Point[] getSelectedNoteLocations()
Get all the selected note locations

Returns:
The selected step and notes locations.

getSelectedEntries

public List<JobEntryCopy> getSelectedEntries()
Gets the selected entries.

Returns:
the selected entries

getSelectedNotes

public List<NotePadMeta> getSelectedNotes()
Gets a list of all selected notes.

Returns:
A list of all the selected notes.

getEntryIndexes

public int[] getEntryIndexes(List<JobEntryCopy> entries)
Gets the entry indexes.

Parameters:
entries - the entries
Returns:
the entry indexes

getNoteIndexes

public int[] getNoteIndexes(List<NotePadMeta> notes)
Get an array of the locations of an array of notes

Parameters:
notes - An array of notes
Returns:
an array of the locations of an array of notes

findStart

public JobEntryCopy findStart()
Find start.

Returns:
the job entry copy

toString

public String toString()
Gets a textual representation of the job. If its name has been set, it will be returned, otherwise the classname is returned.

Overrides:
toString in class Object
Returns:
the textual representation of the job.

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<SQLStatement> getSQLStatements(Repository repository,
                                           ProgressMonitorListener monitor)
                                    throws 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:
KettleException

getArguments

public String[] getArguments()
Gets the arguments used for this job.

Returns:
Returns the arguments.

setArguments

public void setArguments(String[] arguments)
Sets 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

public List<String> getUsedVariables()
Gets the used variables.

Returns:
the used variables

haveConnectionsChanged

public boolean haveConnectionsChanged()
Description copied from interface: HasDatabasesInterface
Checks whether or not the connections have changed.

Specified by:
haveConnectionsChanged in interface HasDatabasesInterface
Returns:
True if the connections have been changed.

haveJobEntriesChanged

public boolean haveJobEntriesChanged()
Have job entries changed.

Returns:
true, if successful

haveJobHopsChanged

public boolean haveJobHopsChanged()
Have job hops changed.

Returns:
true, if successful

haveNotesChanged

public boolean haveNotesChanged()
Have notes changed.

Returns:
true, if successful

getSharedObjectsFile

public String getSharedObjectsFile()
Gets the shared objects file.

Returns:
the sharedObjectsFile

setSharedObjectsFile

public void setSharedObjectsFile(String sharedObjectsFile)
Sets the shared objects file.

Parameters:
sharedObjectsFile - the sharedObjectsFile to set

setModifiedUser

public void setModifiedUser(String modifiedUser)
Sets the user who last modified the job.

Specified by:
setModifiedUser in interface EngineMetaInterface
Parameters:
modifiedUser - The modifiedUser to set.

getModifiedUser

public String getModifiedUser()
Gets the user who last modified the job.

Specified by:
getModifiedUser in interface EngineMetaInterface
Returns:
Returns the modifiedUser.

setModifiedDate

public void setModifiedDate(Date modifiedDate)
Sets the date the job was modified.

Specified by:
setModifiedDate in interface EngineMetaInterface
Parameters:
modifiedDate - The modifiedDate to set.

getModifiedDate

public Date getModifiedDate()
Gets the date the job was last modified.

Specified by:
getModifiedDate in interface EngineMetaInterface
Returns:
Returns the modifiedDate.

getDescription

public String getDescription()
Gets the description of the job.

Specified by:
getDescription in interface RepositoryElementInterface
Returns:
The description of the job

getExtendedDescription

public String getExtendedDescription()
Gets the extended description of the job.

Returns:
The extended description of the job

getJobversion

public String 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

setDescription

public void setDescription(String description)
Set the description of the job.

Specified by:
setDescription in interface RepositoryElementInterface
Parameters:
description - The new description of the job

setExtendedDescription

public void setExtendedDescription(String extendedDescription)
Set the description of the job.

Parameters:
extendedDescription - The new extended description of the job

setJobversion

public void setJobversion(String jobVersion)
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

getCreatedDate

public Date getCreatedDate()
Gets the date the job was created.

Specified by:
getCreatedDate in interface EngineMetaInterface
Returns:
Returns the createdDate.

setCreatedDate

public void setCreatedDate(Date createdDate)
Description copied from interface: EngineMetaInterface
Sets the date the transformation was created.

Specified by:
setCreatedDate in interface EngineMetaInterface
Parameters:
createdDate - The createdDate to set.

setCreatedUser

public void setCreatedUser(String createdUser)
Description copied from interface: EngineMetaInterface
Sets the user by whom this was created.

Specified by:
setCreatedUser in interface EngineMetaInterface
Parameters:
createdUser - The createdUser to set.

getCreatedUser

public String getCreatedUser()
Gets the user by whom the job was created.

Specified by:
getCreatedUser in interface EngineMetaInterface
Returns:
Returns the createdUser.

findJobEntry

public static final JobEntryInterface findJobEntry(List<JobEntryInterface> jobentries,
                                                   ObjectId id_jobentry)
Find a jobentry with a certain ID in a list of job entries.

Parameters:
jobentries - The List of jobentries
id_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,
                                                  ObjectId id_jobentry_copy)
Find a jobentrycopy with a certain ID in a list of job entry copies.

Parameters:
jobcopies - The List of jobentry copies
id_jobentry_copy - The id of the jobentry copy
Returns:
The JobEntryCopy object if one was found, null otherwise.

setInternalKettleVariables

public void setInternalKettleVariables()
Calls setInternalKettleVariables on the default object.

Specified by:
setInternalKettleVariables in interface EngineMetaInterface

setInternalKettleVariables

public void setInternalKettleVariables(VariableSpace var)
This method sets various internal kettle variables that can be used by the transformation.


copyVariablesFrom

public void copyVariablesFrom(VariableSpace space)
Description copied from interface: VariableSpace
Copy the variables from another space, without initializing with the defaults. This does not affect any parent relationship.

Specified by:
copyVariablesFrom in interface VariableSpace
Parameters:
space - the space to copy the variables from.

environmentSubstitute

public String environmentSubstitute(String aString)
Description copied from interface: VariableSpace
Substitute the string using the current variable space.

Specified by:
environmentSubstitute in interface VariableSpace
Parameters:
aString - The string to substitute.
Returns:
The substituted string.

environmentSubstitute

public String[] environmentSubstitute(String[] aString)
Description copied from interface: VariableSpace
Replaces environment variables in an array of strings. See also: environmentSubstitute(String string)

Specified by:
environmentSubstitute in interface VariableSpace
Parameters:
aString - The array of strings that wants its variables to be replaced.
Returns:
the array with the environment variables replaced.

getParentVariableSpace

public VariableSpace getParentVariableSpace()
Description copied from interface: VariableSpace
Get the parent of the variable space.

Specified by:
getParentVariableSpace in interface VariableSpace
Returns:
the parent.

setParentVariableSpace

public void setParentVariableSpace(VariableSpace parent)
Description copied from interface: VariableSpace
Set the parent variable space

Specified by:
setParentVariableSpace in interface VariableSpace
Parameters:
parent - The parent variable space to set

getVariable

public String getVariable(String variableName,
                          String defaultValue)
Description copied from interface: VariableSpace
Get the value of a variable with a default in case the variable is not found.

Specified by:
getVariable in interface VariableSpace
Parameters:
variableName - The name of the variable
defaultValue - The default value in case the variable could not be found
Returns:
the String value of a variable

getVariable

public String getVariable(String variableName)
Description copied from interface: VariableSpace
Get the value of a variable.

Specified by:
getVariable in interface VariableSpace
Parameters:
variableName - The name of the variable
Returns:
the String value of a variable or null in case the variable could not be found.

getBooleanValueOfVariable

public boolean getBooleanValueOfVariable(String variableName,
                                         boolean defaultValue)
Description copied from interface: VariableSpace
This method returns a boolean for the new variable check boxes. If the variable name is not set or the variable name is not specified, this method simply returns the default value. If not, it convert the variable value to a boolean. "Y", "YES" and "TRUE" all convert to true. (case insensitive)

Specified by:
getBooleanValueOfVariable in interface VariableSpace
Parameters:
variableName - The variable to look up.
defaultValue - The default value to return.
Returns:
See Also:
static method ValueMeta.convertStringToBoolean()

initializeVariablesFrom

public void initializeVariablesFrom(VariableSpace parent)
Description copied from interface: VariableSpace
Initialize variable space using the defaults, copy over the variables from the parent (using copyVariablesFrom()), after this the "injected" variables should be inserted (injectVariables()). The parent is set as parent variable space.

Specified by:
initializeVariablesFrom in interface VariableSpace
Parameters:
parent - the parent to start from, or null if root.

listVariables

public String[] listVariables()
Description copied from interface: VariableSpace
List the variables (not the values) that are currently in the variable space.

Specified by:
listVariables in interface VariableSpace
Returns:
Array of String variable names.

setVariable

public void setVariable(String variableName,
                        String variableValue)
Description copied from interface: VariableSpace
Sets a variable in the Kettle Variables list.

Specified by:
setVariable in interface VariableSpace
Parameters:
variableName - The name of the variable to set
variableValue - The value of the variable to set. If the variableValue is null, the variable is cleared from the list.

shareVariablesWith

public void shareVariablesWith(VariableSpace space)
Description copied from interface: VariableSpace
Share 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 VariableSpace
Parameters:
space - Variable space to be shared.

injectVariables

public void injectVariables(Map<String,String> prop)
Description copied from interface: VariableSpace
Inject variables. The behaviour 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 VariableSpace
Parameters:
prop - Properties object containing key-value pairs.

checkJobEntries

public void checkJobEntries(List<CheckResultInterface> remarks,
                            boolean only_selected,
                            ProgressMonitorListener monitor)
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 JobEntry
only_selected - true if you only want to check the selected jobs
monitor - Progress monitor (not presently in use)

getResourceDependencies

public List<ResourceReference> getResourceDependencies()
Gets the resource dependencies.

Returns:
the resource dependencies

exportResources

public String exportResources(VariableSpace space,
                              Map<String,ResourceDefinition> definitions,
                              ResourceNamingInterface namingInterface,
                              Repository repository)
                       throws KettleException
Description 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 interface ResourceExportInterface
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 name appropriately
repository - the repository object to load from
Returns:
The filename for this object. (also contained in the definitions map)
Throws:
KettleException - in case something goes wrong during the export

getSlaveServers

public List<SlaveServer> getSlaveServers()
Gets a list of slave servers.

Specified by:
getSlaveServers in interface HasSlaveServersInterface
Returns:
the slaveServer list

setSlaveServers

public void setSlaveServers(List<SlaveServer> slaveServers)
Sets the slave servers.

Parameters:
slaveServers - the slaveServers to set

findSlaveServer

public SlaveServer findSlaveServer(String serverString)
Find a slave server using the name

Parameters:
serverString - the name of the slave server
Returns:
the slave server or null if we couldn't spot an approriate entry.

getSlaveServerNames

public String[] getSlaveServerNames()
Gets an array of slave server names.

Returns:
An array list slave server names

renameJobEntryIfNameCollides

public void renameJobEntryIfNameCollides(JobEntryCopy je)
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.

getSharedObjects

public SharedObjects getSharedObjects()
Gets the shared objects.

Returns:
the sharedObjects

setSharedObjects

public void setSharedObjects(SharedObjects sharedObjects)
Sets the shared objects.

Parameters:
sharedObjects - the sharedObjects to set

addNameChangedListener

public void addNameChangedListener(NameChangedListener listener)
Adds the name changed listener.

Parameters:
listener - the listener

removeNameChangedListener

public void removeNameChangedListener(NameChangedListener listener)
Removes the name changed listener.

Parameters:
listener - the listener

addFilenameChangedListener

public void addFilenameChangedListener(FilenameChangedListener listener)
Adds the filename changed listener.

Parameters:
listener - the listener

removeFilenameChangedListener

public void removeFilenameChangedListener(FilenameChangedListener listener)
Removes the filename changed listener.

Parameters:
listener - the listener

activateParameters

public void activateParameters()
Description copied from interface: NamedParams
Activate the currently set parameters

Specified by:
activateParameters in interface NamedParams

addParameterDefinition

public void addParameterDefinition(String key,
                                   String defValue,
                                   String description)
                            throws DuplicateParamException
Description copied from interface: NamedParams
Add a parameter definition to this set. TODO: default, throw exception

Specified by:
addParameterDefinition in interface NamedParams
Parameters:
key - Name of the parameter.
defValue - default value.
description - Description of the parameter.
Throws:
DuplicateParamException - Upon duplicate parameter definitions

getParameterDescription

public String getParameterDescription(String key)
                               throws UnknownParamException
Description copied from interface: NamedParams
Get the description of a parameter.

Specified by:
getParameterDescription in interface NamedParams
Parameters:
key - Key to get value for.
Returns:
description of parameter key.
Throws:
UnknownParamException - Parameter 'key' is unknown.

getParameterDefault

public String getParameterDefault(String key)
                           throws UnknownParamException
Description copied from interface: NamedParams
Get the default value of a parameter.

Specified by:
getParameterDefault in interface NamedParams
Parameters:
key - Key to get value for.
Returns:
default value for parameter key.
Throws:
UnknownParamException - Parameter 'key' is unknown.

getParameterValue

public String getParameterValue(String key)
                         throws UnknownParamException
Description copied from interface: NamedParams
Get the value of a parameter.

Specified by:
getParameterValue in interface NamedParams
Parameters:
key - Key to get value for.
Returns:
value of parameter key.
Throws:
UnknownParamException - Parameter 'key' is unknown.

listParameters

public String[] listParameters()
Description copied from interface: NamedParams
List the parameters.

Specified by:
listParameters in interface NamedParams
Returns:
Array of parameters.

setParameterValue

public void setParameterValue(String key,
                              String value)
                       throws UnknownParamException
Description copied from interface: NamedParams
Set the value of a parameter.

Specified by:
setParameterValue in interface NamedParams
Parameters:
key - key to set value of
value - value to set it to.
Throws:
UnknownParamException - Parameter 'key' is unknown.

eraseParameters

public void eraseParameters()
Description copied from interface: NamedParams
Clear the values.

Specified by:
eraseParameters in interface NamedParams

clearParameters

public void clearParameters()
Description copied from interface: NamedParams
Clear all parameters

Specified by:
clearParameters in interface NamedParams

copyParametersFrom

public void copyParametersFrom(NamedParams params)
Description copied from interface: NamedParams
Copy params to these named parameters (clearing out first).

Specified by:
copyParametersFrom in interface NamedParams
Parameters:
params - the parameters to copy from.

getJobCopies

public List<JobEntryCopy> getJobCopies()
Gets the job copies.

Returns:
the job copies

getNotes

public List<NotePadMeta> getNotes()
Gets the notes.

Returns:
the notes

getJobhops

public List<JobHopMeta> getJobhops()
Gets the jobhops.

Returns:
the jobhops

getRepositoryElementType

public RepositoryObjectType getRepositoryElementType()
Description copied from interface: RepositoryElementInterface
Gets the repository element type.

Specified by:
getRepositoryElementType in interface RepositoryElementInterface
Returns:
the repository element type

getObjectRevision

public ObjectRevision getObjectRevision()
Description copied from interface: RepositoryElementInterface
Gets the object revision.

Specified by:
getObjectRevision in interface LoggingObjectInterface
Specified by:
getObjectRevision in interface RepositoryElementInterface
Returns:
the object revision

setObjectRevision

public void setObjectRevision(ObjectRevision objectRevision)
Description copied from interface: RepositoryElementInterface
Sets the object revision.

Specified by:
setObjectRevision in interface RepositoryElementInterface

composeJobEntryInterfaceList

public List<JobEntryInterface> composeJobEntryInterfaceList()
Create a unique list of job entry interfaces

Returns:

getLogChannelId

public String getLogChannelId()
Description copied from interface: LoggingObjectInterface
Gets the log channel id.

Specified by:
getLogChannelId in interface LoggingObjectInterface
Returns:
the log channel id

getObjectName

public String getObjectName()
Description copied from interface: LoggingObjectInterface
Gets the object name.

Specified by:
getObjectName in interface LoggingObjectInterface
Returns:
the name

getObjectCopy

public String getObjectCopy()
Description copied from interface: LoggingObjectInterface
Gets a string identifying a copy in a series of steps.

Specified by:
getObjectCopy in interface LoggingObjectInterface
Returns:
A string identifying a copy in a series of steps.

getObjectType

public LoggingObjectType getObjectType()
Description copied from interface: LoggingObjectInterface
Gets the object type.

Specified by:
getObjectType in interface LoggingObjectInterface
Returns:
the objectType

getParent

public LoggingObjectInterface getParent()
Description copied from interface: LoggingObjectInterface
Gets the parent.

Specified by:
getParent in interface LoggingObjectInterface
Returns:
the parent

getLogLevel

public LogLevel getLogLevel()
Description copied from interface: LoggingObjectInterface
Gets the logging level of the log channel of this logging object.

Specified by:
getLogLevel in interface LoggingObjectInterface
Returns:
The logging level of the log channel of this logging object.

setLogLevel

public void setLogLevel(LogLevel logLevel)
Sets the log level.

Parameters:
logLevel - the new log level

getChannelLogTable

public ChannelLogTable getChannelLogTable()
Gets the channel log table for the job.

Returns:
the channel log table for the job.

setChannelLogTable

public void setChannelLogTable(ChannelLogTable channelLogTable)
Sets the channel log table for the job.

Parameters:
channelLogTable - the channelLogTable to set

getJobEntryLogTable

public JobEntryLogTable getJobEntryLogTable()
Gets the job entry log table.

Returns:
the jobEntryLogTable

setJobEntryLogTable

public void setJobEntryLogTable(JobEntryLogTable jobEntryLogTable)
Sets the job entry log table.

Parameters:
jobEntryLogTable - the jobEntryLogTable to set

getLogTables

public List<LogTableInterface> getLogTables()
Gets the log tables.

Returns:
the log tables

canSave

public boolean canSave()
Checks whether the job can be saved. For JobMeta, this method always returns true

Specified by:
canSave in interface EngineMetaInterface
Returns:
true
See Also:
EngineMetaInterface.canSave()

getContainerObjectId

public String getContainerObjectId()
Gets the container object id.

Specified by:
getContainerObjectId in interface LoggingObjectInterface
Returns:
the carteObjectId

setCarteObjectId

public void setCarteObjectId(String containerObjectId)
Sets the carte object id.

Parameters:
containerObjectId - the execution container Object id to set

getRegistrationDate

public Date getRegistrationDate()
Gets the registration date for the transformation. For jobMeta, this method always returns null.

Specified by:
getRegistrationDate in interface LoggingObjectInterface
Returns:
null

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 KettleException
Look up the references after import

Parameters:
repository - the repository to reference.
Throws:
KettleException

getRepository

public Repository getRepository()
Gets the repository.

Specified by:
getRepository in interface HasRepositoryInterface
Returns:
the repository

setRepository

public void setRepository(Repository repository)
Sets the repository.

Specified by:
setRepository in interface HasRepositoryInterface
Parameters:
repository - the repository to set