summaryrefslogtreecommitdiffstats
path: root/common-be/src/main
diff options
context:
space:
mode:
authoraribeiro <anderson.ribeiro@est.tech>2021-05-18 20:57:07 +0100
committerChristophe Closset <christophe.closset@intl.att.com>2021-07-05 14:36:03 +0000
commit6047cd212696f5260d1296ce1fc3449dadb6005d (patch)
tree06812f8814816ade1442ca0393a91f09655f4fd1 /common-be/src/main
parentb835031b83230c36649c6e77787867a465e0ac47 (diff)
Support for associating node types to models
Issue-ID: SDC-3597 Signed-off-by: aribeiro <anderson.ribeiro@est.tech> Signed-off-by: MichaelMorris <michael.morris@est.tech> Change-Id: Icd0066240b78ba98d8f0efab66d11756f18cb251
Diffstat (limited to 'common-be/src/main')
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/components/ComponentMetadataDataDefinition.java5
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/GraphPropertyEnum.java13
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java2
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFieldsExtractor.java4
4 files changed, 17 insertions, 7 deletions
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 ebccc6c2b8..849153b1ac 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
@@ -132,6 +132,9 @@ public abstract class ComponentMetadataDataDefinition extends ToscaDataDefinitio
@Getter
@Setter
private Map<String, String> categorySpecificMetadata;
+ @Getter
+ @Setter
+ private String model;
public ComponentMetadataDataDefinition(ComponentMetadataDataDefinition other) {
this.uniqueId = other.getUniqueId();
@@ -159,6 +162,7 @@ public abstract class ComponentMetadataDataDefinition extends ToscaDataDefinitio
this.isVspArchived = other.isVspArchived;
this.archiveTime = other.getArchiveTime();
this.categorySpecificMetadata = other.getCategorySpecificMetadata();
+ this.model = other.getModel();
}
public ComponentMetadataDataDefinition(JsonPresentationFieldsExtractor extractor) {
@@ -185,6 +189,7 @@ public abstract class ComponentMetadataDataDefinition extends ToscaDataDefinitio
this.isArchived = extractor.isArchived();
this.isVspArchived = extractor.isVspArchived();
this.archiveTime = extractor.getArchiveTime();
+ this.model = extractor.getModel();
}
public void setUniqueId(String uniqueId) {
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/GraphPropertyEnum.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/GraphPropertyEnum.java
index 0ed0bd21fa..8f547cf7d2 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/GraphPropertyEnum.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/GraphPropertyEnum.java
@@ -55,15 +55,16 @@ public enum GraphPropertyEnum {
ICONS("icons", String.class, false, false),
METADATA_KEYS("metadataKeys", String.class, false, false),
USE_SUBSTITUTION_FOR_NESTED_SERVICES("useServiceSubstitutionForNestedServices", Boolean.class, false, false),
-
DATA_TYPES("data_types", Map.class, false, false),
-
//Archive/Restore
- IS_ARCHIVED("isArchived", Boolean.class, false, true), IS_VSP_ARCHIVED("isVspArchived", Boolean.class, false, true), ARCHIVE_TIME("archiveTime",
- Long.class, false, true), PREV_CATALOG_UPDATE_TIME("previousUpdateTime", Long.class, false, true), CURRENT_CATALOG_UPDATE_TIME(
- "currentUpdateTime", Long.class, false, true),
+ IS_ARCHIVED("isArchived", Boolean.class, false, true),
+ IS_VSP_ARCHIVED("isVspArchived", Boolean.class, false, true),
+ ARCHIVE_TIME("archiveTime", Long.class, false, true),
+ PREV_CATALOG_UPDATE_TIME("previousUpdateTime", Long.class, false, true),
+ CURRENT_CATALOG_UPDATE_TIME("currentUpdateTime", Long.class, false, true),
//Healing
- HEALING_VERSION("healVersion", Integer.class, false, true);
+ HEALING_VERSION("healVersion", Integer.class, false, true),
+ MODEL("model", String.class, false, false);
// @formatter:on
private final String property;
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 185d9538ff..1e8e842656 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
@@ -68,7 +68,7 @@ public enum JsonPresentationFields {
DERIVED_FROM_GENERIC_TYPE("derivedFromGenericType", null),
DERIVED_FROM_GENERIC_VERSION("derivedFromGenericVersion", null),
SERVICE_FUNCTION("serviceFunction", null),
- MODELS("models", null),
+ MODEL("model", 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 c5eb86559e..2fc2c52404 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
@@ -165,4 +165,8 @@ public class JsonPresentationFieldsExtractor {
public String getServiceFunction() {
return (String) properties.get(JsonPresentationFields.SERVICE_FUNCTION.getPresentation());
}
+
+ public String getModel() {
+ return (String) properties.get(JsonPresentationFields.MODEL.getPresentation());
+ }
}