org.pentaho.di.ui.spoon
Class Spoon

java.lang.Object
  extended by org.pentaho.di.ui.spoon.Spoon
All Implemented Interfaces:
AddUndoPositionInterface, PDIObserver, OverwritePrompter, SpoonInterface, LifeEventHandler, org.pentaho.ui.xul.impl.XulEventHandler, org.pentaho.ui.xul.XulEventSource, org.pentaho.xul.swt.tab.TabListener

public class Spoon
extends Object
implements AddUndoPositionInterface, org.pentaho.xul.swt.tab.TabListener, SpoonInterface, OverwritePrompter, PDIObserver, LifeEventHandler, org.pentaho.ui.xul.XulEventSource, org.pentaho.ui.xul.impl.XulEventHandler

This class handles the main window of the Spoon graphical transformation editor.

Since:
16-may-2003, i18n at 07-Feb-2006, redesign 01-Dec-2006
Author:
Matt

Field Summary
static String APP_NAME
           
 RepositoryCapabilities capabilities
           
 SpoonDelegates delegates
           
 String lastDirOpened
          We can use this to set a default filter path in the open and save dialogs
static LoggingObjectInterface loggingObject
           
 PropsUI props
           
 Repository rep
           
 Text selectionFilter
           
 Map<String,SharedObjects> sharedObjectsFileMap
           
 boolean showJob
           
 boolean showTrans
           
static String STRING_BUILDING_BLOCKS
           
static String STRING_CLUSTERS
           
static String STRING_CONNECTIONS
           
static String STRING_ELEMENTS
           
static String STRING_HISTORY
           
static String STRING_HOPS
           
static String STRING_JOB
           
static String STRING_JOB_BASE
           
static String STRING_JOB_ENTRIES
           
static String STRING_JOB_NO_NAME
           
static String STRING_JOBS
           
static String STRING_PARTITIONS
           
static String STRING_SLAVES
           
static String STRING_STEPS
           
static String STRING_TRANS_BASE
           
static String STRING_TRANS_NO_NAME
           
static String STRING_TRANSFORMATION
           
static String STRING_TRANSFORMATIONS
           
 org.pentaho.xul.swt.tab.TabSet tabfolder
           
 RowMetaAndData variables
           
static String XML_TAG_JOB_JOB_ENTRIES
           
static String XML_TAG_TRANSFORMATION_STEPS
           
static String XUL_FILE_MAIN
           
 
Fields inherited from interface org.pentaho.di.core.gui.SpoonInterface
STATE_CORE_OBJECTS_CHEF, STATE_CORE_OBJECTS_NONE, STATE_CORE_OBJECTS_SPOON, XUL_FILE_MENU_PROPERTIES, XUL_FILE_MENUBAR, XUL_FILE_MENUS
 
Constructor Summary
Spoon(Display d)
           
