Class ResetConfigurationHandler
- java.lang.Object
-
- com.snowflake.connectors.application.configuration.reset.ResetConfigurationHandler
-
public class ResetConfigurationHandler extends Object
Handler for the reset configuration process. A new instance of the handler must be created usingthe builder
.
-
-
Field Summary
Fields Modifier and Type Field Description static String
ERROR_TYPE
Error type for the reset configuration failure, used by theConnectorErrorHelper
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ResetConfigurationHandlerBuilder
builder(Session session)
Returns a new instance ofResetConfigurationHandlerBuilder
.ConnectorResponse
resetConfiguration()
Executes the main logic of the handler, with logging usingwithExceptionLogging
.static Variant
resetConfiguration(Session session)
Default handler method for thePUBLIC.RESET_CONFIGURATION
procedure.
-
-
-
Field Detail
-
ERROR_TYPE
public static final String ERROR_TYPE
Error type for the reset configuration failure, used by theConnectorErrorHelper
.- See Also:
- Constant Field Values
-
-
Method Detail
-
resetConfiguration
public static Variant resetConfiguration(Session session)
Default handler method for thePUBLIC.RESET_CONFIGURATION
procedure.- Parameters:
session
- Snowpark session object- Returns:
- a variant representing the
ConnectorResponse
returned byresetConfiguration
-
builder
public static ResetConfigurationHandlerBuilder builder(Session session)
Returns a new instance ofResetConfigurationHandlerBuilder
.- Parameters:
session
- Snowpark session object- Returns:
- a new builder instance
-
resetConfiguration
public ConnectorResponse resetConfiguration()
Executes the main logic of the handler, with logging usingwithExceptionLogging
.The handler logic consists of:
- connector status check
ResetConfigurationValidator.validate()
ResetConfigurationCallback.execute()
ResetConfigurationSdkCallback.execute()
- connector status update
- Returns:
- a response with the code
OK
if the execution was successful, otherwise a response with an error code and an error message
-
-