diff --git a/java/open-banking-demo-app/src/main/java/com/ing/developer/app/apis/greetings/GreetingsAdapter.java b/java/open-banking-demo-app/src/main/java/com/ing/developer/app/apis/greetings/GreetingsAdapter.java index e8496c8..002102a 100644 --- a/java/open-banking-demo-app/src/main/java/com/ing/developer/app/apis/greetings/GreetingsAdapter.java +++ b/java/open-banking-demo-app/src/main/java/com/ing/developer/app/apis/greetings/GreetingsAdapter.java @@ -1,22 +1,17 @@ package com.ing.developer.app.apis.greetings; -import com.ing.developer.common.Utils; -import com.ing.developer.common.clients.Companion; import com.ing.developer.showcase.client.ApiException; -import com.ing.developer.showcase.client.api.GreetingsApi; +import com.ing.developer.showcase.client.api.ShowcaseApiApi; import org.springframework.stereotype.Component; -import java.security.PrivateKey; -import java.security.cert.Certificate; - import static com.ing.developer.app.common.GenericAdapterErrorHandler.throwInternalizedException; @Component public class GreetingsAdapter { - private final GreetingsApi greetingsApi; + private final ShowcaseApiApi greetingsApi; - public GreetingsAdapter(GreetingsApi greetingsApi) { + public GreetingsAdapter(ShowcaseApiApi greetingsApi) { this.greetingsApi = greetingsApi; } diff --git a/java/open-banking-demo-app/src/main/java/com/ing/developer/app/configuration/GreetingsConfiguration.java b/java/open-banking-demo-app/src/main/java/com/ing/developer/app/configuration/GreetingsConfiguration.java index 00d4d9d..11ad6c4 100644 --- a/java/open-banking-demo-app/src/main/java/com/ing/developer/app/configuration/GreetingsConfiguration.java +++ b/java/open-banking-demo-app/src/main/java/com/ing/developer/app/configuration/GreetingsConfiguration.java @@ -3,7 +3,7 @@ import com.ing.developer.common.Utils; import com.ing.developer.common.clients.Companion; import com.ing.developer.showcase.client.ApiClient; -import com.ing.developer.showcase.client.api.GreetingsApi; +import com.ing.developer.showcase.client.api.ShowcaseApiApi; import org.springframework.context.annotation.Bean; import org.springframework.core.env.Environment; @@ -33,8 +33,8 @@ public GreetingsConfiguration(Environment env) { } @Bean - public GreetingsApi greetingsApi() { - return new GreetingsApi(buildClient()); + public ShowcaseApiApi greetingsApi() { + return new ShowcaseApiApi(buildClient()); } private ApiClient buildClient() { diff --git a/java/open-banking-simple-app/src/main/java/com/ing/developer/app/PremiumShowcaseAPI.java b/java/open-banking-simple-app/src/main/java/com/ing/developer/app/PremiumShowcaseAPI.java index 393b6c7..3c50a69 100644 --- a/java/open-banking-simple-app/src/main/java/com/ing/developer/app/PremiumShowcaseAPI.java +++ b/java/open-banking-simple-app/src/main/java/com/ing/developer/app/PremiumShowcaseAPI.java @@ -3,7 +3,7 @@ import com.ing.developer.common.clients.Companion; import com.ing.developer.showcase.client.ApiClient; import com.ing.developer.showcase.client.ApiException; -import com.ing.developer.showcase.client.api.GreetingsApi; +import com.ing.developer.showcase.client.api.ShowcaseApiApi; import javax.ws.rs.client.ClientBuilder; @@ -23,7 +23,7 @@ public class PremiumShowcaseAPI { public static void callShowcaseAPI() throws ApiException { Utils.Pair trustMaterial = Companion.Utils.createOpenBankingClient(keyStoreFileName, keyStorePassword, false, null, null, false, false); ApiClient clientAPI = new ApiClient(clientId, trustMaterial.getFirst(), trustMaterial.getSecond()); - GreetingsApi greetingsApi = new GreetingsApi(clientAPI); + ShowcaseApiApi greetingsApi = new ShowcaseApiApi(clientAPI); String greeting = greetingsApi.greetingsSingleGet(null).getMessage(); System.out.println(greeting); } @@ -31,7 +31,7 @@ public static void callShowcaseAPI() throws ApiException { public static void callShowcaseAPIMTLSPinning() throws ApiException { Utils.Pair trustMaterial = Companion.Utils.createOpenBankingClient(keyStoreFileName, keyStorePassword, false, null, null, false, false); ApiClient clientAPI = new ApiClient(clientId, trustMaterial.getFirst(), trustMaterial.getSecond()).setMTLSPinning(true); - GreetingsApi greetingsApi = new GreetingsApi(clientAPI); + ShowcaseApiApi greetingsApi = new ShowcaseApiApi(clientAPI); String greeting = greetingsApi.mtlsOnlyGreetingsGet(null).getMessage(); System.out.println(greeting); } @@ -40,7 +40,7 @@ public static void callShowcaseAPIJWS() throws ApiException { Utils.Pair trustMaterial = Companion.Utils.getTrustMaterial(keyStoreFileName, keyStorePassword); Utils.Pair openBankingClient = Companion.Utils.createOpenBankingClient(keyStoreFileName, keyStorePassword, false, null, null, false, false); ApiClient clientAPI = new ApiClient(clientId, trustMaterial.getSecond(), openBankingClient.getSecond(), null, trustMaterial.getFirst()).setMTLSPinning(true).setJwsSigning(true); - GreetingsApi greetingsApi = new GreetingsApi(clientAPI); + ShowcaseApiApi greetingsApi = new ShowcaseApiApi(clientAPI); String greeting = greetingsApi.signedGreetingsGet(null,null).getMessage(); System.out.println(greeting); } diff --git a/java/open-banking-simple-app/src/main/java/com/ing/developer/app/ProductionShowcaseAPI.java b/java/open-banking-simple-app/src/main/java/com/ing/developer/app/ProductionShowcaseAPI.java index 02bb984..3ad8580 100644 --- a/java/open-banking-simple-app/src/main/java/com/ing/developer/app/ProductionShowcaseAPI.java +++ b/java/open-banking-simple-app/src/main/java/com/ing/developer/app/ProductionShowcaseAPI.java @@ -4,7 +4,7 @@ import com.ing.developer.common.clients.Companion; import com.ing.developer.showcase.client.ApiClient; import com.ing.developer.showcase.client.ApiException; -import com.ing.developer.showcase.client.api.GreetingsApi; +import com.ing.developer.showcase.client.api.ShowcaseApiApi; import javax.ws.rs.client.ClientBuilder; import java.security.PrivateKey; @@ -21,7 +21,7 @@ public static void callShowcaseAPI() throws ApiException { Utils.Pair trustMaterial = Companion.Utils.createOpenBankingClient(keyStoreFileName, keyStorePassword, false, null, null, false, false); ApiClient clientAPI = new ApiClient(clientId, trustMaterial.getFirst(), trustMaterial.getSecond()); - GreetingsApi greetingsApi = new GreetingsApi(clientAPI); + ShowcaseApiApi greetingsApi = new ShowcaseApiApi(clientAPI); String greeting = greetingsApi.greetingsSingleGet(null).getMessage(); System.out.println(greeting); }