diff options
author | aribeiro <anderson.ribeiro@est.tech> | 2021-10-01 11:30:49 +0100 |
---|---|---|
committer | Andr� Schmid <andre.schmid@est.tech> | 2021-11-05 17:14:06 +0000 |
commit | 1de1692115d1df5b4e07c1feb21d098899a6604b (patch) | |
tree | 1e26079e5cc5dc708eb666611f98dd0fc0af571d /catalog-model/src | |
parent | 2b55a906b7115ff2b156b35a4ff66811157111ee (diff) |
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 <anderson.ribeiro@est.tech>
Change-Id: I71b3e49a160521e35a45515ad7adef836f901e78
Diffstat (limited to 'catalog-model/src')
3 files changed, 7 insertions, 7 deletions
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<OperationInputDefinition> 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<OperationInputDefinition> 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<PropertyAssignmentUi> inputs; public void addToInputs(final PropertyAssignmentUi input) { |