aboutsummaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints/modules/service/src/main/java
diff options
context:
space:
mode:
authorMuthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>2018-12-12 10:03:26 -0500
committerMuthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>2018-12-12 10:03:26 -0500
commit50e751e5374e1240080411400f4ae71d27115fa2 (patch)
tree8018fb524f6bc0e0b6df3f112e5cec3592c49976 /ms/controllerblueprints/modules/service/src/main/java
parenta567903b114503a13c225ed720a96391e75f0126 (diff)
Decompose enhancer to multiple types.
Change-Id: I508ce5919680f6e7f994776e58404729b55eace8 Issue-ID: CCSDK-803 Signed-off-by: Muthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>
Diffstat (limited to 'ms/controllerblueprints/modules/service/src/main/java')
-rw-r--r--ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/BluePrintEnhancerService.java47
-rw-r--r--ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/ServiceTemplateService.java6
2 files changed, 2 insertions, 51 deletions
diff --git a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/BluePrintEnhancerService.java b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/BluePrintEnhancerService.java
index 91df3331..930c88d8 100644
--- a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/BluePrintEnhancerService.java
+++ b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/BluePrintEnhancerService.java
@@ -29,12 +29,7 @@ import org.onap.ccsdk.apps.controllerblueprints.core.ConfigModelConstant;
import org.onap.ccsdk.apps.controllerblueprints.core.data.*;
import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils;
import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment;
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.service.ResourceDefinitionRepoService;
-import org.onap.ccsdk.apps.controllerblueprints.service.enhancer.BluePrintEnhancerServiceImpl;
import org.onap.ccsdk.apps.controllerblueprints.service.enhancer.ResourceAssignmentEnhancerService;
-import org.springframework.beans.factory.config.ConfigurableBeanFactory;
-import org.springframework.context.annotation.Scope;
-import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
@@ -47,9 +42,7 @@ import java.util.Map;
*/
@Deprecated
-@Service
-@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-public class BluePrintEnhancerService extends BluePrintEnhancerServiceImpl {
+public class BluePrintEnhancerService {
private static EELFLogger log = EELFManager.getInstance().getLogger(BluePrintEnhancerService.class);
@@ -57,44 +50,6 @@ public class BluePrintEnhancerService extends BluePrintEnhancerServiceImpl {
private Map<String, DataType> recipeDataTypes = new HashMap<>();
- public BluePrintEnhancerService(ResourceDefinitionRepoService resourceDefinitionRepoService,
- ResourceAssignmentEnhancerService resourceAssignmentEnhancerService) {
- super(resourceDefinitionRepoService);
- this.resourceAssignmentEnhancerService = resourceAssignmentEnhancerService;
- }
-
- @Override
- public void enrichTopologyTemplate(@NotNull ServiceTemplate serviceTemplate) throws BluePrintException {
- super.enrichTopologyTemplate(serviceTemplate);
-
- // Update the Recipe Inputs and DataTypes
- populateRecipeInputs(serviceTemplate);
- }
-
-
- @Override
- public void enrichNodeTemplate(@NotNull String nodeTemplateName, @NotNull NodeTemplate nodeTemplate) throws BluePrintException {
- super.enrichNodeTemplate(nodeTemplateName, nodeTemplate);
-
- String nodeTypeName = nodeTemplate.getType();
- log.info("*** Enriching NodeType: {}", nodeTypeName);
- // Get NodeType from Repo and Update Service Template
- NodeType nodeType = super.populateNodeType(nodeTypeName);
-
- // Enrich NodeType
- super.enrichNodeType(nodeTypeName, nodeType);
-
- // Custom for Artifact Population
- if (StringUtils.isNotBlank(nodeType.getDerivedFrom())
- && ConfigModelConstant.MODEL_TYPE_NODE_ARTIFACT.equalsIgnoreCase(nodeType.getDerivedFrom())) {
- populateArtifactTemplateMappingDataType(nodeTemplateName, nodeTemplate);
- }
-
- //Enrich Node Template Artifacts
- super.enrichNodeTemplateArtifactDefinition(nodeTemplateName, nodeTemplate);
-
- }
-
private void populateArtifactTemplateMappingDataType(@NotNull String nodeTemplateName, @NotNull NodeTemplate nodeTemplate)
throws BluePrintException {
diff --git a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/ServiceTemplateService.java b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/ServiceTemplateService.java
index 898647ea..57096c7f 100644
--- a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/ServiceTemplateService.java
+++ b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/ServiceTemplateService.java
@@ -43,7 +43,6 @@ public class ServiceTemplateService {
private ResourceDictionaryRepository dataDictionaryRepository;
private ConfigModelCreateService configModelCreateService;
- private BluePrintEnhancerService bluePrintEnhancerService;
private ResourceAssignmentValidationService resourceAssignmentValidationService;
/**
@@ -51,16 +50,13 @@ public class ServiceTemplateService {
*
* @param dataDictionaryRepository dataDictionaryRepository
* @param configModelCreateService configModelCreateService
- * @param bluePrintEnhancerService bluePrintEnhancerService
* @param resourceAssignmentValidationService resourceAssignmentValidationService
*/
public ServiceTemplateService(ResourceDictionaryRepository dataDictionaryRepository,
ConfigModelCreateService configModelCreateService,
- BluePrintEnhancerService bluePrintEnhancerService,
ResourceAssignmentValidationService resourceAssignmentValidationService) {
this.dataDictionaryRepository = dataDictionaryRepository;
this.configModelCreateService = configModelCreateService;
- this.bluePrintEnhancerService = bluePrintEnhancerService;
this.resourceAssignmentValidationService = resourceAssignmentValidationService;
}
@@ -82,7 +78,7 @@ public class ServiceTemplateService {
* @return ServiceTemplate
*/
public ServiceTemplate enrichServiceTemplate(ServiceTemplate serviceTemplate) throws BluePrintException {
- this.bluePrintEnhancerService.enhance(serviceTemplate);
+ //FIXME("Connect New Enrichment service")
return serviceTemplate;
}