org.pentaho.di.ui.trans.step
Class BaseStepXulDialog

java.lang.Object
  extended by org.pentaho.ui.xul.XulEventSourceAdapter
      extended by org.pentaho.ui.xul.impl.AbstractXulEventHandler
          extended by org.pentaho.di.ui.trans.step.BaseStepXulDialog
All Implemented Interfaces:
org.pentaho.ui.xul.impl.XulEventHandler, org.pentaho.ui.xul.XulEventSource
Direct Known Subclasses:
RulesDialog

public abstract class BaseStepXulDialog
extends org.pentaho.ui.xul.impl.AbstractXulEventHandler

Created by IntelliJ IDEA. User: nbaker Date: Jun 7, 2010 Time: 9:02:06 AM To change this template use File | Settings | File Templates.


Field Summary
static LoggingObjectInterface loggingObject
           
 
Constructor Summary
BaseStepXulDialog(String xulFile, Shell parent, BaseStepMeta baseStepMeta, TransMeta transMeta, String stepname)
           
BaseStepXulDialog(String xulFile, Shell parent, int nr, BaseStepMeta in, TransMeta tr)
           
 
Method Summary
 void addDatabases(org.pentaho.ui.xul.components.XulMenuList<?> wConnection)
           
 void addDatabases(org.pentaho.ui.xul.components.XulMenuList wConnection, Class<? extends DatabaseInterface> databaseType)
           
 void close()
           
 void dispose()
           
static void generateFieldMapping(Shell shell, RowMetaInterface sourceFields, RowMetaInterface targetFields, List<SourceToTargetMapping> fieldMapping)
          Create a new field mapping between source and target steps.
static void getFieldsFromPrevious(ComboVar comboVar, TransMeta transMeta, StepMeta stepMeta)
          Gets fields from previous steps and populate a ComboVar.
static void getFieldsFromPrevious(RowMetaInterface row, org.pentaho.ui.xul.containers.XulTree tableView, int keyColumn, int[] nameColumn, int[] dataTypeColumn, int lengthColumn, int precisionColumn, TableItemInsertListener listener)
          Gets unused fields from previous steps and inserts them as rows into a table view.
static void getFieldsFromPrevious(RowMetaInterface row, org.pentaho.ui.xul.containers.XulTree tableView, List<Object> fields, StepTableDataObject field, TableItemInsertXulListener listener)
           
 String getName()
           
 Repository getRepository()
           
 Shell getShell()
           
 boolean isBasic()
           
 boolean isDebug()
           
 boolean isDetailed()
           
 boolean isRowLevel()
           
 void logBasic(String message)
           
 void logBasic(String message, Object... arguments)
           
 void logDebug(String message)
           
 void logDebug(String message, Object... arguments)
           
 void logDetailed(String message)
           
 void logDetailed(String message, Object... arguments)
           
 void logError(String message)
           
 void logError(String message, Object... arguments)
           
 void logError(String message, Throwable e)
           
 void logMinimal(String message)
           
 void logMinimal(String message, Object... arguments)
           
 void logRowlevel(String message)
           
 void logRowlevel(String message, Object... arguments)
           
abstract  void onAccept()
           
abstract  void onCancel()
           
 String open()
           
 void selectDatabase(org.pentaho.ui.xul.components.XulMenuList wConnection, String name)
           
 void setRepository(Repository repository)
           
 void setShellImage(Shell shell, StepMetaInterface stepMetaInterface)
           
 void setSize()
          Set the shell size, based upon the previous time the geometry was saved in the Properties file.
static void setSize(Shell shell)
           
static void setSize(Shell shell, int minWidth, int minHeight, boolean packIt)
           
 void storeScreenSize()
           
 
Methods inherited from class org.pentaho.ui.xul.impl.AbstractXulEventHandler
bind, bind, getData, getXulDomContainer, setData, setName, setXulDomContainer
 
Methods inherited from class org.pentaho.ui.xul.XulEventSourceAdapter
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

loggingObject

public static final LoggingObjectInterface loggingObject
Constructor Detail

BaseStepXulDialog

public BaseStepXulDialog(String xulFile,
                         Shell parent,
                         BaseStepMeta baseStepMeta,
                         TransMeta transMeta,
                         String stepname)

