Old Config files

 avatar
unknown
plain_text
2 years ago
4.6 kB
5
Indexable
package com.kotak.collection.reporting.configuration;

import com.kotak.collection.rest.audit.ApiClient;
import com.kotak.collection.rest.audit.api.CallRecordingInformationApi;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * Config file for CallRecordingInformationApi of AuditService.
 */
@Configuration
@ComponentScan
public class CallRecordingInformationApiConfig {
  @Bean
  public CallRecordingInformationApi callRecordingInformationApi(final ApiClient apiClient) {
    return new CallRecordingInformationApi(apiClient);
  }
}

package com.kotak.collection.reporting.configuration;

import com.kotak.collection.rest.audit.ApiClient;
import com.kotak.collection.rest.audit.api.CallQualityAggregationApi;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * Config file for CallQualityAggregationApi of AuditService.
 */
@Configuration
@ComponentScan
public class CallQualityAggregationApiConfig {
  @Bean
  public CallQualityAggregationApi callQualityAggregationApi(final ApiClient apiClient) {
    return new CallQualityAggregationApi(apiClient);
  }
}

package com.kotak.collection.reporting.configuration;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.client.SimpleClientHttpRequestFactory;

/**
 * SimpleClientHttpRequestFactory specific to Audit service.
 */
@Configuration
@ComponentScan
public class AuditServiceHttpRequestFactoryConfig {
  @Bean
  public SimpleClientHttpRequestFactory auditServiceHttpRequestFactory() {
    return new SimpleClientHttpRequestFactory();
  }
}

package com.kotak.collection.reporting.configuration;

import static com.kotak.collection.reporting.constant.CommonConstant.AUDIT_SERVICE_HTTP_REQUEST_FACTORY_BEAN;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.client.SimpleClientHttpRequestFactory;
import org.springframework.web.client.RestTemplate;

/**
 * Configuration for the Audit Service REST template.
 */
@Configuration
@ComponentScan
public class AuditServiceRestTemplateConfig {

  @Autowired private AuditServiceClientConfigProperties auditServiceClientConfigProperties;

  @Autowired
  @Qualifier(AUDIT_SERVICE_HTTP_REQUEST_FACTORY_BEAN)
  private SimpleClientHttpRequestFactory auditServiceHttpRequestFactory;

  /**
   * Creates a REST template for the Audit Service.
   *
   * @return RestTemplate
   */
  @Bean
  public RestTemplate auditServiceRestTemplate() {
    auditServiceHttpRequestFactory.setConnectTimeout(
        auditServiceClientConfigProperties.getConnectionTimeout());
    auditServiceHttpRequestFactory.setReadTimeout(
        auditServiceClientConfigProperties.getReadTimeout());
    return new RestTemplate(auditServiceHttpRequestFactory);
  }
}

package com.kotak.collection.reporting.configuration;

import com.kotak.collection.rest.audit.ApiClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * Bean creation of ApiClient of AuditService.
 */
@Configuration
@ComponentScan
public class ApiClientConfig {
  @Bean
  public ApiClient apiClient(final RestTemplate auditServiceRestTemplate) {
    return new ApiClient(auditServiceRestTemplate);
  }
}

package com.kotak.collection.reporting.configuration;

import com.kotak.collection.rest.audit.ApiClient;
import com.kotak.collection.rest.audit.api.AgenciesInformationApi;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * Config file for AgenciesInformationApi of AuditService.
 */
@Configuration
@ComponentScan
public class AgenciesInformationApiConfig {
  @Bean
  public AgenciesInformationApi agenciesInformationApi(final ApiClient apiClient) {
    return new AgenciesInformationApi(apiClient);
  }
}
Editor is loading...
Leave a Comment