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.UpdateResourceHandlerBuilder
Test builder for theUpdateResourceHandler
.Allows for customization of the following handler components:
UpdateResourceValidator
PreUpdateResourceCallback
PostUpdateResourceCallback
ConnectorErrorHelper
ResourceIngestionDefinitionRepository
IngestionProcessRepository
TransactionManager
-
-
Constructor Summary
Constructors Constructor Description UpdateResourceHandlerTestBuilder()
Creates a new, emptyUpdateResourceHandlerTestBuilder
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UpdateResourceHandlerTestBuilder
withErrorHelper(com.snowflake.connectors.common.exception.helper.ConnectorErrorHelper errorHelper)
Sets the error helper used to build the test handler instance.UpdateResourceHandlerTestBuilder
withIngestionProcessRepository(com.snowflake.connectors.application.ingestion.process.IngestionProcessRepository ingestionProcessRepository)
Sets the ingestion process repository used to build the test handler instance.UpdateResourceHandlerTestBuilder
withPostUpdateResourceCallback(com.snowflake.connectors.application.ingestion.update.PostUpdateResourceCallback callback)
Sets the PostUpdateResourceCallback used to build the test handler instance.UpdateResourceHandlerTestBuilder
withPreUpdateResourceCallback(com.snowflake.connectors.application.ingestion.update.PreUpdateResourceCallback callback)
Sets the PreUpdateResourceCallback used to build the test handler instance.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.UpdateResourceHandlerTestBuilder
withTransactionManager(com.snowflake.connectors.util.snowflake.TransactionManager transactionManager)
Sets the transaction manager used to build the test handler instance.UpdateResourceHandlerTestBuilder
withUpdateResourceValidator(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:
withErrorHelper
in 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:
withUpdateResourceValidator
in 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:
withPreUpdateResourceCallback
in 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:
withPostUpdateResourceCallback
in 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
-
-