Merge 1806 code of vid-common
[vid.git] / vid-app-common / src / main / java / org / onap / vid / controllers / MsoConfig.java
1 package org.onap.vid.controllers;
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 import org.togglz.core.manager.FeatureManager;
12
13
14 @Configuration
15 public class MsoConfig {
16
17     /**
18      * Gets the object mapper.
19      *
20      * @return the object mapper
21      */
22     @Bean
23     public ObjectMapper getObjectMapper() {
24         return new ObjectMapper();
25     }
26
27     @Bean
28     public MsoRequestFactory createRequestDetailsFactory(){
29         return new MsoRequestFactory();
30     }
31
32     @Bean
33     public MsoInterface getMsoClient(){
34         return new MsoRestClientNew();
35     }
36
37     @Bean
38     public MsoBusinessLogic getMsoBusinessLogic(MsoInterface msoClient, FeatureManager featureManager){
39         return new MsoBusinessLogicImpl(msoClient, featureManager);
40     }
41
42
43 }