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

yasithdev pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata.git


The following commit(s) were added to refs/heads/master by this push:
     new 3d146be771 Remove dead iam util classes (#664)
3d146be771 is described below

commit 3d146be771ae42a6ac5d193be72fb602a515993e
Author: Yasith Jayawardana <[email protected]>
AuthorDate: Sat Jun 13 00:36:40 2026 -0400

    Remove dead iam util classes (#664)
    
    Three unreferenced legacy classes under iam-service/util: 
SharingModelConverter
    (unused proto->entity helper) and the Utils + JPAConstants pair (legacy 
JDBC-URL
    parsing helpers used only by each other). Zero references across both repos
    (the one wildcard import of iam.util.* does not use any of them); the 
reactor
    compiles cleanly without them.
---
 .../org/apache/airavata/iam/util/JPAConstants.java | 28 ------
 .../airavata/iam/util/SharingModelConverter.java   | 40 ---------
 .../java/org/apache/airavata/iam/util/Utils.java   | 99 ----------------------
 3 files changed, 167 deletions(-)

diff --git 
a/airavata-api/iam-service/src/main/java/org/apache/airavata/iam/util/JPAConstants.java
 
b/airavata-api/iam-service/src/main/java/org/apache/airavata/iam/util/JPAConstants.java
deleted file mode 100644
index 4cfc554461..0000000000
--- 
a/airavata-api/iam-service/src/main/java/org/apache/airavata/iam/util/JPAConstants.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-package org.apache.airavata.iam.util;
-
-public class JPAConstants {
-    public static final String KEY_JDBC_URL = "airavata.jdbc.url";
-    public static final String KEY_JDBC_USER = "airavata.jdbc.user";
-    public static final String KEY_JDBC_PASSWORD = "airavata.jdbc.password";
-    public static final String KEY_JDBC_DRIVER = "airavata.jdbc.driver";
-    public static final String VALIDATION_QUERY = 
"airavata.jdbc.validationQuery";
-}
diff --git 
a/airavata-api/iam-service/src/main/java/org/apache/airavata/iam/util/SharingModelConverter.java
 
b/airavata-api/iam-service/src/main/java/org/apache/airavata/iam/util/SharingModelConverter.java
deleted file mode 100644
index 0d4e265a4c..0000000000
--- 
a/airavata-api/iam-service/src/main/java/org/apache/airavata/iam/util/SharingModelConverter.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-package org.apache.airavata.iam.util;
-
-import org.apache.airavata.iam.model.UserEntity;
-import org.apache.airavata.model.user.proto.UserProfile;
-
-/**
- * Converts proto data models to sharing entity types.
- */
-public class SharingModelConverter {
-
-    /**
-     * Build UserEntity from proto UserProfile.
-     */
-    public static UserEntity getUser(UserProfile userProfile) {
-        UserEntity user = new UserEntity();
-        user.setUserId(userProfile.getAiravataInternalUserId());
-        user.setDomainId(userProfile.getGatewayId());
-        user.setUserName(userProfile.getUserId());
-        return user;
-    }
-}
diff --git 
a/airavata-api/iam-service/src/main/java/org/apache/airavata/iam/util/Utils.java
 
b/airavata-api/iam-service/src/main/java/org/apache/airavata/iam/util/Utils.java
deleted file mode 100644
index a71e95e7d2..0000000000
--- 
a/airavata-api/iam-service/src/main/java/org/apache/airavata/iam/util/Utils.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/**
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-package org.apache.airavata.iam.util;
-
-import java.net.URI;
-import org.apache.airavata.config.ServerSettings;
-import org.apache.airavata.exception.ApplicationSettingsException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class Utils {
-    private static final Logger logger = LoggerFactory.getLogger(Utils.class);
-
-    public static String getJDBCURL() {
-        try {
-            return ServerSettings.getSetting(JPAConstants.KEY_JDBC_URL);
-        } catch (ApplicationSettingsException e) {
-            logger.error(e.getMessage(), e);
-            return null;
-        }
-    }
-
-    public static String getHost() {
-        try {
-            String jdbcURL = getJDBCURL();
-            String cleanURI = jdbcURL.substring(5);
-            URI uri = URI.create(cleanURI);
-            return uri.getHost();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            return null;
-        }
-    }
-
-    public static int getPort() {
-        try {
-            String jdbcURL = getJDBCURL();
-            String cleanURI = jdbcURL.substring(5);
-            URI uri = URI.create(cleanURI);
-            return uri.getPort();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            return -1;
-        }
-    }
-
-    public static String getJDBCUser() {
-        try {
-            return ServerSettings.getSetting(JPAConstants.KEY_JDBC_USER);
-        } catch (ApplicationSettingsException e) {
-            logger.error(e.getMessage(), e);
-            return null;
-        }
-    }
-
-    public static String getValidationQuery() {
-        try {
-            return ServerSettings.getSetting(JPAConstants.VALIDATION_QUERY);
-        } catch (ApplicationSettingsException e) {
-            logger.error(e.getMessage(), e);
-            return null;
-        }
-    }
-
-    public static String getJDBCPassword() {
-        try {
-            return ServerSettings.getSetting(JPAConstants.KEY_JDBC_PASSWORD);
-        } catch (ApplicationSettingsException e) {
-            logger.error(e.getMessage(), e);
-            return null;
-        }
-    }
-
-    public static String getJDBCDriver() {
-        try {
-            return ServerSettings.getSetting(JPAConstants.KEY_JDBC_DRIVER);
-        } catch (ApplicationSettingsException e) {
-            logger.error(e.getMessage(), e);
-            return null;
-        }
-    }
-}

Reply via email to