Added oparent to sdc main
[sdc.git] / asdctool / src / main / java / org / openecomp / sdc / asdctool / configuration / ArtifactUUIDFixConfiguration.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
4  * ================================================================================
5  * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.openecomp.sdc.asdctool.configuration;
22
23
24 import org.openecomp.sdc.asdctool.impl.ArtifactUuidFix;
25 import org.openecomp.sdc.be.components.distribution.engine.ServiceDistributionArtifactsBuilder;
26 import org.openecomp.sdc.be.config.CatalogModelSpringConfig;
27 import org.openecomp.sdc.be.dao.config.DAOSpringConfig;
28 import org.openecomp.sdc.config.CatalogBESpringConfig;
29 import org.springframework.beans.factory.config.PropertiesFactoryBean;
30 import org.springframework.context.annotation.Bean;
31 import org.springframework.context.annotation.ComponentScan;
32 import org.springframework.context.annotation.Configuration;
33 import org.springframework.context.annotation.Import;
34 import org.springframework.core.io.FileSystemResource;
35
36 @Configuration
37 @Import({DAOSpringConfig.class, CatalogBESpringConfig.class, CatalogModelSpringConfig.class})
38 @ComponentScan({"org.openecomp.sdc.asdctool.migration.tasks",//migration tasks
39         "org.openecomp.sdc.asdctool.migration.config.mocks"
40                 })
41 public class ArtifactUUIDFixConfiguration {
42
43     @Bean
44     public ArtifactUuidFix artifactUuidFix() {
45         return new ArtifactUuidFix();
46     }
47     
48
49     @Bean(name = "serviceDistributionArtifactsBuilder")
50     public ServiceDistributionArtifactsBuilder serviceDistributionArtifactsBuilder() {
51         return new ServiceDistributionArtifactsBuilder();
52     }
53
54     @Bean(name = "elasticsearchConfig")
55     public PropertiesFactoryBean mapper() {
56         String configHome = System.getProperty("config.home");
57         PropertiesFactoryBean bean = new PropertiesFactoryBean();
58         bean.setLocation(new FileSystemResource(configHome + "/elasticsearch.yml"));
59         return bean;
60     }
61
62
63 }