Package org.pentaho.di.ui.trans.step
Class BaseStepDialog
java.lang.Object
org.eclipse.swt.widgets.Dialog
org.pentaho.di.ui.trans.step.BaseStepDialog
- Direct Known Subclasses:
BaseFileStepDialog
,BaseStreamingDialog
,CalculatorDialog
,CommonStepDialog
,ConstantDialog
,CsvInputDialog
,DatabaseJoinDialog
,DatabaseLookupDialog
,DataGridDialog
,DBProcDialog
,DeleteDialog
,DenormaliserDialog
,DetectEmptyStreamDialog
,DetectLastRowDialog
,DimensionLookupDialog
,DummyTransDialog
,DynamicSQLRowDialog
,ExecProcessDialog
,ExecSQLDialog
,ExecSQLRowDialog
,FieldsChangeSequenceDialog
,FieldSplitterDialog
,FileExistsDialog
,FileLockedDialog
,FilesFromResultDialog
,FilesToResultDialog
,FilterRowsDialog
,FixedInputDialog
,FlattenerDialog
,FormulaDialog
,FuzzyMatchDialog
,GetFileNamesDialog
,GetFilesRowsCountDialog
,GetSlaveSequenceDialog
,GetSubFoldersDialog
,GetTableNamesDialog
,GetVariableDialog
,GroupByDialog
,HTTPDialog
,HTTPPOSTDialog
,IfNullDialog
,InjectorDialog
,InsertUpdateDialog
,JaninoDialog
,JavaFilterDialog
,JobExecutorDialog
,JoinRowsDialog
,LDIFInputDialog
,LoadFileInputDialog
,MappingDialog
,MappingInputDialog
,MappingOutputDialog
,MemoryGroupByDialog
,MergeJoinDialog
,MergeRowsDialog
,MissingTransDialog
,ModPartitionerDialog
,MultiMergeJoinDialog
,NormaliserDialog
,NullIfDialog
,NumberRangeDialog
,OlapInputDialog
,ParGzipCsvInputDialog
,PGPDecryptStreamDialog
,PGPEncryptStreamDialog
,PrioritizeStreamsDialog
,ProcessFilesDialog
,PropertyInputDialog
,PropertyOutputDialog
,RandomValueDialog
,RegexEvalDialog
,ReplaceStringDialog
,ReservoirSamplingDialog
,RowGeneratorDialog
,RowsFromResultDialog
,RowsToResultDialog
,SampleRowsDialog
,SasInputDialog
,ScriptDialog
,ScriptValuesModDialog
,SecretKeyGeneratorDialog
,SelectValuesDialog
,SetValueConstantDialog
,SetValueFieldDialog
,SetVariableDialog
,SimpleMappingDialog
,SingleThreaderDialog
,SocketReaderDialog
,SocketWriterDialog
,SortedMergeDialog
,SortRowsDialog
,SplitFieldToRowsDialog
,SQLFileOutputDialog
,SSHDialog
,StepMetastructureDialog
,StepsMetricsDialog
,StreamLookupDialog
,StringCutDialog
,StringOperationsDialog
,SwitchCaseDialog
,SymmetricCryptoTransDialog
,SynchronizeAfterMergeDialog
,SyslogMessageDialog
,SystemDataDialog
,TableCompareDialog
,TableExistsDialog
,TableInputDialog
,TableOutputDialog
,TextFileInputDialog
,TextFileInputDialog
,TextFileOutputDialog
,TransExecutorDialog
,UniqueRowsByHashSetDialog
,UniqueRowsDialog
,UnivariateStatsDialog
,UpdateDialog
,UserDefinedJavaClassDialog
,ValidatorDialog
,ValueMapperDialog
,WebServiceAvailableDialog
,WebServiceDialog
,WriteToLogDialog
,XBaseInputDialog
,ZipFileDialog
public class BaseStepDialog
extends org.eclipse.swt.widgets.Dialog
This class provides functionality common to Step Dialogs.
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
class
static interface
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
Whether the dialog (and its backup) have changed.protected org.pentaho.di.trans.step.StepMetaInterface
The base step meta.protected static final int
A constant indicating a center button alignment.static final int
A constant indicating a left button alignment.static final int
A constant indicating a right button alignment.protected static int
The button alignment (defaults to center).protected boolean
Whether the dialog (and its backup) have changed.protected DatabaseDialog
A reference to a database dialog.protected org.eclipse.swt.layout.FormData
FormData for the common dialog buttons.protected org.eclipse.swt.layout.FormData
FormData for the common dialog buttons.protected org.eclipse.swt.layout.FormData
FormData for the common dialog buttons.protected org.eclipse.swt.layout.FormData
The FormData for the step name and its label.protected org.eclipse.swt.layout.FormData
FormData for the common dialog buttons.protected org.eclipse.swt.layout.FormData
FormData for the common dialog buttons.protected org.eclipse.swt.layout.FormData
FormData for the common dialog buttons.protected org.eclipse.swt.layout.FormData
The FormData for the step name and its label.protected org.pentaho.di.core.logging.LogChannel
The log channel for this dialog.static final org.pentaho.di.core.logging.LoggingObjectInterface
The logging object interface for this dialog.protected org.eclipse.swt.widgets.Listener
Listeners for the common dialog buttons.protected org.eclipse.swt.widgets.Listener
Listeners for the common dialog buttons.protected org.eclipse.swt.events.SelectionAdapter
A listener adapter for default widget selection.protected org.eclipse.swt.widgets.Listener
Listeners for the common dialog buttons.protected org.eclipse.swt.widgets.Listener
Listeners for the common dialog buttons.protected org.eclipse.swt.widgets.Listener
Listeners for the common dialog buttons.protected org.eclipse.swt.widgets.Listener
A listener for dialog resizing.protected org.eclipse.swt.widgets.Listener
Listeners for the common dialog buttons.protected org.pentaho.metastore.api.IMetaStore
The MetaStore to useprotected PropsUI
The UI properties.protected org.pentaho.di.repository.Repository
The associated repository.protected org.eclipse.swt.widgets.Shell
A reference to the shell.protected org.pentaho.di.trans.step.StepMeta
The step meta for this dialog.protected String
The step name.protected org.pentaho.di.trans.TransMeta
The metadata for the associated transformation.protected static org.pentaho.di.core.variables.VariableSpace
The variable bindings for this dialog.protected org.eclipse.swt.widgets.Button
Common dialog buttons.protected org.eclipse.swt.widgets.Button
Common dialog buttons.protected org.eclipse.swt.widgets.Button
Common dialog buttons.protected org.eclipse.swt.widgets.Label
The Step name label.protected org.eclipse.swt.widgets.Button
Common dialog buttons.protected org.eclipse.swt.widgets.Button
Common dialog buttons.protected org.eclipse.swt.widgets.Button
Common dialog buttons.protected org.eclipse.swt.widgets.Text
The Step name UI component. -
Constructor Summary
ConstructorDescriptionBaseStepDialog
(org.eclipse.swt.widgets.Shell parent, int nr, org.pentaho.di.trans.step.BaseStepMeta in, org.pentaho.di.trans.TransMeta tr) Instantiates a new base step dialog.BaseStepDialog
(org.eclipse.swt.widgets.Shell parent, org.pentaho.di.trans.step.BaseStepMeta baseStepMeta, org.pentaho.di.trans.TransMeta transMeta, String stepname) Instantiates a new base step dialog.BaseStepDialog
(org.eclipse.swt.widgets.Shell parent, org.pentaho.di.trans.step.StepMetaInterface baseStepMeta, org.pentaho.di.trans.TransMeta transMeta, String stepname) Instantiates a new base step dialog. -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.swt.custom.CCombo
addConnectionLine
(org.eclipse.swt.widgets.Composite parent, org.eclipse.swt.widgets.Control previous, int middle, int margin) Adds the connection line.org.eclipse.swt.custom.CCombo
addConnectionLine
(org.eclipse.swt.widgets.Composite parent, org.eclipse.swt.widgets.Control previous, int middle, int margin, Class<? extends org.pentaho.di.core.database.DatabaseInterface> databaseType) Adds the connection line.org.eclipse.swt.custom.CCombo
addConnectionLine
(org.eclipse.swt.widgets.Composite parent, org.eclipse.swt.widgets.Control previous, int middle, int margin, org.eclipse.swt.widgets.Label wlConnection, org.eclipse.swt.widgets.Button wbwConnection, org.eclipse.swt.widgets.Button wbnConnection, org.eclipse.swt.widgets.Button wbeConnection) Adds the connection line.org.eclipse.swt.custom.CCombo
addConnectionLine
(org.eclipse.swt.widgets.Composite parent, org.eclipse.swt.widgets.Control previous, int middle, int margin, org.eclipse.swt.widgets.Label wlConnection, org.eclipse.swt.widgets.Button wbwConnection, org.eclipse.swt.widgets.Button wbnConnection, org.eclipse.swt.widgets.Button wbeConnection, Class<? extends org.pentaho.di.core.database.DatabaseInterface> databaseType) Adds the connection line.void
addDatabases
(org.eclipse.swt.custom.CCombo wConnection) Adds the databases to the Combo Box component.void
addDatabases
(org.eclipse.swt.custom.CCombo wConnection, Class<? extends org.pentaho.di.core.database.DatabaseInterface> databaseType) Adds the databases with the specified type to the Combo Box component.protected static void
centerButtons
(org.eclipse.swt.widgets.Button[] buttons, int width, int margin, org.eclipse.swt.widgets.Control lastControl) Aligns the buttons as centered on the dialog.protected org.eclipse.swt.widgets.Button
createHelpButton
(org.eclipse.swt.widgets.Shell shell, org.pentaho.di.trans.step.StepMeta stepMeta, org.pentaho.di.core.plugins.PluginInterface plugin) void
dispose()
Dispose this dialog.static final void
generateFieldMapping
(org.eclipse.swt.widgets.Shell shell, org.pentaho.di.core.row.RowMetaInterface sourceFields, org.pentaho.di.core.row.RowMetaInterface targetFields, List<org.pentaho.di.core.SourceToTargetMapping> fieldMapping) Create a new field mapping between source and target steps.protected static int
Returns the default alignment for the buttons.protected DatabaseDialog
getDatabaseDialog
(org.eclipse.swt.widgets.Shell shell) Gets the database dialog.static final void
getFieldsFromPrevious
(org.pentaho.di.core.row.RowMetaInterface row, TableView tableView, int keyColumn, int[] nameColumn, int[] dataTypeColumn, int lengthColumn, int precisionColumn, boolean optimizeWidth, TableItemInsertListener listener) Gets unused fields from previous steps and inserts them as rows into a table view.static final void
getFieldsFromPrevious
(org.pentaho.di.core.row.RowMetaInterface row, TableView tableView, int keyColumn, int[] nameColumn, int[] dataTypeColumn, int lengthColumn, int precisionColumn, boolean optimizeWidth, TableItemInsertListener listener, BaseStepDialog.FieldsChoiceDialogProvider getFieldsChoiceDialogProvider) Gets unused fields from previous steps and inserts them as rows into a table view.static final void
getFieldsFromPrevious
(org.pentaho.di.core.row.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 final void
getFieldsFromPrevious
(org.pentaho.di.trans.TransMeta transMeta, org.pentaho.di.trans.step.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 final void
getFieldsFromPrevious
(ComboVar comboVar, org.pentaho.di.trans.TransMeta transMeta, org.pentaho.di.trans.step.StepMeta stepMeta) Gets fields from previous steps and populate a ComboVar.org.pentaho.metastore.api.IMetaStore
static final org.eclipse.swt.events.ModifyListener
getModifyListenerTooltipText
(org.eclipse.swt.widgets.Text textField) Gets the modify listener tooltip text.protected String
getPathOf
(org.pentaho.di.repository.RepositoryElementMetaInterface object) org.pentaho.di.repository.Repository
Gets the repository associated with this dialog.boolean
isBasic()
Checks if the log level is basic.boolean
isDebug()
Checks if the log level is debug.boolean
Checks if the log level is detailed.boolean
Checks if the log level is row level.protected static void
leftAlignButtons
(org.eclipse.swt.widgets.Button[] buttons, int width, int margin, org.eclipse.swt.widgets.Control lastControl) Aligns the buttons as left-aligned on the dialog.void
Log the message at a basic logging level.void
Log the message with arguments at a basic logging level.void
Log the message at a debug logging level.void
Log the message with arguments at a debug logging level.void
logDetailed
(String message) Log the message at a detailed logging level.void
logDetailed
(String message, Object... arguments) Log the message with arguments at a detailed logging level.void
Log the message at a error logging level.void
Log the message with arguments at a error logging level.void
Log the message with the associated Throwable object at a error logging level.void
logMinimal
(String message) Log the message at a minimal logging level.void
logMinimal
(String message, Object... arguments) Log the message with arguments at a minimal logging level.void
logRowlevel
(String message) Log the message at a rowlevel logging level.void
logRowlevel
(String message, Object... arguments) Log the message with arguments at a rowlevel logging level.static final void
positionBottomButtons
(org.eclipse.swt.widgets.Composite composite, org.eclipse.swt.widgets.Button[] buttons, int margin, int alignment, org.eclipse.swt.widgets.Control lastControl) static final void
positionBottomButtons
(org.eclipse.swt.widgets.Composite composite, org.eclipse.swt.widgets.Button[] buttons, int margin, org.eclipse.swt.widgets.Control lastControl) Position the specified buttons at the bottom of the parent composite.static final void
positionBottomLeftButtons
(org.eclipse.swt.widgets.Composite composite, org.eclipse.swt.widgets.Button[] buttons, int margin, org.eclipse.swt.widgets.Control lastControl) static final void
positionBottomRightButtons
(org.eclipse.swt.widgets.Composite composite, org.eclipse.swt.widgets.Button[] buttons, int margin, org.eclipse.swt.widgets.Control lastControl) void
reinitConnectionDropDown
(org.eclipse.swt.custom.CCombo dropDown, String selected) protected static void
rightAlignButtons
(org.eclipse.swt.widgets.Button[] buttons, int width, int margin, org.eclipse.swt.widgets.Control lastControl) Aligns the buttons as right-aligned on the dialog.void
selectDatabase
(org.eclipse.swt.custom.CCombo wConnection, String name) Selects the database with the specified name in the Combo Box component.protected void
setButtonPositions
(org.eclipse.swt.widgets.Button[] buttons, int margin, org.eclipse.swt.widgets.Control lastControl) Sets the button positions.void
setMetaStore
(org.pentaho.metastore.api.IMetaStore metaStore) static void
setMinimalShellHeight
(org.eclipse.swt.widgets.Shell shell, org.eclipse.swt.widgets.Control[] controls, int margin, int extra) Sets the minimal shell height.void
setRepository
(org.pentaho.di.repository.Repository repository) Sets the repository associated with this dialog.void
setShellImage
(org.eclipse.swt.widgets.Shell shell, org.pentaho.di.trans.step.StepMetaInterface stepMetaInterface) Sets the shell image.void
setSize()
Set the shell size, based upon the previous time the geometry was saved in the Properties file.static void
setSize
(org.eclipse.swt.widgets.Shell shell) Sets the size of this dialog with respect to the given shell.static void
setSize
(org.eclipse.swt.widgets.Shell shell, int prefWidth, int prefHeight) static void
setSize
(org.eclipse.swt.widgets.Shell shell, int minWidth, int minHeight, boolean packIt) Sets the size of this dialog with respect to the given parameters.static final void
setTraverseOrder
(org.eclipse.swt.widgets.Control[] controls) Sets the traverse order for the given controls.showDbDialogUnlessCancelledOrValid
(org.pentaho.di.core.database.DatabaseMeta changing, org.pentaho.di.core.database.DatabaseMeta origin) void
showDbExistsDialog
(org.pentaho.di.core.database.DatabaseMeta changing) void
Store screen size.toString()
Methods inherited from class org.eclipse.swt.widgets.Dialog
checkSubclass, getParent, getStyle, getText, setText
-
Field Details
-
loggingObject
public static final org.pentaho.di.core.logging.LoggingObjectInterface loggingObjectThe logging object interface for this dialog. -
variables
protected static org.pentaho.di.core.variables.VariableSpace variablesThe variable bindings for this dialog. -
stepname
The step name. -
wlStepname
protected org.eclipse.swt.widgets.Label wlStepnameThe Step name label. -
wStepname
protected org.eclipse.swt.widgets.Text wStepnameThe Step name UI component. -
fdlStepname
protected org.eclipse.swt.layout.FormData fdlStepnameThe FormData for the step name and its label. -
fdStepname
protected org.eclipse.swt.layout.FormData fdStepnameThe FormData for the step name and its label. -
wOK
protected org.eclipse.swt.widgets.Button wOKCommon dialog buttons. -
wGet
protected org.eclipse.swt.widgets.Button wGetCommon dialog buttons. -
wPreview
protected org.eclipse.swt.widgets.Button wPreviewCommon dialog buttons. -
wSQL
protected org.eclipse.swt.widgets.Button wSQLCommon dialog buttons. -
wCreate
protected org.eclipse.swt.widgets.Button wCreateCommon dialog buttons. -
wCancel
protected org.eclipse.swt.widgets.Button wCancelCommon dialog buttons. -
fdOK
protected org.eclipse.swt.layout.FormData fdOKFormData for the common dialog buttons. -
fdGet
protected org.eclipse.swt.layout.FormData fdGetFormData for the common dialog buttons. -
fdPreview
protected org.eclipse.swt.layout.FormData fdPreviewFormData for the common dialog buttons. -
fdSQL
protected org.eclipse.swt.layout.FormData fdSQLFormData for the common dialog buttons. -
fdCreate
protected org.eclipse.swt.layout.FormData fdCreateFormData for the common dialog buttons. -
fdCancel
protected org.eclipse.swt.layout.FormData fdCancelFormData for the common dialog buttons. -
lsOK
protected org.eclipse.swt.widgets.Listener lsOKListeners for the common dialog buttons. -
lsGet
protected org.eclipse.swt.widgets.Listener lsGetListeners for the common dialog buttons. -
lsPreview
protected org.eclipse.swt.widgets.Listener lsPreviewListeners for the common dialog buttons. -
lsSQL
protected org.eclipse.swt.widgets.Listener lsSQLListeners for the common dialog buttons. -
lsCreate
protected org.eclipse.swt.widgets.Listener lsCreateListeners for the common dialog buttons. -
lsCancel
protected org.eclipse.swt.widgets.Listener lsCancelListeners for the common dialog buttons. -
transMeta
protected org.pentaho.di.trans.TransMeta transMetaThe metadata for the associated transformation. -
shell
protected org.eclipse.swt.widgets.Shell shellA reference to the shell. -
lsDef
protected org.eclipse.swt.events.SelectionAdapter lsDefA listener adapter for default widget selection. -
lsResize
protected org.eclipse.swt.widgets.Listener lsResizeA listener for dialog resizing. -
changed
protected boolean changedWhether the dialog (and its backup) have changed. -
backupChanged
protected boolean backupChangedWhether the dialog (and its backup) have changed. -
baseStepMeta
protected org.pentaho.di.trans.step.StepMetaInterface baseStepMetaThe base step meta. -
props
The UI properties. -
repository
protected org.pentaho.di.repository.Repository repositoryThe associated repository. -
metaStore
protected org.pentaho.metastore.api.IMetaStore metaStoreThe MetaStore to use -
stepMeta
protected org.pentaho.di.trans.step.StepMeta stepMetaThe step meta for this dialog. -
log
protected org.pentaho.di.core.logging.LogChannel logThe log channel for this dialog. -
BUTTON_ALIGNMENT_CENTER
protected static final int BUTTON_ALIGNMENT_CENTERA constant indicating a center button alignment.- See Also:
-
BUTTON_ALIGNMENT_LEFT
public static final int BUTTON_ALIGNMENT_LEFTA constant indicating a left button alignment.- See Also:
-
BUTTON_ALIGNMENT_RIGHT
public static final int BUTTON_ALIGNMENT_RIGHTA constant indicating a right button alignment.- See Also:
-
buttonAlignment
protected static int buttonAlignmentThe button alignment (defaults to center). -
databaseDialog
A reference to a database dialog.
-
-
Constructor Details
-
BaseStepDialog
public BaseStepDialog(org.eclipse.swt.widgets.Shell parent, org.pentaho.di.trans.step.BaseStepMeta baseStepMeta, org.pentaho.di.trans.TransMeta transMeta, String stepname) Instantiates a new base step dialog.- Parameters:
parent
- the parent shellbaseStepMeta
- the associated base step metadatatransMeta
- the associated transformation metadatastepname
- the step name
-
BaseStepDialog
public BaseStepDialog(org.eclipse.swt.widgets.Shell parent, org.pentaho.di.trans.step.StepMetaInterface baseStepMeta, org.pentaho.di.trans.TransMeta transMeta, String stepname) Instantiates a new base step dialog.- Parameters:
parent
- the parent shellbaseStepMeta
- the associated base step metadatatransMeta
- the associated transformation metadatastepname
- the step name
-
BaseStepDialog
public BaseStepDialog(org.eclipse.swt.widgets.Shell parent, int nr, org.pentaho.di.trans.step.BaseStepMeta in, org.pentaho.di.trans.TransMeta tr) Instantiates a new base step dialog.- Parameters:
parent
- the parent shellnr
- the number of rowsin
- the base step metadatatr
- the transformation metadata
-
-
Method Details
-
setShellImage
public void setShellImage(org.eclipse.swt.widgets.Shell shell, org.pentaho.di.trans.step.StepMetaInterface stepMetaInterface) Sets the shell image.- Parameters:
shell
- the shellstepMetaInterface
- the step meta interface (because of the legacy code)
-
dispose
public void dispose()Dispose this dialog. -
setSize
public void setSize()Set the shell size, based upon the previous time the geometry was saved in the Properties file. -
setButtonPositions
protected void setButtonPositions(org.eclipse.swt.widgets.Button[] buttons, int margin, org.eclipse.swt.widgets.Control lastControl) Sets the button positions.- Parameters:
buttons
- the buttonsmargin
- the margin between buttonslastControl
- the last control
-
positionBottomButtons
public static final void positionBottomButtons(org.eclipse.swt.widgets.Composite composite, org.eclipse.swt.widgets.Button[] buttons, int margin, org.eclipse.swt.widgets.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 keyButton_Position
and has the valid values ofleft, center, right
withcenter
being the default.- Parameters:
composite
- the compositebuttons
- The buttons to position.margin
- The margin between the buttons in pixelslastControl
- the last control
-
positionBottomRightButtons
public static final void positionBottomRightButtons(org.eclipse.swt.widgets.Composite composite, org.eclipse.swt.widgets.Button[] buttons, int margin, org.eclipse.swt.widgets.Control lastControl) -
positionBottomLeftButtons
public static final void positionBottomLeftButtons(org.eclipse.swt.widgets.Composite composite, org.eclipse.swt.widgets.Button[] buttons, int margin, org.eclipse.swt.widgets.Control lastControl) -
positionBottomButtons
public static final void positionBottomButtons(org.eclipse.swt.widgets.Composite composite, org.eclipse.swt.widgets.Button[] buttons, int margin, int alignment, org.eclipse.swt.widgets.Control lastControl) -
getButtonAlignment
protected static int getButtonAlignment()Returns the default alignment for the buttons. This is set in the LAF properties with the keyButton_Position
. The valid values are:left
center
right
center
will be used as a default- Returns:
- a constant which indicates the button alignment
-
leftAlignButtons
protected static void leftAlignButtons(org.eclipse.swt.widgets.Button[] buttons, int width, int margin, org.eclipse.swt.widgets.Control lastControl) Aligns the buttons as left-aligned on the dialog.- Parameters:
buttons
- the array of buttons to alignwidth
- the standardized width of all the buttonsmargin
- the margin between buttonslastControl
- (optional) the bottom most control used for aligning the buttons relative to the bottom of the controls on the dialog
-
rightAlignButtons
protected static void rightAlignButtons(org.eclipse.swt.widgets.Button[] buttons, int width, int margin, org.eclipse.swt.widgets.Control lastControl) Aligns the buttons as right-aligned on the dialog.- Parameters:
buttons
- the array of buttons to alignwidth
- the standardized width of all the buttonsmargin
- the margin between buttonslastControl
- (optional) the bottom most control used for aligning the buttons relative to the bottom of the controls on the dialog
-
centerButtons
protected static void centerButtons(org.eclipse.swt.widgets.Button[] buttons, int width, int margin, org.eclipse.swt.widgets.Control lastControl) Aligns the buttons as centered on the dialog.- Parameters:
buttons
- the array of buttons to alignwidth
- the standardized width of all the buttonsmargin
- the margin between buttonslastControl
- (optional) the bottom most control used for aligning the buttons relative to the bottom of the controls on the dialog
-
getModifyListenerTooltipText
public static final org.eclipse.swt.events.ModifyListener getModifyListenerTooltipText(org.eclipse.swt.widgets.Text textField) Gets the modify listener tooltip text.- Parameters:
textField
- the text field- Returns:
- the modify listener tooltip text
-
addDatabases
public void addDatabases(org.eclipse.swt.custom.CCombo wConnection) Adds the databases to the Combo Box component.- Parameters:
wConnection
- the Combo Box component
-
addDatabases
public void addDatabases(org.eclipse.swt.custom.CCombo wConnection, Class<? extends org.pentaho.di.core.database.DatabaseInterface> databaseType) Adds the databases with the specified type to the Combo Box component.- Parameters:
wConnection
- the Combo Box componentdatabaseType
- the database type
-
selectDatabase
Selects the database with the specified name in the Combo Box component.- Parameters:
wConnection
- the Combo Box componentname
- the name of the database to select
-
addConnectionLine
public org.eclipse.swt.custom.CCombo addConnectionLine(org.eclipse.swt.widgets.Composite parent, org.eclipse.swt.widgets.Control previous, int middle, int margin) Adds the connection line.- Parameters:
parent
- the parent UI componentprevious
- the previous UI componentmiddle
- the middlemargin
- the margin- Returns:
- the the Combo Box component for the given parameters
-
addConnectionLine
public org.eclipse.swt.custom.CCombo addConnectionLine(org.eclipse.swt.widgets.Composite parent, org.eclipse.swt.widgets.Control previous, int middle, int margin, Class<? extends org.pentaho.di.core.database.DatabaseInterface> databaseType) Adds the connection line.- Parameters:
parent
- the parent UI componentprevious
- the previous UI componentmiddle
- the middlemargin
- the margindatabaseType
- the database type- Returns:
- the Combo Box component for the given parameters
-
addConnectionLine
public org.eclipse.swt.custom.CCombo addConnectionLine(org.eclipse.swt.widgets.Composite parent, org.eclipse.swt.widgets.Control previous, int middle, int margin, org.eclipse.swt.widgets.Label wlConnection, org.eclipse.swt.widgets.Button wbwConnection, org.eclipse.swt.widgets.Button wbnConnection, org.eclipse.swt.widgets.Button wbeConnection) Adds the connection line.- Parameters:
parent
- the parent UI componentprevious
- the previous UI componentmiddle
- the middlemargin
- the marginwlConnection
- the connection labelwbnConnection
- the "new connection" buttonwbeConnection
- the "edit connection" button- Returns:
- the Combo Box component for the given parameters
-
addConnectionLine
public org.eclipse.swt.custom.CCombo addConnectionLine(org.eclipse.swt.widgets.Composite parent, org.eclipse.swt.widgets.Control previous, int middle, int margin, org.eclipse.swt.widgets.Label wlConnection, org.eclipse.swt.widgets.Button wbwConnection, org.eclipse.swt.widgets.Button wbnConnection, org.eclipse.swt.widgets.Button wbeConnection, Class<? extends org.pentaho.di.core.database.DatabaseInterface> databaseType) Adds the connection line.- Parameters:
parent
- the parent UI componentprevious
- the previous UI componentmiddle
- the middlemargin
- the marginwlConnection
- the connection labelwbnConnection
- the "new connection" buttonwbeConnection
- the "edit connection" buttondatabaseType
- the database type- Returns:
- the Combo Box component for the given parameters
-
showDbDialogUnlessCancelledOrValid
public String showDbDialogUnlessCancelledOrValid(org.pentaho.di.core.database.DatabaseMeta changing, org.pentaho.di.core.database.DatabaseMeta origin) -
showDbExistsDialog
public void showDbExistsDialog(org.pentaho.di.core.database.DatabaseMeta changing) -
reinitConnectionDropDown
-
getDatabaseDialog
Gets the database dialog.- Parameters:
shell
- the shell- Returns:
- the database dialog
-
storeScreenSize
public void storeScreenSize()Store screen size. -
toString
-
getRepository
public org.pentaho.di.repository.Repository getRepository()Gets the repository associated with this dialog.- Returns:
- Returns the repository.
-
setRepository
public void setRepository(org.pentaho.di.repository.Repository repository) Sets the repository associated with this dialog.- Parameters:
repository
- The repository to set.
-
setMinimalShellHeight
public static void setMinimalShellHeight(org.eclipse.swt.widgets.Shell shell, org.eclipse.swt.widgets.Control[] controls, int margin, int extra) Sets the minimal shell height.- Parameters:
shell
- the shellcontrols
- the controls to measuremargin
- the margin between the componentsextra
- the extra padding
-
setSize
public static void setSize(org.eclipse.swt.widgets.Shell shell) Sets the size of this dialog with respect to the given shell.- Parameters:
shell
- the new size
-
setSize
public static void setSize(org.eclipse.swt.widgets.Shell shell, int prefWidth, int prefHeight) -
setSize
public static void setSize(org.eclipse.swt.widgets.Shell shell, int minWidth, int minHeight, boolean packIt) Sets the size of this dialog with respect to the given parameters.- Parameters:
shell
- the shellminWidth
- the minimum widthminHeight
- the minimum heightpackIt
- true to pack the dialog components, false otherwise
-
setTraverseOrder
public static final void setTraverseOrder(org.eclipse.swt.widgets.Control[] controls) Sets the traverse order for the given controls.- Parameters:
controls
- the new traverse order
-
getFieldsFromPrevious
public static final void getFieldsFromPrevious(org.pentaho.di.trans.TransMeta transMeta, org.pentaho.di.trans.step.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:
transMeta
- the transformation metadatastepMeta
- the step metadatatableView
- the table viewkeyColumn
- the key columnnameColumn
- the name columndataTypeColumn
- the data type columnlengthColumn
- the length columnprecisionColumn
- the precision columnlistener
- a listener for tables insert events
-
getFieldsFromPrevious
public static final void getFieldsFromPrevious(org.pentaho.di.core.row.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 fieldstableView
- the table view to modifykeyColumn
- the column in the table view to match with the names of the fields, checks for existance if >0nameColumn
- the column numbers in which the name should end up indataTypeColumn
- the target column numbers in which the data type should end up inlengthColumn
- 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(org.pentaho.di.core.row.RowMetaInterface row, TableView tableView, int keyColumn, int[] nameColumn, int[] dataTypeColumn, int lengthColumn, int precisionColumn, boolean optimizeWidth, TableItemInsertListener listener) Gets unused fields from previous steps and inserts them as rows into a table view.- Parameters:
row
- the input fieldstableView
- the table view to modifykeyColumn
- the column in the table view to match with the names of the fields, checks for existance if >0nameColumn
- the column numbers in which the name should end up indataTypeColumn
- the target column numbers in which the data type should end up inlengthColumn
- 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)optimizeWidth
-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(org.pentaho.di.core.row.RowMetaInterface row, TableView tableView, int keyColumn, int[] nameColumn, int[] dataTypeColumn, int lengthColumn, int precisionColumn, boolean optimizeWidth, TableItemInsertListener listener, BaseStepDialog.FieldsChoiceDialogProvider getFieldsChoiceDialogProvider) Gets unused fields from previous steps and inserts them as rows into a table view.- Parameters:
row
- the input fieldstableView
- the table view to modifykeyColumn
- the column in the table view to match with the names of the fields, checks for existance if >0nameColumn
- the column numbers in which the name should end up indataTypeColumn
- the target column numbers in which the data type should end up inlengthColumn
- 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)optimizeWidth
-listener
- A listener that you can use to do custom modifications to the inserted table item, based on a value from the provided rowgetFieldsChoiceDialogProvider
- the GetFieldsChoice dialog provider
-
getFieldsFromPrevious
public static final void getFieldsFromPrevious(ComboVar comboVar, org.pentaho.di.trans.TransMeta transMeta, org.pentaho.di.trans.step.StepMeta stepMeta) Gets fields from previous steps and populate a ComboVar.- Parameters:
comboVar
- the Combo Box (with Variables) to populatetransMeta
- the transformation metadatastepMeta
- the step metadata
-
generateFieldMapping
public static final void generateFieldMapping(org.eclipse.swt.widgets.Shell shell, org.pentaho.di.core.row.RowMetaInterface sourceFields, org.pentaho.di.core.row.RowMetaInterface targetFields, List<org.pentaho.di.core.SourceToTargetMapping> fieldMapping) throws org.pentaho.di.core.exception.KettleException Create a new field mapping between source and target steps.- Parameters:
shell
- the shell of the parent windowsourceFields
- the source fieldstargetFields
- the target fieldsfieldMapping
- the list of source to target mappings to default to (can be empty but not null)- Throws:
org.pentaho.di.core.exception.KettleException
- in case something goes wrong during the field mapping
-
isBasic
public boolean isBasic()Checks if the log level is basic.- Returns:
- true, if the log level is basic, false otherwise
-
isDetailed
public boolean isDetailed()Checks if the log level is detailed.- Returns:
- true, if the log level is detailed, false otherwise
-
isDebug
public boolean isDebug()Checks if the log level is debug.- Returns:
- true, if the log level is debug, false otherwise
-
isRowLevel
public boolean isRowLevel()Checks if the log level is row level.- Returns:
- true, if the log level is row level, false otherwise
-
logMinimal
Log the message at a minimal logging level.- Parameters:
message
- the message to log
-
logMinimal
Log the message with arguments at a minimal logging level.- Parameters:
message
- the messagearguments
- the arguments
-
logBasic
Log the message at a basic logging level.- Parameters:
message
- the message
-
logBasic
Log the message with arguments at a basic logging level.- Parameters:
message
- the messagearguments
- the arguments
-
logDetailed
Log the message at a detailed logging level.- Parameters:
message
- the message
-
logDetailed
Log the message with arguments at a detailed logging level.- Parameters:
message
- the messagearguments
- the arguments
-
logDebug
Log the message at a debug logging level.- Parameters:
message
- the message
-
logDebug
Log the message with arguments at a debug logging level.- Parameters:
message
- the messagearguments
- the arguments
-
logRowlevel
Log the message at a rowlevel logging level.- Parameters:
message
- the message
-
logRowlevel
Log the message with arguments at a rowlevel logging level.- Parameters:
message
- the messagearguments
- the arguments
-
logError
Log the message at a error logging level.- Parameters:
message
- the message
-
logError
Log the message with the associated Throwable object at a error logging level.- Parameters:
message
- the messagee
- the e
-
logError
Log the message with arguments at a error logging level.- Parameters:
message
- the messagearguments
- the arguments
-
createHelpButton
protected org.eclipse.swt.widgets.Button createHelpButton(org.eclipse.swt.widgets.Shell shell, org.pentaho.di.trans.step.StepMeta stepMeta, org.pentaho.di.core.plugins.PluginInterface plugin) -
getMetaStore
public org.pentaho.metastore.api.IMetaStore getMetaStore() -
setMetaStore
public void setMetaStore(org.pentaho.metastore.api.IMetaStore metaStore) -
getPathOf
-