aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-dao
diff options
context:
space:
mode:
authorJvD_Ericsson <jeff.van.dam@est.tech>2023-03-02 14:42:45 +0000
committerJvD_Ericsson <jeff.van.dam@est.tech>2023-03-10 17:32:30 +0000
commit0606cf6d6dd2cd4630f4cdd14e2e1eee626ca377 (patch)
treefbf0ee90a49cc23ac3a65d325afb15e6c2613182 /catalog-dao
parent86c6a41b4ecf80b9edf554120ddebf572599c679 (diff)
Support for delete of non normative interface types
Issue-ID: SDC-4423 Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech> Change-Id: Ic41a8d0e792f4f0c6effd7eb6c9bd74887a0506c
Diffstat (limited to 'catalog-dao')
-rw-r--r--catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/InterfaceData.java4
1 files changed, 4 insertions, 0 deletions
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;
}
}