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

java.lang.Object
  extended by Dialog
      extended by org.pentaho.di.ui.trans.step.BaseStepDialog
Direct Known Subclasses:
AbortDialog, AccessInputDialog, AccessOutputDialog, AddSequenceDialog, AddXMLDialog, AggregateRowsDialog, AnalyticQueryDialog, AppendDialog, AutoDocDialog, BlockingStepDialog, BlockUntilStepsFinishDialog, CalculatorDialog, ChangeFileEncodingDialog, CheckSumDialog, CloneRowDialog, ClosureGeneratorDialog, ColumnExistsDialog, CombinationLookupDialog, ConstantDialog, CreditCardValidatorDialog, CsvInputDialog, CubeInputDialog, CubeOutputDialog, DatabaseJoinDialog, DatabaseLookupDialog, DataGridDialog, DBProcDialog, DelayDialog, DeleteDialog, DenormaliserDialog, DetectEmptyStreamDialog, DetectLastRowDialog, DimensionLookupDialog, DummyTransDialog, DynamicSQLRowDialog, ElasticSearchBulkDialog, ExcelInputDialog, ExcelOutputDialog, ExcelWriterStepDialog, ExecProcessDialog, ExecSQLDialog, ExecSQLRowDialog, FieldsChangeSequenceDialog, FieldSplitterDialog, FileExistsDialog, FileLockedDialog, FilesFromResultDialog, FilesToResultDialog, FilterRowsDialog, FixedInputDialog, FlattenerDialog, FormulaDialog, FuzzyMatchDialog, GaInputStepDialog, GetFileNamesDialog, GetFilesRowsCountDialog, GetPreviousRowFieldDialog, GetRepositoryNamesDialog, GetSlaveSequenceDialog, GetSubFoldersDialog, GetTableNamesDialog, GetVariableDialog, GetXMLDataDialog, GPBulkLoaderDialog, GroupByDialog, HTTPDialog, HTTPPOSTDialog, IfNullDialog, InfobrightLoaderDialog, IngresVectorwiseLoaderDialog, InjectorDialog, InsertUpdateDialog, JaninoDialog, JavaFilterDialog, JoinRowsDialog, JsonInputDialog, JsonOutputDialog, LDAPInputDialog, LDAPOutputDialog, LDIFInputDialog, LoadFileInputDialog, LucidDBBulkLoaderDialog, LucidDBStreamingLoaderDialog, MailDialog, MailInputDialog, MailValidatorDialog, MappingDialog, MappingInputDialog, MappingOutputDialog, MemoryGroupByDialog, MergeJoinDialog, MergeRowsDialog, MetaInjectDialog, ModPartitionerDialog, MondrianInputDialog, MonetDBBulkLoaderDialog, MultiMergeJoinDialog, MySQLBulkLoaderDialog, NormaliserDialog, NullIfDialog, NumberRangeDialog, OlapInputDialog, OraBulkLoaderDialog, ParGzipCsvInputDialog, PentahoReportingOutputDialog, PGBulkLoaderDialog, PrioritizeStreamsDialog, ProcessFilesDialog, PropertyInputDialog, PropertyOutputDialog, RandomCCNumberGeneratorDialog, RandomValueDialog, RegexEvalDialog, ReplaceStringDialog, ReservoirSamplingDialog, RestDialog, RowGeneratorDialog, RowsFromResultDialog, RowsToResultDialog, RssInputDialog, RssOutputDialog, SalesforceDeleteDialog, SalesforceInputDialog, SalesforceInsertDialog, SalesforceUpdateDialog, SalesforceUpsertDialog, SampleRowsDialog, SapInputDialog, ScriptDialog, ScriptValuesModDialog, SecretKeyGeneratorDialog, SelectValuesDialog, SetValueConstantDialog, SetValueFieldDialog, SetVariableDialog, SingleThreaderDialog, SocketReaderDialog, SocketWriterDialog, SortedMergeDialog, SortRowsDialog, SplitFieldToRowsDialog, SQLFileOutputDialog, SSHDialog, StepMetastructureDialog, StepsMetricsDialog, StreamLookupDialog, StringCutDialog, StringOperationsDialog, SwitchCaseDialog, SymmetricCryptoTransDialog, SynchronizeAfterMergeDialog, SyslogMessageDialog, SystemDataDialog, TableExistsDialog, TableInputDialog, TableOutputDialog, TeraFastDialog, TextFileInputDialog, TextFileOutputDialog, UniqueRowsByHashSetDialog, UniqueRowsDialog, UnivariateStatsDialog, UpdateDialog, UserDefinedJavaClassDialog, ValidatorDialog, ValueMapperDialog, WebServiceAvailableDialog, WebServiceDialog, WriteToLogDialog, XBaseInputDialog, XMLInputDialog, XMLInputSaxDialog, XMLInputStreamDialog, XMLJoinDialog, XMLOutputDialog, XsdValidatorDialog, XsltDialog, YamlInputDialog

