org.pentaho.di.ui.spoon.job
Class JobGraph

java.lang.Object
  extended by Composite
      extended by org.pentaho.di.ui.spoon.AbstractGraph
          extended by org.pentaho.di.ui.spoon.job.JobGraph
All Implemented Interfaces:
Redrawable, LogParentProvidedInterface, TabItemInterface, org.pentaho.ui.xul.impl.XulEventHandler

public class JobGraph
extends AbstractGraph
implements org.pentaho.ui.xul.impl.XulEventHandler, Redrawable, TabItemInterface, LogParentProvidedInterface

Handles the display of Jobs in Spoon, in a graphical form.

Author:
Matt Created on 17-may-2003

Field Summary
 Composite extraViewComposite
           
 CTabFolder extraViewTabFolder
           
 Job job
           
 JobGridDelegate jobGridDelegate
           
 JobHistoryDelegate jobHistoryDelegate
           
 JobLogDelegate jobLogDelegate
           
static String START_TEXT
           
static String STOP_TEXT
           
 
Constructor Summary
JobGraph(Composite par, Spoon spoon, JobMeta jobMeta)
           
 
Method Summary
 void addAllTabs()
           
 void addExtraView()
          Add an extra view to the main composite SashForm
 void addRefreshListener(RefreshListener refreshListener)
           
 void addUndoPosition(Object[] obj, int[] pos, Point[] prev, Point[] curr)
           
 void addUndoPosition(Object[] obj, int[] pos, Point[] prev, Point[] curr, boolean nextAlso)
           
 void allignbottom()
           
 void allignleft()
           
 void allignright()
           
 void alligntop()
           
 boolean applyChanges()
           
 void browseVersionHistory()
           
 boolean canBeClosed()
          Closes the content behind the tab, de-allocates resources.
 boolean canHandleSave()
           
 void checkEmptyExtraView()
          If the extra tab view at the bottom is empty, we close it.
 void clearSelection()
           
 void clearSettings()
           
 void copyEntry()
           
static void copyInternalJobVariables(JobMeta sourceJobMeta, TransMeta targetTransMeta)
           
 void deleteEntry()
           
 void deleteHop()
           
 void deleteNote()
           
 void delSelected()
           
 void detachEntry()
           
 void disableHop()
           
 void disableHopsBetweenSelectedEntries()
           
 void disableHopsDownstream()
           
 void distributehorizontal()
           
 void distributevertical()
           
 void duplicateEntry()
           
 void editEntryClick()
           
 void editEntryDescription()
           
 void editEntryParallel()
          Go from serial to parallel to serial execution
 void editJobProperties()
           
 void editNote()
           
static boolean editProperties(JobMeta jobMeta, Spoon spoon, Repository rep, boolean allowDirectoryChange)
           
 void enableDisableHopsDownstream(boolean enabled)
           
 void enableHopsBetweenSelectedEntries()
           
 void enableHopsBetweenSelectedEntries(boolean enabled)
          This method enables or disables all the hops between the selected Entries.
 void enableHopsDownstream()
           
 void exploreDatabase()
           
 void flipHop()
           
 NotePadMeta getCurrentNote()
           
 JobEntryCopy getJobEntry()
           
 Image getJobImage(Device device, int x, int y, float magnificationFactor)
           
 Point getLastMove()
           
 HasLogChannelInterface getLogChannelProvider()
           
 JobMeta getManagedObject()
           
 EngineMetaInterface getMeta()
           
 String getName()
           
 Point getRealPosition(Composite canvas, int x, int y)
           
 List<RefreshListener> getRefreshListeners()
           
 void getSQL()
           
 AreaOwner getVisibleAreaOwner(int x, int y)
           
 org.pentaho.ui.xul.XulDomContainer getXulDomContainer()
           
 boolean hasContentChanged()
           
 void hideEntry()
           
 boolean isExecutionResultsPaneVisible()
           
 void keyPressed(KeyEvent e)
           
 void keyReleased(KeyEvent e)
           
 void launchStuff()
           
 void launchStuff(JobEntryCopy jobEntryCopy)
           
 void lowerNote()
           
 void mouseDoubleClick(MouseEvent e)
           
 void mouseDown(MouseEvent e)
           
 void mouseEnter(MouseEvent event)
           
 void mouseExit(MouseEvent event)
           
 void mouseHover(MouseEvent e)
           
 void mouseMove(MouseEvent e)
           
 void mouseScrolled(MouseEvent e)
           
 void mouseUp(MouseEvent e)
           
 void newHopClick()
           
 void newNote()
           
 void newProps()
           
 void openFile()
           
 void openJob()
           
 void openJob(JobEntryJob entry, JobEntryCopy jobEntryCopy)
           
 void openTransformation()
           
 void paintControl(PaintEvent e)
           
 void pasteNote()
           
 void printFile()
           
 void raiseNote()
           
 void renameJobEntry(JobEntryCopy jobEntry, String newName)
          Method gets called, when the user wants to change a job entries name and he indeed entered a different name then the old one.
 void replayJob()
           
 void runJob()
           
 void saveFile()
           
 void saveFileAs()
           
 void saveXMLFileToVfs()
           
 void selectAll()
           
 void selectInRect(JobMeta jobMeta, Rectangle rect)
           
 void setControlStates()
           
 void setCurrentNote(NotePadMeta ni)
           
 boolean setFocus()
           
 void setHopEvaluationFalse()
           
 void setHopEvaluationTrue()
           
 void setHopUnconditional()
           
 void setJobEntry(JobEntryCopy jobEntry)
           
 void setJobMeta(JobMeta jobMeta)
           
 void setLastMove(Point lastMove)
           
 void setName(String name)
           
 void setRefreshListeners(List<RefreshListener> refreshListeners)
           
 void setXulDomContainer(org.pentaho.ui.xul.XulDomContainer xulDomContainer)
           
 int showChangedWarning()
           
