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
,CreditCardValidatorDialog
,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
,GetRepositoryNamesDialog
,GetSlaveSequenceDialog
,GetSubFoldersDialog
,GetTableNamesDialog
,GetVariableDialog
,GroupByDialog
,HTTPDialog
,HTTPPOSTDialog
,IfNullDialog
,InjectorDialog
,InsertUpdateDialog
,JaninoDialog
,JavaFilterDialog
,JobExecutorDialog
,JoinRowsDialog
,LDIFInputDialog
,LoadFileInputDialog
,MailDialog
,MailInputDialog
,MailValidatorDialog
,MappingDialog
,MappingInputDialog
,MappingOutputDialog
,MemoryGroupByDialog
,MergeJoinDialog
,MergeRowsDialog
,MissingTransDialog
,ModPartitionerDialog
,MultiMergeJoinDialog
,NormaliserDialog
,NullIfDialog
,NumberRangeDialog
,OlapInputDialog
,ParGzipCsvInputDialog
,PGPDecryptStreamDialog
,PGPEncryptStreamDialog
,PrioritizeStreamsDialog
,ProcessFilesDialog
,PropertyInputDialog
,PropertyOutputDialog
,RandomCCNumberGeneratorDialog
,RandomValueDialog
,RegexEvalDialog
,ReplaceStringDialog
,ReservoirSamplingDialog
,RestDialog
,RowGeneratorDialog
,RowsFromResultDialog
,RowsToResultDialog
,SampleRowsDialog
,SasInputDialog
,ScriptDialog
,ScriptValuesModDialog
,SecretKeyGeneratorDialog
,SelectValuesDialog
,SetValueConstantDialog
,SetValueFieldDialog
,SetVariableDialog
,SFTPPutDialog
,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
Nested Classes Modifier and Type Class Description class
BaseStepDialog.AddConnectionListener
class
BaseStepDialog.EditConnectionListener
static interface
BaseStepDialog.FieldsChoiceDialogProvider
-
Field Summary
Fields Modifier and Type Field Description protected boolean
backupChanged
Whether the dialog (and its backup) have changed.protected org.pentaho.di.trans.step.StepMetaInterface
baseStepMeta
The base step meta.protected static int
BUTTON_ALIGNMENT_CENTER
A constant indicating a center button alignment.static int
BUTTON_ALIGNMENT_LEFT
A constant indicating a left button alignment.static int
BUTTON_ALIGNMENT_RIGHT
A constant indicating a right button alignment.protected static int
buttonAlignment
The button alignment (defaults to center).protected boolean
changed
Whether the dialog (and its backup) have changed.protected DatabaseDialog
databaseDialog
A reference to a database dialog.protected org.eclipse.swt.layout.FormData
fdCancel
FormData for the common dialog buttons.protected org.eclipse.swt.layout.FormData
fdCreate
FormData for the common dialog buttons.protected org.eclipse.swt.layout.FormData
fdGet
FormData for the common dialog buttons.protected org.eclipse.swt.layout.FormData
fdlStepname
The FormData for the step name and its label.protected org.eclipse.swt.layout.FormData
fdOK
FormData for the common dialog buttons.protected org.eclipse.swt.layout.FormData
fdPreview
FormData for the common dialog buttons.protected org.eclipse.swt.layout.FormData
fdSQL
FormData for the common dialog buttons.protected org.eclipse.swt.layout.FormData
fdStepname
The FormData for the step name and its label.protected org.pentaho.di.core.logging.LogChannel
log
The log channel for this dialog.static org.pentaho.di.core.logging.LoggingObjectInterface
loggingObject
The logging object interface for this dialog.protected org.eclipse.swt.widgets.Listener
lsCancel
Listeners for the common dialog buttons.protected org.eclipse.swt.widgets.Listener
lsCreate
Listeners for the common dialog buttons.protected org.eclipse.swt.events.SelectionAdapter
lsDef
A listener adapter for default widget selection.protected org.eclipse.swt.widgets.Listener
lsGet
Listeners for the common dialog buttons.protected org.eclipse.swt.widgets.Listener
lsOK
Listeners for the common dialog buttons.protected org.eclipse.swt.widgets.Listener
lsPreview
Listeners for the common dialog buttons.protected org.eclipse.swt.widgets.Listener
lsResize
A listener for dialog resizing.protected org.eclipse.swt.widgets.Listener
lsSQL
Listeners for the common dialog buttons.protected org.pentaho.metastore.api.IMetaStore
metaStore
The MetaStore to useprotected PropsUI
props
The UI properties.protected org.pentaho.di.repository.Repository
repository
The associated repository.protected org.eclipse.swt.widgets.Shell
shell
A reference to the shell.protected org.pentaho.di.trans.step.StepMeta
stepMeta
The step meta for this dialog.protected String
stepname
The step name.protected org.pentaho.di.trans.TransMeta
transMeta
The metadata for the associated transformation.protected static org.pentaho.di.core.variables.VariableSpace
variables
The variable bindings for this dialog.protected org.eclipse.swt.widgets.Button
wCancel
Common dialog buttons.protected org.eclipse.swt.widgets.Button
wCreate
Common dialog buttons.protected org.eclipse.swt.widgets.Button
wGet
Common dialog buttons.protected org.eclipse.swt.widgets.Label
wlStepname
The Step name label.protected org.eclipse.swt.widgets.Button
wOK
Common dialog buttons.protected org.eclipse.swt.widgets.Button
wPreview
Common dialog buttons.protected org.eclipse.swt.widgets.Button
wSQL
Common dialog buttons.protected org.eclipse.swt.widgets.Text
wStepname
The Step name UI component.
-
Constructor Summary
Constructors Constructor Description 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.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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.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 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
getButtonAlignment()
Returns the default alignment for the buttons.protected DatabaseDialog
getDatabaseDialog(org.eclipse.swt.widgets.Shell shell)
Gets the database dialog.static 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 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 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 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 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
getMetaStore()
static 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
getRepository()
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
isDetailed()
Checks if the log level is detailed.boolean
isRowLevel()
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
logBasic(String message)
Log the message at a basic logging level.void
logBasic(String message, Object... arguments)
Log the message with arguments at a basic logging level.void
logDebug(String message)
Log the message at a debug logging level.void
logDebug(String message, Object... arguments)
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
logError(String message)
Log the message at a error logging level.void
logError(String message, Object... arguments)
Log the message with arguments at a error logging level.void
logError(String message, Throwable e)
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 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 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 void
positionBottomLeftButtons(org.eclipse.swt.widgets.Composite composite, org.eclipse.swt.widgets.Button[] buttons, int margin, org.eclipse.swt.widgets.Control lastControl)
static 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 void
setTraverseOrder(org.eclipse.swt.widgets.Control[] controls)
Sets the traverse order for the given controls.String
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
storeScreenSize()
Store screen size.String
toString()
-
-
-
Field Detail
-
loggingObject
public static final org.pentaho.di.core.logging.LoggingObjectInterface loggingObject
The logging object interface for this dialog.
-
variables
protected static org.pentaho.di.core.variables.VariableSpace variables
The variable bindings for this dialog.
-
stepname
protected String stepname
The step name.
-
wlStepname
protected org.eclipse.swt.widgets.Label wlStepname
The Step name label.
-
wStepname
protected org.eclipse.swt.widgets.Text wStepname
The Step name UI component.
-
fdlStepname
protected org.eclipse.swt.layout.FormData fdlStepname
The FormData for the step name and its label.
-
fdStepname
protected org.eclipse.swt.layout.FormData fdStepname
The FormData for the step name and its label.
-
wOK
protected org.eclipse.swt.widgets.Button wOK
Common dialog buttons.
-
wGet
protected org.eclipse.swt.widgets.Button wGet
Common dialog buttons.
-
wPreview
protected org.eclipse.swt.widgets.Button wPreview
Common dialog buttons.
-
wSQL
protected org.eclipse.swt.widgets.Button wSQL
Common dialog buttons.
-
wCreate
protected org.eclipse.swt.widgets.Button wCreate
Common dialog buttons.
-
wCancel
protected org.eclipse.swt.widgets.Button wCancel
Common dialog buttons.
-
fdOK
protected org.eclipse.swt.layout.FormData fdOK
FormData for the common dialog buttons.
-
fdGet
protected org.eclipse.swt.layout.FormData fdGet
FormData for the common dialog buttons.
-
fdPreview
protected org.eclipse.swt.layout.FormData fdPreview
FormData for the common dialog buttons.
-
fdSQL
protected org.eclipse.swt.layout.FormData fdSQL
FormData for the common dialog buttons.
-
fdCreate
protected org.eclipse.swt.layout.FormData fdCreate
FormData for the common dialog buttons.
-
fdCancel
protected org.eclipse.swt.layout.FormData fdCancel
FormData for the common dialog buttons.
-
lsOK
protected org.eclipse.swt.widgets.Listener lsOK
Listeners for the common dialog buttons.
-
lsGet
protected org.eclipse.swt.widgets.Listener lsGet
Listeners for the common dialog buttons.
-
lsPreview
protected org.eclipse.swt.widgets.Listener lsPreview
Listeners for the common dialog buttons.
-
lsSQL
protected org.eclipse.swt.widgets.Listener lsSQL
Listeners for the common dialog buttons.
-
lsCreate
protected org.eclipse.swt.widgets.Listener lsCreate
Listeners for the common dialog buttons.
-
lsCancel
protected org.eclipse.swt.widgets.Listener lsCancel
Listeners for the common dialog buttons.
-
transMeta
protected org.pentaho.di.trans.TransMeta transMeta
The metadata for the associated transformation.
-
shell
protected org.eclipse.swt.widgets.Shell shell
A reference to the shell.
-
lsDef
protected org.eclipse.swt.events.SelectionAdapter lsDef
A listener adapter for default widget selection.
-
lsResize
protected org.eclipse.swt.widgets.Listener lsResize
A listener for dialog resizing.
-
changed
protected boolean changed
Whether the dialog (and its backup) have changed.
-
backupChanged
protected boolean backupChanged
Whether the dialog (and its backup) have changed.
-
baseStepMeta
protected org.pentaho.di.trans.step.StepMetaInterface baseStepMeta
The base step meta.
-
props
protected PropsUI props
The UI properties.
-
repository
protected org.pentaho.di.repository.Repository repository
The associated repository.
-
metaStore
protected org.pentaho.metastore.api.IMetaStore metaStore
The MetaStore to use
-
stepMeta
protected org.pentaho.di.trans.step.StepMeta stepMeta
The step meta for this dialog.
-
log
protected org.pentaho.di.core.logging.LogChannel log
The log channel for this dialog.
-
BUTTON_ALIGNMENT_CENTER
protected static final int BUTTON_ALIGNMENT_CENTER
A constant indicating a center button alignment.- See Also:
- Constant Field Values
-
BUTTON_ALIGNMENT_LEFT
public static final int BUTTON_ALIGNMENT_LEFT
A constant indicating a left button alignment.- See Also:
- Constant Field Values
-
BUTTON_ALIGNMENT_RIGHT
public static final int BUTTON_ALIGNMENT_RIGHT
A constant indicating a right button alignment.- See Also:
- Constant Field Values
-
buttonAlignment
protected static int buttonAlignment
The button alignment (defaults to center).
-
databaseDialog
protected DatabaseDialog databaseDialog
A reference to a database dialog.
-
-
Constructor Detail
-
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 Detail
-
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
public void selectDatabase(org.eclipse.swt.custom.CCombo wConnection, String name)
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
public void reinitConnectionDropDown(org.eclipse.swt.custom.CCombo dropDown, String selected)
-
getDatabaseDialog
protected DatabaseDialog getDatabaseDialog(org.eclipse.swt.widgets.Shell shell)
Gets the database dialog.- Parameters:
shell
- the shell- Returns:
- the database dialog
-
storeScreenSize
public void storeScreenSize()
Store screen size.
-
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
public void logMinimal(String message)
Log the message at a minimal logging level.- Parameters:
message
- the message to log
-
logMinimal
public void logMinimal(String message, Object... arguments)
Log the message with arguments at a minimal logging level.- Parameters:
message
- the messagearguments
- the arguments
-
logBasic
public void logBasic(String message)
Log the message at a basic logging level.- Parameters:
message
- the message
-
logBasic
public void logBasic(String message, Object... arguments)
Log the message with arguments at a basic logging level.- Parameters:
message
- the messagearguments
- the arguments
-
logDetailed
public void logDetailed(String message)
Log the message at a detailed logging level.- Parameters:
message
- the message
-
logDetailed
public void logDetailed(String message, Object... arguments)
Log the message with arguments at a detailed logging level.- Parameters:
message
- the messagearguments
- the arguments
-
logDebug
public void logDebug(String message)
Log the message at a debug logging level.- Parameters:
message
- the message
-
logDebug
public void logDebug(String message, Object... arguments)
Log the message with arguments at a debug logging level.- Parameters:
message
- the messagearguments
- the arguments
-
logRowlevel
public void logRowlevel(String message)
Log the message at a rowlevel logging level.- Parameters:
message
- the message
-
logRowlevel
public void logRowlevel(String message, Object... arguments)
Log the message with arguments at a rowlevel logging level.- Parameters:
message
- the messagearguments
- the arguments
-
logError
public void logError(String message)
Log the message at a error logging level.- Parameters:
message
- the message
-
logError
public void logError(String message, Throwable e)
Log the message with the associated Throwable object at a error logging level.- Parameters:
message
- the messagee
- the e
-
logError
public void logError(String message, Object... arguments)
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
protected String getPathOf(org.pentaho.di.repository.RepositoryElementMetaInterface object)
-
-