From fa5940315c9a9b659a246269f74384d8aa50e34d Mon Sep 17 00:00:00 2001 From: MichaelMorris Date: Thu, 26 Aug 2021 07:54:48 +0100 Subject: Fix get capability type with uid Signed-off-by: MichaelMorris Issue-ID: SDC-3688 Change-Id: I2e74e612d90c984071cbf8f1dd43cf55a26034f5 --- .../org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java | 4 ++-- .../org/openecomp/sdc/be/components/impl/ServiceImportParseLogic.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'catalog-be') diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java index 49cd95831c..018deca3ac 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java @@ -3843,7 +3843,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { Resource resource, List validationObjects, AuditingActionEnum actionEnum, Either eitherResult, String type, boolean inTransaction) { - Either eitherCapTypeFound = capabilityTypeOperation.getCapabilityType(type, inTransaction); + Either eitherCapTypeFound = capabilityTypeOperation.getCapabilityType(UniqueIdBuilder.buildCapabilityTypeUid(resource.getModel(), type), inTransaction); if (eitherCapTypeFound.isRight()) { if (eitherCapTypeFound.right().value() == StorageOperationStatus.NOT_FOUND) { BeEcompErrorManager.getInstance().logBeGraphObjectMissingError(CREATE_RESOURCE_VALIDATE_CAPABILITY_TYPES, "Capability Type", type); @@ -3868,7 +3868,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { Either eitherResult, Entry> typeEntry, boolean inTransaction) { Either eitherCapTypeFound = capabilityTypeOperation - .getCapabilityType(typeEntry.getKey(), inTransaction); + .getCapabilityType(UniqueIdBuilder.buildCapabilityTypeUid(resource.getModel(), typeEntry.getKey()), inTransaction); if (eitherCapTypeFound.isRight()) { if (eitherCapTypeFound.right().value() == StorageOperationStatus.NOT_FOUND) { BeEcompErrorManager.getInstance() diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceImportParseLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceImportParseLogic.java index 994092911f..196fc679ad 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceImportParseLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceImportParseLogic.java @@ -571,7 +571,7 @@ public class ServiceImportParseLogic { Map.Entry> typeEntry, boolean inTransaction) { Either eitherCapTypeFound = capabilityTypeOperation - .getCapabilityType(typeEntry.getKey(), inTransaction); + .getCapabilityType(UniqueIdBuilder.buildCapabilityTypeUid(resource.getModel(), typeEntry.getKey()), inTransaction); if (eitherCapTypeFound.isRight()) { if (eitherCapTypeFound.right().value() == StorageOperationStatus.NOT_FOUND) { BeEcompErrorManager.getInstance() @@ -623,7 +623,7 @@ public class ServiceImportParseLogic { boolean inTransaction) { try { Either eitherCapTypeFound = capabilityTypeOperation - .getCapabilityType(type, inTransaction); + .getCapabilityType(UniqueIdBuilder.buildCapabilityTypeUid(resource.getModel(), type), inTransaction); if (eitherCapTypeFound.isRight()) { if (eitherCapTypeFound.right().value() == StorageOperationStatus.NOT_FOUND) { BeEcompErrorManager.getInstance() -- cgit 1.2.3-korg