public class BaseStepDialog
extends Dialog


Field Summary
static LoggingObjectInterface loggingObject
           
 
Constructor Summary
BaseStepDialog(Shell parent, BaseStepMeta baseStepMeta, TransMeta transMeta, String stepname)
           
BaseStepDialog(Shell parent, int nr, BaseStepMeta in, TransMeta tr)
           
 
Method Summary
 CCombo addConnectionLine(Composite parent, Control previous, int middle, int margin)
           
 CCombo addConnectionLine(Composite parent, Control previous, int middle, int margin, Class<? extends DatabaseInterface> databaseType)
           
 CCombo addConnectionLine(Composite parent, Control previous, int middle, int margin, Label wlConnection, Button wbnConnection, Button wbeConnection)
           
 CCombo addConnectionLine(Composite parent, Control previous, int middle, int margin, Label wlConnection, Button wbnConnection, Button wbeConnection, Class<? extends DatabaseInterface> databaseType)
           
 void addDatabases(CCombo wConnection)
           
 void addDatabases(CCombo wConnection, Class<? extends DatabaseInterface> databaseType)
           
 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, TableView 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(TransMeta transMeta, StepMeta stepMeta, TableView 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 ModifyListener getModifyListenerTooltipText(Text textField)
           
 Repository getRepository()
           
 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)
           
static void positionBottomButtons(Composite composite, Button[] buttons, int margin, Control lastControl)
          Position the specified buttons at the bottom of the parent composite.
 void selectDatabase(CCombo wConnection, String name)
           
static void setMinimalShellHeight(Shell shell, Control[] controls, int margin, int extra)
           
 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)
           
static void setTraverseOrder(Control[] controls)
           
 void storeScreenSize()
           
 
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

BaseStepDialog

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

BaseStepDialog

public BaseStepDialog(Shell parent,
                      int nr,
                      BaseStepMeta in,
                      TransMeta tr)
Method Detail

setShellImage

public void setShellImage(Shell shell,
                          StepMetaInterface stepMetaInterface)

dispose

public void dispose()

setSize

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


positionBottomButtons

public static final void positionBottomButtons(Composite composite,
                                               Button[] buttons,
                                               int margin,
                                               Control lastControl)
Position the specified buttons at the bottom of the parent composite. Also, make the buttons all the same width: the width of the largest button.

The default alignment for buttons in the system will be used. This is set as an LAF property with the key Button_Position and has the valid values of left, center, right with center being the default.

Parameters:
buttons - The buttons to position.
margin - The margin between the buttons in pixels

getModifyListenerTooltipText

public static final ModifyListener getModifyListenerTooltipText(Text textField)

addDatabases

public void addDatabases(CCombo wConnection)

addDatabases

public void addDatabases(CCombo wConnection,
                         Class<? extends DatabaseInterface> databaseType)

selectDatabase

public void selectDatabase(CCombo wConnection,
                           String name)

addConnectionLine

public CCombo addConnectionLine(Composite parent,
                                Control previous,
                                int middle,
                                int margin)

addConnectionLine

public CCombo addConnectionLine(Composite parent,
                                Control previous,
                                int middle,
                                int margin,
                                Class<? extends DatabaseInterface> databaseType)

addConnectionLine

public CCombo addConnectionLine(Composite parent,
                                Control previous,
                                int middle,
                                int margin,
                                Label wlConnection,
                                Button wbnConnection,
                                Button wbeConnection)

addConnectionLine

public CCombo addConnectionLine(Composite parent,
                                Control previous,
                                int middle,
                                int margin,
                                Label wlConnection,
                                Button wbnConnection,
                                Button wbeConnection,
                                Class<? extends DatabaseInterface> databaseType)

storeScreenSize

public void storeScreenSize()

getRepository

public Repository getRepository()
Returns:
Returns the repository.

setRepository

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

setMinimalShellHeight

public static void setMinimalShellHeight(Shell shell,
                                         Control[] controls,
                                         int margin,
                                         int extra)

setSize

public static void setSize(Shell shell)

setSize

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

setTraverseOrder

public static final void setTraverseOrder(Control[] controls)

getFieldsFromPrevious

public static final void getFieldsFromPrevious(TransMeta transMeta,
                                               StepMeta stepMeta,
                                               TableView 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:
r -
fields -
i -
js - the column in the table view to match with the names of the fields, checks for existance if >0
nameColumn -
j -
lengthColumn -
listener -

getFieldsFromPrevious

public static final void getFieldsFromPrevious(RowMetaInterface row,
                                               TableView 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)