From 2e6a7eb218ad07a19fd1cc09b94e1f6a82e05360 Mon Sep 17 00:00:00 2001 From: "Sindhuri.A" Date: Fri, 7 Sep 2018 13:53:56 +0530 Subject: Single node copy paste keyboard shorcut on canvas Keyboard Shortcut copy paste for single node on Composition page canvas for services Issue-ID: SDC-1736 Change-Id: I669a728d3641a59ba7a4d8cc18fdae1000a0377f Signed-off-by: Sindhuri.A --- .../be/model/jsontitan/operations/NodeTemplateOperation.java | 12 ++++++++++++ .../be/model/jsontitan/operations/ToscaOperationFacade.java | 8 ++++++++ 2 files changed, 20 insertions(+) (limited to 'catalog-model') diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsontitan/operations/NodeTemplateOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsontitan/operations/NodeTemplateOperation.java index eb41232ad0..fda20c1a12 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsontitan/operations/NodeTemplateOperation.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsontitan/operations/NodeTemplateOperation.java @@ -1972,6 +1972,18 @@ public class NodeTemplateOperation extends BaseOperation { return updateToscaDataDeepElementsOfToscaElement(containerComponent.getUniqueId(), EdgeLabelEnum.INST_PROPERTIES, VertexTypeEnum.INST_PROPERTIES, properties, pathKeys, JsonPresentationFields.NAME); } + public StorageOperationStatus updateComponentInstanceAttribute(Component containerComponent, String componentInstanceId, ComponentInstanceProperty property){ + List pathKeys = new ArrayList<>(); + pathKeys.add(componentInstanceId); + return updateToscaDataDeepElementOfToscaElement(containerComponent.getUniqueId(), EdgeLabelEnum.INST_ATTRIBUTES, VertexTypeEnum.INST_ATTRIBUTES, property, pathKeys, JsonPresentationFields.NAME); + } + + public StorageOperationStatus addComponentInstanceAttribute(Component containerComponent, String componentInstanceId, ComponentInstanceProperty property){ + List pathKeys = new ArrayList<>(); + pathKeys.add(componentInstanceId); + return addToscaDataDeepElementToToscaElement(containerComponent.getUniqueId(), EdgeLabelEnum.INST_ATTRIBUTES, VertexTypeEnum.INST_ATTRIBUTES, property, pathKeys, JsonPresentationFields.NAME); + } + public StorageOperationStatus updateComponentInstanceInput(Component containerComponent, String componentInstanceId, ComponentInstanceInput property) { List pathKeys = new ArrayList<>(); diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsontitan/operations/ToscaOperationFacade.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsontitan/operations/ToscaOperationFacade.java index aae73841a1..a1d08a6eed 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsontitan/operations/ToscaOperationFacade.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsontitan/operations/ToscaOperationFacade.java @@ -2222,6 +2222,14 @@ public class ToscaOperationFacade { return nodeTemplateOperation.addComponentInstanceProperty(containerComponent, componentInstanceId, property); } + public StorageOperationStatus updateComponentInstanceAttribute(Component containerComponent, String componentInstanceId, ComponentInstanceProperty property){ + return nodeTemplateOperation.updateComponentInstanceAttribute(containerComponent, componentInstanceId, property); + } + + public StorageOperationStatus addComponentInstanceAttribute(Component containerComponent, String componentInstanceId, ComponentInstanceProperty property){ + return nodeTemplateOperation.addComponentInstanceAttribute(containerComponent, componentInstanceId, property); + } + public StorageOperationStatus updateComponentInstanceInput(Component containerComponent, String componentInstanceId, ComponentInstanceInput property) { return nodeTemplateOperation.updateComponentInstanceInput(containerComponent, componentInstanceId, property); } -- cgit 1.2.3-korg