diff options
author | aribeiro <anderson.ribeiro@est.tech> | 2021-05-18 20:57:07 +0100 |
---|---|---|
committer | Christophe Closset <christophe.closset@intl.att.com> | 2021-07-05 14:36:03 +0000 |
commit | 6047cd212696f5260d1296ce1fc3449dadb6005d (patch) | |
tree | 06812f8814816ade1442ca0393a91f09655f4fd1 /catalog-dao | |
parent | b835031b83230c36649c6e77787867a465e0ac47 (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 'catalog-dao')
4 files changed, 9 insertions, 1 deletions
diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/api/ActionStatus.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/api/ActionStatus.java index ed448c18d4..4728833ecc 100644 --- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/api/ActionStatus.java +++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/api/ActionStatus.java @@ -52,7 +52,8 @@ public enum ActionStatus { // Category related COMPONENT_MISSING_CATEGORY, COMPONENT_INVALID_CATEGORY, COMPONENT_ELEMENT_INVALID_NAME_FORMAT, COMPONENT_ELEMENT_INVALID_NAME_LENGTH, COMPONENT_CATEGORY_ALREADY_EXISTS, COMPONENT_CATEGORY_NOT_FOUND, COMPONENT_SUB_CATEGORY_NOT_FOUND_FOR_CATEGORY, COMPONENT_SUB_CATEGORY_EXISTS_FOR_CATEGORY, COMPONENT_GROUPING_EXISTS_FOR_SUB_CATEGORY, // Model related - MODEL_ALREADY_EXISTS, INVALID_MODEL, MODEL_IMPORTS_IS_EMPTY, COULD_NOT_READ_MODEL_IMPORTS, + MODEL_ALREADY_EXISTS, INVALID_MODEL, MODEL_IMPORTS_IS_EMPTY, COULD_NOT_READ_MODEL_IMPORTS, MODEL_NOT_FOUND, MODEL_NAME_CANNOT_BE_EMPTY, + COMPONENT_WITH_MODEL_ALREADY_EXIST, // Service API URL INVALID_SERVICE_API_URL, // Property related 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 a940c8d3f0..cbfee5e799 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 @@ -50,6 +50,7 @@ public enum GraphPropertiesDictionary { CONTACT_ID ("contactId", String.class, false, false), VENDOR_NAME ("vendorName", String.class, false, false), VENDOR_RELEASE ("vendorRelease", String.class, false, false), + MODEL ("model", String.class, false, false), CONFORMANCE_LEVEL ("conformanceLevel", String.class, false, false), ICON ("icon", String.class, false, false), TAGS ("tags", String.class, false, false), diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/GraphPropertiesDictionaryExtractor.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/GraphPropertiesDictionaryExtractor.java index 0701da5ad4..ed1dc29942 100644 --- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/GraphPropertiesDictionaryExtractor.java +++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/GraphPropertiesDictionaryExtractor.java @@ -136,6 +136,10 @@ public class GraphPropertiesDictionaryExtractor { return (String) properties.get(GraphPropertiesDictionary.VENDOR_RELEASE.getProperty()); } + public String getModel() { + return (String) properties.get(GraphPropertiesDictionary.MODEL.getProperty()); + } + public Boolean isAbstract() { return (Boolean) properties.get(GraphPropertiesDictionary.IS_ABSTRACT.getProperty()); } diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/ComponentMetadataData.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/ComponentMetadataData.java index 0341be73f6..602d53ed26 100644 --- a/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/ComponentMetadataData.java +++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/ComponentMetadataData.java @@ -62,6 +62,7 @@ public abstract class ComponentMetadataData extends GraphNode { metadataDataDefinition.setCsarVersion(extractor.getCsarVersion()); metadataDataDefinition.setImportedToscaChecksum(extractor.getImportedToscaChecksum()); metadataDataDefinition.setInvariantUUID(extractor.getInvariantUuid()); + metadataDataDefinition.setModel(extractor.getModel()); componentInstanceCounter = extractor.getInstanceCounter(); } @@ -90,6 +91,7 @@ public abstract class ComponentMetadataData extends GraphNode { addIfExists(map, GraphPropertiesDictionary.CSAR_VERSION, metadataDataDefinition.getCsarVersion()); addIfExists(map, GraphPropertiesDictionary.IMPORTED_TOSCA_CHECKSUM, metadataDataDefinition.getImportedToscaChecksum()); addIfExists(map, GraphPropertiesDictionary.INVARIANT_UUID, metadataDataDefinition.getInvariantUUID()); + addIfExists(map, GraphPropertiesDictionary.MODEL, metadataDataDefinition.getModel()); return map; } |