Disable editing of normative data types
[sdc.git] / catalog-dao / src / main / java / org / openecomp / sdc / be / resources / data / DataTypeData.java
index e482fb5..bf13331 100644 (file)
@@ -50,6 +50,9 @@ public class DataTypeData extends GraphNode {
         dataTypeDataDefinition.setCreationTime((Long) properties.get(GraphPropertiesDictionary.CREATION_DATE.getProperty()));
         dataTypeDataDefinition.setModificationTime((Long) properties.get(GraphPropertiesDictionary.LAST_UPDATE_DATE.getProperty()));
         dataTypeDataDefinition.setModel((String) properties.get(GraphPropertiesDictionary.MODEL.getProperty()));
+        final Object normativeProperty = properties.get(GraphPropertiesDictionary.NORMATIVE.getProperty());
+        final boolean normative = normativeProperty != null && (boolean) normativeProperty;
+        dataTypeDataDefinition.setNormative(normative);        
     }
 
     @Override
@@ -62,6 +65,7 @@ public class DataTypeData extends GraphNode {
         addIfExists(map, GraphPropertiesDictionary.CREATION_DATE, dataTypeDataDefinition.getCreationTime());
         addIfExists(map, GraphPropertiesDictionary.LAST_UPDATE_DATE, dataTypeDataDefinition.getModificationTime());
         addIfExists(map, GraphPropertiesDictionary.MODEL, dataTypeDataDefinition.getModel());
+        addIfExists(map, GraphPropertiesDictionary.NORMATIVE, dataTypeDataDefinition.isNormative());
         return map;
     }