From 18950cf448def2f5b8493724c1b01b1292672c1d Mon Sep 17 00:00:00 2001 From: MichaelMorris Date: Thu, 14 Apr 2022 15:19:07 +0100 Subject: Enable identification of system deployed VFCs Signed-off-by: MichaelMorris Issue-ID: SDC-3972 Change-Id: Ia3513020f508275827b34111c6eb2921204d9320 --- .../sdc/be/datatypes/components/ComponentMetadataDataDefinition.java | 3 +++ .../org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java | 1 + .../sdc/be/datatypes/enums/JsonPresentationFieldsExtractor.java | 4 ++++ 3 files changed, 8 insertions(+) (limited to 'common-be/src/main/java/org') diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/components/ComponentMetadataDataDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/components/ComponentMetadataDataDefinition.java index d6588e96e1..4b94adb829 100644 --- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/components/ComponentMetadataDataDefinition.java +++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/components/ComponentMetadataDataDefinition.java @@ -74,6 +74,7 @@ public abstract class ComponentMetadataDataDefinition extends ToscaDataDefinitio private Boolean isVspArchived = false; private Map categorySpecificMetadata; private String model; + private boolean normative = false; protected ComponentMetadataDataDefinition(ComponentMetadataDataDefinition other) { this.uniqueId = other.getUniqueId(); @@ -102,6 +103,7 @@ public abstract class ComponentMetadataDataDefinition extends ToscaDataDefinitio this.archiveTime = other.getArchiveTime(); this.categorySpecificMetadata = other.getCategorySpecificMetadata(); this.model = other.getModel(); + this.normative = other.isNormative(); } protected ComponentMetadataDataDefinition(JsonPresentationFieldsExtractor extractor) { @@ -129,6 +131,7 @@ public abstract class ComponentMetadataDataDefinition extends ToscaDataDefinitio this.isVspArchived = extractor.isVspArchived(); this.archiveTime = extractor.getArchiveTime(); this.model = extractor.getModel(); + this.normative = extractor.isNormative() == null ? false: extractor.isNormative(); } public void setUniqueId(String uniqueId) { diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java index a3acb42343..6e845a0a8f 100644 --- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java +++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java @@ -70,6 +70,7 @@ public enum JsonPresentationFields { DERIVED_FROM_GENERIC_VERSION("derivedFromGenericVersion", null), SERVICE_FUNCTION("serviceFunction", null), MODEL("model", null), + NORMATIVE("normative", null), DATA_TYPES("data_types", GraphPropertyEnum.DATA_TYPES), ////Inputs diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFieldsExtractor.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFieldsExtractor.java index a0b2143a5f..f497066572 100644 --- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFieldsExtractor.java +++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFieldsExtractor.java @@ -173,4 +173,8 @@ public class JsonPresentationFieldsExtractor { public String getModel() { return (String) properties.get(JsonPresentationFields.MODEL.getPresentation()); } + + public Boolean isNormative() { + return (Boolean) properties.get(JsonPresentationFields.NORMATIVE.getPresentation()); + } } -- cgit 1.2.3-korg