data-resource-management-service/drms-graph-impl/drms-api/src/main/java/org/apache/airavata/drms/api/utils/CustosUtils.java [58:79]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            EntityType entityType = EntityType.newBuilder().setId(StoragePreferenceConstants.STORAGE_PREFERENCE_LABEL).build();
            EntityType type = sharingManagementClient.getEntityType(tenantId, entityType);
            CustosUtils.mergeStorageEntity(custosClientProvider, tenantId, storageId, username);
            if (!type.isInitialized() || type.getId().isEmpty()) {
                EntityType storEntityType = EntityType.newBuilder()
                        .setId(StoragePreferenceConstants.STORAGE_PREFERENCE_LABEL)
                        .setName(StoragePreferenceConstants.STORAGE_PREFERENCE_LABEL)
                        .setDescription("Storage preference entity type")
                        .build();
                sharingManagementClient.createEntityType(tenantId, storEntityType);
            }
            Entity entity = Entity.newBuilder().
                    setId(storagePreferenceId)
                    .setName(storagePreferenceId)
                    .setOwnerId(username)
                    .setParentId(storageId)
                    .setType(StoragePreferenceConstants.STORAGE_PREFERENCE_LABEL)
                    .setDescription("Storage Preference information").build();

            Status status = sharingManagementClient.isEntityExists(tenantId, entity);
            if (!status.getStatus()) {
                sharingManagementClient.createEntity(tenantId, entity);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



data-resource-management-service/drms-rdbms-impl/drms-server/src/main/java/org/apache/airavata/drms/api/utils/CustosUtils.java [60:81]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            EntityType entityType = EntityType.newBuilder().setId(StoragePreferenceConstants.STORAGE_PREFERENCE_LABEL).build();
            EntityType type = sharingManagementClient.getEntityType(tenantId, entityType);
            CustosUtils.mergeStorageEntity(custosClientProvider, tenantId, storageId, username);
            if (!type.isInitialized() || type.getId().isEmpty()) {
                EntityType storEntityType = EntityType.newBuilder()
                        .setId(StoragePreferenceConstants.STORAGE_PREFERENCE_LABEL)
                        .setName(StoragePreferenceConstants.STORAGE_PREFERENCE_LABEL)
                        .setDescription("Storage preference entity type")
                        .build();
                sharingManagementClient.createEntityType(tenantId, storEntityType);
            }
            Entity entity = Entity.newBuilder().
                    setId(storagePreferenceId)
                    .setName(storagePreferenceId)
                    .setOwnerId(username)
                    .setParentId(storageId)
                    .setType(StoragePreferenceConstants.STORAGE_PREFERENCE_LABEL)
                    .setDescription("Storage Preference information").build();

            Status status = sharingManagementClient.isEntityExists(tenantId, entity);
            if (!status.getStatus()) {
                sharingManagementClient.createEntity(tenantId, entity);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



