org.pentaho.di.ui.spoon.delegates
Class SpoonJobDelegate

java.lang.Object
  extended by org.pentaho.di.ui.spoon.delegates.SpoonDelegate
      extended by org.pentaho.di.ui.spoon.delegates.SpoonJobDelegate

public class SpoonJobDelegate
extends SpoonDelegate


Field Summary
 
Fields inherited from class org.pentaho.di.ui.spoon.delegates.SpoonDelegate
loggingObject
 
Constructor Summary
SpoonJobDelegate(Spoon spoon)
           
 
Method Summary
 boolean addJob(JobMeta jobMeta)
          Add a job to the job map
 void addJobGraph(JobMeta jobMeta)
           
 void closeJob(JobMeta jobMeta)
           
 void copyJobEntries(JobMeta jobMeta, List<JobEntryCopy> jec)
           
 void deleteJobEntryCopies(JobMeta jobMeta, JobEntryCopy jobEntry)
           
 void dupeJobEntry(JobMeta jobMeta, JobEntryCopy jobEntry)
           
 void editJobEntry(JobMeta jobMeta, JobEntryCopy je)
           
 void executeJob(JobMeta jobMeta, boolean local, boolean remote, Date replayDate, boolean safe, String startCopyName, int startCopyNr)
           
 JobGraph findJobGraphOfJob(JobMeta jobMeta)
           
 JobMeta getJob(String name)
           
 JobEntryDialogInterface getJobEntryDialog(JobEntryInterface jobEntryInterface, JobMeta jobMeta)
           
 List<JobMeta> getJobList()
           
 JobMeta[] getLoadedJobs()
           
 StepDialogInterface getStepEntryDialog(StepMetaInterface stepMeta, TransMeta transMeta, String stepName)
           
 boolean isDefaultJobName(String name)
           
 JobEntryCopy newJobEntry(JobMeta jobMeta, String type_desc, boolean openit)
           
 void newJobHop(JobMeta jobMeta, JobEntryCopy fr, JobEntryCopy to)
           
 void pasteXML(JobMeta jobMeta, String clipcontent, Point loc)
           
 void redoJobAction(JobMeta jobMeta, TransAction transAction)
           
 void removeJob(String key)
           
 JobMeta ripDB(List<DatabaseMeta> databases, String jobname, RepositoryDirectoryInterface repdir, String directory, DatabaseMeta sourceDbInfo, DatabaseMeta targetDbInfo, String[] tables)
           
 void ripDBWizard()
          Create a job that extracts tables & data from a database.
 void undoJobAction(JobMeta jobMeta, TransAction transAction)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpoonJobDelegate

public SpoonJobDelegate(Spoon spoon)
Method Detail

newJobEntry

public JobEntryCopy newJobEntry(JobMeta jobMeta,
                                String type_desc,
                                boolean openit)

getJobEntryDialog

public JobEntryDialogInterface getJobEntryDialog(JobEntryInterface jobEntryInterface,
                                                 JobMeta jobMeta)

getStepEntryDialog

public StepDialogInterface getStepEntryDialog(StepMetaInterface stepMeta,
                                              TransMeta transMeta,
                                              String stepName)

editJobEntry

public void editJobEntry(JobMeta jobMeta,
                         JobEntryCopy je)

deleteJobEntryCopies

public void deleteJobEntryCopies(JobMeta jobMeta,
                                 JobEntryCopy jobEntry)

dupeJobEntry

public void dupeJobEntry(JobMeta jobMeta,
                         JobEntryCopy jobEntry)

copyJobEntries

public void copyJobEntries(JobMeta jobMeta,
                           List<JobEntryCopy> jec)

pasteXML

public void pasteXML(JobMeta jobMeta,
                     String clipcontent,
                     Point loc)

newJobHop

public void newJobHop(JobMeta jobMeta,
                      JobEntryCopy fr,
                      JobEntryCopy to)

ripDBWizard

public void ripDBWizard()
Create a job that extracts tables & data from a database.

0) Select the database to rip

1) Select the tables in the database to rip

2) Select the database to dump to

3) Select the repository directory in which it will end up

4) Select a name for the new job

5) Create an empty job with the selected name.

6) Create 1 transformation for every selected table

7) add every created transformation to the job & evaluate


ripDB

public JobMeta ripDB(List<DatabaseMeta> databases,
                     String jobname,
                     RepositoryDirectoryInterface repdir,
                     String directory,
                     DatabaseMeta sourceDbInfo,
                     DatabaseMeta targetDbInfo,
                     String[] tables)

isDefaultJobName

public boolean isDefaultJobName(String name)

findJobGraphOfJob

public JobGraph findJobGraphOfJob(JobMeta jobMeta)

addJob

public boolean addJob(JobMeta jobMeta)
Add a job to the job map

Parameters:
jobMeta - the job to add to the map
Returns:
true if the job was added

closeJob

public void closeJob(JobMeta jobMeta)
Parameters:
transMeta - the transformation to close, make sure it's ok to dispose of it BEFORE you call this.

addJobGraph

public void addJobGraph(JobMeta jobMeta)

getJobList

public List<JobMeta> getJobList()

getJob

public JobMeta getJob(String name)

getLoadedJobs

public JobMeta[] getLoadedJobs()

removeJob

public void removeJob(String key)

redoJobAction

public void redoJobAction(JobMeta jobMeta,
                          TransAction transAction)

undoJobAction

public void undoJobAction(JobMeta jobMeta,
                          TransAction transAction)

executeJob

public void executeJob(JobMeta jobMeta,
                       boolean local,
                       boolean remote,
                       Date replayDate,
                       boolean safe,
                       String startCopyName,
                       int startCopyNr)
                throws KettleException
Throws:
KettleException