aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-model/src
diff options
context:
space:
mode:
authorMichaelMorris <michael.morris@est.tech>2022-02-02 12:12:52 +0000
committerAndr� Schmid <andre.schmid@est.tech>2022-02-02 14:30:29 +0000
commitc69801e7a744c6b10b0594e87e6be154f4b7da43 (patch)
tree432aab984027085834cc65fe51c213922c830e9a /catalog-model/src
parente61740866d27f969cc0b2190bd4c5dd43cef944d (diff)
Improve service import support
Add support for category specific metadata and substitution mapping in service import Signed-off-by: MichaelMorris <michael.morris@est.tech> Issue-ID: SDC-3867 Change-Id: Ib71404942a4a8f174025ccb1b8343164216d8f58
Diffstat (limited to 'catalog-model/src')
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/UploadServiceInfo.java10
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/UploadServiceInfoTest.java4
2 files changed, 11 insertions, 3 deletions
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/UploadServiceInfo.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/UploadServiceInfo.java
index 26cee8447c..837791af22 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/UploadServiceInfo.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/UploadServiceInfo.java
@@ -21,6 +21,7 @@ package org.openecomp.sdc.be.model;
import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
import lombok.Getter;
import lombok.Setter;
import org.openecomp.sdc.be.model.category.CategoryDefinition;
@@ -52,12 +53,16 @@ public class UploadServiceInfo {
private String contactId, name, serviceIconPath, icon, vendorName, vendorRelease, serviceVendorModelNumber;
private String serviceType = "";
private String model;
+ private Map<String, String> categorySpecificMetadata;
+ private String derivedFromGenericType;
+ private String derivedFromGenericVersion;
public UploadServiceInfo(String payloadData, String payloadName, String description, List<String> tags, String invariantUUID, String UUID,
String type, String category, String subcategory, String resourceVendor, String resourceVendorRelease,
String serviceRole, String serviceEcompNaming, String ecompGeneratedNaming, String namingPolicy,
List<UploadArtifactInfo> artifactList, String contactId, String name, String resourceIconPath, String icon,
- String vendorName, String vendorRelease, String serviceVendorModelNumber, String serviceType, String projectCode, String model) {
+ String vendorName, String vendorRelease, String serviceVendorModelNumber, String serviceType, String projectCode, String model, Map<String, String> categorySpecificMetadata,
+ String derivedFromGenericType, String derivedFromGenericVersion) {
this.payloadData = payloadData;
this.payloadName = payloadName;
this.description = description;
@@ -96,6 +101,9 @@ public class UploadServiceInfo {
categories.add(catDef);
}
}
+ this.categorySpecificMetadata = categorySpecificMetadata;
+ this.derivedFromGenericType = derivedFromGenericType;
+ this.derivedFromGenericVersion = derivedFromGenericVersion;
}
public UploadServiceInfo() {
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/UploadServiceInfoTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/UploadServiceInfoTest.java
index 0c34d4b745..d8ddb75be4 100644
--- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/UploadServiceInfoTest.java
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/UploadServiceInfoTest.java
@@ -25,7 +25,7 @@ import org.junit.Assert;
import org.junit.Test;
import org.openecomp.sdc.be.model.category.CategoryDefinition;
import org.openecomp.sdc.be.model.category.SubCategoryDefinition;
-
+import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
@@ -40,7 +40,7 @@ public class UploadServiceInfoTest {
public void testCtor() {
new UploadServiceInfo("mock", "mock", "mock", new LinkedList<>(), "mock", "mock", "mock", "mock/mock/mock",
"mock", "mock", "mock", "mock", "mock", "mock", "mock", new LinkedList<>(), "mock", "mock", "mock",
- "mock", "mock", "mock", "mock", "mock", "mock", "mock");
+ "mock", "mock", "mock", "mock", "mock", "mock", "mock", new HashMap<>(), "mock", "mock");
}
@Test