Spoon(Display d, Repository rep)
           
 
Method Summary
 void addCoreObjectsTree()
           
 void addDefaultKeyListeners(Control control)
           
 void addFileListener(FileListener listener)
           
 void addJobGraph(JobMeta jobMeta)
           
 void addJobHistory()
           
 void addJobHistory(JobMeta jobMeta, boolean select)
           
 void addJobLog()
           
 void addMenuLast()
           
 void addMenuListener(String id, Object listener, String methodName)
           
 void addPropertyChangeListener(PropertyChangeListener listener)
           
 void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
           
 boolean addSpoonBrowser(String name, String urlString)
           
 boolean addSpoonBrowser(String name, String urlString, LocationListener locationListener)
           
 void addSpoonMenuController(ISpoonMenuController menuController)
           
 void addSpoonSlave()
           
 void addSpoonSlave(SlaveServer slaveServer)
           
 void addTransGraph(TransMeta transMeta)
           
 void addTransHistory()
           
 void addTransLog()
           
 void addUndoChange(UndoInterface undoInterface, Object[] from, Object[] to, int[] pos)
           
 void addUndoChange(UndoInterface undoInterface, Object[] from, Object[] to, int[] pos, boolean nextAlso)
           
 void addUndoDelete(UndoInterface undoInterface, Object[] obj, int[] position)
           
 void addUndoDelete(UndoInterface undoInterface, Object[] obj, int[] position, boolean nextAlso)
           
 void addUndoNew(UndoInterface undoInterface, Object[] obj, int[] position)
           
 void addUndoNew(UndoInterface undoInterface, Object[] obj, int[] position, boolean nextAlso)
           
 void addUndoPosition(UndoInterface undoInterface, Object[] obj, int[] pos, Point[] prev, Point[] curr)
           
 void analyseImpact()
           
 void analyseImpact(TransMeta transMeta)
           
 void applyVariables()
           
 void applyVariableToAllLoadedObjects(String name, String value)
           
 void browseVersionHistory()
           
 void changeLooks()
           
 boolean checkIfHopAlreadyExists(TransMeta transMeta, TransHopMeta newHop)
           
 void checkTrans()
           
 void checkTrans(TransMeta transMeta)
          Checks *all* the steps in the transformation, puts the result in remarks list
 void checkTrans(TransMeta transMeta, boolean only_selected)
          Check the steps in a transformation
 void clearDBCache(String id)
           
 void clearSharedObjectCache()
           
 void clipConnection()
           
 void closeAllFiles()
           
 void closeFile()
           
 void closeRepository()
           
 void closeSpoonBrowser()
           
 void consume(LifeEventInfo info)
           
 void copy()
           
 void copyFile()
           
 void copyJob()
           
 void copyJob(JobMeta jobMeta)
           
 void copyJobentries()
           
 void copySelected(TransMeta transMeta, List<StepMeta> steps, List<NotePadMeta> notes)
           
 void copySteps()
          It's called copySteps, but the job entries also arrive at this location
 void copyTableWizard()
          Create a transformation that extracts tables & data from a database.
 void copyTransformation()
           
 void copyTransformation(TransMeta transMeta)
           
 void copyTransformationImage()
           
 void copyTransformationImage(TransMeta transMeta)
           
 void createCmdLineFile()
           
 void createDatabaseWizard()
          Shows a wizard that creates a new database connection...
 void createKettleArchive(TransMeta transMeta)
           
 void createPopupMenus()
           
 void cut()
           
 void debugFile()
           
 void debugTransformation()
           
 void delClusterSchema()
           
 void delConnection()
           
 void deleteJobEntryCopies()
           
 void deleteJobEntryCopies(JobMeta jobMeta, JobEntryCopy jobEntry)
           
 void delHop()
           
 void delHop(TransMeta transMeta, TransHopMeta transHopMeta)
           
 void delPartitionSchema()
           
 void delSlaveServer()
           
 void delSlaveServer(HasSlaveServersInterface hasSlaveServersInterface, SlaveServer slaveServer)
           
 void delStep()
           
 void delStep(TransMeta transMeta, StepMeta stepMeta)
           
 void displayCmdLine()
           
 void displayDbDependancies()
           
 void dispose()
           
 void disposeVariableComposite(boolean tree, boolean shared, boolean core, boolean history)
           
 boolean doDestroy()
           
 void dupeConnection()
           
 void dupeJobEntry()
           
 void dupeStep()
           
 void dupeStep(TransMeta transMeta, StepMeta stepMeta)
           
 void editClustering(TransMeta transMeta, List<StepMeta> stepMetas)
          Select a clustering schema for this step.
 void editClustering(TransMeta transMeta, StepMeta stepMeta)
          Select a clustering schema for this step.
 void editClusterSchema()
           
 void editConnection()
           
 void editHop()
           
 void editHop(TransMeta transMeta, TransHopMeta transHopMeta)
           
 void editJobEntry()
           
 void editJobEntry(JobMeta jobMeta, JobEntryCopy je)
           
 boolean editJobProperties(String id)
           
 void editJobPropertiesPopup()
           
 void editKettlePropertiesFile()
           
 void editOptions()
           
 void editPartitioning(TransMeta transMeta, StepMeta stepMeta)
           
 void editPartitionSchema()
           
 boolean editProperties()
           
 void editSelectAll()
           
 void editSlaveServer()
           
 void editStep()
           
 String editStep(TransMeta transMeta, StepMeta stepMeta)
           
 void editStepErrorHandling(TransMeta transMeta, StepMeta stepMeta)
           
 boolean editTransformationProperties()
           
 void editTransformationPropertiesPopup()
           
 void editUnselectAll()
           
 void enableMenus()
           
 void executeFile(boolean local, boolean remote, boolean cluster, boolean preview, boolean debug, Date replayDate, boolean safe)
           
 void executeJob()
           
 void executeJob(JobMeta jobMeta, boolean local, boolean remote, Date replayDate, boolean safe, String startCopyName, int startCopyNr)
           
 void executeTransformation()
           
 void executeTransformation(TransMeta transMeta, boolean local, boolean remote, boolean cluster, boolean preview, boolean debug, Date replayDate, boolean safe)
           
 void exploreDatabase()
           
 void exploreDB()
           
 void exploreRepository()
           
 void exportAllFileRepository()
          Export this job or transformation including all depending resources to a single ZIP file containing a file repository.
 void exportAllXMLFile()
          Export this job or transformation including all depending resources to a single zip file.
 void exportRepositoryAll()
           
 boolean exportRepositoryDirectory(RepositoryDirectory directoryToExport)
           
 boolean exportXMLFile()
           
 Job findActiveJob(Job job, JobEntryCopy jobEntryCopy)
           
 Trans findActiveTrans(Job job, JobEntryCopy jobEntryCopy)
           
 JobMeta findJob(String tabItemText)
           
 TransMeta findTransformation(String tabItemText)
           
 void fireMenuControlers()
           
 String fromClipboard()
           
 void generateFieldMapping(TransMeta transMeta, StepMeta stepMeta)
          Create a new SelectValues step in between this step and the previous.
 List<DatabaseMeta> getActiveDatabases()
           
 HasDatabasesInterface getActiveHasDatabasesInterface()
           
 JobMeta getActiveJob()
           
 JobGraph getActiveJobGraph()
           
 EngineMetaInterface getActiveMeta()
           
 TabItemInterface getActiveTabitem()
           
 String getActiveTabText()
           
 TransMeta getActiveTransformation()
           
 TransGraph getActiveTransGraph()
           
 UndoInterface getActiveUndoInterface()
           
 String[] getArguments()
           
static CommandLineOption[] getCommandLineArgs(List<String> args)
           
static CommandLineOption getCommandLineOption(CommandLineOption[] options, String opt)
           
 int getCoreObjectsState()
          Get the core object state.
 Object getData()
           
 RepositoryDirectoryInterface getDefaultSaveLocation(RepositoryElementInterface repositoryElement)
           
 Display getDisplay()
           
static Spoon getInstance()
           
 JobEntryDialogInterface getJobEntryDialog(JobEntryInterface jei, JobMeta jobMeta)
           
 JobExecutionConfiguration getJobExecutionConfiguration()
           
 String getLastFileOpened()
           
 JobMeta[] getLoadedJobs()
           
 TransMeta[] getLoadedTransformations()
           
 LogChannelInterface getLog()
           
 org.pentaho.ui.xul.XulDomContainer getMainSpoonContainer()
           
 String getName()
           
 PropsUI getProperties()
           
 Repository getRepository()
           
 String getRepositoryName()
           
 RepositorySecurityManager getSecurityManager()
           
 Object getSelectionObject()
           
 Shell getShell()
           
 void getSQL()
           
 StepDialogInterface getStepEntryDialog(StepMetaInterface stepMeta, TransMeta transMeta, String stepName)
           
 org.pentaho.xul.swt.tab.TabSet getTabSet()
           
 TransExecutionConfiguration getTransDebugExecutionConfiguration()
           
 TransExecutionConfiguration getTransExecutionConfiguration()
           
 TransExecutionConfiguration getTransPreviewExecutionConfiguration()
           
 TreeSelection[] getTreeObjects(Tree tree)
           
 org.pentaho.vfs.ui.VfsFileChooserDialog getVfsFileChooserDialog(org.apache.commons.vfs.FileObject rootFile, org.apache.commons.vfs.FileObject initialFile)
           
 org.pentaho.ui.xul.XulDomContainer getXulDomContainer()
           
 void handleStartOptions(CommandLineOption[] options)
           
 void helpAbout()
           
 void helpShowJobEntryPlugins()
          Show a dialog containing information on the different job entry plugins.
 void helpShowStepPlugins()
          Show a dialog containing information on the different step plugins.
 void hideSplash()
           
 void hideToolTips()
           
 void importDirectoryToRepository()
           
 void importFile()
           
 void init(TransMeta ti)
           
 boolean isDisposed()
           
 boolean isExecutionResultsPaneVisible()
           
 boolean isStopped()
           
 void lastFileSelect(String id)
           
 void loadObjectFromRepository(String objname, RepositoryObjectType objectType, RepositoryDirectoryInterface repdir, String versionLabel)
           
 void loadPerspective(int pos)
           
 void loadPerspective(String id)
           
 void loadRepositoryObjects(TransMeta transMeta)
           
 void loadSettings()
           
