summaryrefslogtreecommitdiffstats
path: root/common-be
diff options
context:
space:
mode:
authorKartik Hegde <kh00735564@techmahindra.com>2022-11-12 14:29:11 +0530
committerKartik Hegde <kh00735564@techmahindra.com>2022-12-21 12:04:30 +0000
commitcf04a1a714ef4a1df973929dc750232b4d67d7b4 (patch)
treeedd2e6e5074ba58efb98663a1ea1851208895fff /common-be
parentf995db01ee95606b6cded82822a73435ebc190c8 (diff)
Multitenancy in SDC
Issue-ID: SDC-4215 Change-Id: Ie24ba38acc9f1998d4a7e722e8f98456dab9201d Signed-off-by: Kartik Hegde <kh00735564@techmahindra.com>
Diffstat (limited to 'common-be')
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/components/ComponentMetadataDataDefinition.java3
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/components/ServiceMetadataDataDefinition.java1
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java1
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFieldsExtractor.java5
4 files changed, 10 insertions, 0 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 4b94adb829..0a1c03a32e 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
@@ -49,6 +49,7 @@ public abstract class ComponentMetadataDataDefinition extends ToscaDataDefinitio
private Long creationDate;
private Long lastUpdateDate;
private String description;
+ private String tenant;
private String state;
private List<String> tags;
private String conformanceLevel;
@@ -84,6 +85,7 @@ public abstract class ComponentMetadataDataDefinition extends ToscaDataDefinitio
this.creationDate = other.getCreationDate();
this.lastUpdateDate = other.getLastUpdateDate();
this.description = other.getDescription();
+ this.tenant = other.getTenant();
this.state = other.getState();
this.tags = new ArrayList<>(other.getTags() != null ? other.getTags() : new LinkedList<>());
this.icon = other.getIcon();
@@ -114,6 +116,7 @@ public abstract class ComponentMetadataDataDefinition extends ToscaDataDefinitio
this.creationDate = extractor.getCreationDate();
this.lastUpdateDate = extractor.getLastUpdateDate();
this.description = extractor.getDescription();
+ this.tenant = extractor.getTenant();
this.state = extractor.getState();
this.tags = extractor.getTags();
this.icon = extractor.getIcon();
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/components/ServiceMetadataDataDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/components/ServiceMetadataDataDefinition.java
index b9a0dc73a8..2456b67b0c 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/components/ServiceMetadataDataDefinition.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/components/ServiceMetadataDataDefinition.java
@@ -42,6 +42,7 @@ public class ServiceMetadataDataDefinition extends ComponentMetadataDataDefiniti
private ResourceTypeEnum importServiceType = ResourceTypeEnum.SERVICE;
private String toscaServiceName;
private String vendorName;
+ private String tenant;
private String vendorRelease;
public ServiceMetadataDataDefinition(JsonPresentationFieldsExtractor extractor) {
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 6e845a0a8f..ad10a63cfa 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
@@ -72,6 +72,7 @@ public enum JsonPresentationFields {
MODEL("model", null),
NORMATIVE("normative", null),
DATA_TYPES("data_types", GraphPropertyEnum.DATA_TYPES),
+ TENANT("tenant", null),
////Inputs
ANNOTATIONS("annotations", null),
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 f497066572..3808ac78f9 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
@@ -177,4 +177,9 @@ public class JsonPresentationFieldsExtractor {
public Boolean isNormative() {
return (Boolean) properties.get(JsonPresentationFields.NORMATIVE.getPresentation());
}
+
+ public String getTenant() {
+ return (String) properties.get(JsonPresentationFields.TENANT.getPresentation());
+ }
+
}