summaryrefslogtreecommitdiffstats
path: root/dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/config/TcaAaiConfig.java
diff options
context:
space:
mode:
Diffstat (limited to 'dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/config/TcaAaiConfig.java')
-rw-r--r--dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/config/TcaAaiConfig.java36
1 files changed, 2 insertions, 34 deletions
diff --git a/dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/config/TcaAaiConfig.java b/dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/config/TcaAaiConfig.java
index 4ec42d5..d2ed48c 100644
--- a/dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/config/TcaAaiConfig.java
+++ b/dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/config/TcaAaiConfig.java
@@ -20,17 +20,11 @@
package org.onap.dcae.analytics.tca.web.config;
import org.onap.dcae.analytics.tca.core.service.TcaAaiEnrichmentContext;
-import org.onap.dcae.analytics.tca.core.service.TcaAaiEnrichmentService;
import org.onap.dcae.analytics.tca.web.TcaAppProperties;
import org.onap.dcae.analytics.tca.web.aai.TcaAaiEnrichmentContextImpl;
-import org.onap.dcae.analytics.tca.web.aai.TcaAaiEnrichmentServiceImpl;
-import org.onap.dcae.analytics.tca.web.aai.TcaAaiRestClientPreferences;
-import org.onap.dcae.analytics.tca.web.util.function.TcaAppPropsToAaiRestClientPrefsFunction;
-import org.onap.dcae.analytics.web.http.HttpClientPreferencesCustomizer;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
-import org.springframework.web.client.RestTemplate;
/**
* @author Rajiv Singla
@@ -39,35 +33,9 @@ import org.springframework.web.client.RestTemplate;
public class TcaAaiConfig {
@Bean
- public TcaAaiRestClientPreferences aaiRestClientPreferences(final TcaAppProperties tcaAppProperties) {
- return new TcaAppPropsToAaiRestClientPrefsFunction().apply(tcaAppProperties);
- }
-
- @Bean
- public RestTemplate aaiRestTemplate(final TcaAaiRestClientPreferences aaiRestClientPreferences,
- final RestTemplateBuilder restTemplateBuilder) {
- if(aaiRestClientPreferences == null) {
- return null;
- }
- return restTemplateBuilder
- .additionalCustomizers(new HttpClientPreferencesCustomizer<>(aaiRestClientPreferences))
- .build();
- }
-
- @Bean
- public TcaAaiEnrichmentService aaiEnrichmentService(final TcaAppProperties tcaAppProperties,
- final RestTemplate aaiRestTemplate) {
- if (aaiRestTemplate == null) {
- return null;
- }
- return new TcaAaiEnrichmentServiceImpl(tcaAppProperties, aaiRestTemplate);
- }
-
-
- @Bean
public TcaAaiEnrichmentContext tcaAaiEnrichmentContext(final TcaAppProperties tcaAppProperties,
- final TcaAaiEnrichmentService aaiEnrichmentService) {
- return new TcaAaiEnrichmentContextImpl(tcaAppProperties, aaiEnrichmentService);
+ final RestTemplateBuilder restTemplateBuilder) {
+ return new TcaAaiEnrichmentContextImpl(tcaAppProperties, restTemplateBuilder);
}
}