From 0606cf6d6dd2cd4630f4cdd14e2e1eee626ca377 Mon Sep 17 00:00:00 2001 From: JvD_Ericsson Date: Thu, 2 Mar 2023 14:42:45 +0000 Subject: Support for delete of non normative interface types Issue-ID: SDC-4423 Signed-off-by: JvD_Ericsson Change-Id: Ic41a8d0e792f4f0c6effd7eb6c9bd74887a0506c --- .../main/java/org/openecomp/sdc/be/resources/data/InterfaceData.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'catalog-dao') diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/InterfaceData.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/InterfaceData.java index 4f3c4c0e63..062a9fd56f 100644 --- a/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/InterfaceData.java +++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/InterfaceData.java @@ -17,6 +17,7 @@ * limitations under the License. * ============LICENSE_END========================================================= */ + package org.openecomp.sdc.be.resources.data; import java.util.HashMap; @@ -52,6 +53,8 @@ public class InterfaceData extends GraphNode { interfaceDataDefinition.setDescription((String) properties.get(GraphPropertiesDictionary.DESCRIPTION.getProperty())); interfaceDataDefinition.setCreationDate((Long) properties.get(GraphPropertiesDictionary.CREATION_DATE.getProperty())); interfaceDataDefinition.setLastUpdateDate((Long) properties.get(GraphPropertiesDictionary.LAST_UPDATE_DATE.getProperty())); + final Object normativeProperty = properties.get(GraphPropertiesDictionary.NORMATIVE.getProperty()); + interfaceDataDefinition.setUserCreated(!(normativeProperty instanceof Boolean && (Boolean) normativeProperty)); } public InterfaceDataDefinition getInterfaceDataDefinition() { @@ -75,6 +78,7 @@ public class InterfaceData extends GraphNode { addIfExists(map, GraphPropertiesDictionary.CREATION_DATE, interfaceDataDefinition.getCreationDate()); addIfExists(map, GraphPropertiesDictionary.LAST_UPDATE_DATE, interfaceDataDefinition.getLastUpdateDate()); addIfExists(map, GraphPropertiesDictionary.DESCRIPTION, interfaceDataDefinition.getDescription()); + addIfExists(map, GraphPropertiesDictionary.NORMATIVE, !interfaceDataDefinition.isUserCreated()); return map; } } -- cgit 1.2.3-korg