-
- public StorageOperationStatus deleteInstInputsToComponent(GraphVertex nodeTypeVertex, Map<String, MapPropertiesDataDefinition> instInputs) {
-
- if (instInputs != null && !instInputs.isEmpty()) {
- instInputs.entrySet().forEach(i -> {
- List<String> uniqueKeys = new ArrayList<>(i.getValue().getMapToscaDataDefinition().keySet());
- List<String> pathKeys = new ArrayList<>();
- pathKeys.add(i.getKey());
-
- StorageOperationStatus status = deleteToscaDataDeepElements(nodeTypeVertex, EdgeLabelEnum.INST_INPUTS, VertexTypeEnum.INST_INPUTS, uniqueKeys, pathKeys, JsonPresentationFields.NAME);
- if (status != StorageOperationStatus.OK) {
- return;
- }
- });
- }
-
- return StorageOperationStatus.OK;
- }
-
- public StorageOperationStatus addInstPropertiesToComponent(GraphVertex nodeTypeVertex, Map<String, MapPropertiesDataDefinition> instInputs) {
-
- if (instInputs != null && !instInputs.isEmpty()) {
- instInputs.entrySet().forEach(i -> {
- StorageOperationStatus status = addToscaDataDeepElementsBlockToToscaElement(nodeTypeVertex, EdgeLabelEnum.INST_PROPERTIES, VertexTypeEnum.INST_PROPERTIES, i.getValue(), i.getKey());
- if (status != StorageOperationStatus.OK) {
- return;
- }
- });
+ public StorageOperationStatus associateInstGroupsToComponent(GraphVertex nodeTypeVertex, Map<String, MapGroupsDataDefinition> instGroups) {
+ if (instGroups != null && !instGroups.isEmpty()) {
+ Either<GraphVertex, StorageOperationStatus> assosiateElementToData = associateElementToData(nodeTypeVertex, VertexTypeEnum.INST_GROUPS,
+ EdgeLabelEnum.INST_GROUPS, instGroups);
+ if (assosiateElementToData.isRight()) {
+ return assosiateElementToData.right().value();
+ }