Class ConnectionConfigurationHandlerTestBuilder
- java.lang.Object
-
- com.snowflake.connectors.application.configuration.connection.ConnectionConfigurationHandlerTestBuilder
-
public class ConnectionConfigurationHandlerTestBuilder extends Object
Test builder for theConnectionConfigurationHandler
.Allows for customization of the following handler components:
ConnectionConfigurationInputValidator
ConnectionConfigurationCallback
ConnectionValidator
ConnectorErrorHelper
ConnectionConfigurationService
ConnectorStatusService
-
-
Constructor Summary
Constructors Constructor Description ConnectionConfigurationHandlerTestBuilder()
Creates a new, emptyConnectionConfigurationHandlerTestBuilder
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.snowflake.connectors.application.configuration.connection.ConnectionConfigurationHandler
build()
Builds a new handler instance.ConnectionConfigurationHandlerTestBuilder
withCallback(com.snowflake.connectors.application.configuration.connection.ConnectionConfigurationCallback callback)
Sets the callback used to build the handler instance.ConnectionConfigurationHandlerTestBuilder
withConnectionConfigurationService(com.snowflake.connectors.application.configuration.connection.ConnectionConfigurationService connectionConfigurationService)
Sets the connection configuration service used to build the handler instance.ConnectionConfigurationHandlerTestBuilder
withConnectionValidator(com.snowflake.connectors.application.configuration.connection.ConnectionValidator connectionValidator)
Sets the connection validator used to build the handler instance.ConnectionConfigurationHandlerTestBuilder
withConnectorStatusService(com.snowflake.connectors.application.status.ConnectorStatusService connectorStatusService)
Sets the connector status service used to build the handler instance.ConnectionConfigurationHandlerTestBuilder
withErrorHelper(com.snowflake.connectors.common.exception.helper.ConnectorErrorHelper errorHelper)
Sets the error helper used to build the handler instance.ConnectionConfigurationHandlerTestBuilder
withInputValidator(com.snowflake.connectors.application.configuration.connection.ConnectionConfigurationInputValidator inputValidator)
Sets the input validator used to build the handler instance.
-
-
-
Constructor Detail
-
ConnectionConfigurationHandlerTestBuilder
public ConnectionConfigurationHandlerTestBuilder()
Creates a new, emptyConnectionConfigurationHandlerTestBuilder
.Properties of the new builder instance must be fully customized before a handler instance can be built.
-
-
Method Detail
-
withInputValidator
public ConnectionConfigurationHandlerTestBuilder withInputValidator(com.snowflake.connectors.application.configuration.connection.ConnectionConfigurationInputValidator inputValidator)
Sets the input validator used to build the handler instance.- Parameters:
inputValidator
- connection configuration input validator- Returns:
- this builder
-
withCallback
public ConnectionConfigurationHandlerTestBuilder withCallback(com.snowflake.connectors.application.configuration.connection.ConnectionConfigurationCallback callback)
Sets the callback used to build the handler instance.- Parameters:
callback
- connector configuration callback- Returns:
- this builder
-
withConnectionValidator
public ConnectionConfigurationHandlerTestBuilder withConnectionValidator(com.snowflake.connectors.application.configuration.connection.ConnectionValidator connectionValidator)
Sets the connection validator used to build the handler instance.- Parameters:
connectionValidator
- connection validator- Returns:
- this builder
-
withErrorHelper
public ConnectionConfigurationHandlerTestBuilder withErrorHelper(com.snowflake.connectors.common.exception.helper.ConnectorErrorHelper errorHelper)
Sets the error helper used to build the handler instance.- Parameters:
errorHelper
- connector error helper- Returns:
- this builder
-
withConnectionConfigurationService
public ConnectionConfigurationHandlerTestBuilder withConnectionConfigurationService(com.snowflake.connectors.application.configuration.connection.ConnectionConfigurationService connectionConfigurationService)
Sets the connection configuration service used to build the handler instance.- Parameters:
connectionConfigurationService
- connection configuration service- Returns:
- this builder
-
withConnectorStatusService
public ConnectionConfigurationHandlerTestBuilder withConnectorStatusService(com.snowflake.connectors.application.status.ConnectorStatusService connectorStatusService)
Sets the connector status service used to build the handler instance.- Parameters:
connectorStatusService
- connector status service- Returns:
- this builder
-
build
public com.snowflake.connectors.application.configuration.connection.ConnectionConfigurationHandler build()
Builds a new handler instance.- Returns:
- new handler instance
- Throws:
NullPointerException
- if any property for the new handler is null
-
-