static void main(String[] a)
          This is the main procedure for Spoon.
 String makeTabName(EngineMetaInterface transMeta, boolean showingLocation)
           
 boolean messageBox(String message, String text, boolean allowCancel, int type)
           
 Object[] messageDialogWithToggle(String dialogTitle, Object image, String message, int dialogImageType, String[] buttonLabels, int defaultIndex, String toggleMessage, boolean toggleState)
           
 void monitorClusterSchema()
           
 void newClusteringSchema()
           
 void newClusteringSchema(TransMeta transMeta)
          This creates a new clustering schema, edits it and adds it to the transformation metadata
 void newConnection()
           
 void newDatabasePartitioningSchema()
           
 void newFileDropDown()
           
 void newHop()
           
 void newHop(TransMeta transMeta)
           
 void newHop(TransMeta transMeta, StepMeta fr, StepMeta to)
           
 void newHop(TransMeta transMeta, TransHopMeta transHopMeta)
           
 JobEntryCopy newJobEntry(JobMeta jobMeta, String typeDesc, boolean openit)
           
 void newJobFile()
           
 void newJobHop(JobMeta jobMeta, JobEntryCopy fr, JobEntryCopy to)
           
 void newPartitioningSchema(TransMeta transMeta)
          This creates a new partitioning schema, edits it and adds it to the transformation metadata
 void newSlaveServer()
           
 void newSlaveServer(HasSlaveServersInterface hasSlaveServersInterface)
          This creates a slave server, edits it and adds it to the transformation metadata
 void newStep()
           
 StepMeta newStep(TransMeta transMeta)
           
 StepMeta newStep(TransMeta transMeta, boolean openit, boolean rename)
           
 StepMeta newStep(TransMeta transMeta, String name, String description, boolean openit, boolean rename)
          Allocate new step, optionally open and rename it.
 void newTransFile()
           
 void open()
           
 void openFile()
           
 void openFile(boolean importfile)
           
 void openFile(String fname, boolean importfile)
           
 void openFileVFSFile()
           
 void openRepository()
           
 boolean overwritePrompt(String message, String rememberText, String rememberPropertyName)
           
 void paste()
           
 void pasteJob()
          Paste job from the clipboard...
 void pasteTransformation()
          Paste transformation from the clipboard...
 void pasteXML(JobMeta jobMeta, String clipcontent, Point loc)
           
 void pasteXML(TransMeta transMeta, String clipcontent, Point loc)
           
 boolean performNewTransHopChecks(TransMeta transMeta, TransHopMeta newHop)
           
 void previewFile()
           
 void previewTransformation()
           
 void printFile()
           
 boolean quitFile()
           
 boolean readAndDispatch()
           
 void redoAction()
           
 void redoAction(UndoInterface undoInterface)
           
 void refreshCoreObjects()
           
 void refreshGraph()
           
 void refreshTree()
          Refresh the object selection tree (on the left of the screen)
 void removePropertyChangeListener(PropertyChangeListener listener)
           
 boolean removeSpoonMenuController(ISpoonMenuController menuController)
           
 ISpoonMenuController removeSpoonMenuController(String menuControllerName)
           
 void replayTransformation()
           
 JobMeta ripDB(List<DatabaseMeta> databases, String jobName, RepositoryDirectory repdir, String directory, DatabaseMeta sourceDbInfo, DatabaseMeta targetDbInfo, String[] tables)
           
 void ripDBWizard()
          Create a job that extracts tables & data from a database.
 void runFile()
           
 boolean save(EngineMetaInterface meta, String fname, boolean export)
           
 boolean saveFile()
           
 boolean saveFileAs()
           
 boolean saveFileAs(EngineMetaInterface meta)
           
 boolean saveJobRepository(JobMeta jobMeta)
           
 boolean saveJobRepository(JobMeta jobMeta, boolean ask_name)
           
 boolean saveMeta(EngineMetaInterface meta, String fname)
           
 void saveSettings()
           
 boolean saveToFile(EngineMetaInterface meta)
           
 boolean saveToRepository(EngineMetaInterface meta)
           
 boolean saveToRepository(EngineMetaInterface meta, boolean ask_name)
           
 boolean saveXMLFile(boolean export)
           
 boolean saveXMLFile(EngineMetaInterface meta, boolean export)
           
 boolean saveXMLFileToVfs()
           
 boolean saveXMLFileToVfs(EngineMetaInterface meta)
           
 void searchMetaData()
          Search the transformation meta-data.
 void selectRep(CommandLineOption[] options)
           
 void sendTransformationXMLToSlaveServer(TransMeta transMeta, TransExecutionConfiguration executionConfiguration)
          Sends transformation to slave server
 void setArguments(String[] arguments)
           
 void setCoreObjectsState(int state)
          Set the core object state.
 void setData(Object arg0)
           
 boolean setDesignMode()
           
 void setDestroy(boolean destroy)
           
 void setJobExecutionConfiguration(JobExecutionConfiguration jobExecutionConfiguration)
           
 void setJobMetaVariables(JobMeta jobMeta)
          Set previously defined variables (set variables dialog) on the specified job
 void setLastFileOpened(String inLastFileOpened)
           
 void setLog()
           
 void setName(String arg0)
           
 void setParametersAsVariablesInUI(NamedParams namedParameters, VariableSpace space)
           
 void setRepository(Repository rep)
           
 void setShellText()
           
 void setStopped(boolean stopped)
           
 void setTransDebugExecutionConfiguration(TransExecutionConfiguration debugExecutionConfiguration)
           
 void setTransExecutionConfiguration(TransExecutionConfiguration executionConfiguration)
           
 void setTransMetaVariables(TransMeta transMeta)
          Set previously defined variables (set variables dialog) on the specified transformation
 void setTransPreviewExecutionConfiguration(TransExecutionConfiguration previewExecutionConfiguration)
           
 void setUndoMenu(UndoInterface undoInterface)
          Sets the text and enabled settings for the undo and redo menu items
 void setVariables()
           
 boolean setViewMode()
           
 void setXulDomContainer(org.pentaho.ui.xul.XulDomContainer arg0)
           
 void shareObject(String id)
           
 void showArguments()
           
 void showExecutionResults()
           
 void showLastImpactAnalyses()
           
 void showLastImpactAnalyses(TransMeta transMeta)
           
 void showLastTransCheck()
          Show the remarks of the last transformation check that was run.
 void showLastTransPreview()
           
 void showSelection()
          If you click in the tree, you might want to show the corresponding window.
 void showTips()
           
 void showVariables()
           
 void showWelcomePage()
           
 void sleep()
           
 void sortHops()
           
 void sqlConnection()
           
 void start(CommandLineOption[] options)
           
 boolean tabClose(org.pentaho.xul.swt.tab.TabItem item)
           
 void tabDeselected(org.pentaho.xul.swt.tab.TabItem item)
           
 void tabSelected(org.pentaho.xul.swt.tab.TabItem item)
           
 void toClipboard(String cliptext)
           
 String toString()
           
 void undoAction()
           
 void undoAction(UndoInterface undoInterface)
           
 void update(ChangedFlagInterface o, Object arg)
           
 void verifyCopyDistribute(TransMeta transMeta, StepMeta fr)
           
 void zoom100Percent()
           
 void zoomIn()
           
 void zoomOut()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

