diff options
author | KrupaNagabhushan <krupa.nagabhushan@est.tech> | 2021-07-15 15:29:02 +0100 |
---|---|---|
committer | Michael Morris <michael.morris@est.tech> | 2021-07-28 13:04:26 +0000 |
commit | dd2e1700187449a017b75589aeb0c2dfb989dec7 (patch) | |
tree | 278eea3690a5cf47e6c50188412727d226840b7f /catalog-model/src/main/java | |
parent | 938548c5c6c1935f426b6f9e671d969e15371389 (diff) |
Consider component model when retrieving capability types
Issue-ID: SDC-3642
Signed-off-by: KrupaNagabhushan <krupa.nagabhushan@est.tech>
Change-Id: Ie09b5f8d64b95fc2db14f19d3857a9935075b2fe
Diffstat (limited to 'catalog-model/src/main/java')
2 files changed, 3 insertions, 3 deletions
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/api/ICapabilityTypeOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/api/ICapabilityTypeOperation.java index 88485d7c74..0e7faf7fc1 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/api/ICapabilityTypeOperation.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/api/ICapabilityTypeOperation.java @@ -46,5 +46,5 @@ public interface ICapabilityTypeOperation { public Either<CapabilityTypeDefinition, StorageOperationStatus> getCapabilityType(String uniqueId, boolean inTransaction); - Either<Map<String, CapabilityTypeDefinition>, JanusGraphOperationStatus> getAllCapabilityTypes(); + Either<Map<String, CapabilityTypeDefinition>, JanusGraphOperationStatus> getAllCapabilityTypes(String modelName); } diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/CapabilityTypeOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/CapabilityTypeOperation.java index 0763559af5..f4073baa3d 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/CapabilityTypeOperation.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/CapabilityTypeOperation.java @@ -409,11 +409,11 @@ public class CapabilityTypeOperation extends AbstractOperation implements ICapab return getCapabilityType(uniqueId, true); } - public Either<Map<String, CapabilityTypeDefinition>, JanusGraphOperationStatus> getAllCapabilityTypes() { + public Either<Map<String, CapabilityTypeDefinition>, JanusGraphOperationStatus> getAllCapabilityTypes(String modelName) { Map<String, CapabilityTypeDefinition> capabilityTypes = new HashMap<>(); Either<Map<String, CapabilityTypeDefinition>, JanusGraphOperationStatus> result = Either.left(capabilityTypes); Either<List<CapabilityTypeData>, JanusGraphOperationStatus> getAllCapabilityTypes = janusGraphGenericDao - .getByCriteria(NodeTypeEnum.CapabilityType, null, CapabilityTypeData.class); + .getByCriteriaForModel(NodeTypeEnum.CapabilityType, null, modelName, CapabilityTypeData.class); if (getAllCapabilityTypes.isRight()) { JanusGraphOperationStatus status = getAllCapabilityTypes.right().value(); if (status != JanusGraphOperationStatus.NOT_FOUND) { |