You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by is...@apache.org on 2023/01/30 22:34:23 UTC

[airavata-data-lake] branch master updated: adding update properties

This is an automated email from the ASF dual-hosted git repository.

isjarana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-data-lake.git


The following commit(s) were added to refs/heads/master by this push:
     new e58cf56  adding update properties
     new b199b75  Merge pull request #205 from isururanawaka/mysql_conversion
e58cf56 is described below

commit e58cf56a911f76d092b904a68e0fc4dc93465a72
Author: Isuru Ranawaka <ir...@gmail.com>
AuthorDate: Mon Jan 30 17:33:44 2023 -0500

    adding update properties
---
 .../airavata/drms/api/persistance/mapper/ResourceMapper.java       | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/data-resource-management-service/drms-rdbms-impl/drms-server/src/main/java/org/apache/airavata/drms/api/persistance/mapper/ResourceMapper.java b/data-resource-management-service/drms-rdbms-impl/drms-server/src/main/java/org/apache/airavata/drms/api/persistance/mapper/ResourceMapper.java
index e756475..3344b6b 100644
--- a/data-resource-management-service/drms-rdbms-impl/drms-server/src/main/java/org/apache/airavata/drms/api/persistance/mapper/ResourceMapper.java
+++ b/data-resource-management-service/drms-rdbms-impl/drms-server/src/main/java/org/apache/airavata/drms/api/persistance/mapper/ResourceMapper.java
@@ -100,7 +100,12 @@ public class ResourceMapper {
 
         Resource prResource = new Resource();
 
+       Map<String,String> resourceMap =  resource.getPropertiesMap();
 
+       for(Map.Entry<String,String> entry: resourceMap.entrySet()){
+           resourcePropertySet.add(new ResourceProperty(entry.getKey(), entry.getValue(), prResource));
+        }
+       
         if (allFields != null) {
             allFields.forEach((descriptor, value) -> {
                 String fieldName = descriptor.getJsonName();
@@ -115,8 +120,6 @@ public class ResourceMapper {
         resourcePropertySet.add(new ResourceProperty("tenantId", authenticatedUser.getTenantId(), prResource));
         resourcePropertySet.add(new ResourceProperty("lastModifiedTime", String.valueOf(entity.getCreatedAt()), prResource));
         resourcePropertySet.add(new ResourceProperty("owner", entity.getOwnerId(), prResource));
-        resourcePropertySet.add(new ResourceProperty("firstName", authenticatedUser.getFirstName(), prResource));
-        resourcePropertySet.add(new ResourceProperty("lastName", authenticatedUser.getLastName(), prResource));
 
         if(exResource != null){
           Set<ResourceProperty> properties =  exResource.getResourceProperty();