loggingObject

public static final LoggingObjectInterface loggingObject

STRING_TRANSFORMATIONS

public static final String STRING_TRANSFORMATIONS

STRING_JOBS

public static final String STRING_JOBS

STRING_BUILDING_BLOCKS

public static final String STRING_BUILDING_BLOCKS

STRING_ELEMENTS

public static final String STRING_ELEMENTS

STRING_CONNECTIONS

public static final String STRING_CONNECTIONS

STRING_STEPS

public static final String STRING_STEPS

STRING_JOB_ENTRIES

public static final String STRING_JOB_ENTRIES

STRING_HOPS

public static final String STRING_HOPS

STRING_PARTITIONS

public static final String STRING_PARTITIONS

STRING_SLAVES

public static final String STRING_SLAVES

STRING_CLUSTERS

public static final String STRING_CLUSTERS

STRING_TRANS_BASE

public static final String STRING_TRANS_BASE

STRING_JOB_BASE

public static final String STRING_JOB_BASE

STRING_HISTORY

public static final String STRING_HISTORY

STRING_TRANS_NO_NAME

public static final String STRING_TRANS_NO_NAME

STRING_JOB_NO_NAME

public static final String STRING_JOB_NO_NAME

STRING_TRANSFORMATION

public static final String STRING_TRANSFORMATION

STRING_JOB

public static final String STRING_JOB

APP_NAME

public static final String APP_NAME

tabfolder

public org.pentaho.xul.swt.tab.TabSet tabfolder

delegates

public SpoonDelegates delegates

variables

public RowMetaAndData variables

props

public PropsUI props

rep

public Repository rep

capabilities

public RepositoryCapabilities capabilities

selectionFilter

public Text selectionFilter

sharedObjectsFileMap

public Map<String,SharedObjects> sharedObjectsFileMap

lastDirOpened

public String lastDirOpened
We can use this to set a default filter path in the open and save dialogs


XUL_FILE_MAIN

public static final String XUL_FILE_MAIN
See Also:
Constant Field Values

XML_TAG_TRANSFORMATION_STEPS

public static final String XML_TAG_TRANSFORMATION_STEPS
See Also:
Constant Field Values

XML_TAG_JOB_JOB_ENTRIES

public static final String XML_TAG_JOB_JOB_ENTRIES
See Also:
Constant Field Values

showTrans

public boolean showTrans

showJob

public boolean showJob
Constructor Detail

Spoon

public Spoon(Display d)

Spoon

public Spoon(Display d,
             Repository rep)
Method Detail

main

public static void main(String[] a)
                 throws KettleException
This is the main procedure for Spoon.

Parameters:
a - Arguments are available in the "Get System Info" step.
Throws:
KettleException

init

public void init(TransMeta ti)

getMainSpoonContainer

public org.pentaho.ui.xul.XulDomContainer getMainSpoonContainer()

loadPerspective

public void loadPerspective(String id)

loadPerspective

public void loadPerspective(int pos)

getShell

public Shell getShell()

getInstance

public static Spoon getInstance()

getVfsFileChooserDialog

public org.pentaho.vfs.ui.VfsFileChooserDialog getVfsFileChooserDialog(org.apache.commons.vfs.FileObject rootFile,
                                                                       org.apache.commons.vfs.FileObject initialFile)

closeFile

public void closeFile()

closeAllFiles

public void closeAllFiles()

closeSpoonBrowser

public void closeSpoonBrowser()

searchMetaData

public void searchMetaData()
Search the transformation meta-data.


showArguments

public void showArguments()

setVariables

public void setVariables()

applyVariables

public void applyVariables()

applyVariableToAllLoadedObjects

public void applyVariableToAllLoadedObjects(String name,
                                            String value)

showVariables

public void showVariables()

open

public void open()

readAndDispatch

public boolean readAndDispatch()

isStopped

public boolean isStopped()
Returns:
check whether or not the application was stopped.

setStopped

public void setStopped(boolean stopped)
Parameters:
stopped - True to stop this application.

setDestroy

public void setDestroy(boolean destroy)
Parameters:
destroy - Whether or not to distroy the display.