static int showChangedWarning(Shell shell, String name)
           
 void showExecutionResults()
           
static void showOnlyStartOnceMessage(Shell shell)
           
 void snaptogrid()
           
 void startJob(JobExecutionConfiguration executionConfiguration)
           
 void stopJob()
           
 String toString()
           
 
Methods inherited from class org.pentaho.di.ui.spoon.AbstractGraph
dispose, forceFocus, getChangedWarning, real2screen, redraw, screen2real, showChangedWarning, sign, zoom100Percent, zoomIn, zoomOut
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.pentaho.ui.xul.impl.XulEventHandler
getData, setData
 
Methods inherited from interface org.pentaho.di.core.gui.Redrawable
redraw
 
Methods inherited from interface org.pentaho.di.ui.spoon.TabItemInterface
getChangedWarning
 

Field Detail

START_TEXT

public static final String START_TEXT

STOP_TEXT

public static final String STOP_TEXT

job

public Job job

extraViewComposite

public Composite extraViewComposite

extraViewTabFolder

public CTabFolder extraViewTabFolder

jobLogDelegate

public JobLogDelegate jobLogDelegate

jobHistoryDelegate

public JobHistoryDelegate jobHistoryDelegate

jobGridDelegate

public JobGridDelegate jobGridDelegate
Constructor Detail

JobGraph

public JobGraph(Composite par,
                Spoon spoon,
                JobMeta jobMeta)
Method Detail

mouseDoubleClick

public void mouseDoubleClick(MouseEvent e)

mouseDown

public void mouseDown(MouseEvent e)

mouseUp

public void mouseUp(MouseEvent e)

mouseMove

public void mouseMove(MouseEvent e)

mouseHover

public void mouseHover(MouseEvent e)

mouseEnter

public void mouseEnter(MouseEvent event)

mouseExit

public void mouseExit(MouseEvent event)

mouseScrolled

public void mouseScrolled(MouseEvent e)

getVisibleAreaOwner

public AreaOwner getVisibleAreaOwner(int x,
                                     int y)

keyPressed

public void keyPressed(KeyEvent e)

keyReleased

public void keyReleased(KeyEvent e)

selectInRect

public void selectInRect(JobMeta jobMeta,
                         Rectangle rect)

setFocus

public boolean setFocus()
Specified by:
setFocus in interface TabItemInterface

renameJobEntry

public void renameJobEntry(JobEntryCopy jobEntry,
                           String newName)
Method gets called, when the user wants to change a job entries name and he indeed entered a different name then the old one. Make sure that no other job entry matches this name and rename in case of uniqueness.

Parameters:
jobEntry -
newName -

showOnlyStartOnceMessage

public static void showOnlyStartOnceMessage(Shell shell)

delSelected

public void delSelected()

clearSettings

public void clearSettings()

getRealPosition

public Point getRealPosition(Composite canvas,
                             int x,
                             int y)

setJobEntry

public void setJobEntry(JobEntryCopy jobEntry)

getJobEntry

public JobEntryCopy getJobEntry()

openTransformation

public void openTransformation()

openJob

public void openJob()

newHopClick

public void newHopClick()

editEntryClick

public void editEntryClick()

editEntryDescription

public void editEntryDescription()

editEntryParallel

public void editEntryParallel()
Go from serial to parallel to serial execution


duplicateEntry

public void duplicateEntry()
                    throws KettleException
Throws:
KettleException

copyEntry

public void copyEntry()

detachEntry

public void detachEntry()

hideEntry

public void hideEntry()

deleteEntry

public void deleteEntry()

selectAll

public void selectAll()

clearSelection

public void clearSelection()

editJobProperties

public void editJobProperties()

pasteNote

public void pasteNote()

newNote

public void newNote()

setCurrentNote

public void setCurrentNote(NotePadMeta ni)

getCurrentNote

public NotePadMeta getCurrentNote()

editNote

public void editNote()

deleteNote

public void deleteNote()

raiseNote

public void raiseNote()

lowerNote

public void lowerNote()

flipHop

public void flipHop()

disableHop

public void disableHop()

deleteHop

public void deleteHop()

setHopUnconditional

public void setHopUnconditional()

setHopEvaluationTrue

public void setHopEvaluationTrue()