BaseStepXulDialog

public BaseStepXulDialog(String xulFile,
                         Shell parent,
                         int nr,
                         BaseStepMeta in,
                         TransMeta tr)
Method Detail

getName

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

open

public String open()

close

public void close()

onAccept

public abstract void onAccept()

onCancel

public abstract void onCancel()

setShellImage

public void setShellImage(Shell shell,
                          StepMetaInterface stepMetaInterface)

dispose

public void dispose()

getShell

public Shell getShell()

setSize

public void setSize()
Set the shell size, based upon the previous time the geometry was saved in the Properties file.


addDatabases

public void addDatabases(org.pentaho.ui.xul.components.XulMenuList<?> wConnection)

addDatabases

public void addDatabases(org.pentaho.ui.xul.components.XulMenuList wConnection,
                         Class<? extends DatabaseInterface> databaseType)

selectDatabase

public void selectDatabase(org.pentaho.ui.xul.components.XulMenuList wConnection,
                           String name)

storeScreenSize

public void storeScreenSize()

getRepository

public Repository getRepository()
Returns:
Returns the repository.

setRepository

public void setRepository(Repository repository)
Parameters:
repository - The repository to set.

setSize

public static void setSize(Shell shell)

setSize

public static void setSize(Shell shell,
                           int minWidth,
                           int minHeight,
                           boolean packIt)

getFieldsFromPrevious

public static final void getFieldsFromPrevious(RowMetaInterface row,
                                               org.pentaho.ui.xul.containers.XulTree tableView,
                                               int keyColumn,
                                               int[] nameColumn,
                                               int[] dataTypeColumn,
                                               int lengthColumn,
                                               int precisionColumn,
                                               TableItemInsertListener listener)
Gets unused fields from previous steps and inserts them as rows into a table view.

Parameters:
row - the input fields
tableView - the table view to modify
keyColumn - the column in the table view to match with the names of the fields, checks for existance if >0
nameColumn - the column numbers in which the name should end up in
dataTypeColumn - the target column numbers in which the data type should end up in
lengthColumn - the length column where the length should end up in (if >0)
precisionColumn - the length column where the precision should end up in (if >0)
listener - A listener that you can use to do custom modifications to the inserted table item, based on a value from the provided row

getFieldsFromPrevious

public static final void getFieldsFromPrevious(ComboVar comboVar,
                                               TransMeta transMeta,
                                               StepMeta stepMeta)
Gets fields from previous steps and populate a ComboVar.

Parameters:
comboVar - the comboVar to populate
TransMeta - the source transformation
StepMeta - the source step

generateFieldMapping

public static final void generateFieldMapping(Shell shell,
                                              RowMetaInterface sourceFields,
                                              RowMetaInterface targetFields,
                                              List<SourceToTargetMapping> fieldMapping)
                                       throws KettleException
Create a new field mapping between source and target steps.

Parameters:
shell - the shell of the parent window
sourceFields - the source fields
targetFields - the target fields
fieldMapping - the list of source to target mappings to default to (can be empty but not null)
Throws:
KettleException - in case something goes wrong during the field mapping

isBasic

public boolean isBasic()

isDetailed

public boolean isDetailed()

isDebug

public boolean isDebug()

isRowLevel

public boolean isRowLevel()

logMinimal

public void logMinimal(String message)

logMinimal

public void logMinimal(String message,
                       Object... arguments)

logBasic

public void logBasic(String message)

logBasic

public void logBasic(String message,
                     Object... arguments)

logDetailed

public void logDetailed(String message)

logDetailed

public void logDetailed(String message,
                        Object... arguments)

logDebug

public void logDebug(String message)

logDebug

public void logDebug(String message,
                     Object... arguments)

logRowlevel

public void logRowlevel(String message)

logRowlevel

public void logRowlevel(String message,
                        Object... arguments)

logError

public void logError(String message)

logError

public void logError(String message,
                     Throwable e)

logError

public void logError(String message,
                     Object... arguments)

getFieldsFromPrevious

public static void getFieldsFromPrevious(RowMetaInterface row,
                                         org.pentaho.ui.xul.containers.XulTree tableView,
                                         List<Object> fields,
                                         StepTableDataObject field,
                                         TableItemInsertXulListener listener)