Interface ConnectorConfigurationService
-
public interface ConnectorConfigurationService
A service for basic management of the connector configuration.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description Variant
getConfiguration()
Retrieves current connector configuration properties.static ConnectorConfigurationService
getInstance(Session session)
Returns a new instance of the default service implementation.void
updateConfiguration(Variant configuration)
Updates the connector configuration record with the provided properties.void
validateFields(Variant configuration)
Validates if all the provided connector configuration properties are allowed by theConnectorConfigurationKey
values.
-
-
-
Method Detail
-
updateConfiguration
void updateConfiguration(Variant configuration)
Updates the connector configuration record with the provided properties. If the configuration is not present, a new record will be created.- Parameters:
configuration
- connector configuration properties, which keys must be allowed by theConnectorConfigurationKey
values- Throws:
ConnectorConfigurationParsingException
- if a key of a provided property is not allowed by theConnectorConfigurationKey
values
-
validateFields
void validateFields(Variant configuration)
Validates if all the provided connector configuration properties are allowed by theConnectorConfigurationKey
values.- Parameters:
configuration
- connector configuration properties, which keys must be allowed by theConnectorConfigurationKey
values- Throws:
ConnectorConfigurationParsingException
- if a key of a provided property is not allowed by theConnectorConfigurationKey
values
-
getConfiguration
Variant getConfiguration()
Retrieves current connector configuration properties.- Returns:
- connector configuration properties
- Throws:
ConnectorConfigurationNotFoundException
- if connector configuration record does not currently exist
-
getInstance
static ConnectorConfigurationService getInstance(Session session)
Returns a new instance of the default service implementation.Default implementation of the service uses:
- a default implementation of
ConfigurationRepository
connector_configuration
as the configuration record key
- Parameters:
session
- Snowpark session object- Returns:
- a new service instance
- a default implementation of
-
-