setHopEvaluationFalse

public void setHopEvaluationFalse()

enableHopsBetweenSelectedEntries

public void enableHopsBetweenSelectedEntries()

disableHopsBetweenSelectedEntries

public void disableHopsBetweenSelectedEntries()

enableHopsBetweenSelectedEntries

public void enableHopsBetweenSelectedEntries(boolean enabled)
This method enables or disables all the hops between the selected Entries.


enableHopsDownstream

public void enableHopsDownstream()

disableHopsDownstream

public void disableHopsDownstream()

enableDisableHopsDownstream

public void enableDisableHopsDownstream(boolean enabled)

launchStuff

public void launchStuff(JobEntryCopy jobEntryCopy)

launchStuff

public void launchStuff()

openJob

public void openJob(JobEntryJob entry,
                    JobEntryCopy jobEntryCopy)

copyInternalJobVariables

public static void copyInternalJobVariables(JobMeta sourceJobMeta,
                                            TransMeta targetTransMeta)

paintControl

public void paintControl(PaintEvent e)

getJobImage

public Image getJobImage(Device device,
                         int x,
                         int y,
                         float magnificationFactor)

snaptogrid

public void snaptogrid()

allignleft

public void allignleft()

allignright

public void allignright()

alligntop

public void alligntop()

allignbottom

public void allignbottom()

distributehorizontal

public void distributehorizontal()

distributevertical

public void distributevertical()

newProps

public void newProps()

toString

public String toString()

getMeta

public EngineMetaInterface getMeta()
Specified by:
getMeta in interface TabItemInterface

setJobMeta

public void setJobMeta(JobMeta jobMeta)
Parameters:
jobMeta - the jobMeta to set

applyChanges

public boolean applyChanges()
                     throws KettleException
Specified by:
applyChanges in interface TabItemInterface
Throws:
KettleException

canBeClosed

public boolean canBeClosed()
Description copied from interface: TabItemInterface
Closes the content behind the tab, de-allocates resources.

Specified by:
canBeClosed in interface TabItemInterface
Returns:
true if the tab was closed, false if it was prevented by the user. (are you sure dialog)

getManagedObject

public JobMeta getManagedObject()
Specified by:
getManagedObject in interface TabItemInterface

hasContentChanged

public boolean hasContentChanged()
Specified by:
hasContentChanged in interface TabItemInterface

showChangedWarning

public static int showChangedWarning(Shell shell,
                                     String name)

editProperties

public static boolean editProperties(JobMeta jobMeta,
                                     Spoon spoon,
                                     Repository rep,
                                     boolean allowDirectoryChange)

getLastMove

public Point getLastMove()
Returns:
the lastMove

setLastMove

public void setLastMove(Point lastMove)
Parameters:
lastMove - the lastMove to set

addExtraView

public void addExtraView()
Add an extra view to the main composite SashForm


checkEmptyExtraView

public void checkEmptyExtraView()
If the extra tab view at the bottom is empty, we close it.


isExecutionResultsPaneVisible

public boolean isExecutionResultsPaneVisible()

showExecutionResults

public void showExecutionResults()

addAllTabs

public void addAllTabs()

openFile

public void openFile()

saveFile

public void saveFile()
              throws KettleException
Throws:
KettleException

saveFileAs

public void saveFileAs()
                throws KettleException
Throws:
KettleException

saveXMLFileToVfs

public void saveXMLFileToVfs()

printFile

public void printFile()

runJob

public void runJob()

getSQL

public void getSQL()

exploreDatabase

public void exploreDatabase()

browseVersionHistory

public void browseVersionHistory()

startJob

public void startJob(JobExecutionConfiguration executionConfiguration)
              throws KettleException
Throws:
KettleException

stopJob

public void stopJob()

setControlStates

public void setControlStates()
Specified by:
setControlStates in interface TabItemInterface

getRefreshListeners

public List<RefreshListener> getRefreshListeners()
Returns:
the refresh listeners

setRefreshListeners

public void setRefreshListeners(List<RefreshListener> refreshListeners)
Parameters:
refreshListeners - the refresh listeners to set

addRefreshListener

public void addRefreshListener(RefreshListener refreshListener)
Parameters:
refreshListener - the job refresh listener to add

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

setName

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

setXulDomContainer

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

canHandleSave

public boolean canHandleSave()
Specified by:
canHandleSave in interface TabItemInterface

getLogChannelProvider

public HasLogChannelInterface getLogChannelProvider()
Specified by:
getLogChannelProvider in interface LogParentProvidedInterface

addUndoPosition

public void addUndoPosition(Object[] obj,
                            int[] pos,
                            Point[] prev,
                            Point[] curr)

addUndoPosition

public void addUndoPosition(Object[] obj,
                            int[] pos,
                            Point[] prev,
                            Point[] curr,
                            boolean nextAlso)

showChangedWarning

public int showChangedWarning()
                       throws KettleException
Specified by:
showChangedWarning in interface TabItemInterface
Overrides:
showChangedWarning in class AbstractGraph
Throws:
KettleException

replayJob

public void replayJob()