summaryrefslogtreecommitdiffstats
path: root/asdctool/src/main
diff options
context:
space:
mode:
authorTomasz Golabek <tomasz.golabek@nokia.com>2019-06-28 12:17:09 +0200
committerOfir Sonsino <ofir.sonsino@intl.att.com>2019-07-24 08:50:23 +0000
commit79827ecb068e1e33ce28701f5dc59b37ee309b51 (patch)
treed6115d41cd37d2e82fa5b9f7bc43457bee69de9c /asdctool/src/main
parent8b6d4ee2ffbfb11a1f9d494b2de403aab112cf93 (diff)
Autowired annotation for catalog-be
Injection of the properties moved to the constructors/setters replacing field annotations. Change-Id: I766ff67e466bec5a91db1035f29e7f919d32e0ea Issue-ID: SDC-2400 Signed-off-by: Tomasz Golabek <tomasz.golabek@nokia.com>
Diffstat (limited to 'asdctool/src/main')
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/configuration/ArtifactUUIDFixConfiguration.java6
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/configuration/CsarGeneratorConfiguration.java5
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/config/ValidationToolConfiguration.java4
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/config/MigrationSpringConfig.java30
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/config/mocks/HealthCheckBusinessLogicMock.java41
5 files changed, 25 insertions, 61 deletions
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/configuration/ArtifactUUIDFixConfiguration.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/configuration/ArtifactUUIDFixConfiguration.java
index 317bd26107..608c6a6dd7 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/configuration/ArtifactUUIDFixConfiguration.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/configuration/ArtifactUUIDFixConfiguration.java
@@ -52,12 +52,6 @@ public class ArtifactUUIDFixConfiguration {
return new ArtifactUuidFix(janusGraphDao, toscaOperationFacade, toscaExportHandler, artifactCassandraDao, csarUtils);
}
-
- @Bean(name = "serviceDistributionArtifactsBuilder")
- public ServiceDistributionArtifactsBuilder serviceDistributionArtifactsBuilder() {
- return new ServiceDistributionArtifactsBuilder();
- }
-
@Bean(name = "elasticsearchConfig")
public PropertiesFactoryBean mapper() {
String configHome = System.getProperty("config.home");
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/configuration/CsarGeneratorConfiguration.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/configuration/CsarGeneratorConfiguration.java
index 4768a62f6c..32c37a36b3 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/configuration/CsarGeneratorConfiguration.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/configuration/CsarGeneratorConfiguration.java
@@ -58,10 +58,5 @@ public class CsarGeneratorConfiguration {
bean.setLocation(new FileSystemResource(configHome + "/elasticsearch.yml"));
return bean;
}
- @Bean(name = "serviceDistributionArtifactsBuilder")
- public ServiceDistributionArtifactsBuilder serviceDistributionArtifactsBuilder() {
- return new ServiceDistributionArtifactsBuilder();
- }
-
}
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/config/ValidationToolConfiguration.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/config/ValidationToolConfiguration.java
index 764e6d93b1..d59a9aae6a 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/config/ValidationToolConfiguration.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/config/ValidationToolConfiguration.java
@@ -236,7 +236,7 @@ public class ValidationToolConfiguration {
}
@Bean
- public ServiceDistributionArtifactsBuilder serviceDistributionArtifactsBuilder() {
- return new ServiceDistributionArtifactsBuilder();
+ public ServiceDistributionArtifactsBuilder serviceDistributionArtifactsBuilder(ToscaOperationFacade toscaOperationFacade) {
+ return new ServiceDistributionArtifactsBuilder(toscaOperationFacade);
}
}
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/config/MigrationSpringConfig.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/config/MigrationSpringConfig.java
index 91cce7485d..e5e0740794 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/config/MigrationSpringConfig.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/config/MigrationSpringConfig.java
@@ -27,11 +27,19 @@ import org.openecomp.sdc.asdctool.migration.dao.MigrationTasksDao;
import org.openecomp.sdc.asdctool.migration.resolver.MigrationResolver;
import org.openecomp.sdc.asdctool.migration.resolver.SpringBeansMigrationResolver;
import org.openecomp.sdc.asdctool.migration.service.SdcRepoService;
-import org.openecomp.sdc.be.components.distribution.engine.ServiceDistributionArtifactsBuilder;
+import org.openecomp.sdc.be.components.impl.ResourceBusinessLogic;
+import org.openecomp.sdc.be.components.impl.ServiceBusinessLogic;
import org.openecomp.sdc.be.components.scheduledtasks.ComponentsCleanBusinessLogic;
import org.openecomp.sdc.be.config.CatalogModelSpringConfig;
import org.openecomp.sdc.be.dao.cassandra.CassandraClient;
import org.openecomp.sdc.be.dao.config.DAOSpringConfig;
+import org.openecomp.sdc.be.model.jsonjanusgraph.operations.ArtifactsOperations;
+import org.openecomp.sdc.be.model.jsonjanusgraph.operations.InterfaceOperation;
+import org.openecomp.sdc.be.model.operations.api.IElementOperation;
+import org.openecomp.sdc.be.model.operations.api.IGroupInstanceOperation;
+import org.openecomp.sdc.be.model.operations.api.IGroupOperation;
+import org.openecomp.sdc.be.model.operations.api.IGroupTypeOperation;
+import org.openecomp.sdc.be.model.operations.impl.InterfaceLifecycleOperation;
import org.openecomp.sdc.config.CatalogBESpringConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.PropertiesFactoryBean;
@@ -77,11 +85,6 @@ public class MigrationSpringConfig {
return new MigrationTasksDao(cassandraClient);
}
- @Bean(name = "serviceDistributionArtifactsBuilder")
- public ServiceDistributionArtifactsBuilder serviceDistributionArtifactsBuilder() {
- return new ServiceDistributionArtifactsBuilder();
- }
-
@Bean(name = "elasticsearchConfig")
public PropertiesFactoryBean mapper() {
String configHome = System.getProperty("config.home");
@@ -91,6 +94,19 @@ public class MigrationSpringConfig {
}
@Bean(name = "componentsCleanBusinessLogic")
- public ComponentsCleanBusinessLogic componentsCleanBusinessLogic() {return new ComponentsCleanBusinessLogic(); }
+ public ComponentsCleanBusinessLogic componentsCleanBusinessLogic(
+ IElementOperation elementDao,
+ IGroupOperation groupOperation,
+ IGroupInstanceOperation groupInstanceOperation,
+ IGroupTypeOperation groupTypeOperation,
+ InterfaceOperation interfaceOperation,
+ InterfaceLifecycleOperation interfaceLifecycleTypeOperation,
+ ResourceBusinessLogic resourceBusinessLogic,
+ ServiceBusinessLogic serviceBusinessLogic,
+ ArtifactsOperations artifactToscaOperation) {
+ return new ComponentsCleanBusinessLogic(elementDao, groupOperation,
+ groupInstanceOperation, groupTypeOperation, interfaceOperation, interfaceLifecycleTypeOperation, resourceBusinessLogic,
+ serviceBusinessLogic, artifactToscaOperation);
+ }
}
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/config/mocks/HealthCheckBusinessLogicMock.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/config/mocks/HealthCheckBusinessLogicMock.java
deleted file mode 100644
index 183ca543da..0000000000
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/config/mocks/HealthCheckBusinessLogicMock.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.sdc.asdctool.migration.config.mocks;
-
-import org.openecomp.sdc.be.components.health.HealthCheckBusinessLogic;
-import org.springframework.stereotype.Component;
-
-import javax.annotation.PostConstruct;
-
-@Component("healthCheckBusinessLogic")
-public class HealthCheckBusinessLogicMock extends HealthCheckBusinessLogic {
-
- @Override
- @PostConstruct
- public void init() {
-
- }
-
- @Override
- protected void destroy() {
-
- }
-}