org.onap migration
[vid.git] / vid-app-common / src / main / java / org / onap / vid / controller / MsoConfig.java
1 package org.onap.vid.controller;
2
3 import com.fasterxml.jackson.databind.ObjectMapper;
4 import org.onap.vid.factories.MsoRequestFactory;
5 import org.onap.vid.mso.MsoBusinessLogic;
6 import org.onap.vid.mso.MsoBusinessLogicImpl;
7 import org.onap.vid.mso.MsoInterface;
8 import org.onap.vid.mso.rest.MsoRestClientNew;
9 import org.springframework.context.annotation.Bean;
10 import org.springframework.context.annotation.Configuration;
11
12
13 @Configuration
14 public class MsoConfig {
15
16     /**
17      * Gets the object mapper.
18      *
19      * @return the object mapper
20      */
21     @Bean
22     public ObjectMapper getObjectMapper() {
23         return new ObjectMapper();
24     }
25
26     @Bean
27     public MsoRequestFactory createRequestDetailsFactory(){
28         return new MsoRequestFactory();
29     }
30
31     @Bean
32     public MsoInterface getMsoClient(){
33         return new MsoRestClientNew();
34     }
35
36     @Bean
37     public MsoBusinessLogic getMsoBusinessLogic(){
38         return new MsoBusinessLogicImpl(getMsoClient());
39     }
40
41
42 }