aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-model/src
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-model/src')
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/Component.java8
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/Resource.java8
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/Service.java4
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/UploadResourceInfo.java1
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/UploadServiceInfo.java1
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/catalog/CatalogComponent.java1
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaElementOperation.java1
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/utils/ModelConverter.java2
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiComponentMetadata.java3
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiResourceMetadata.java2
10 files changed, 30 insertions, 1 deletions
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/Component.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/Component.java
index 0e9c44a382..1fd02da5e8 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/Component.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/Component.java
@@ -213,6 +213,14 @@ public abstract class Component implements PropertiesOwner {
componentMetadataDefinition.getMetadataDataDefinition().setDescription(description);
}
+ public String getTenant() {
+ return componentMetadataDefinition.getMetadataDataDefinition().getTenant();
+ }
+
+ public void setTenant(String tenant) {
+ componentMetadataDefinition.getMetadataDataDefinition().setTenant(tenant);
+ }
+
public LifecycleStateEnum getLifecycleState() {
if (componentMetadataDefinition.getMetadataDataDefinition().getState() != null) {
return LifecycleStateEnum.valueOf(componentMetadataDefinition.getMetadataDataDefinition().getState());
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/Resource.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/Resource.java
index 0b54e0bea7..f0fbc5d550 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/Resource.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/Resource.java
@@ -113,6 +113,14 @@ public class Resource extends Component implements Serializable {
getResourceMetadataDataDefinition().setVendorName(vendorName);
}
+ public String getTenant() {
+ return getResourceMetadataDataDefinition().getTenant();
+ }
+
+ public void setTenant(String tenant) {
+ getResourceMetadataDataDefinition().setTenant(tenant);
+ }
+
public String getVendorRelease() {
return getResourceMetadataDataDefinition().getVendorRelease();
}
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/Service.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/Service.java
index bc8efb528d..061a78b5e8 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/Service.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/Service.java
@@ -197,6 +197,10 @@ public class Service extends Component {
getMetadataDefinition().setVendorName(vendorName);
}
+ public void setTenant(String tenant) {
+ getMetadataDefinition().setTenant(tenant);
+ }
+
public void setVendorRelease(String vendorRelease) {
getMetadataDefinition().setVendorRelease(vendorRelease);
}
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/UploadResourceInfo.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/UploadResourceInfo.java
index e853b64f93..b3d0c53f4a 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/UploadResourceInfo.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/UploadResourceInfo.java
@@ -42,6 +42,7 @@ public class UploadResourceInfo {
private String resourceIconPath;
private String icon;
private String vendorName;
+ private String tenant;
private String vendorRelease;
private String resourceVendorModelNumber;
private String resourceType = "VFC";
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 1c12a3e463..d709947cfa 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
@@ -58,6 +58,7 @@ public class UploadServiceInfo {
private String serviceIconPath;
private String icon;
private String vendorName;
+ private String tenant;
private String vendorRelease;
private String serviceVendorModelNumber;
private String serviceType = "";
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/catalog/CatalogComponent.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/catalog/CatalogComponent.java
index f65c84f474..cd056eede2 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/catalog/CatalogComponent.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/catalog/CatalogComponent.java
@@ -54,6 +54,7 @@ public class CatalogComponent {
private String lastUpdaterUserId;
private List<CategoryDefinition> categories;
private String model;
+ private String tenant;
public List<String> getTags() {
return tags == null ? Collections.emptyList() : ImmutableList.copyOf(tags);
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaElementOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaElementOperation.java
index caedbeeb62..65c109c3f6 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaElementOperation.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaElementOperation.java
@@ -1372,6 +1372,7 @@ public abstract class ToscaElementOperation extends BaseOperation {
catalogComponent.setLastUpdateDate((lastUpdateDate != null ? (Long) lastUpdateDate : 0L));
catalogComponent.setDistributionStatus((String) metadatObj.get(JsonPresentationFields.DISTRIBUTION_STATUS.getPresentation()));
catalogComponent.setDescription((String) metadatObj.get(JsonPresentationFields.DESCRIPTION.getPresentation()));
+ catalogComponent.setTenant((String) metadatObj.get(JsonPresentationFields.TENANT.getPresentation()));
catalogComponent.setSystemName((String) metadatObj.get(JsonPresentationFields.SYSTEM_NAME.getPresentation()));
catalogComponent.setUuid((String) metadatObj.get(JsonPresentationFields.UUID.getPresentation()));
catalogComponent.setInvariantUUID((String) metadatObj.get(JsonPresentationFields.INVARIANT_UUID.getPresentation()));
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/utils/ModelConverter.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/utils/ModelConverter.java
index a246a1a406..7924e09f79 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/utils/ModelConverter.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/utils/ModelConverter.java
@@ -814,6 +814,7 @@ public class ModelConverter {
component.setConformanceLevel((String) toscaElement.getMetadataValue(JsonPresentationFields.CONFORMANCE_LEVEL));
component.setIcon((String) toscaElement.getMetadataValue(JsonPresentationFields.ICON));
component.setDescription((String) toscaElement.getMetadataValue(JsonPresentationFields.DESCRIPTION));
+ component.setTenant((String) toscaElement.getMetadataValue(JsonPresentationFields.TENANT));
component.setTags((List<String>) toscaElement.getMetadataValue(JsonPresentationFields.TAGS));
component.setInvariantUUID((String) toscaElement.getMetadataValue(JsonPresentationFields.INVARIANT_UUID));
component.setContactId((String) toscaElement.getMetadataValue(JsonPresentationFields.CONTACT_ID));
@@ -1381,6 +1382,7 @@ public class ModelConverter {
toscaElement.setMetadataValue(JsonPresentationFields.IS_DELETED, component.getIsDeleted());
toscaElement.setMetadataValue(JsonPresentationFields.ICON, component.getIcon());
toscaElement.setMetadataValue(JsonPresentationFields.DESCRIPTION, component.getDescription());
+ toscaElement.setMetadataValue(JsonPresentationFields.TENANT, component.getTenant());
toscaElement.setMetadataValue(JsonPresentationFields.TAGS, component.getTags());
toscaElement.setMetadataValue(JsonPresentationFields.INVARIANT_UUID, component.getInvariantUUID());
toscaElement.setMetadataValue(JsonPresentationFields.CONTACT_ID, component.getContactId());
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiComponentMetadata.java b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiComponentMetadata.java
index a0d7873d2d..d760614d3e 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiComponentMetadata.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiComponentMetadata.java
@@ -33,7 +33,7 @@ public abstract class UiComponentMetadata {
private String uniqueId;
private String name; // archiveName
-
+ private String tenant;
private String version; // archiveVersion
private Boolean isHighestVersion;
private Long creationDate;
@@ -100,5 +100,6 @@ public abstract class UiComponentMetadata {
this.archiveTime = metadata.getArchiveTime();
this.isVspArchived = metadata.isVspArchived();
this.model = metadata.getModel();
+ this.tenant = metadata.getTenant();
}
}
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiResourceMetadata.java b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiResourceMetadata.java
index 9cc5294f5b..b8b9d72e0a 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiResourceMetadata.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiResourceMetadata.java
@@ -44,6 +44,7 @@ public class UiResourceMetadata extends UiComponentMetadata {
private List<String> derivedFrom;
private Map<String, String> categorySpecificMetadata;
private String csarVersionId;
+ private String tenant;
public UiResourceMetadata(List<CategoryDefinition> categories, List<String> derivedFrom, ResourceMetadataDataDefinition metadata) {
super(categories, metadata);
@@ -57,5 +58,6 @@ public class UiResourceMetadata extends UiComponentMetadata {
this.derivedFrom = derivedFrom;
this.categorySpecificMetadata = metadata.getCategorySpecificMetadata();
this.csarVersionId = metadata.getCsarVersionId();
+ this.tenant = metadata.getTenant();
}
}