diff options
author | Kartik Hegde <kh00735564@techmahindra.com> | 2022-11-12 14:29:11 +0530 |
---|---|---|
committer | Kartik Hegde <kh00735564@techmahindra.com> | 2022-12-21 12:04:30 +0000 |
commit | cf04a1a714ef4a1df973929dc750232b4d67d7b4 (patch) | |
tree | edd2e6e5074ba58efb98663a1ea1851208895fff /openecomp-be/lib/openecomp-sdc-versioning-lib | |
parent | f995db01ee95606b6cded82822a73435ebc190c8 (diff) |
Multitenancy in SDC
Issue-ID: SDC-4215
Change-Id: Ie24ba38acc9f1998d4a7e722e8f98456dab9201d
Signed-off-by: Kartik Hegde <kh00735564@techmahindra.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-versioning-lib')
2 files changed, 9 insertions, 1 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/Item.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/Item.java index 62d21676f2..bbaf4945ea 100644 --- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/Item.java +++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/Item.java @@ -33,6 +33,7 @@ public class Item { private String type; private String name; private String owner; + private String tenant; private ItemStatus status; private String description; private Map<String, Object> properties = new HashMap<>(); diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/zusammen/ItemZusammenDaoImpl.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/zusammen/ItemZusammenDaoImpl.java index e2e7b1cc1e..868faf4582 100644 --- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/zusammen/ItemZusammenDaoImpl.java +++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/zusammen/ItemZusammenDaoImpl.java @@ -102,6 +102,9 @@ public class ItemZusammenDaoImpl implements ItemDao { case ITEM_OWNER: item.setOwner((String) propertyValue); break; + case TENANT: + item.setTenant((String) propertyValue); + break; case ITEM_STATUS: item.setStatus(ItemStatus.valueOf((String) propertyValue)); break; @@ -121,6 +124,9 @@ public class ItemZusammenDaoImpl implements ItemDao { info.setDescription(item.getDescription()); info.addProperty(ItemInfoProperty.ITEM_TYPE.getName(), item.getType()); info.addProperty(ItemInfoProperty.ITEM_OWNER.getName(), item.getOwner()); + if (item.getTenant() != null) { + info.addProperty(ItemInfoProperty.TENANT.getName(), item.getTenant()); + } if (item.getStatus() != null) { info.addProperty(ItemInfoProperty.ITEM_STATUS.getName(), item.getStatus()); } @@ -135,7 +141,8 @@ public class ItemZusammenDaoImpl implements ItemDao { ITEM_TYPE("item_type"), ITEM_VERSIONS_STATUSES("item_versions_statuses"), ITEM_OWNER("Owner"), - ITEM_STATUS("status"); + ITEM_STATUS("status"), + TENANT("Tenant"); private final String name; |