summaryrefslogtreecommitdiffstats
path: root/catalog-model
diff options
context:
space:
mode:
authorMichaelMorris <michael.morris@est.tech>2023-01-20 22:31:39 +0000
committerVasyl Razinkov <vasyl.razinkov@est.tech>2023-01-23 19:53:48 +0000
commitf6b1fff5f297765305c17b1c6bdf540132232233 (patch)
tree1bbc06d426b2bfbe4b80a2c1b137eb6487dab401 /catalog-model
parentf0100abd146b8c97e4b1ff0ba74175a24bbc5e98 (diff)
Disable editing of normative data types
Signed-off-by: MichaelMorris <michael.morris@est.tech> Issue-ID: SDC-4341 Change-Id: Id7673624032883c641e05fd6e5e3d599f7da14df
Diffstat (limited to 'catalog-model')
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/PropertyOperation.java7
1 files changed, 6 insertions, 1 deletions
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<DataTypeDefinition, StorageOperationStatus> 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<DataTypeData, JanusGraphOperationStatus> updateNode = janusGraphGenericDao.updateNode(dataTypeData, DataTypeData.class);