From cf04a1a714ef4a1df973929dc750232b4d67d7b4 Mon Sep 17 00:00:00 2001 From: Kartik Hegde Date: Sat, 12 Nov 2022 14:29:11 +0530 Subject: Multitenancy in SDC Issue-ID: SDC-4215 Change-Id: Ie24ba38acc9f1998d4a7e722e8f98456dab9201d Signed-off-by: Kartik Hegde --- .../sdc/be/datatypes/components/ComponentMetadataDataDefinition.java | 3 +++ .../sdc/be/datatypes/components/ServiceMetadataDataDefinition.java | 1 + .../org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java | 1 + .../sdc/be/datatypes/enums/JsonPresentationFieldsExtractor.java | 5 +++++ 4 files changed, 10 insertions(+) (limited to 'common-be/src/main/java') 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 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()); + } + } -- cgit 1.2.3-korg