doDestroy

public boolean doDestroy()
Returns:
Returns whether or not we should distroy the display.

setArguments

public void setArguments(String[] arguments)
Parameters:
arguments - The arguments to set.

getArguments

public String[] getArguments()
Returns:
Returns the arguments.

dispose

public void dispose()

isDisposed

public boolean isDisposed()

sleep

public void sleep()

undoAction

public void undoAction()

redoAction

public void redoAction()

copySteps

public void copySteps()
It's called copySteps, but the job entries also arrive at this location


copyJobentries

public void copyJobentries()

copy

public void copy()

copyFile

public void copyFile()

cut

public void cut()

createPopupMenus

public void createPopupMenus()

executeTransformation

public void executeTransformation()

previewTransformation

public void previewTransformation()

debugTransformation

public void debugTransformation()

checkTrans

public void checkTrans()

analyseImpact

public void analyseImpact()

showLastImpactAnalyses

public void showLastImpactAnalyses()

showLastTransPreview

public void showLastTransPreview()

showExecutionResults

public void showExecutionResults()

isExecutionResultsPaneVisible

public boolean isExecutionResultsPaneVisible()

copyTransformation

public void copyTransformation()

copyTransformationImage

public void copyTransformationImage()

editTransformationProperties

public boolean editTransformationProperties()

editProperties

public boolean editProperties()

executeJob

public void executeJob()

copyJob

public void copyJob()

showTips

public void showTips()

showWelcomePage

public void showWelcomePage()

addMenuLast

public void addMenuLast()

lastFileSelect

public void lastFileSelect(String id)

addDefaultKeyListeners

public void addDefaultKeyListeners(Control control)

setViewMode

public boolean setViewMode()

setDesignMode

public boolean setDesignMode()

disposeVariableComposite

public void disposeVariableComposite(boolean tree,
                                     boolean shared,
                                     boolean core,
                                     boolean history)

addCoreObjectsTree

public void addCoreObjectsTree()

refreshCoreObjects

public void refreshCoreObjects()

getTreeObjects

public TreeSelection[] getTreeObjects(Tree tree)
Returns:
The object that is selected in the tree or null if we couldn't figure it out. (titles etc. == null)

hideToolTips

public void hideToolTips()

showSelection

public void showSelection()
If you click in the tree, you might want to show the corresponding window.


newHop

public void newHop()

sortHops

public void sortHops()

newDatabasePartitioningSchema

public void newDatabasePartitioningSchema()

newClusteringSchema

public void newClusteringSchema()

newSlaveServer

public void newSlaveServer()

editTransformationPropertiesPopup

public void editTransformationPropertiesPopup()

addTransLog

public void addTransLog()

addTransHistory

public void addTransHistory()

editJobProperties

public boolean editJobProperties(String id)

editJobPropertiesPopup

public void editJobPropertiesPopup()

addJobLog

public void addJobLog()

addJobHistory

public void addJobHistory()

newStep

public void newStep()

editConnection

public void editConnection()

dupeConnection

public void dupeConnection()

clipConnection

public void clipConnection()

delConnection

public void delConnection()

sqlConnection

public void sqlConnection()

clearDBCache

public void clearDBCache(String id)

exploreDatabase

public void exploreDatabase()

exploreDB

public void exploreDB()

editStep

public void editStep()

dupeStep

public void dupeStep()

delStep

public void delStep()

shareObject

public void shareObject(String id)

editJobEntry

public void editJobEntry()

dupeJobEntry

public void dupeJobEntry()

deleteJobEntryCopies

public void deleteJobEntryCopies()

editHop

public void editHop()

delHop

public void delHop()

editPartitionSchema

public void editPartitionSchema()

delPartitionSchema

public void delPartitionSchema()

editClusterSchema

public void editClusterSchema()

delClusterSchema

public void delClusterSchema()

monitorClusterSchema

public void monitorClusterSchema()
                          throws KettleException
Throws:
KettleException

editSlaveServer

public void editSlaveServer()

delSlaveServer

public void delSlaveServer()

addSpoonSlave

public void addSpoonSlave()

tabDeselected

public void tabDeselected(org.pentaho.xul.swt.tab.TabItem item)
Specified by:
tabDeselected in interface org.pentaho.xul.swt.tab.TabListener

tabClose

public boolean tabClose(org.pentaho.xul.swt.tab.TabItem item)
Specified by:
tabClose in interface org.pentaho.xul.swt.tab.TabListener

getTabSet

public org.pentaho.xul.swt.tab.TabSet getTabSet()

tabSelected

public void tabSelected(org.pentaho.xul.swt.tab.TabItem item)
Specified by:
tabSelected in interface org.pentaho.xul.swt.tab.TabListener

getRepositoryName

public String getRepositoryName()

pasteXML

public void pasteXML(TransMeta transMeta,
                     String clipcontent,
                     Point loc)

copySelected

public void copySelected(TransMeta transMeta,
                         List<StepMeta> steps,
                         List<NotePadMeta> notes)

editHop

public void editHop(TransMeta transMeta,
                    TransHopMeta transHopMeta)

delHop

public void delHop(TransMeta transMeta,
                   TransHopMeta transHopMeta)

newHop

public void newHop(TransMeta transMeta,
                   StepMeta fr,
                   StepMeta to)

newHop

public void newHop(TransMeta transMeta,
                   TransHopMeta transHopMeta)

checkIfHopAlreadyExists

public boolean checkIfHopAlreadyExists(TransMeta transMeta,
                                       TransHopMeta newHop)
Parameters:
transMeta -
newHop -
Returns:
true when the hop was added, false if there was an error

performNewTransHopChecks

public boolean performNewTransHopChecks(TransMeta transMeta,
                                        TransHopMeta newHop)
Parameters:
transMeta -
newHop -
Returns:
true when the hop was added, false if there was an error

verifyCopyDistribute

public void verifyCopyDistribute(TransMeta transMeta,
                                 StepMeta fr)

newHop

public void newHop(TransMeta transMeta)

openRepository

public void openRepository()

clearSharedObjectCache

public void clearSharedObjectCache()
                            throws KettleException
Throws:
KettleException

