From f6b1fff5f297765305c17b1c6bdf540132232233 Mon Sep 17 00:00:00 2001 From: MichaelMorris Date: Fri, 20 Jan 2023 22:31:39 +0000 Subject: Disable editing of normative data types Signed-off-by: MichaelMorris Issue-ID: SDC-4341 Change-Id: Id7673624032883c641e05fd6e5e3d599f7da14df --- .../openecomp/sdc/be/model/operations/impl/PropertyOperation.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'catalog-model') diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/PropertyOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/PropertyOperation.java index 9dc28cb2b4..f6bcf1bc8e 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/PropertyOperation.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/PropertyOperation.java @@ -1268,9 +1268,14 @@ public class PropertyOperation extends AbstractOperation implements IPropertyOpe return Either.right(operationStatus); } propertiesData.put(propertyName, addPropertyToNodeType.left().value()); - } + } DataTypeData dataTypeData = new DataTypeData(); + Either existingNode = getDataTypeByUidWithoutDerived(uniqueId, true); + if (existingNode.isLeft()) { + dataTypeData.getDataTypeDataDefinition().setNormative(existingNode.left().value().isNormative()); + } dataTypeData.getDataTypeDataDefinition().setUniqueId(uniqueId); + long modificationTime = System.currentTimeMillis(); dataTypeData.getDataTypeDataDefinition().setModificationTime(modificationTime); Either updateNode = janusGraphGenericDao.updateNode(dataTypeData, DataTypeData.class); -- cgit 1.2.3-korg