-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Remove configuration API (#18998)"
This reverts commit 41f3c0a.
- Loading branch information
Showing
26 changed files
with
1,338 additions
and
140 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
airbyte-server/src/main/java/io/airbyte/server/ConfigurationApiBinder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Copyright (c) 2022 Airbyte, Inc., all rights reserved. | ||
*/ | ||
|
||
package io.airbyte.server; | ||
|
||
import io.airbyte.server.apis.ConfigurationApi; | ||
import org.glassfish.hk2.utilities.binding.AbstractBinder; | ||
import org.glassfish.jersey.process.internal.RequestScoped; | ||
|
||
public class ConfigurationApiBinder extends AbstractBinder { | ||
|
||
@Override | ||
protected void configure() { | ||
bindFactory(ConfigurationApiFactory.class) | ||
.to(ConfigurationApi.class) | ||
.in(RequestScoped.class); | ||
} | ||
|
||
} |
33 changes: 33 additions & 0 deletions
33
airbyte-server/src/main/java/io/airbyte/server/ConfigurationApiFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright (c) 2022 Airbyte, Inc., all rights reserved. | ||
*/ | ||
|
||
package io.airbyte.server; | ||
|
||
import io.airbyte.server.apis.ConfigurationApi; | ||
import java.util.Map; | ||
import org.glassfish.hk2.api.Factory; | ||
import org.slf4j.MDC; | ||
|
||
public class ConfigurationApiFactory implements Factory<ConfigurationApi> { | ||
|
||
private static Map<String, String> mdc; | ||
|
||
public static void setValues( | ||
final Map<String, String> mdc) { | ||
ConfigurationApiFactory.mdc = mdc; | ||
} | ||
|
||
@Override | ||
public ConfigurationApi provide() { | ||
MDC.setContextMap(ConfigurationApiFactory.mdc); | ||
|
||
return new ConfigurationApi(); | ||
} | ||
|
||
@Override | ||
public void dispose(final ConfigurationApi service) { | ||
/* noop */ | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 0 additions & 35 deletions
35
airbyte-server/src/main/java/io/airbyte/server/apis/ApiHelper.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.