aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-dao
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-dao
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-dao')
-rw-r--r--catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/GraphPropertiesDictionary.java3
-rw-r--r--catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/DataTypeData.java4
2 files changed, 6 insertions, 1 deletions
diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/GraphPropertiesDictionary.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/GraphPropertiesDictionary.java
index 15fc013173..5a287c9261 100644
--- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/GraphPropertiesDictionary.java
+++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/GraphPropertiesDictionary.java
@@ -160,7 +160,8 @@ public enum GraphPropertiesDictionary {
CUSTOMIZATION_UUID ("customizationUUID", String.class, false, false),
IS_ARCHIVED ("isArchived", Boolean.class, false, true),
IS_VSP_ARCHIVED ("isVspArchived", Boolean.class, false, true),
- ARCHIVE_TIME ("archiveTime", Long.class, false, true);
+ NORMATIVE ("normative", Boolean.class, false, false),
+ ARCHIVE_TIME ("archiveTime", Long.class, false, true);
// @formatter:on
private final String property;
diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/DataTypeData.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/DataTypeData.java
index e482fb55b6..bf13331dd1 100644
--- a/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/DataTypeData.java
+++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/DataTypeData.java
@@ -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;
}