mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-10-19 12:50:20 +00:00
parent
d9b15ef6cb
commit
52ea9ea81e
@ -16,6 +16,8 @@ package org.openmetadata.service.secrets.converter;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.openmetadata.schema.security.ssl.ValidateSSLClientConfig;
|
import org.openmetadata.schema.security.ssl.ValidateSSLClientConfig;
|
||||||
import org.openmetadata.schema.services.connections.database.GreenplumConnection;
|
import org.openmetadata.schema.services.connections.database.GreenplumConnection;
|
||||||
|
import org.openmetadata.schema.services.connections.database.common.IamAuthConfig;
|
||||||
|
import org.openmetadata.schema.services.connections.database.common.basicAuth;
|
||||||
import org.openmetadata.service.util.JsonUtils;
|
import org.openmetadata.service.util.JsonUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -24,6 +26,8 @@ import org.openmetadata.service.util.JsonUtils;
|
|||||||
public class GreenplumConnectionClassConverter extends ClassConverter {
|
public class GreenplumConnectionClassConverter extends ClassConverter {
|
||||||
|
|
||||||
private static final List<Class<?>> SSL_SOURCE_CLASS = List.of(ValidateSSLClientConfig.class);
|
private static final List<Class<?>> SSL_SOURCE_CLASS = List.of(ValidateSSLClientConfig.class);
|
||||||
|
private static final List<Class<?>> CONFIG_SOURCE_CLASSES =
|
||||||
|
List.of(basicAuth.class, IamAuthConfig.class);
|
||||||
|
|
||||||
public GreenplumConnectionClassConverter() {
|
public GreenplumConnectionClassConverter() {
|
||||||
super(GreenplumConnection.class);
|
super(GreenplumConnection.class);
|
||||||
@ -34,6 +38,9 @@ public class GreenplumConnectionClassConverter extends ClassConverter {
|
|||||||
GreenplumConnection greenplumConnection =
|
GreenplumConnection greenplumConnection =
|
||||||
(GreenplumConnection) JsonUtils.convertValue(object, this.clazz);
|
(GreenplumConnection) JsonUtils.convertValue(object, this.clazz);
|
||||||
|
|
||||||
|
tryToConvert(greenplumConnection.getAuthType(), CONFIG_SOURCE_CLASSES)
|
||||||
|
.ifPresent(greenplumConnection::setAuthType);
|
||||||
|
|
||||||
tryToConvert(greenplumConnection.getSslConfig(), SSL_SOURCE_CLASS)
|
tryToConvert(greenplumConnection.getSslConfig(), SSL_SOURCE_CLASS)
|
||||||
.ifPresent(greenplumConnection::setSslConfig);
|
.ifPresent(greenplumConnection::setSslConfig);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user