exploreRepository

public void exploreRepository()

loadObjectFromRepository

public void loadObjectFromRepository(String objname,
                                     RepositoryObjectType objectType,
                                     RepositoryDirectoryInterface repdir,
                                     String versionLabel)

closeRepository

public void closeRepository()

openFile

public void openFile()

importFile

public void importFile()

openFile

public void openFile(boolean importfile)

getLastFileOpened

public String getLastFileOpened()

setLastFileOpened

public void setLastFileOpened(String inLastFileOpened)

displayCmdLine

public void displayCmdLine()

createCmdLineFile

public void createCmdLineFile()

openFileVFSFile

public void openFileVFSFile()

addFileListener

public void addFileListener(FileListener listener)

openFile

public void openFile(String fname,
                     boolean importfile)

getProperties

public PropsUI getProperties()

newFileDropDown

public void newFileDropDown()

newTransFile

public void newTransFile()

newJobFile

public void newJobFile()

setTransMetaVariables

public void setTransMetaVariables(TransMeta transMeta)
Set previously defined variables (set variables dialog) on the specified transformation

Parameters:
transMeta -

setJobMetaVariables

public void setJobMetaVariables(JobMeta jobMeta)
Set previously defined variables (set variables dialog) on the specified job

Parameters:
jobMeta -

loadRepositoryObjects

public void loadRepositoryObjects(TransMeta transMeta)

quitFile

public boolean quitFile()
                 throws KettleException
Throws:
KettleException

saveFile

public boolean saveFile()

saveToFile

public boolean saveToFile(EngineMetaInterface meta)
                   throws KettleException
Throws:
KettleException

saveToRepository

public boolean saveToRepository(EngineMetaInterface meta)
                         throws KettleException
Throws:
KettleException

saveToRepository

public boolean saveToRepository(EngineMetaInterface meta,
                                boolean ask_name)
                         throws KettleException
Throws:
KettleException

saveJobRepository

public boolean saveJobRepository(JobMeta jobMeta)
                          throws KettleException
Throws:
KettleException

saveJobRepository

public boolean saveJobRepository(JobMeta jobMeta,
                                 boolean ask_name)
                          throws KettleException
Throws:
KettleException

saveFileAs

public boolean saveFileAs()
                   throws KettleException
Throws:
KettleException

saveFileAs

public boolean saveFileAs(EngineMetaInterface meta)
                   throws KettleException
Throws:
KettleException

exportXMLFile

public boolean exportXMLFile()

exportAllXMLFile

public void exportAllXMLFile()
Export this job or transformation including all depending resources to a single zip file.


exportAllFileRepository

public void exportAllFileRepository()
Export this job or transformation including all depending resources to a single ZIP file containing a file repository.


exportRepositoryAll

public void exportRepositoryAll()

exportRepositoryDirectory

public boolean exportRepositoryDirectory(RepositoryDirectory directoryToExport)
Parameters:
directoryToExport - set to null to export the complete repository
Returns:
false if we want to stop processing. true if we need to continue.

importDirectoryToRepository

public void importDirectoryToRepository()

saveXMLFile

public boolean saveXMLFile(boolean export)

saveXMLFile

public boolean saveXMLFile(EngineMetaInterface meta,
                           boolean export)

saveXMLFileToVfs

public boolean saveXMLFileToVfs()

saveXMLFileToVfs

public boolean saveXMLFileToVfs(EngineMetaInterface meta)

save

public boolean save(EngineMetaInterface meta,
                    String fname,
                    boolean export)

saveMeta

public boolean saveMeta(EngineMetaInterface meta,
                        String fname)

helpAbout

public void helpAbout()

helpShowStepPlugins

public void helpShowStepPlugins()
Show a dialog containing information on the different step plugins.


helpShowJobEntryPlugins

public void helpShowJobEntryPlugins()
Show a dialog containing information on the different job entry plugins.


editUnselectAll

public void editUnselectAll()

editSelectAll

public void editSelectAll()

editOptions

public void editOptions()

editKettlePropertiesFile

public void editKettlePropertiesFile()

refreshTree

public void refreshTree()
Refresh the object selection tree (on the left of the screen)


getActiveTabText

public String getActiveTabText()

refreshGraph

public void refreshGraph()

newStep

public StepMeta newStep(TransMeta transMeta)

newStep

public StepMeta newStep(TransMeta transMeta,
                        boolean openit,
                        boolean rename)

newStep

public StepMeta newStep(TransMeta transMeta,
                        String name,
                        String description,
                        boolean openit,
                        boolean rename)
Allocate new step, optionally open and rename it.

Parameters:
name - Name of the new step
description - Description of the type of step
openit - Open the dialog for this step?
rename - Rename this step?
Returns:
The newly created StepMeta object.

setShellText

public void setShellText()

enableMenus

public void enableMenus()

addSpoonMenuController

public void addSpoonMenuController(ISpoonMenuController menuController)

removeSpoonMenuController

public boolean removeSpoonMenuController(ISpoonMenuController menuController)

removeSpoonMenuController

public ISpoonMenuController removeSpoonMenuController(String menuControllerName)

printFile

public void printFile()

getActiveTransGraph

public TransGraph getActiveTransGraph()

getActiveJobGraph

public JobGraph getActiveJobGraph()

getActiveMeta

public EngineMetaInterface getActiveMeta()

getActiveTabitem

public TabItemInterface getActiveTabitem()

getActiveTransformation

public TransMeta getActiveTransformation()
Returns:
The active TransMeta object by looking at the selected TransGraph, TransLog, TransHist If nothing valueable is selected, we return null

getActiveJob

public JobMeta getActiveJob()
Returns:
The active JobMeta object by looking at the selected JobGraph, JobLog, JobHist If nothing valueable is selected, we return null

getActiveUndoInterface

public UndoInterface getActiveUndoInterface()

findTransformation

public TransMeta findTransformation(String tabItemText)

findJob

public JobMeta findJob(String tabItemText)

getLoadedTransformations

public TransMeta[] getLoadedTransformations()

getLoadedJobs

public JobMeta[] getLoadedJobs()

saveSettings

public void saveSettings()

loadSettings

public void loadSettings()

