Class UpdateResourceHandlerTestBuilder


  • public class UpdateResourceHandlerTestBuilder
    extends com.snowflake.connectors.application.ingestion.update.UpdateResourceHandlerBuilder
    Test builder for the UpdateResourceHandler.

    Allows for customization of the following handler components:

    • UpdateResourceValidator
    • PreUpdateResourceCallback
    • PostUpdateResourceCallback
    • ConnectorErrorHelper
    • ResourceIngestionDefinitionRepository
    • IngestionProcessRepository
    • TransactionManager
    • Constructor Detail

      • UpdateResourceHandlerTestBuilder

        public UpdateResourceHandlerTestBuilder()
        Creates a new, empty UpdateResourceHandlerTestBuilder.

        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 class com.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 class com.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 class com.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 class com.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