From 1de1692115d1df5b4e07c1feb21d098899a6604b Mon Sep 17 00:00:00 2001 From: aribeiro Date: Fri, 1 Oct 2021 11:30:49 +0100 Subject: Add UI support for adding tosca artifact types UI support for adding artifacts to an interface operation implementation Issue-ID: SDC-3768 Signed-off-by: aribeiro Change-Id: I71b3e49a160521e35a45515ad7adef836f901e78 --- .../be/model/jsonjanusgraph/operations/NodeTemplateOperation.java | 6 +++--- .../openecomp/sdc/be/model/jsonjanusgraph/utils/ModelConverter.java | 6 +++--- .../src/main/java/org/openecomp/sdc/be/ui/model/OperationUi.java | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'catalog-model/src/main/java') diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/NodeTemplateOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/NodeTemplateOperation.java index 9db61e8ec3..0e7b9f0193 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/NodeTemplateOperation.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/NodeTemplateOperation.java @@ -1718,9 +1718,9 @@ public class NodeTemplateOperation extends BaseOperation { final OperationDataDefinition operationDataDefinition = new OperationDataDefinition(); operationDataDefinition.setName(operation.getOperationType()); operationDataDefinition.setUniqueId(UUID.randomUUID().toString()); - final ArtifactDataDefinition implementation = new ArtifactDataDefinition(); - implementation.setArtifactName(operation.getImplementation()); - operationDataDefinition.setImplementation(implementation); + final ArtifactDataDefinition artifactDataDefinition = new ArtifactDataDefinition(); + artifactDataDefinition.setArtifactName((String) operation.getImplementation()); + operationDataDefinition.setImplementation(artifactDataDefinition); if (CollectionUtils.isNotEmpty(operation.getInputs())) { final ListDataDefinition inputs = new ListDataDefinition<>(); operation.getInputs().forEach(input -> { diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/utils/ModelConverter.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/utils/ModelConverter.java index 9efef3b606..16d225a2b2 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/utils/ModelConverter.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/utils/ModelConverter.java @@ -425,9 +425,9 @@ public class ModelConverter { operationUi.setOperationType(operationEntry.getKey()); operationUi.setInterfaceType(interfaceDataDefinition.getType()); final OperationDataDefinition operationDataDefinition = operationEntry.getValue(); - final ArtifactDataDefinition implementation = operationDataDefinition.getImplementation(); - if (implementation != null) { - operationUi.setImplementation(implementation.getArtifactName()); + final ArtifactDataDefinition artifactDataDefinition = operationDataDefinition.getImplementation(); + if (artifactDataDefinition != null) { + operationUi.setImplementation(artifactDataDefinition); } final ListDataDefinition inputs = operationDataDefinition.getInputs(); if (inputs != null && !inputs.isEmpty()) { diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/OperationUi.java b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/OperationUi.java index d80e1cba00..1f63b4c455 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/OperationUi.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/OperationUi.java @@ -29,7 +29,7 @@ public class OperationUi { private String interfaceType; private String operationType; - private String implementation; + private Object implementation; private List inputs; public void addToInputs(final PropertyAssignmentUi input) { -- cgit 1.2.3-korg