changeLooks

public void changeLooks()

undoAction

public void undoAction(UndoInterface undoInterface)

redoAction

public void redoAction(UndoInterface undoInterface)

setUndoMenu

public void setUndoMenu(UndoInterface undoInterface)
Sets the text and enabled settings for the undo and redo menu items

Parameters:
undoInterface - the object which holds the undo/redo information

addUndoNew

public void addUndoNew(UndoInterface undoInterface,
                       Object[] obj,
                       int[] position)

addUndoNew

public void addUndoNew(UndoInterface undoInterface,
                       Object[] obj,
                       int[] position,
                       boolean nextAlso)

addUndoDelete

public void addUndoDelete(UndoInterface undoInterface,
                          Object[] obj,
                          int[] position)

addUndoDelete

public void addUndoDelete(UndoInterface undoInterface,
                          Object[] obj,
                          int[] position,
                          boolean nextAlso)

addUndoPosition

public void addUndoPosition(UndoInterface undoInterface,
                            Object[] obj,
                            int[] pos,
                            Point[] prev,
                            Point[] curr)
Specified by:
addUndoPosition in interface AddUndoPositionInterface

addUndoChange

public void addUndoChange(UndoInterface undoInterface,
                          Object[] from,
                          Object[] to,
                          int[] pos)

addUndoChange

public void addUndoChange(UndoInterface undoInterface,
                          Object[] from,
                          Object[] to,
                          int[] pos,
                          boolean nextAlso)

checkTrans

public void checkTrans(TransMeta transMeta)
Checks *all* the steps in the transformation, puts the result in remarks list


checkTrans

public void checkTrans(TransMeta transMeta,
                       boolean only_selected)
Check the steps in a transformation

Parameters:
only_selected - True: Check only the selected steps...

showLastTransCheck

public void showLastTransCheck()
Show the remarks of the last transformation check that was run.

See Also:
checkTrans()

analyseImpact

public void analyseImpact(TransMeta transMeta)

showLastImpactAnalyses

public void showLastImpactAnalyses(TransMeta transMeta)

toClipboard

public void toClipboard(String cliptext)

fromClipboard

public String fromClipboard()

pasteTransformation

public void pasteTransformation()
Paste transformation from the clipboard...


pasteJob

public void pasteJob()
Paste job from the clipboard...


copyTransformation

public void copyTransformation(TransMeta transMeta)

copyJob

public void copyJob(JobMeta jobMeta)

copyTransformationImage

public void copyTransformationImage(TransMeta transMeta)

getActiveHasDatabasesInterface

public HasDatabasesInterface getActiveHasDatabasesInterface()
Returns:
Either a TransMeta or JobMeta object

createDatabaseWizard

public void createDatabaseWizard()
Shows a wizard that creates a new database connection...


getActiveDatabases

public List<DatabaseMeta> getActiveDatabases()

copyTableWizard

public void copyTableWizard()
Create a transformation that extracts tables & data from a database.

0) Select the database to rip

1) Select the table in the database to copy

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 transformation

6) Create 1 transformation for the selected table


toString

public String toString()
Overrides:
toString in class Object

selectRep

public void selectRep(CommandLineOption[] options)

handleStartOptions

public void handleStartOptions(CommandLineOption[] options)

start

public void start(CommandLineOption[] options)
           throws KettleException
Throws:
KettleException

getCommandLineOption

public static CommandLineOption getCommandLineOption(CommandLineOption[] options,
                                                     String opt)

getCommandLineArgs

public static CommandLineOption[] getCommandLineArgs(List<String> args)

generateFieldMapping

public void generateFieldMapping(TransMeta transMeta,
                                 StepMeta stepMeta)
Create a new SelectValues step in between this step and the previous. If the previous fields are not there, no mapping can be made, same with the required fields.

Parameters:
stepMeta - The target step to map against.

editPartitioning

public void editPartitioning(TransMeta transMeta,
                             StepMeta stepMeta)

editClustering

public void editClustering(TransMeta transMeta,
                           StepMeta stepMeta)
Select a clustering schema for this step.

Parameters:
stepMeta - The step to set the clustering schema for.

editClustering

public void editClustering(TransMeta transMeta,
                           List<StepMeta> stepMetas)
Select a clustering schema for this step.

Parameters:
stepMeta - The steps (at least one!) to set the clustering schema for.

createKettleArchive

public void createKettleArchive(TransMeta transMeta)

newPartitioningSchema

public void newPartitioningSchema(TransMeta transMeta)
This creates a new partitioning schema, edits it and adds it to the transformation metadata


newClusteringSchema

public void newClusteringSchema(TransMeta transMeta)
This creates a new clustering schema, edits it and adds it to the transformation metadata


newSlaveServer

public void newSlaveServer(HasSlaveServersInterface hasSlaveServersInterface)
This creates a slave server, edits it and adds it to the transformation metadata


delSlaveServer

public void delSlaveServer(HasSlaveServersInterface hasSlaveServersInterface,
                           SlaveServer slaveServer)

sendTransformationXMLToSlaveServer

public void sendTransformationXMLToSlaveServer(TransMeta transMeta,
                                               TransExecutionConfiguration executionConfiguration)
Sends transformation to slave server

Parameters:
executionConfiguration -

runFile

public void runFile()

replayTransformation

public void replayTransformation()

previewFile

public void previewFile()

debugFile

public void debugFile()

executeFile

public void executeFile(boolean local,
                        boolean remote,
                        boolean cluster,
                        boolean preview,
                        boolean debug,
                        Date replayDate,
                        boolean safe)

executeTransformation

public void executeTransformation(TransMeta transMeta,
                                  boolean local,
                                  boolean remote,
                                  boolean cluster,
                                  boolean preview,
                                  boolean debug,
                                  Date replayDate,
                                  boolean safe)

executeJob

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

addSpoonSlave

public void addSpoonSlave(SlaveServer slaveServer)

addJobHistory

public void addJobHistory(JobMeta jobMeta,
                          boolean select)

paste

public void paste()

newJobEntry

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

getJobEntryDialog

