Class UpdateResourceHandlerTestBuilder
- java.lang.Object
-
- com.snowflake.connectors.application.ingestion.update.UpdateResourceHandlerBuilder
-
- com.snowflake.connectors.application.ingestion.update.UpdateResourceHandlerTestBuilder
-
public class UpdateResourceHandlerTestBuilder extends com.snowflake.connectors.application.ingestion.update.UpdateResourceHandlerBuilderTest builder for theUpdateResourceHandler.Allows for customization of the following handler components:
UpdateResourceValidatorPreUpdateResourceCallbackPostUpdateResourceCallbackConnectorErrorHelperResourceIngestionDefinitionRepositoryIngestionProcessRepositoryTransactionManager
-
-
Constructor Summary
Constructors Constructor Description UpdateResourceHandlerTestBuilder()Creates a new, emptyUpdateResourceHandlerTestBuilder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UpdateResourceHandlerTestBuilderwithErrorHelper(com.snowflake.connectors.common.exception.helper.ConnectorErrorHelper errorHelper)Sets the error helper used to build the test handler instance.UpdateResourceHandlerTestBuilderwithIngestionProcessRepository(com.snowflake.connectors.application.ingestion.process.IngestionProcessRepository ingestionProcessRepository)Sets the ingestion process repository used to build the test handler instance.UpdateResourceHandlerTestBuilderwithPostUpdateResourceCallback(com.snowflake.connectors.application.ingestion.update.PostUpdateResourceCallback callback)Sets the PostUpdateResourceCallback used to build the test handler instance.UpdateResourceHandlerTestBuilderwithPreUpdateResourceCallback(com.snowflake.connectors.application.ingestion.update.PreUpdateResourceCallback callback)Sets the PreUpdateResourceCallback used to build the test handler instance.UpdateResourceHandlerTestBuilderwithResourceIngestionDefinitionRepository(com.snowflake.connectors.application.ingestion.definition.ResourceIngestionDefinitionRepository<com.snowflake.connectors.application.ingestion.definition.VariantResource> resourceIngestionDefinitionRepository)Sets the resource ingestion definition repository used to build the test handler instance.UpdateResourceHandlerTestBuilderwithTransactionManager(com.snowflake.connectors.util.snowflake.TransactionManager transactionManager)Sets the transaction manager used to build the test handler instance.UpdateResourceHandlerTestBuilderwithUpdateResourceValidator(com.snowflake.connectors.application.ingestion.update.UpdateResourceValidator validator)Sets the UpdateResourceValidator used to build the test handler instance.
-
-
-
Constructor Detail
-
UpdateResourceHandlerTestBuilder
public UpdateResourceHandlerTestBuilder()
Creates a new, emptyUpdateResourceHandlerTestBuilder.Properties of the new builder instance must be fully customized before a handler instance can be built.
-
-
Method Detail
-
withErrorHelper
public UpdateResourceHandlerTestBuilder withErrorHelper(com.snowflake.connectors.common.exception.helper.ConnectorErrorHelper errorHelper)
Sets the error helper used to build the test handler instance.- Overrides:
withErrorHelperin classcom.snowflake.connectors.application.ingestion.update.UpdateResourceHandlerBuilder- Parameters:
errorHelper- connector error helper- Returns:
- this builder
-
withUpdateResourceValidator
public UpdateResourceHandlerTestBuilder withUpdateResourceValidator(com.snowflake.connectors.application.ingestion.update.UpdateResourceValidator validator)
Sets the UpdateResourceValidator used to build the test handler instance. It allows to add connector-specific logic which validates whether a resource can be updated.- Overrides:
withUpdateResourceValidatorin classcom.snowflake.connectors.application.ingestion.update.UpdateResourceHandlerBuilder- Parameters:
validator- custom callback implementation- Returns:
- this builder
-
withPreUpdateResourceCallback
public UpdateResourceHandlerTestBuilder withPreUpdateResourceCallback(com.snowflake.connectors.application.ingestion.update.PreUpdateResourceCallback callback)
Sets the PreUpdateResourceCallback used to build the test handler instance. It allows to add connector-specific logic which is invoked before a resource is updated.- Overrides:
withPreUpdateResourceCallbackin classcom.snowflake.connectors.application.ingestion.update.UpdateResourceHandlerBuilder- Parameters:
callback- custom callback implementation- Returns:
- this builder
-
withPostUpdateResourceCallback
public UpdateResourceHandlerTestBuilder withPostUpdateResourceCallback(com.snowflake.connectors.application.ingestion.update.PostUpdateResourceCallback callback)
Sets the PostUpdateResourceCallback used to build the test handler instance. It allows to add connector-specific logic which is invoked after a resource is updated.- Overrides:
withPostUpdateResourceCallbackin classcom.snowflake.connectors.application.ingestion.update.UpdateResourceHandlerBuilder- Parameters:
callback- custom callback implementation- Returns:
- this builder
-
withResourceIngestionDefinitionRepository
public UpdateResourceHandlerTestBuilder withResourceIngestionDefinitionRepository(com.snowflake.connectors.application.ingestion.definition.ResourceIngestionDefinitionRepository<com.snowflake.connectors.application.ingestion.definition.VariantResource> resourceIngestionDefinitionRepository)
Sets the resource ingestion definition repository used to build the test handler instance.- Parameters:
resourceIngestionDefinitionRepository- resource ingestion definition repository- Returns:
- this builder
-
withIngestionProcessRepository
public UpdateResourceHandlerTestBuilder withIngestionProcessRepository(com.snowflake.connectors.application.ingestion.process.IngestionProcessRepository ingestionProcessRepository)
Sets the ingestion process repository used to build the test handler instance.- Parameters:
ingestionProcessRepository- ingestion process repository- Returns:
- this builder
-
withTransactionManager
public UpdateResourceHandlerTestBuilder withTransactionManager(com.snowflake.connectors.util.snowflake.TransactionManager transactionManager)
Sets the transaction manager used to build the test handler instance.- Parameters:
transactionManager- transaction manager- Returns:
- this builder
-
-