Class BaseTransformDialog

    • Field Detail

      • loggingObject

        public static final ILoggingObject loggingObject
        The logging object interface for this dialog.
      • variables

        protected IVariables variables
        The variable bindings for this dialog.
      • transformName

        protected String transformName
        The transform name.
      • wlTransformName

        protected org.eclipse.swt.widgets.Label wlTransformName
        The Transform name label.
      • wTransformName

        protected org.eclipse.swt.widgets.Text wTransformName
        The Transform name UI component.
      • fdlTransformName

        protected org.eclipse.swt.layout.FormData fdlTransformName
        The FormData for the transform name and its label.
      • fdTransformName

        protected org.eclipse.swt.layout.FormData fdTransformName
      • wOk

        protected org.eclipse.swt.widgets.Button wOk
        Common dialog buttons.
      • wGet

        protected org.eclipse.swt.widgets.Button wGet
      • wPreview

        protected org.eclipse.swt.widgets.Button wPreview
      • wSql

        protected org.eclipse.swt.widgets.Button wSql
      • wCreate

        protected org.eclipse.swt.widgets.Button wCreate
      • wCancel

        protected org.eclipse.swt.widgets.Button wCancel
      • fdOk

        protected org.eclipse.swt.layout.FormData fdOk
        FormData for the common dialog buttons.
      • fdGet

        protected org.eclipse.swt.layout.FormData fdGet
      • fdPreview

        protected org.eclipse.swt.layout.FormData fdPreview
      • fdSql

        protected org.eclipse.swt.layout.FormData fdSql
      • fdCreate

        protected org.eclipse.swt.layout.FormData fdCreate
      • fdCancel

        protected org.eclipse.swt.layout.FormData fdCancel
      • pipelineMeta

        protected PipelineMeta pipelineMeta
        The metadata for the associated pipeline.
      • shell

        protected org.eclipse.swt.widgets.Shell shell
        A reference to the parent shell.
      • 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
      • baseTransformMeta

        protected ITransformMeta baseTransformMeta
        The base transform meta.
      • props

        protected PropsUi props
        The UI properties.
      • transformMeta

        protected TransformMeta transformMeta
        The transform meta for this dialog.
      • log

        protected 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

        protected 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).
    • Constructor Detail

      • BaseTransformDialog

        public BaseTransformDialog​(org.eclipse.swt.widgets.Shell parent,
                                   IVariables variables,
                                   BaseTransformMeta<?,​?> baseTransformMeta,
                                   PipelineMeta pipelineMeta,
                                   String transformName)
        Instantiates a new base transform dialog.
        Parameters:
        parent - the parent shell
        baseTransformMeta - the associated base transform metadata
        pipelineMeta - the associated pipeline metadata
        transformName - the transform name
      • BaseTransformDialog

        public BaseTransformDialog​(org.eclipse.swt.widgets.Shell parent,
                                   IVariables variables,
                                   ITransformMeta baseTransformMeta,
                                   PipelineMeta pipelineMeta,
                                   String transformName)
        Instantiates a new base transform dialog.
        Parameters:
        parent - the parent shell
        baseTransformMeta - the associated base transform metadata
        pipelineMeta - the associated pipeline metadata
        transformName - the transform name
      • BaseTransformDialog

        public BaseTransformDialog​(org.eclipse.swt.widgets.Shell parent,
                                   int nr,
                                   IVariables variables,
                                   BaseTransformMeta<?,​?> in,
                                   PipelineMeta tr)
        Instantiates a new base transform dialog.
        Parameters:
        parent - the parent shell
        nr - the number of rows
        variables -
        in - the base transform metadata
        tr - the pipeline metadata
    • Method Detail

      • setShellImage

        public void setShellImage​(org.eclipse.swt.widgets.Shell shell,
                                  ITransformMeta transformMetaInterface)
        Sets the shell image.
        Parameters:
        shell - the shell
        transformMetaInterface - the transform meta interface (because of the legacy code)
      • setActive

        public void setActive()
      • dispose

        public void dispose()
        Dispose this dialog.
      • isDisposed

        public boolean isDisposed()
      • 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 buttons
        margin - the margin between buttons
        lastControl - 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 key Button_Position and has the valid values of left, center, right with center being the default.

        Parameters:
        composite - the composite
        buttons - The buttons to position.
        margin - The margin between the buttons in pixels
        lastControl - the last control
      • 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 key Button_Position. The valid values are:
        • left
        • center
        • right
        NOTE: if the alignment is not provided or contains an invalid value, 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 align
        width - the standardized width of all the buttons
        margin - the margin between buttons
        lastControl - (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 align
        width - the standardized width of all the buttons
        margin - the margin between buttons
        lastControl - (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 align
        width - the standardized width of all the buttons
        margin - the margin between buttons
        lastControl - (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​(IVariables variables,
                                                                                               TextVar textField)
        Gets the modify listener tooltip text.
        Parameters:
        variables -
        textField - the text field
        Returns:
        the modify listener tooltip text
      • addConnectionLine

        public MetaSelectionLine<DatabaseMeta> addConnectionLine​(org.eclipse.swt.widgets.Composite parent,
                                                                 org.eclipse.swt.widgets.Control previous,
                                                                 DatabaseMeta selected,
                                                                 org.eclipse.swt.events.ModifyListener lsMod)
        Adds the connection line for the given parent and previous control, and returns a meta selection manager control
        Parameters:
        parent - the parent composite object
        previous - the previous control
        Returns:
        the combo box UI component
      • addConnectionLine

        public MetaSelectionLine<DatabaseMeta> addConnectionLine​(org.eclipse.swt.widgets.Composite parent,
                                                                 org.eclipse.swt.widgets.Control previous,
                                                                 DatabaseMeta selected,
                                                                 org.eclipse.swt.events.ModifyListener lsMod,
                                                                 String connectionLabel)
      • addConnectionLine

        public MetaSelectionLine<DatabaseMeta> addConnectionLine​(org.eclipse.swt.widgets.Composite parent,
                                                                 org.eclipse.swt.widgets.Control previous,
                                                                 DatabaseMeta selected,
                                                                 org.eclipse.swt.events.ModifyListener lsMod,
                                                                 String connectionLabel,
                                                                 String connectionTooltip)
      • 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 shell
        controls - the controls to measure
        margin - the margin between the components
        extra - 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 minWidth,
                                   int minHeight)
      • 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 shell
        minWidth - the minimum width
        minHeight - the minimum height
        packIt - 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​(IVariables variables,
                                                       PipelineMeta pipelineMeta,
                                                       TransformMeta transformMeta,
                                                       TableView tableView,
                                                       int keyColumn,
                                                       int[] nameColumn,
                                                       int[] dataTypeColumn,
                                                       int lengthColumn,
                                                       int precisionColumn,
                                                       ITableItemInsertListener listener)
        Gets unused fields from previous transforms and inserts them as rows into a table view.
        Parameters:
        variables -
        pipelineMeta - the pipeline metadata
        transformMeta - the transform metadata
        tableView - the table view
        keyColumn - the key column
        nameColumn - the name column
        dataTypeColumn - the data type column
        lengthColumn - the length column
        precisionColumn - the precision column
        listener - a listener for tables insert events
      • getFieldsFromPrevious

        public static final void getFieldsFromPrevious​(IRowMeta row,
                                                       TableView tableView,
                                                       int keyColumn,
                                                       int[] nameColumn,
                                                       int[] dataTypeColumn,
                                                       int lengthColumn,
                                                       int precisionColumn,
                                                       ITableItemInsertListener listener)
        Gets unused fields from previous transforms 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​(IRowMeta row,
                                                       TableView tableView,
                                                       int keyColumn,
                                                       int[] nameColumn,
                                                       int[] dataTypeColumn,
                                                       int lengthColumn,
                                                       int precisionColumn,
                                                       boolean optimizeWidth,
                                                       ITableItemInsertListener listener)
        Gets unused fields from previous transforms 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)
        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​(IRowMeta row,
                                                       TableView tableView,
                                                       int keyColumn,
                                                       int[] nameColumn,
                                                       int[] dataTypeColumn,
                                                       int lengthColumn,
                                                       int precisionColumn,
                                                       boolean optimizeWidth,
                                                       ITableItemInsertListener listener,
                                                       BaseTransformDialog.IFieldsChoiceDialogProvider getFieldsChoiceDialogProvider)
        Gets unused fields from previous transforms 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)
        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
        getFieldsChoiceDialogProvider - the GetFieldsChoice dialog provider
      • getFieldsFromPrevious

        public static final void getFieldsFromPrevious​(IVariables variables,
                                                       ComboVar comboVar,
                                                       PipelineMeta pipelineMeta,
                                                       TransformMeta transformMeta)
        Gets fields from previous transforms and populate a ComboVar.
        Parameters:
        variables -
        comboVar - the Combo Box (with Variables) to populate
        pipelineMeta - the pipeline metadata
        transformMeta - the transform metadata
      • 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 message
        arguments - 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 message
        arguments - 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 message
        arguments - 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 message
        arguments - 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 message
        arguments - 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 message
        e - the e
      • logError

        public void logError​(String message,
                             Object... arguments)
        Log the message with arguments at a error logging level.
        Parameters:
        message - the message
        arguments - the arguments
      • addConnectionLine

        public MetaSelectionLine<DatabaseMeta> addConnectionLine​(org.eclipse.swt.widgets.Composite parent,
                                                                 org.eclipse.swt.widgets.Control previous,
                                                                 String connection,
                                                                 org.eclipse.swt.events.ModifyListener lsMod)
        Adds the connection line for the given parent and previous control, and returns a meta selection manager control
        Parameters:
        parent - the parent composite object
        previous - the previous control
        connection -
        lsMod -
        Returns:
        the combo box UI component
      • getVariables

        public IVariables getVariables()
        Gets variables
        Returns:
        value of variables
      • replaceNameWithBaseFilename

        protected void replaceNameWithBaseFilename​(String filename)