public JobEntryDialogInterface getJobEntryDialog(JobEntryInterface jei,
                                                 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)

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,
                     RepositoryDirectory repdir,
                     String directory,
                     DatabaseMeta sourceDbInfo,
                     DatabaseMeta targetDbInfo,
                     String[] tables)

setCoreObjectsState

public void setCoreObjectsState(int state)
Set the core object state.

Parameters:
state -

getCoreObjectsState

public int getCoreObjectsState()
Get the core object state.

Returns:
state.

getLog

public LogChannelInterface getLog()

getRepository

public Repository getRepository()

setRepository

public void setRepository(Repository rep)

addMenuListener

public void addMenuListener(String id,
                            Object listener,
                            String methodName)

addTransGraph

public void addTransGraph(TransMeta transMeta)
Specified by:
addTransGraph in interface SpoonInterface

addJobGraph

public void addJobGraph(JobMeta jobMeta)

addSpoonBrowser

public boolean addSpoonBrowser(String name,
                               String urlString,
                               LocationListener locationListener)

addSpoonBrowser

public boolean addSpoonBrowser(String name,
                               String urlString)
Specified by:
addSpoonBrowser in interface SpoonInterface

getTransExecutionConfiguration

public TransExecutionConfiguration getTransExecutionConfiguration()

messageDialogWithToggle

public Object[] messageDialogWithToggle(String dialogTitle,
                                        Object image,
                                        String message,
                                        int dialogImageType,
                                        String[] buttonLabels,
                                        int defaultIndex,
                                        String toggleMessage,
                                        boolean toggleState)
Specified by:
messageDialogWithToggle in interface SpoonInterface

editStepErrorHandling

public void editStepErrorHandling(TransMeta transMeta,
                                  StepMeta stepMeta)

editStep

public String editStep(TransMeta transMeta,
                       StepMeta stepMeta)

dupeStep

public void dupeStep(TransMeta transMeta,
                     StepMeta stepMeta)

delStep

public void delStep(TransMeta transMeta,
                    StepMeta stepMeta)

makeTabName

public String makeTabName(EngineMetaInterface transMeta,
                          boolean showingLocation)

newConnection

public void newConnection()

getSQL

public void getSQL()

overwritePrompt

public boolean overwritePrompt(String message,
                               String rememberText,
                               String rememberPropertyName)
Specified by:
overwritePrompt in interface OverwritePrompter

messageBox

public boolean messageBox(String message,
                          String text,
                          boolean allowCancel,
                          int type)
Specified by:
messageBox in interface SpoonInterface

getTransPreviewExecutionConfiguration

public TransExecutionConfiguration getTransPreviewExecutionConfiguration()
Returns:
the previewExecutionConfiguration

setTransPreviewExecutionConfiguration

public void setTransPreviewExecutionConfiguration(TransExecutionConfiguration previewExecutionConfiguration)
Parameters:
previewExecutionConfiguration - the previewExecutionConfiguration to set

getTransDebugExecutionConfiguration

public TransExecutionConfiguration getTransDebugExecutionConfiguration()
Returns:
the debugExecutionConfiguration

setTransDebugExecutionConfiguration

public void setTransDebugExecutionConfiguration(TransExecutionConfiguration debugExecutionConfiguration)
Parameters:
debugExecutionConfiguration - the debugExecutionConfiguration to set

setTransExecutionConfiguration

public void setTransExecutionConfiguration(TransExecutionConfiguration executionConfiguration)
Parameters:
executionConfiguration - the executionConfiguration to set

getJobExecutionConfiguration

public JobExecutionConfiguration getJobExecutionConfiguration()
Returns:
the jobExecutionConfiguration

setJobExecutionConfiguration

public void setJobExecutionConfiguration(JobExecutionConfiguration jobExecutionConfiguration)
Parameters:
jobExecutionConfiguration - the jobExecutionConfiguration to set

update

public void update(ChangedFlagInterface o,
                   Object arg)
Specified by:
update in interface PDIObserver

consume

public void consume(LifeEventInfo info)
Specified by:
consume in interface LifeEventHandler

setLog

public void setLog()

getDisplay

public Display getDisplay()
Returns:
the display

zoomIn

public void zoomIn()

zoomOut

public void zoomOut()

zoom100Percent

public void zoom100Percent()

setParametersAsVariablesInUI

public void setParametersAsVariablesInUI(NamedParams namedParameters,
                                         VariableSpace space)

browseVersionHistory

public void browseVersionHistory()

findActiveTrans

public Trans findActiveTrans(Job job,
                             JobEntryCopy jobEntryCopy)

findActiveJob

public Job findActiveJob(Job job,
                         JobEntryCopy jobEntryCopy)

getSelectionObject

public Object getSelectionObject()

getDefaultSaveLocation

public RepositoryDirectoryInterface getDefaultSaveLocation(RepositoryElementInterface repositoryElement)

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Specified by:
addPropertyChangeListener in interface org.pentaho.ui.xul.XulEventSource

addPropertyChangeListener

public void addPropertyChangeListener(String propertyName,
                                      PropertyChangeListener listener)

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Specified by:
removePropertyChangeListener in interface org.pentaho.ui.xul.XulEventSource

getData

public Object getData()
Specified by:
getData in interface org.pentaho.ui.xul.impl.XulEventHandler

getName

public String getName()
Specified by:
getName in interface org.pentaho.ui.xul.impl.XulEventHandler

getXulDomContainer

public org.pentaho.ui.xul.XulDomContainer getXulDomContainer()
Specified by:
getXulDomContainer in interface org.pentaho.ui.xul.impl.XulEventHandler

setData

public void setData(Object arg0)
Specified by:
setData in interface org.pentaho.ui.xul.impl.XulEventHandler

setName

public void setName(String arg0)
Specified by:
setName in interface org.pentaho.ui.xul.impl.XulEventHandler

setXulDomContainer

public void setXulDomContainer(org.pentaho.ui.xul.XulDomContainer arg0)
Specified by:
setXulDomContainer in interface org.pentaho.ui.xul.impl.XulEventHandler

getSecurityManager

public RepositorySecurityManager getSecurityManager()

displayDbDependancies

public void displayDbDependancies()

fireMenuControlers

public void fireMenuControlers()

hideSplash

public void hideSplash()