Class AbstractDatabaseConnection

    • Field Detail

      • m_URL

        protected JdbcUrl m_URL
        the URL to connect to the database.
      • m_User

        protected String m_User
        database username.
      • m_Password

        protected BasePassword m_Password
        database password.
      • m_ActualPassword

        protected BasePassword m_ActualPassword
        the actual SMTP password to use.
      • m_PromptForPassword

        protected boolean m_PromptForPassword
        whether to prompt the user for a password if none provided.
      • m_StopFlowIfCanceled

        protected boolean m_StopFlowIfCanceled
        whether to stop the flow if canceled.
      • m_CustomStopMessage

        protected String m_CustomStopMessage
        the custom stop message to use if flow gets stopped due to cancelation.
      • m_StopMode

        protected StopMode m_StopMode
        how to perform the stop.
      • m_CloseConnection

        protected boolean m_CloseConnection
        whether to close the connection when the flow wraps up.
    • Constructor Detail

      • AbstractDatabaseConnection

        public AbstractDatabaseConnection()
    • Method Detail

      • setURL

        public void setURL​(JdbcUrl value)
        Sets the database URL.
        Parameters:
        value - the URL
      • getURL

        public JdbcUrl getURL()
        Returns the database URL.
        Returns:
        the URL
      • URLTipText

        public String URLTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • getResolvedURL

        public String getResolvedURL()
        Expands variables and placeholders.
        Returns:
        the fully resolved URL
      • setUser

        public void setUser​(String value)
        Sets the database user.
        Parameters:
        value - the user
      • getUser

        public String getUser()
        Returns the database user.
        Returns:
        the user
      • userTipText

        public String userTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • passwordTipText

        public String passwordTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setDataTypeSetup

        public void setDataTypeSetup​(AbstractDataTypeSetup value)
        Sets the data type setup to apply to the connection.
        Parameters:
        value - the setup
      • getDataTypeSetup

        public AbstractDataTypeSetup getDataTypeSetup()
        Returns the data type setup to apply to the connection.
        Returns:
        the setup
      • dataTypeSetupTipText

        public String dataTypeSetupTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setStopFlowIfCanceled

        public void setStopFlowIfCanceled​(boolean value)
        Sets whether to stop the flow if dialog canceled.
        Specified by:
        setStopFlowIfCanceled in interface InteractiveActor
        Parameters:
        value - if true flow gets stopped if dialog canceled
      • getStopFlowIfCanceled

        public boolean getStopFlowIfCanceled()
        Returns whether to stop the flow if dialog canceled.
        Specified by:
        getStopFlowIfCanceled in interface InteractiveActor
        Returns:
        true if the flow gets stopped if dialog canceled
      • stopFlowIfCanceledTipText

        public String stopFlowIfCanceledTipText()
        Returns the tip text for this property.
        Specified by:
        stopFlowIfCanceledTipText in interface InteractiveActor
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setCustomStopMessage

        public void setCustomStopMessage​(String value)
        Sets the custom message to use when stopping the flow.
        Specified by:
        setCustomStopMessage in interface InteractiveActor
        Parameters:
        value - the stop message
      • getCustomStopMessage

        public String getCustomStopMessage()
        Returns the custom message to use when stopping the flow.
        Specified by:
        getCustomStopMessage in interface InteractiveActor
        Returns:
        the stop message
      • customStopMessageTipText

        public String customStopMessageTipText()
        Returns the tip text for this property.
        Specified by:
        customStopMessageTipText in interface InteractiveActor
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • stopModeTipText

        public String stopModeTipText()
        Returns the tip text for this property.
        Specified by:
        stopModeTipText in interface StopModeSupporter
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setCloseConnection

        public void setCloseConnection​(boolean value)
        Sets whether to close the connection once the flow wraps up.
        Parameters:
        value - true if to close
      • getCloseConnection

        public boolean getCloseConnection()
        Returns whether to close the connection once the flow wraps up.
        Returns:
        true if to close
      • closeConnectionTipText

        public String closeConnectionTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • doInteract

        public String doInteract()
        Performs the interaction with the user.
        Specified by:
        doInteract in interface InteractiveActor
        Returns:
        true if successfully interacted
      • supportsHeadlessInteraction

        public boolean supportsHeadlessInteraction()
        Returns whether headless interaction is supported.
        Specified by:
        supportsHeadlessInteraction in interface InteractiveActor
        Returns:
        true if interaction in headless environment is possible
      • doInteractHeadless

        public String doInteractHeadless()
        Performs the interaction with the user in a headless environment.
        Specified by:
        doInteractHeadless in interface InteractiveActor
        Returns:
        true if successfully interacted
      • doExecute

        protected String doExecute()
        Executes the actor.
        Specified by:
        doExecute in class AbstractActor
        Returns:
        null if everything is fine, otherwise error message
      • retrieveConnection

        protected abstract AbstractDatabaseConnection retrieveConnection()
        Returns the database connection in use. Reconnects the database, to make sure that the database connection is the correct one.
        Returns:
        the connection object
      • getConnection

        public AbstractDatabaseConnection getConnection()
        Returns the database connection in use. Reconnects the database, to make sure that the database connection is the correct one.
        Returns:
        the connection object
      • wrapUp

        public void wrapUp()
        Cleans up after the execution has finished. Graphical output is left untouched.
        Specified by:
        wrapUp in interface Actor
        Overrides:
        wrapUp in class AbstractActor